Allow C-c to work in backtrace in more cases
[external/binutils.git] / gdb / ChangeLog
1 2018-03-26  Tom Tromey  <tom@tromey.com>
2
3         PR cli/17716:
4         * python/py-framefilter.c (py_print_type, py_print_value)
5         (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
6         RETURN_MASK_ERROR.
7
8 2018-03-26  Tom Tromey  <tom@tromey.com>
9
10         * python/py-framefilter.c (enumerate_args): Use
11         gdb::unique_xmalloc_ptr.
12
13 2018-03-26  Tom Tromey  <tom@tromey.com>
14
15         * python/py-framefilter.c (py_print_frame): Return
16         EXT_LANG_BT_OK.
17         (gdbpy_apply_frame_filter): Update comment.
18         * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
19         Remove.
20         <EXT_LANG_BT_NO_FILTERS>: Change value.
21
22 2018-03-26  Tom Tromey  <tom@tromey.com>
23
24         PR backtrace/15582:
25         * stack.c (backtrace_command): Parse "hide" argument.
26         * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
27         * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
28         constant.
29
30 2018-03-26  Tom Tromey  <tom@tromey.com>
31
32         * stack.c (backtrace_command_1): Remove "show_locals" parameter,
33         add "flags".
34         (backtrace_command): Remove "fulltrace", add "flags".
35
36 2018-03-26  Tom Tromey  <tom@tromey.com>
37
38         * stack.c (backtrace_command): Rewrite command line parsing.
39
40 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
41
42         * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
43
44 2018-03-26  Simon Marchi  <simon.marchi@ericsson.com>
45
46         * filename-seen-cache.h: Add include guard.
47
48 2018-03-26  Keith Seitz  <keiths@redhat.com>
49
50         * symfile.c (place_section): Remove "struct" from section_addr_info
51         in comment.
52         * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
53         "struct" keyword from section_addr_info.
54
55 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
56
57         * regformats/regdef.h (reg): Add constructors.
58
59 2018-03-25  Pedro Alves  <palves@redhat.com>
60
61         * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
62         if then/else bodies in var_func_name extraction.
63
64 2018-03-23  Weimin Pan  <weimin.pan@oracle.com>
65
66         * minsyms.c (lookup_minimal_symbol_and_objfile): Use
67         lookup_minimal_symbol() to find symbol entry.
68         * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
69
70 2018-03-23  Keith Seitz  <keiths@redhat.com>
71
72         PR c++/22968
73         * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
74         nested type definitions for C++, too.
75
76 2018-03-23  Tom Tromey  <tom@tromey.com>
77
78         * machoread.c (struct oso_el): Add a constructor.  Don't define as
79         a typedef.
80         (macho_register_oso): Remove.
81         (macho_symtab_read): Take a std::vector.
82         (oso_el_compare_name): Now a std::sort comparator.
83         (macho_symfile_read_all_oso): Take a std::vector.
84         (macho_symfile_read): Use std::vector.  Remove cleanups.
85
86 2018-03-22  Tom Tromey  <tom@tromey.com>
87
88         * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
89         (record_full_goto_bookmark): Use std::string.
90
91 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
92
93         PR tdep/18295
94         * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
95         a single mask.
96
97 2018-03-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
98
99         * rs6000-tdep.c (store_insn_p): New function.
100         (skip_prologue): New variable alloca_reg_offset. Set lr_reg
101         and cr_reg to their unshifted values. Use store_insn_p to
102         match LR saves using either R1 or fdata->alloca_reg. Use
103         store_insn_p to match CR saves. Set alloca_reg_offset
104         when alloca_reg and framep are set. Remove lr_reg shift
105         when assigning to fdata->lr_register.
106
107 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
108
109         * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
110         command line args instead of emitting a warning.
111
112 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
113
114         * tracepoint.h (struct static_tracepoint_marker): Initialize
115         fields, define default constructor, move constructor and move
116         assignment, disable the rest.
117         <str_id, extra>: Make std::string.
118         (release_static_tracepoint_marker): Remove.
119         (free_current_marker): Remove.
120         * tracepoint.c (free_current_marker): Remove.
121         (parse_static_tracepoint_marker_definition): Adjust to
122         std::string, use new hex2str overload.
123         (release_static_tracepoint_marker): Remove.
124         (print_one_static_tracepoint_marker): Get marker by reference
125         and adjust to std::string.
126         (info_static_tracepoint_markers_command): Adjust to std::vector
127         changes
128         * target.h (static_tracepoint_marker_p): Remove typedef.
129         (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
130         (struct target_ops) <to_static_tracepoint_marker_at>: Return
131         bool.
132         <to_static_tracepoint_markers_by_strid>: Return std::vector.
133         * target-debug.h
134         (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
135         (target_debug_print_std_vector_static_tracepoint_marker): New.
136         (target_debug_print_struct_static_tracepoint_marker_p): Rename
137         to...
138         (target_debug_print_static_tracepoint_marker_p): ... this.
139         * target-delegates.c: Re-generate.
140         * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
141         Make std::string.
142         * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
143         (decode_static_tracepoint_spec): Adjust to std::vector.
144         (tracepoint_print_one_detail): Adjust to std::string.
145         (strace_marker_decode_location): Adjust to std::string.
146         (update_static_tracepoint): Adjust to std::string, remove call
147         to release_static_tracepoint_marker.
148         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
149         Adjust to std::vector.
150         * remote.c (remote_static_tracepoint_marker_at): Return bool.
151         (remote_static_tracepoint_markers_by_strid): Adjust to
152         std::vector.
153         * common/rsp-low.h (hex2str): New overload with explicit count
154         of bytes.
155         * common/rsp-low.c (hex2str): New overload with explicit count
156         of bytes.
157         * unittests/rsp-low-selftests.c (test_hex2str): New function.
158         (_initialize_rsp_low_selftests): Add test_hex2str test.
159         * unittests/tracepoint-selftests.c
160         (test_parse_static_tracepoint_marker_definition): Adjust to
161         std::string.
162
163 2018-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
164
165         * tracepoint.c (parse_static_tracepoint_marker_definition):
166         Consider case where the definition is followed by more
167         definitions.
168         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
169         tracepoint-selftests.c.
170         * unittests/tracepoint-selftests.c: New.
171
172 2018-03-21  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
173
174         * MAINTAINERS (Write After Approval): Add Pedro Franco de
175         Carvalho.
176
177 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
178
179         * gdb/symtab.c (find_pc_sect_line): fixed indentation.
180
181 2018-03-20  Stephen Roberts  <stephen.roberts@arm.com>
182
183         * gdb/symtab.c (find_pc_sect_line): now uses binary search.
184
185 2018-03-19  Tom Tromey  <tom@tromey.com>
186
187         * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
188         "IDENT" production.
189
190 2018-03-19  Pedro Alves  <palves@redhat.com>
191             Tom Tromey  <tom@tromey.com>
192
193         * unittests/observable-selftests.c: New file.
194         * common/observable.h: New file.
195         * observable.h: New file.
196         * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
197         arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
198         breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
199         corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
200         extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
201         infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
202         linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
203         mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
204         ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
205         python/py-breakpoint.c, python/py-finishbreakpoint.c,
206         python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
207         record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
208         riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
209         spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
210         symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
211         tui/tui-interp.c, valops.c: Update all users.
212         * tui/tui-hooks.c (tui_bp_created_observer)
213         (tui_bp_deleted_observer, tui_bp_modified_observer)
214         (tui_inferior_exit_observer, tui_before_prompt_observer)
215         (tui_normal_stop_observer, tui_register_changed_observer):
216         Remove.
217         (tui_observers_token): New global.
218         (attach_or_detach, tui_attach_detach_observers): New functions.
219         (tui_install_hooks, tui_remove_hooks): Use
220         tui_attach_detach_observers.
221         * record-btrace.c (record_btrace_thread_observer): Remove.
222         (record_btrace_thread_observer_token): New global.
223         * observer.sh: Remove.
224         * observer.c: Rename to observable.c.
225         * observable.c (namespace gdb_observers): Define new objects.
226         (observer_debug): Move into gdb_observers namespace.
227         (struct observer, struct observer_list, xalloc_observer_list_node)
228         (xfree_observer_list_node, generic_observer_attach)
229         (generic_observer_detach, generic_observer_notify): Remove.
230         (_initialize_observer): Update.
231         Don't include observer.inc.
232         * Makefile.in (generated_files): Remove observer.h, observer.inc.
233         (clean mostlyclean): Likewise.
234         (observer.h, observer.inc): Remove targets.
235         (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
236         (COMMON_SFILES): Use observable.c, not observer.c.
237         * .gitignore: Remove observer.h.
238
239 2018-03-18  Tom Tromey  <tom@tromey.com>
240
241         * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
242         gdb::def_vector.
243         (bfd_lookup_symbol_from_dyn_symtab): Likewise.
244
245 2018-03-17  Tom Tromey  <tom@tromey.com>
246
247         * auto-load.c (auto_load_objfile_script_1): Use std::string.
248
249 2018-03-17  Tom Tromey  <tom@tromey.com>
250
251         * target.c (class scoped_target_fd): New.
252         (target_fileio_close_cleanup): Remove.
253         (target_fileio_read_alloc_1): Use scoped_target_fd.
254
255 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
256
257         * silent-rules.mk: New.
258         * Makefile.in: Include silent-rules.mk
259         (srcdir, VPATH, top_srcdir): Move up.
260         (COMPILE): Add ECHO_CXX.
261         (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
262         (init.c): Add ECHO_INIT_C.
263         (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
264         (version.c): Add ECHO_GEN.
265         (printcmd.o): Add ECHO_CXX.
266         (target-float.o): Add ECHO_CXX.
267         (ada-exp.o): Add ECHO_CXX.
268         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
269         (insight$(EXEEXT)): Add ECHO_CXXLD.
270         * gnulib/configure.ac: Add AM_SILENT_RULES.
271         * gnulib/aclocal.m4: Re-generate.
272         * gnulib/configure: Re-generate.
273         * gnulib/import/Makefile.in: Re-generate.
274
275 2018-03-16  Tom Tromey  <tom@tromey.com>
276
277         * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
278         * utils.h (make_cleanup_free_section_addr_info): Don't declare.
279         * utils.c (do_free_section_addr_info)
280         (make_cleanup_free_section_addr_info): Remove.
281         * symfile.h (struct other_sections): Add constructor.
282         (struct section_addr_info): Remove.
283         (section_addr_info): New typedef.
284         (struct sym_fns) <sym_offsets>: Change type of parameter.
285         (build_section_addr_info_from_objfile)
286         (relative_addr_info_to_section_offsets, addr_info_make_relative)
287         (default_symfile_offsets, symbol_file_add)
288         (symbol_file_add_from_bfd)
289         (build_section_addr_info_from_section_table): Update.
290         (alloc_section_addr_info, free_section_addr_info): Don't declare.
291         * symfile.c (alloc_section_addr_info): Remove.
292         (build_section_addr_info_from_section_table): Change return type.
293         Update.
294         (build_section_addr_info_from_bfd)
295         (build_section_addr_info_from_objfile): Likewise.
296         (free_section_addr_info): Remove.
297         (relative_addr_info_to_section_offsets): Change type of "addrs".
298         (addrs_section_compar): Now a std::sort comparator.
299         (addrs_section_sort): Change return type.
300         (addr_info_make_relative): Change type of "addrs".  Update.
301         (default_symfile_offsets, syms_from_objfile_1)
302         (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
303         (symbol_file_add_separate): Update.
304         (symbol_file_add): Change type of "addrs".  Update.
305         (add_symbol_file_command): Update.  Remove cleanups.
306         * symfile-mem.c (symbol_file_add_from_memory): Update.  Remove
307         cleanups.
308         * symfile-debug.c (debug_sym_offsets): Change type of "info".
309         * solib.c (solib_read_symbols): Update.
310         * objfiles.c (objfile_relocate): Update.  Remove cleanups.
311         * machoread.c (macho_symfile_offsets): Update.
312         * jit.c (jit_bfd_try_read_symtab): Update.
313
314 2018-03-15  Simon Marchi  <simon.marchi@polymtl.ca>
315
316         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
317         unittests/utils-selftests.c.
318         * unittests/utils-selftests.c: New file.
319
320 2018-03-14  Tom Tromey  <tom@tromey.com>
321
322         PR cli/14977:
323         * printcmd.c (printf_c_string, printf_wide_c_string): Special case
324         for NULL.
325
326 2018-03-14  Tom Tromey  <tom@tromey.com>
327
328         PR cli/19918:
329         * printcmd.c (printf_pointer): Allow "-" in format.
330
331 2018-03-14  Tom Tromey  <tom@tromey.com>
332
333         * printcmd.c (_initialize_printcmd): Add usage to printf.
334
335 2018-03-14  Yao Qi  <qiyao@sourceware.org>
336
337         * MAINTAINERS: Update my email address.
338
339 2018-03-13  Tom Tromey  <tom@tromey.com>
340
341         * machoread.c (macho_check_dsym): Change filenamep to a
342         std::string*.
343         (macho_symfile_read): Update.
344         * symfile.c (load_command): Use std::string.
345
346 2018-03-12  Andrew Burgess  <andrew.burgess@embecosm.com>
347
348         * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
349         to error message string.
350         (riscv_register_name): Use xsnprintf instead of sprintf.
351         (riscv_insn::fetch_instruction): Use gdb_assert instead of
352         internal_error.
353         (riscv_print_arg_location): Use gdb_assert_not_reached instead of
354         error.
355         (riscv_push_dummy_call): Likewise.
356
357 2018-03-12  Tom Tromey  <tom@tromey.com>
358
359         * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
360         Use gdb::byte_vector.
361         * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
362
363 2018-03-12  Yao Qi  <yao.qi@linaro.org>
364
365         * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
366         parameter type to readable_regcache.
367         * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
368         the declaration.
369
370 2018-03-11  Tom Tromey  <tom@tromey.com>
371
372         * dwarf2read.c (struct nextfield): Add initializers.
373         (struct nextfnfield): Remove.
374         (struct fnfieldlist): Add initializers.  Remove "length" and
375         "head", use std::vector.
376         (struct decl_field_list): Remove.
377         (struct field_info): Add initializers.
378         <fields, baseclasses>: Now std::vector.
379         <nbaseclasses, nfnfields, typedef_field_list_count,
380         nested_types_list_count>: Remove.
381         (dwarf2_add_field, dwarf2_add_type_defn)
382         (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
383         (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
384         (process_structure_scope): Update.
385
386 2018-03-11  Tom Tromey  <tom@tromey.com>
387
388         * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
389         for use by std::sort.
390         (build_type_psymtabs_1): Use std::vector.
391
392 2018-03-09  Eli Zaretskii  <eliz@gnu.org>
393
394         * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
395         and LIBMPFR in the printed configuration.
396
397 2018-03-08  Tom Tromey  <tom@tromey.com>
398
399         * source.c (get_filename_and_charpos): Use scoped_fd.
400         * nto-procfs.c (procfs_open_1): Use scoped_fd.
401         (procfs_pidlist): Likewise.
402         * procfs.c (proc_get_LDT_entry): Use scoped_fd.
403         (iterate_over_mappings): Likewise.
404
405 2018-03-08  Tom Tromey  <tom@tromey.com>
406
407         * infcall.c (struct call_return_meta_info)
408         <stack_temporaries_enabled>: Remove.
409         (get_call_return_value, call_function_by_hand_dummy): Update.
410         * thread.c (disable_thread_stack_temporaries): Remove.
411         (enable_thread_stack_temporaries): Remove.
412         (thread_stack_temporaries_enabled_p): Return bool.
413         (push_thread_stack_temporary, value_in_thread_stack_temporaries)
414         (get_last_thread_stack_temporary): Update.
415         * eval.c (evaluate_subexp): Update.
416         * gdbthread.h (class enable_thread_stack_temporaries): Now a
417         class, not a function.
418         (value_ptr, value_vec): Remove typedefs.
419         (class thread_info) <stack_temporaries_enabled>: Now bool.
420         <stack_temporaries>: Now a std::vector.
421         (thread_stack_temporaries_enabled_p)
422         (value_in_thread_stack_temporaries): Return bool.
423
424 2018-03-08  Simon Marchi  <simon.marchi@ericsson.com>
425
426         * remote.c (putpkt_binary): Fix omitted bytes reporting.
427         (getpkt_or_notif_sane_1): Likewise.
428
429 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
430
431         * build-id.c (build_id_to_debug_bfd): Use std::string.
432
433 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
434
435         * build-id.c (find_separate_debug_file_by_buildid): Return
436         std::string.
437         * build-id.h (find_separate_debug_file_by_buildid): Return
438         std::string.
439         * coffread.c (coff_symfile_read): Adjust to std::string.
440         * elfread.c (elf_symfile_read): Adjust to std::string.
441         * symfile.c (separate_debug_file_exists): Change parameter to
442         std::string.
443         (find_separate_debug_file): Return std::string.
444         (find_separate_debug_file_by_debuglink): Return std::string.
445         * symfile.h (find_separate_debug_file_by_debuglink): Return
446         std::string.
447
448 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
449
450         * common/xml-utils.c (xml_escape_text): Move code to...
451         (xml_escape_text_append): ... this new function.
452         * common/xml-utils.h (xml_escape_text_append): New declaration.
453         * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
454         New function.
455         (_initialize_xml_utils): register test_xml_escape_text_append as
456         a selftest.
457
458 2018-03-07  Alan Hayward  <alan.hayward@arm.com>
459
460         * defs.h: Remove MAX_REGISTER_SIZE.
461         * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
462         asserts.
463         * python/py-unwind.c (pyuw_sniffer): Likewise.
464
465 2018-03-07  Tom Tromey  <tom@tromey.com>
466
467         * linux-tdep.c (linux_info_proc): Update.
468         * target.h (struct target_ops) <to_fileio_readlink>: Return
469         optional<string>.
470         (target_fileio_readlink): Return optional<string>.
471         * remote.c (remote_hostio_readlink): Return optional<string>.
472         * inf-child.c (inf_child_fileio_readlink): Return
473         optional<string>.
474         * target.c (target_fileio_readlink): Return optional<string>.
475
476 2018-03-07  Andrew Burgess  <andrew.burgess@embecosm.com>
477
478         * regcache.c (cooked_read_test): Add riscv to the list of
479         architectures that have a save_reggroup.
480
481 2018-03-07  Andreas Arnez  <arnez@linux.vnet.ibm.com>
482
483         * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
484         value is not a dynamic class object.
485
486 2018-03-06  Tom Tromey  <tom@tromey.com>
487
488         * rust-exp.y: Formatting fixes.
489
490 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
491
492         * riscv-tdep.c (riscv_register_name): Remove target description
493         support.
494         (riscv_gdbarch_init): Remove target description check.
495
496 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
497
498         * riscv-tdep.c: Remove 'Contributed by ...' lines from header
499         comment.
500         * riscv-tdep.h: Likewise.
501
502 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
503
504         * riscv-tdep.c (riscv_pseudo_register_read): Delete.
505         (riscv_pseudo_register_write): Delete.
506         (riscv_gdbarch_init): Remove all use of pseudo registers.
507
508 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
509
510         * record-btrace.c (btrace_print_lines): Replace cleanup
511         parameter with RAII equivalents.
512         (btrace_insn_history): Replace cleanup with RAII equivalents.
513         * ui-out.h (make_cleanup_ui_out_list_begin_end,
514         make_cleanup_ui_out_tuple_begin_end): Remove.
515         * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
516         make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
517         make_cleanup_ui_out_list_begin_end): Remove.
518
519 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
520
521         * record-btrace.c (record_btrace_maybe_mark_async_event): Change
522         parameter types to std::vector.  Use bool.
523         (record_btrace_wait): Replace VEC(tp_t) with
524         std::vector<thread_info *>.
525         * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
526
527 2018-03-06  Simon Marchi  <simon.marchi@polymtl.ca>
528
529         * record-btrace.c (record_btrace_disable_callback): Remove.
530         (struct scoped_btrace_disable): New.
531         (record_btrace_open): Use scoped_btrace_disable.
532
533 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
534
535         * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
536         reading values from registers.
537
538 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
539
540         * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
541         where appropriate.
542
543 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
544
545         * riscv-tdep.c (riscv_print_arg_location): Add header comment,
546         change parameter type.  Use GDB's print functions, and use
547         core_addr_to_string where appropriate.
548         (riscv_push_dummy_call): Use core_addr_to_string where
549         appropriate, update call to riscv_print_arg_location, and reindent
550         a few lines.
551         (riscv_return_value): Update call to riscv_print_arg_location.
552
553 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
554             Tim Newsome <tim@sifive.com>
555             Albert Ou <a0u@eecs.berkeley.edu>
556             Darius Rad <darius@bluespec.com>
557
558         * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
559         (HFILES_NO_SRCDIR): Add riscv-tdep.h.
560         (ALLDEPFILES): Add riscv-tdep.c
561         * configure.tgt: Add riscv support.
562         * riscv-tdep.c: New file.
563         * riscv-tdep.h: New file.
564         * NEWS: Mention new target.
565         * MAINTAINERS: Add entry for riscv.
566
567 2018-03-06  Andrew Burgess  <andrew.burgess@embecosm.com>
568
569         * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
570         fields within aggregates.
571
572 2018-03-04  Simon Marchi  <simon.marchi@polymtl.ca>
573
574         * record-btrace.c (btrace_print_lines): Change type of flags to
575         gdb_disassembly_flags.
576
577 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
578
579         * fbsd-nat.c: Include "inf-ptrace.h".
580         (USE_SIGTRAP_SIGINFO): Conditionally define.
581         [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
582         (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
583         [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
584         function.
585         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
586         Likewise.
587         [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
588         Likewise.
589         (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
590         "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
591         "supports_stopped_by_hw_breakpoint" target methods.
592
593 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
594
595         * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
596         * fbsd-nat.c (debug_fbsd_nat): New variable.
597         (show_fbsd_nat_debug): New function.
598         (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
599         (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
600
601 2018-03-04  John Baldwin  <jhb@FreeBSD.org>
602
603         * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
604         * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
605         prototype.
606         * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
607         (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
608         method.
609
610 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
611
612         * common/gdb_vecs.c (free_char_ptr_vec): Remove.
613         * common/gdb_vecs.h (free_char_ptr_vec): Remove.
614
615 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
616
617         * charset.c (struct charset_vector): New.
618         (charsets): Change type to charset_vector.
619         (find_charset_names): Adjust.
620         (add_one): Adjust.
621         (_initialize_charset): Adjust.
622
623 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
624
625         * progspace.h (struct program_space) <deleted_solibs>: Change
626         type to std::vector<std::string>.
627         * progspace.c (clear_program_space_solib_cache): Adjust.
628         * breakpoint.c (print_solib_event): Adjust.
629         (check_status_catch_solib): Adjust.
630         * solib.c (update_solib_list): Adjust.
631         * ui-out.h (class ui_out) <field_string>: New overload.
632         * ui-out.c (ui_out::field_string): New overload.
633
634 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
635
636         * progspace.h (struct program_space): Add constructor and
637         destructor, initialize fields.
638         (add_program_space): Remove.
639         * progspace.c (add_program_space): Rename to...
640         (program_space::program_space): ... this.
641         (release_program_space): Rename to...
642         (program_space::~program_space): ... this.
643         (delete_program_space): Use delete to delete program_space.
644         (initialize_progspace): Use new to allocate program_space.
645         * inferior.c (add_inferior_with_spaces): Likewise.
646         (clone_inferior_command): Likewise.
647         * infrun.c (follow_fork_inferior): Likewise.
648         (handle_vfork_child_exec_or_exit): Likewise.
649
650 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
651
652         * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
653         (delim_string_to_char_ptr_vec): Return std::vector of
654         gdb::unique_xmalloc_ptr.
655         (dirnames_to_char_ptr_vec_append): Take std::vector of
656         gdb::unique_xmalloc_ptr.
657         (dirnames_to_char_ptr_vec): Return std::vector of
658         gdb::unique_xmalloc_ptr.
659         * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
660         Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
661         (delim_string_to_char_ptr_vec): Return an std::vector of
662         gdb::unique_xmalloc_ptr, adjust the code.
663         (dirnames_to_char_ptr_vec_append): Take an std::vector of
664         gdb::unique_xmalloc_ptr, adjust the code.
665         (dirnames_to_char_ptr_vec): Return an std::vector of
666         gdb::unique_xmalloc_ptr, adjust the code.
667         * auto-load.c (auto_load_safe_path_vec): Change type to
668         std::vector of gdb::unique_xmalloc_ptr.
669         (auto_load_expand_dir_vars): Return an std::vector of
670         gdb::unique_xmalloc_ptr, adjust the code.
671         (auto_load_safe_path_vec_update): Adjust.
672         (filename_is_in_auto_load_safe_path_vec): Adjust.
673         (auto_load_objfile_script_1): Adjust.
674         * build-id.c (build_id_to_debug_bfd): Adjust.
675         * linux-thread-db.c (thread_db_load_search): Adjust.
676         * source.c (add_path): Adjust.
677         (openp): Adjust.
678         * symfile.c (find_separate_debug_file): Adjust.
679         * utils.c (do_free_char_ptr_vec): Remove.
680         (make_cleanup_free_char_ptr_vec): Remove.
681
682 2018-03-01  Sergio Durigan Junior  <sergiodj@redhat.com>
683
684         PR gdb/22907
685         * common/pathstuff.c: Conditionally include "<windows.h>".
686
687 2018-03-01  Georg Sauthoff  <mail@georg.so>
688
689         PR gdb/22888
690         * gcore.in: Quote variables and switch interpreter to bash.
691
692 2018-03-01  Tom Tromey  <tom@tromey.com>
693
694         * dwarf2read.c (alloc_discriminant_info): Fix default_index
695         assertion.  Add assertion for discriminant_index.
696         (quirk_rust_enum): Use correct base type name in univariant case.
697
698 2018-03-01  Simon Marchi  <simon.marchi@ericsson.com>
699
700         * record.c (get_call_history_modifiers): Return a
701         record_print_flags.
702         (cmd_record_call_history): Adjust.
703         * record-btrace.c (record_btrace_call_history): Adjust.
704         (record_btrace_call_history_range): Adjust.
705         (record_btrace_call_history_from): Adjust.
706         * target-debug.h (target_debug_print_record_print_flags): New.
707         * target-delegates.c: Re-generate.
708         * target.c (target_call_history): Change flags type.
709         (target_call_history_from): Likewise.
710         (target_call_history_range): Likewise.
711         * target.h (struct target_ops) <target_call_history>: Likewise.
712         (target_call_history_from): Likewise.
713         (target_call_history_range): Likewise.
714
715 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
716             Simon Marchi  <simon.marchi@polymtl.ca>
717
718         * common/common-utils.c: Include "sys/stat.h".
719         (is_regular_file): Move here from "source.c"; change return
720         type to "bool".
721         * common/common-utils.h (is_regular_file): New prototype.
722         * common/pathstuff.c (contains_dir_separator): New function.
723         * common/pathstuff.h (contains_dir_separator): New prototype.
724         * source.c: Don't include "sys/stat.h".
725         (is_regular_file): Move to "common/common-utils.c".
726
727 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
728
729         * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
730         (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
731         * auto-load.c: Include "common/pathstuff.h".
732         * common/common-def.h (current_directory): Move here.
733         * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
734         function.
735         * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
736         prototype.
737         * common/pathstuff.c: New file.
738         * common/pathstuff.h: New file.
739         * compile/compile.c: Include "common/pathstuff.h".
740         * defs.h (current_directory): Move to "common/common-defs.h".
741         * dwarf2read.c: Include "common/pathstuff.h".
742         * exec.c: Likewise.
743         * guile/scm-safe-call.c: Likewise.
744         * linux-thread-db.c: Likewise.
745         * main.c: Likewise.
746         * nto-tdep.c: Likewise.
747         * objfiles.c: Likewise.
748         * source.c: Likewise.
749         * symtab.c: Likewise.
750         * utils.c: Include "common/pathstuff.h".
751         (gdb_realpath): Move to "common/pathstuff.c".
752         (gdb_realpath_keepfile): Likewise.
753         (gdb_abspath): Likewise.
754         * utils.h (gdb_realpath): Move to "common/pathstuff.h".
755         (gdb_realpath_keepfile): Likewise.
756         (gdb_abspath): Likewise.
757
758 2018-02-28  John Baldwin  <jhb@FreeBSD.org>
759
760         * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
761         wildcard process pid for super_resume for kernels with a
762         specific bug.
763
764 2018-02-27  Phil Muldoon  <pmuldoon@redhat.com>
765
766         * compile/compile.c (get_args): Add additional comments
767         explaining function.
768
769 2018-02-27  Simon Marchi  <simon.marchi@polymtl.ca>
770             Tom Tromey  <tom@tromey.com>
771
772         * target.h (memory_write_request_s): Remove typedef.  Don't define
773         VEC.
774         (target_write_memory_blocks): Change argument to std::vector.
775         (struct memory_write_request): Add constructor.
776         * target-memory.c (compare_block_starting_address): Return bool.
777         Change argument types.
778         (claim_memory): Change arguments to use std::vector.
779         (split_regular_and_flash_blocks, blocks_to_erase)
780         (compute_garbled_blocks): Likewise.
781         (cleanup_request_data, cleanup_write_requests_vector): Remove.
782         (target_write_memory_blocks): Change argument to std::vector.
783         * symfile.c (struct load_section_data): Add constructor and
784         destructor.  Use std::vector for "requests".
785         (struct load_progress_data): Add initializers.
786         (load_section_callback): Update.  Use "new".
787         (clear_memory_write_data): Remove.
788         (generic_load): Update.
789
790 2018-02-27  Alan Hayward  <alan.hayward@arm.com>
791
792         * arch/aarch64.h: Use common/tdesc.h.
793
794 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
795
796         * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
797         architecture with a 64-bit ABI.
798
799 2018-02-26  Maciej W. Rozycki  <macro@mips.com>
800
801         * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
802         ahead of target description loading.
803
804 2018-02-26  Tom Tromey  <tom@tromey.com>
805
806         * stack.c (backtrace_command_1): Update.
807         * python/python-internal.h (gdbpy_apply_frame_filter): Change type
808         of "flags".
809         * python/py-framefilter.c (py_print_frame)
810         (gdbpy_apply_frame_filter): Change type of "flags".
811         * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
812         of "flags".
813         (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
814         (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
815         * extension.h (enum frame_filter_flag): Rename from
816         frame_filter_flags.
817         (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
818         (apply_ext_lang_frame_filter): Change type of "flags".
819         * extension.c (apply_ext_lang_frame_filter): Change type of
820         "flags".
821         * extension-priv.h (struct extension_language_ops)
822         <apply_frame_filter>: Change type of "flags".
823
824 2018-02-26  Tom Tromey  <tom@tromey.com>
825
826         PR python/16497:
827         * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag.  Fix
828         off-by-one in py_end computation.
829         * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
830         PRINT_MORE_FRAMES.
831         * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
832         constant.
833
834 2018-02-26  Tom Tromey  <tom@tromey.com>
835
836         * dwarf2read.c (struct variant_field): New.
837         (struct nextfield) <variant>: New field.
838         (dwarf2_add_field): Handle DW_TAG_variant_part.
839         (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
840         discriminated union.
841         (read_structure_type): Handle DW_TAG_variant_part.
842         (handle_struct_member_die): New function, extracted from
843         process_structure_scope.  Handle DW_TAG_variant.
844         (process_structure_scope): Handle discriminated unions.  Call
845         handle_struct_member_die.
846
847 2018-02-26  Tom Tromey  <tom@tromey.com>
848
849         * rust-lang.h (rust_last_path_segment): Declare.
850         * rust-lang.c (rust_last_path_segment): Now public.  Change
851         contract.
852         (struct disr_info): Remove.
853         (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
854         (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
855         (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
856         (rust_enum_p, rust_enum_variant): New function.
857         (rust_underscore_fields): Remove "offset" parameter.
858         (rust_print_enum): New function.
859         (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
860         <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
861         (rust_print_struct_def): Add "for_rust_enum" parameter.  Handle
862         enums.
863         (rust_internal_print_type): New function, from rust_print_type.
864         Remove enum code.
865         (rust_print_type): Call rust_internal_print_type.
866         (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
867         Update enum handling.
868         * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
869         (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
870         (rust_union_quirks): New functions.
871         (process_full_comp_unit, process_full_type_unit): Call
872         rust_union_quirks.
873         (process_structure_scope): Update rust_unions if necessary.
874
875 2018-02-26  Tom Tromey  <tom@tromey.com>
876
877         * value.h (value_union_variant): Declare.
878         * valops.c (value_union_variant): New function.
879         * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
880         (struct discriminant_info): New.
881         (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
882         enumerator.
883         (struct main_type) <flag_discriminated_union>: New field.
884
885 2018-02-26  Tom Tromey  <tom@tromey.com>
886
887         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
888         unittests/unpack-selftests.c.
889         * unittests/unpack-selftests.c: New file.
890         * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
891
892 2018-02-26  Yao Qi  <yao.qi@linaro.org>
893
894         * dwarf2read.c (struct partial_die_info) <read>: New method.
895         (read_partial_die): Remove the declaration.
896         (load_partial_dies): Update.
897         (partial_die_info::partial_die_info):
898         (read_partial_die): Change it to partial_die_info::read.
899
900 2018-02-26  Yao Qi  <yao.qi@linaro.org>
901
902         * dwarf2read.c (struct partial_die_info) <fixup>: New method.
903         (fixup_partial_die): Remove declaration.
904         (scan_partial_symbols): Update.
905         (partial_die_parent_scope): Likewise.
906         (partial_die_full_name): Likewise.
907         (fixup_partial_die): Change it to partial_die_info::fixup.
908
909 2018-02-26  Yao Qi  <yao.qi@linaro.org>
910
911         * dwarf2read.c (read_partial_die): Update the declaration.
912         (load_partial_dies): Caller update.
913         (read_partial_die): Remove one argument abbrev_len.
914
915 2018-02-26  Yao Qi  <yao.qi@linaro.org>
916
917         * dwarf2read.c (struct partial_die_info): Add ctor, delete
918         assignment operator.
919         (load_partial_dies): Use ctor and copy ctor.
920         (read_partial_die): Update.
921         (dwarf2_cu::find_partial_die): Use ctor.
922
923 2018-02-26  Yao Qi  <yao.qi@linaro.org>
924
925         * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
926         (find_partial_die_in_comp_unit): Change it to
927         dwarf2_cu::find_partial_die.
928         (find_partial_die): Update.
929
930 2018-02-26  Yao Qi  <yao.qi@linaro.org>
931
932         * dwarf2read.c (read_partial_die): Remove the code checking abbrev
933         is NULL.
934
935 2018-02-26  Yao Qi  <yao.qi@linaro.org>
936
937         * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
938
939 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
940
941         * arch/amd64.h: Use common/tdesc.h.
942         * arch/i386.c: Likewise.
943         * arch/i386.h: Likewise.
944         * arch/tic6x.c: Likewise.
945         * arch/tdesc.h: Move file from here...
946         * common/tdesc.h: ...to here.
947         * features/aarch64-core.c: Regenerate.
948         * features/aarch64-fpu.c: Regenerate.
949         * features/i386/32bit-avx.c: Regenerate.
950         * features/i386/32bit-avx512.c: Regenerate.
951         * features/i386/32bit-core.c: Regenerate.
952         * features/i386/32bit-linux.c: Regenerate.
953         * features/i386/32bit-mpx.c: Regenerate.
954         * features/i386/32bit-pkeys.c: Regenerate.
955         * features/i386/32bit-sse.c: Regenerate.
956         * features/i386/64bit-avx.c: Regenerate.
957         * features/i386/64bit-avx512.c: Regenerate.
958         * features/i386/64bit-core.c: Regenerate.
959         * features/i386/64bit-linux.c: Regenerate.
960         * features/i386/64bit-mpx.c: Regenerate.
961         * features/i386/64bit-pkeys.c: Regenerate.
962         * features/i386/64bit-segments.c: Regenerate.
963         * features/i386/64bit-sse.c: Regenerate.
964         * features/i386/x32-core.c: Regenerate.
965         * features/tic6x-c6xp.c: Regenerate.
966         * features/tic6x-core.c: Regenerate.
967         * features/tic6x-gp.c: Regenerate.
968         * target-descriptions.c: Use common/tdesc.h.
969         * target-descriptions.h: Likewise.
970
971 2018-02-24  Tom Tromey  <tom@tromey.com>
972
973         * linux-thread-db.c (try_thread_db_load_from_pdir_1)
974         (try_thread_db_load_from_dir, thread_db_load_search): Use
975         std::string.
976         (info_auto_load_libthread_db_compare): Return bool.  Change
977         argument types.
978         (info_auto_load_libthread_db): Use std::vector, std::string.
979         Remove cleanups.
980
981 2018-02-24  Tom Tromey  <tom@tromey.com>
982
983         * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
984         std::string.
985         * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
986         std::string*.
987         * gdbarch.c: Rebuild.
988         * gdbarch.h: Rebuild.
989         * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
990         * arch-utils.h (default_fast_tracepoint_valid_at): Update.
991         * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
992         std::string*.
993
994 2018-02-23  Simon Marchi  <simon.marchi@polymtl.ca>
995
996         * gdbtypes.h (sect_offset): Change type to uint64_t.
997         (sect_offset_str): New function.
998         * dwarf2read.c (create_addrmap_from_aranges): Use
999         sect_offset_str.
1000         (error_check_comp_unit_head): Likewise.
1001         (create_debug_type_hash_table): Likewise.
1002         (read_cutu_die_from_dwo): Likewise.
1003         (init_cutu_and_read_dies): Likewise.
1004         (init_cutu_and_read_dies_no_follow): Likewise.
1005         (process_psymtab_comp_unit_reader): Likewise.
1006         (partial_die_parent_scope): Likewise.
1007         (peek_die_abbrev): Likewise.
1008         (process_queue): Likewise.
1009         (dwarf2_physname): Likewise.
1010         (read_namespace_alias): Likewise.
1011         (read_import_statement): Likewise.
1012         (create_dwo_cu_reader): Likewise.
1013         (create_cus_hash_table): Likewise.
1014         (lookup_dwo_cutu): Likewise.
1015         (inherit_abstract_dies): Likewise.
1016         (read_func_scope): Likewise.
1017         (read_call_site_scope): Likewise.
1018         (dwarf2_add_member_fn): Likewise.
1019         (read_common_block): Likewise.
1020         (read_module_type): Likewise.
1021         (read_typedef): Likewise.
1022         (read_subrange_type): Likewise.
1023         (load_partial_dies): Likewise.
1024         (read_partial_die): Likewise.
1025         (find_partial_die): Likewise.
1026         (read_str_index): Likewise.
1027         (dwarf2_string_attr): Likewise.
1028         (build_error_marker_type): Likewise.
1029         (lookup_die_type): Likewise.
1030         (dump_die_shallow): Likewise.
1031         (follow_die_ref): Likewise.
1032         (dwarf2_fetch_die_loc_sect_off): Likewise.
1033         (dwarf2_fetch_constant_bytes): Likewise.
1034         (follow_die_sig): Likewise.
1035         (get_signatured_type): Likewise.
1036         (get_DW_AT_signature_type): Likewise.
1037         (dwarf2_find_containing_comp_unit): Likewise.
1038         (set_die_type): Likewise.
1039
1040 2018-02-21  John Baldwin  <jhb@FreeBSD.org>
1041
1042         * arch/aarch64.c: Include "common-defs.h".
1043         * arch/amd64.c: Likewise.
1044         * arch/i386.c: Likewise.
1045
1046 2018-02-21  Tom Tromey  <tom@tromey.com>
1047
1048         * value.h: (extract_field_op): Update.
1049         * eval.c (extract_field_op): Return a const char *.
1050         * expression.h (parse_expression_for_completion): Update.
1051         * completer.c (complete_expression): Update.
1052         (add_struct_fields): Make fieldname const.
1053         * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
1054         (mark_completion_tag, parse_exp_in_context_1): Update.
1055         (parse_expression_for_completion): Change "name" to
1056         unique_xmalloc_ptr*.
1057
1058 2018-02-21  Tom Tromey  <tom@tromey.com>
1059
1060         * infcall.c (call_function_by_hand_dummy): Use std::vector.
1061
1062 2018-02-21  Yao Qi  <yao.qi@linaro.org>
1063
1064         * avr-tdep.c (avr_read_pc): Change parameter type to
1065         readable_regcache.
1066         * gdbarch.sh (read_pc): Likewise.
1067         * gdbarch.c: Re-generated.
1068         * gdbarch.h: Re-generated.
1069         * hppa-tdep.c (hppa_read_pc): Change parameter type to
1070         readable_regcache.
1071         * ia64-tdep.c (ia64_read_pc): Likewise.
1072         * mips-tdep.c (mips_read_pc): Likewise.
1073         * spu-tdep.c (spu_read_pc): Likewise.
1074
1075 2018-02-21  Yao Qi  <yao.qi@linaro.org>
1076
1077         * Makefile.in (COMMON_SFILES): Add regcache-dump.c
1078         * regcache-dump.c: New file.
1079         * regcache.c: Move register_dump to regcache-dump.c.
1080         (maintenance_print_registers): Likewise.
1081         (maintenance_print_raw_registers): Likewise.
1082         (maintenance_print_cooked_registers): Likewise.
1083         (maintenance_print_register_groups): Likewise.
1084         (maintenance_print_remote_registers): Likewise.
1085         (_initialize_regcache): Likewise.
1086         * regcache.h (register_dump): Moved from regcache.c.
1087
1088 2018-02-21  Yao Qi  <yao.qi@linaro.org>
1089
1090         * regcache.c (regcache::regcache): Update.
1091         (regcache::invalidate): Move it to detached_regcache::invalidate.
1092         (get_thread_arch_aspace_regcache): Update.
1093         (regcache::raw_update): Update.
1094         (regcache::cooked_read): Remove some code.
1095         (regcache::cooked_read_value): Likewise.
1096         (regcache::raw_write): Remove assert on m_readonly_p.
1097         (regcache::raw_supply_integer): Move it to
1098         detached_regcache::raw_supply_integer.
1099         (regcache::raw_supply_zeroed): Likewise.
1100         * regcache.h (detached_regcache) <raw_supply_integer>: New
1101         declaration.
1102         <raw_supply_zeroed, invalidate>: Likewise.
1103         (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
1104         <invalidate>: Likewise.
1105         <m_readonly_p>: Removed.
1106
1107 2018-02-21  Yao Qi  <yao.qi@linaro.org>
1108
1109         * infcmd.c (get_return_value): Let stop_regs point to
1110         get_current_regcache.
1111         * regcache.c (regcache::regcache): Remove.
1112         (register_dump_reg_buffer): New class.
1113         (regcache_print): Adjust.
1114         * regcache.h (regcache): Remove constructors.
1115
1116 2018-02-21  Yao Qi  <yao.qi@linaro.org>
1117
1118         * regcache.c (class register_dump): New class.
1119         (register_dump_regcache, register_dump_none): New class.
1120         (register_dump_remote, register_dump_groups): New class.
1121         (regcache_print): Update.
1122         * regcache.h (regcache_dump_what): Move it to regcache.c.
1123         (regcache) <dump>: Remove.
1124
1125 2018-02-21  Yao Qi  <yao.qi@linaro.org>
1126
1127         * jit.c (struct jit_unwind_private) <regcache>: Change its type to
1128          reg_buffer_rw *.
1129         (jit_unwind_reg_set_impl): Call raw_supply.
1130         (jit_frame_sniffer): Use reg_buffer_rw.
1131         * record-full.c (record_full_core_regbuf): Change its type.
1132         (record_full_core_open_1): Use reg_buffer_rw.
1133         (record_full_close): Likewise.
1134         (record_full_core_fetch_registers): Use regcache->raw_supply.
1135         (record_full_core_store_registers): Likewise.
1136         * regcache.c (regcache::get_register_status): Move it to
1137         reg_buffer.
1138         (regcache_raw_set_cached_value): Remove.
1139         (regcache::raw_set_cached_value): Remove.
1140         (regcache::raw_write): Call raw_supply.
1141         (regcache::raw_supply): Move it to reg_buffer_rw.
1142         * regcache.h (regcache_raw_set_cached_value): Remove.
1143         (reg_buffer_rw): New class.
1144
1145 2018-02-21  Yao Qi  <yao.qi@linaro.org>
1146
1147         * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
1148         readonly_detached_regcache.
1149         (dummy_frame_prev_register): Use regcache->cooked_read.
1150         * frame.c (frame_save_as_regcache): Change return type.
1151         (frame_pop): Update.
1152         * frame.h (frame_save_as_regcache): Update declaration.
1153         * inferior.h (get_infcall_suspend_state_regcache): Update
1154         declaration.
1155         * infrun.c (infcall_suspend_state) <registers>: use
1156         readonly_detached_regcache.
1157         (save_infcall_suspend_state): Don't use regcache_dup.
1158         (get_infcall_suspend_state_regcache): Change return type.
1159         * linux-fork.c (struct fork_info) <savedregs>: Change to
1160         readonly_detached_regcache.
1161         <pc>: New field.
1162         (fork_save_infrun_state): Don't use regcache_dup.
1163         (info_checkpoints_command): Adjust.
1164         * mi/mi-main.c (register_changed_p): Update declaration.
1165         (mi_cmd_data_list_changed_registers): Use
1166         readonly_detached_regcache.
1167         (register_changed_p): Change parameter type to
1168         readonly_detached_regcache.
1169         * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
1170         readonly_detached_regcache.
1171         (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
1172         * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
1173         New.
1174         (regcache::save): Move it to reg_buffer.
1175         (regcache::restore): Change parameter type.
1176         (regcache_dup): Remove.
1177         * regcache.h (reg_buffer) <save>: New method.
1178         (readonly_detached_regcache): New class.
1179         * spu-tdep.c (spu2ppu_cache) <regcache>: Use
1180         readonly_detached_regcache.
1181         (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
1182
1183 2018-02-21  Yao Qi  <yao.qi@linaro.org>
1184
1185         * frame.c (frame_save_as_regcache): Use regcache method save.
1186         (frame_pop): Use regcache method restore.
1187         * infrun.c (restore_infcall_suspend_state): Likewise.
1188         * linux-fork.c (fork_load_infrun_state): Likewise.
1189         * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
1190         save.
1191         * regcache.c (regcache_save): Remove.
1192         (regcache::restore): More asserts.
1193         (regcache_cpy): Remove.
1194         * regcache.h (regcache_save): Remove the declaration.
1195         (regcache::restore): Move from private to public.
1196         Remove the friend declaration of regcache_cpy.
1197         (regcache_cpy): Remove declaration.
1198
1199 2018-02-21  Yao Qi  <yao.qi@linaro.org>
1200
1201         * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
1202         parameter type to 'readable_regcache *'.
1203         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
1204         * arm-tdep.c (arm_neon_quad_read): Likewise.
1205         (arm_pseudo_read): Likewise.
1206         * avr-tdep.c (avr_pseudo_register_read): Likewise.
1207         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
1208         * frv-tdep.c (frv_pseudo_register_read): Likewise.
1209         * gdbarch.c: Re-generated.
1210         * gdbarch.h: Re-generated.
1211         * gdbarch.sh (pseudo_register_read): Change parameter type to
1212         'readable_regcache *'.
1213         (pseudo_register_read_value): Likewise.
1214         * h8300-tdep.c (pseudo_from_raw_register): Likewise.
1215         (h8300_pseudo_register_read): Likewise.
1216         * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
1217         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
1218         (i386_pseudo_register_read_into_value): Likewise.
1219         (i386_pseudo_register_read_value): Likewise.
1220         * i386-tdep.h (i386_pseudo_register_read_into_value): Update
1221         declaration.
1222         * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
1223         * m32c-tdep.c (m32c_raw_read): Likewise.
1224         (m32c_read_flg): Likewise.
1225         (m32c_banked_register): Likewise.
1226         (m32c_banked_read): Likewise.
1227         (m32c_sb_read): Likewise.
1228         (m32c_part_read): Likewise.
1229         (m32c_cat_read): Likewise.
1230         (m32c_r3r2r1r0_read): Likewise.
1231         (m32c_pseudo_register_read): Likewise.
1232         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
1233         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
1234         (mep_pseudo_cr64_read): Likewise.
1235         (mep_pseudo_register_read): Likewise.
1236         * mips-tdep.c (mips_pseudo_register_read): Likewise.
1237         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
1238         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
1239         * regcache.c (regcache::raw_read): Move it to readable_regcache.
1240         (regcache::cooked_read): Likewise.
1241         (regcache::cooked_read_value): Likewise.
1242         (regcache_cooked_read_signed):
1243         (regcache::cooked_read): Likewise.
1244         * regcache.h (readable_regcache): New class.
1245         (regcache): Inherit readable_regcache.  Move some methods to
1246         readable_regcache.
1247         * rl78-tdep.c (rl78_pseudo_register_read): Change
1248         parameter type to 'readable_regcache *'.
1249         * rs6000-tdep.c (do_regcache_raw_read): Remove.
1250         (e500_pseudo_register_read): Change parameter type to
1251         'readable_regcache *'.
1252         (dfp_pseudo_register_read): Likewise.
1253         (vsx_pseudo_register_read): Likewise.
1254         (efpr_pseudo_register_read): Likewise.
1255         * s390-tdep.c (s390_pseudo_register_read): Likewise.
1256         * sh-tdep.c (sh_pseudo_register_read): Likewise.
1257         * sh64-tdep.c (pseudo_register_read_portions): Likewise.
1258         (sh64_pseudo_register_read): Likewise.
1259         * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
1260         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
1261         * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
1262         (spu_pseudo_register_read): Likewise.
1263         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
1264         (xtensa_pseudo_register_read): Likewise.
1265
1266 2018-02-21  Yao Qi  <yao.qi@linaro.org>
1267
1268         * regcache.c (regcache::regcache): Call reg_buffer ctor.
1269         (regcache::arch): Move it to reg_buffer::arch.
1270         (regcache::register_buffer): Likewise.
1271         (regcache::assert_regnum): Likewise.
1272         (regcache::num_raw_registers): Likewise.
1273         * regcache.h (reg_buffer): New class.
1274         (regcache): Inherit reg_buffer.
1275
1276 2018-02-20  Simon Marchi  <simon.marchi@ericsson.com>
1277
1278         * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
1279         gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
1280
1281 2018-02-20  Markus Metzger  <markus.t.metzger@intel.com>
1282
1283         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
1284
1285 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
1286
1287         * Makefile.in: (COMMON_SFILES): Add common/*.c files.
1288         (SFILES): Remove common/*.c files.
1289         (COMMON_OBS): Remove some *.o files built from common/*.c files.
1290         * common/common.host: Add common reference.
1291         * configure.ac: Likewise.
1292         * configure: Regenerate.
1293
1294 2018-02-16  Yao Qi  <yao.qi@linaro.org>
1295
1296         * block.c (block_namespace_info): Inherit allocate_on_obstack.
1297         (block_initialize_namespace): Use new.
1298         * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
1299         (dwarf2_free_objfile): Use delete.
1300         * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
1301         (copy_type_recursive): Use new.
1302         * gdb_obstack.h (allocate_on_obstack): New.
1303
1304 2018-02-15  Yao Qi  <yao.qi@linaro.org>
1305
1306         PR gdb/22849
1307         * inferior.c (exit_inferior_1): Reset inf->control.
1308
1309 2018-02-15  Joel Brobecker  <brobecker@adacore.com>
1310
1311         * ada-lang.c (ada_to_fixed_value_create): Delete advance
1312         declaration.
1313
1314 2018-02-14  Pedro Alves  <palves@redhat.com>
1315
1316         * frame-unwind.c (frame_unwind_try_unwinder): Always call
1317         frame_cleanup_after_sniffer on exception.
1318
1319 2018-02-14  Tom Tromey  <tom@tromey.com>
1320
1321         * solist.h (struct target_so_ops) <bfd_open>: Make pathname
1322         const.
1323         (solib_bfd_open): Make pathname const.
1324         * solib.c (solib_bfd_open): Make pathname const.
1325         * solib-spu.c (spu_bfd_fopen): Make name const.
1326         (spu_bfd_open): Make pathname const.
1327         * solib-darwin.c (darwin_bfd_open): Make pathname const.
1328         * solib-aix.c (solib_aix_bfd_open): Make pathname const.
1329
1330 2018-02-14  Tom Tromey  <tom@tromey.com>
1331
1332         * symfile.c (symfile_bfd_open): Update.
1333         * source.h (openp, source_full_path_of, find_and_open_source):
1334         Change argument type to unique_xmalloc_ptr.
1335         * source.c (openp): Take a unique_xmalloc_ptr.
1336         (source_full_path_of, find_and_open_source): Likewise.
1337         (open_source_file, symtab_to_fullname): Update.
1338         * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
1339         unique_xmalloc_ptr.
1340         * solib.c (solib_find_1): Use unique_xmalloc_ptr.
1341         (exec_file_find): Update.
1342         * psymtab.c (psymtab_to_fullname): Update.
1343         * nto-tdep.h (nto_find_and_open_solib): Update.
1344         * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
1345         unique_xmalloc_ptr.
1346         * exec.c (exec_file_attach): Update.
1347         * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
1348         * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
1349
1350 2018-02-14  Tom Tromey  <tom@tromey.com>
1351
1352         * solib.c: Include source.h.
1353         * nto-tdep.c: Include source.h.
1354         * mi/mi-cmd-env.c: Include source.h.
1355         * infcmd.c: Include source.h.
1356         * exec.c: Include source.h.
1357         * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
1358         (add_path, directory_switch, source_path, init_source_path): Move
1359         declarations...
1360         * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
1361         (add_path, directory_switch, source_path, init_source_path):
1362         ...here.
1363
1364 2018-02-14  Tom Tromey  <tom@tromey.com>
1365
1366         * solist.h (exec_file_find, solib_find): Return
1367         unique_xmalloc_ptr.
1368         (solib_bfd_fopen): Take a const char *.
1369         * solib.c (solib_find_1): Return unique_xmalloc_ptr.
1370         (exec_file_find, solib_find): Likewise.
1371         (solib_bfd_fopen): Do not take ownership of "pathname".
1372         (solib_bfd_open): Use unique_xmalloc_ptr.
1373         * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
1374         * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
1375         * infrun.c (follow_exec): Use unique_xmalloc_ptr.
1376         * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
1377
1378 2018-02-14  Joel Brobecker  <brobecker@adacore.com>
1379
1380         * ada-lang.c (name_match_type_from_name): Remove reference to
1381         ada_name_for_lookup in function's documentation.
1382         * ada-lang.h (ada_name_for_lookup): Delete declaration.
1383
1384 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
1385
1386         * defs.h (enum openp_flags): New enum.
1387         (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
1388         Move to enum openp_flags.
1389         (openp_flags): New enum flags.
1390         (openp): Change parameter type to openp_flags.
1391         * source.c (openp): Change parameter type to openp_flags.
1392         * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
1393         * dwarf2read.c (try_open_dwop_file): Use openp_flags.
1394
1395 2018-02-13  Simon Marchi  <simon.marchi@polymtl.ca>
1396
1397         * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
1398         per-command.
1399
1400 2018-02-12  Andrew Burgess  <andrew.burgess@embecosm.com>
1401
1402         * dwarf2read.c (dwarf2_release_queue): Delete function, move body
1403         into...
1404         (class dwarf2_queue_guard): ...the destructor of this new class.
1405         (dw2_do_instantiate_symtab): Create instance of the new class
1406         dwarf2_queue_guard, remove cleanup.
1407
1408 2018-02-09  Tom Tromey  <tom@tromey.com>
1409
1410         * source.c (find_source_lines): Don't reference past the end of
1411         the vector.
1412
1413 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
1414
1415         * remote.c (remote_btrace_maybe_reopen): Change error message.
1416         * btrace.c (btrace_enable): Likewise.
1417         (parse_xml_btrace): Likewise.
1418         (parse_xml_btrace_conf): Likewise.
1419
1420 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
1421
1422         * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
1423         (linux_enable_pt, linux_enable_bts): Call
1424         diagnose_perf_event_open_fail.
1425
1426 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
1427
1428         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
1429         Remove parameter and change return type.  Update callers.  Move it.
1430         (linux_enable_bts, linux_enable_pt): Improve error message.
1431         (linux_enable_pt): Remove zero buffer size check.
1432         (linux_enable_btrace): Improve error messages.  Remove NULL return
1433         check.
1434
1435 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
1436
1437         * btrace.c (btrace_enable): Remove target_supports_btrace call.
1438         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
1439         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
1440         (linux_supports_pt, linux_supports_btrace): Remove.
1441         (linux_enable_bts): Call cpu_supports_bts.
1442         * nat/linux-btrace.h (linux_supports_btrace): Remove.
1443         * remote.c (remote_supports_btrace): Remove.
1444         (init_remote_ops): Remove remote_supports_btrace.
1445         * target-delegates.c: Regenerated.
1446         * target.c (target_supports_btrace): Remove.
1447         * target.h (target_ops) <to_supports_btrace>: Remove
1448         (target_supports_btrace): Remove.
1449         * x86-linux-nat.c (x86_linux_create_target): Remove
1450         linux_supports_btrace.
1451
1452 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
1453
1454         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
1455         btrace failed.
1456         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
1457         exception and use message in own exception.
1458
1459 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
1460
1461         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
1462         (perf_event_pt_event_type): Use gdb_file_up.
1463         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
1464         scoped_fd, and scoped_mmap.
1465
1466 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
1467
1468         * common/scoped_mmap.h: New.
1469         * unittests/scoped_mmap-selftest.c: New.
1470         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1471         unittests/scoped_mmap-selftest.c.
1472
1473 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
1474
1475         * common/scoped_fd.h: New.
1476         * unittests/scoped_fd-selftest.c: New.
1477         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1478         unittests/scoped_fd-selftest.c.
1479
1480 2018-02-09  Tom Tromey  <tom@tromey.com>
1481
1482         * auto-load.c (auto_load_section_scripts): Use
1483         gdb::unique_xmalloc_ptr.
1484
1485 2018-02-09  Tom Tromey  <tom@tromey.com>
1486
1487         * auto-load.c (execute_script_contents): Use std::string.
1488
1489 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
1490
1491         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
1492         Python function, rather than a new command.
1493
1494 2018-02-08  Tom Tromey  <tom@tromey.com>
1495
1496         * solib.c (solib_find_1): Use std::string.
1497         (solib_bfd_fopen): Use unique_xmalloc_ptr.
1498
1499 2018-02-08  Tom Tromey  <tom@tromey.com>
1500
1501         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
1502
1503 2018-02-08  Tom Tromey  <tom@tromey.com>
1504
1505         * source.c (find_source_lines): Use gdb::def_vector.
1506
1507 2018-02-08  Tom Tromey  <tom@tromey.com>
1508
1509         * macrocmd.c (struct temporary_macro_definition): New.
1510         (macro_define_command): Use temporary_macro_definition.  Remove
1511         cleanups.
1512         (free_macro_definition_ptr): Remove.
1513
1514 2018-02-08  Tom Tromey  <tom@tromey.com>
1515
1516         * macroexp.c (maybe_expand): Use std::string.
1517
1518 2018-02-08  Tom Tromey  <tom@tromey.com>
1519
1520         * macroexp.c (struct macro_buffer): Add initializers for some
1521         members.
1522         (init_buffer, init_shared_buffer, free_buffer)
1523         (free_buffer_return_text): Remove.
1524         (macro_buffer): New constructors.
1525         (~macro_buffer): New destructor.
1526         (macro_buffer::set_shared): New method.
1527         (macro_buffer::resize_buffer, macro_buffer::appendc)
1528         (macro_buffer::appendmem): Now methods, not free functions.
1529         (set_token, append_tokens_without_splicing, stringify)
1530         (macro_stringify): Update.
1531         (gather_arguments): Change return type.  Remove argc_p argument,
1532         add args_ptr argument.  Use std::vector.
1533         (substitute_args): Remove argc argument.  Accept std::vector.
1534         (expand): Update.  Use std::vector.
1535         (scan, macro_expand, macro_expand_next): Update.
1536
1537 2018-02-08  Tom Tromey  <tom@tromey.com>
1538
1539         * symtab.c (default_collect_symbol_completion_matches_break_on):
1540         Use unique_xmalloc_ptr.
1541         * macroscope.h: (sal_macro_scope, user_macro_scope)
1542         (default_macro_scope): Return unique_xmalloc_ptr.
1543         * macroscope.c (sal_macro_scope, user_macro_scope)
1544         (default_macro_scope): Return unique_xmalloc_ptr.
1545         * macroexp.h (macro_expand, macro_expand_once): Return
1546         unique_xmalloc_ptr.
1547         * macroexp.c (macro_expand, macro_expand_once): Return
1548         unique_xmalloc_ptr.
1549         * macrocmd.c (macro_expand_command, macro_expand_once_command)
1550         (info_macro_command, info_macros_command): Use
1551         unique_xmalloc_ptr.
1552         * compile/compile-c-support.c (write_macro_definitions): Use
1553         unique_xmalloc_ptr.
1554         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
1555
1556 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
1557
1558         * value.c (value_static_field): Assign field type instead of
1559         containing type when returning an optimized out value.
1560
1561 2018-02-06  Yao Qi  <yao.qi@linaro.org>
1562
1563         * ft32-tdep.c (ft32_read_pc): Remove.
1564         (ft32_write_pc): Remove.
1565         (ft32_gdbarch_init): Update.
1566         * m32r-tdep.c (m32r_read_pc): Remove.
1567         (m32r_gdbarch_init): Update.
1568         * mep-tdep.c (mep_read_pc): Remove.
1569         (mep_gdbarch_init): Update.
1570         * microblaze-tdep.c (microblaze_write_pc): Remove.
1571         (microblaze_gdbarch_init): Update.
1572         * mn10300-tdep.c (mn10300_read_pc): Remove.
1573         (mn10300_write_pc): Remove.
1574         (mn10300_gdbarch_init): Update.
1575         * moxie-tdep.c (moxie_read_pc): Remove.
1576         (moxie_write_pc): Remove.
1577         (moxie_gdbarch_init): Update.
1578
1579 2018-02-06  Yao Qi  <yao.qi@linaro.org>
1580
1581         * expprint.c (print_subexp_standard): Handle
1582         OP_F77_UNDETERMINED_ARGLIST.
1583         (dump_subexp_body_standard): Likewise.
1584
1585 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
1586
1587         * target-descriptions.c (tdesc_element_visitor) Add empty
1588         implementations.
1589         (tdesc_type): Move make_gdb_type from here.
1590         (tdesc_type_builtin): Likewise.
1591         (tdesc_type_vector): Likewise.
1592         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
1593         (make_gdb_type_struct): Move from tdesc_type_with_fields.
1594         (make_gdb_type_union): Likewise.
1595         (make_gdb_type_flags): Likewise.
1596         (make_gdb_type_enum): Likewise.
1597         (make_gdb_type): New function.
1598         (tdesc_register_type): Use static make_gdb_type.
1599
1600 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
1601
1602         * infcmd.c (default_print_one_register_info): Align natural-format
1603         column values consistently one under another.
1604         (pad_to_column): New function.
1605
1606 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
1607
1608         * dwarf2read.c (dwarf2_physname): Move commment.
1609
1610 2018-02-01  Leszek Swirski  <leszeks@google.com>
1611
1612         * varobj.c (varobj_formatted_print_options): Allow recursive
1613         pretty printing if pretty printing is enabled.
1614
1615 2018-02-01  Leszek Swirski  <leszeks@google.com>
1616
1617         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
1618         names after a structop as a filename.
1619
1620 2018-02-01  Yao Qi  <yao.qi@linaro.org>
1621
1622         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
1623         (arm_record_coproc_data_proc): Likewise.
1624
1625 2018-02-01  Yao Qi  <yao.qi@linaro.org>
1626
1627         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
1628
1629 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
1630
1631         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
1632         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
1633
1634 2018-01-31  Pedro Alves  <palves@redhat.com>
1635
1636         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
1637         * inflow.c (child_terminal_save_inferior): Wrap reference to
1638         tcgetpgrp in HAVE_TERMIOS_H.
1639         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
1640         _WIN32.
1641         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
1642         always iterate over all inferiors.
1643         (gdbsim_cntrl_c): Adjust.
1644         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
1645
1646 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
1647
1648         * gdbtypes.c (lookup_array_range_type): Make sure the array's
1649         index type is objfile-owned if the element type is as well.
1650
1651 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
1652
1653         GDB 8.1 released.
1654
1655 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
1656
1657         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
1658         "features/s390x-linux64.c".
1659         (_initialize_s390_linux_tdep): Remove initialization of tdescs
1660         s390_linux32 and s390x_linux64.
1661         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
1662         default tdesc.
1663         * s390-tdep.c: Include "features/s390-linux32.c" and
1664         "features/s390x-linux64.c".
1665         (s390_tdesc_valid): Add check for tdesc_has_registers.
1666         (s390_gdbarch_init): Make sure there is always a valid tdesc.
1667         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
1668         tdesc_s390x_linux64.
1669         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
1670         tdesc_s390x_linux64 to...
1671         * s390-tdep.h: ...here.
1672
1673 2018-01-30  Pedro Alves  <palves@redhat.com>
1674
1675         PR gdb/13211
1676         * config.in, configure: Regenerate.
1677         * configure.ac: Check for getpgid.
1678         * go32-nat.c (go32_pass_ctrlc): New.
1679         (go32_target): Install it.
1680         * inf-child.c (inf_child_target): Install
1681         child_terminal_save_inferior, child_pass_ctrlc and
1682         child_interrupt.
1683         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
1684         (inf_ptrace_target): No longer install it.
1685         * infcmd.c (interrupt_target_1): Adjust.
1686         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
1687         (child_interrupt): Declare.
1688         (inferior::terminal_state): New.
1689         * inflow.c (struct terminal_info): Update comments.
1690         (inferior_process_group): Delete.
1691         (terminal_is_ours): Delete.
1692         (gdb_tty_state): New.
1693         (child_terminal_init): Adjust.
1694         (is_gdb_terminal, sharing_input_terminal_1)
1695         (sharing_input_terminal): New functions.
1696         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
1697         Set the process's actual process group in the foreground if
1698         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
1699         mark terminal as the inferior's if not sharing GDB's terminal.
1700         Don't check attach_flag.
1701         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
1702         pass down a target_terminal_state.
1703         (child_terminal_save_inferior): New, factored out from ...
1704         (child_terminal_ours_1): ... this.  Handle
1705         target_terminal_state::is_ours_for_output.
1706         (child_interrupt, child_pass_ctrlc): New.
1707         (inflow_inferior_exit): Clear the inferior's terminal_state.
1708         (copy_terminal_info): Copy the inferior's terminal state.
1709         (_initialize_inflow): Remove reference to terminal_is_ours.
1710         * inflow.h (inferior_process_group): Delete.
1711         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
1712         * procfs.c (procfs_target): Don't install procfs_interrupt.
1713         (procfs_interrupt): Delete.
1714         * remote.c (remote_serial_quit_handler): Adjust.
1715         (remote_interrupt): Remove ptid parameter.  Adjust.
1716         * target-delegates.c: Regenerate.
1717         * target.c: Include "terminal.h".
1718         (target_terminal::terminal_state): Rename to ...
1719         (target_terminal::m_terminal_state): ... this.
1720         (target_terminal::init): Adjust.
1721         (target_terminal::inferior): Adjust to per-inferior
1722         terminal_state.
1723         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
1724         (target_terminal::ours, target_terminal::ours_for_output): Use
1725         target_terminal_is_ours_kind.
1726         (target_interrupt): Remove ptid parameter.  Adjust.
1727         (default_target_pass_ctrlc): Adjust.
1728         * target.h (target_ops::to_terminal_save_inferior): New field.
1729         (target_ops::to_interrupt): Remove ptid_t parameter.
1730         (target_interrupt): Remove ptid_t parameter.  Update comment.
1731         (target_pass_ctrlc): Update comment.
1732         * target/target.h (target_terminal_state): New scoped enum,
1733         factored out of ...
1734         (target_terminal::terminal_state): ... here.
1735         (target_terminal::inferior): Update comments.
1736         (target_terminal::restore_inferior): New.
1737         (target_terminal::is_inferior, target_terminal::is_ours)
1738         (target_terminal::is_ours_for_output): Adjust.
1739         (target_terminal::scoped_restore_terminal_state): Adjust to
1740         rename, and call restore_inferior() instead of inferior().
1741         (target_terminal::scoped_restore_terminal_state::m_state): Change
1742         type.
1743         (target_terminal::terminal_state): Rename to ...
1744         (target_terminal::m_terminal_state): ... this and change type.
1745
1746 2018-01-30  Pedro Alves  <palves@redhat.com>
1747
1748         * linux-nat.c (wait_for_signal): New function.
1749         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
1750         directly.
1751         (async_terminal_is_ours)
1752         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
1753         (linux_nat_add_target): Don't override
1754         to_terminal_inferior/to_terminal_ours.
1755
1756 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
1757
1758         * remote.c (remote_follow_fork): Don't call "detach_inferior".
1759
1760 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
1761
1762         * dwarf2read.c (free_dwo_files): Add forward-declaration.
1763         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
1764         dwarf2_per_objfile_free here.
1765         (dwarf2_per_objfile_free): Remove.
1766         (_initialize_dwarf2_read): Don't register
1767         dwarf2_per_objfile_free as a registry cleanup.
1768
1769 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
1770
1771         Avoid compilation errors in MinGW native builds
1772
1773         The error is triggered by including python-internal.h, and the
1774         error message is:
1775
1776              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
1777                       from build-gnulib/import/math.h:27,
1778                       from d:/usr/Python26/include/pyport.h:235,
1779                       from d:/usr/Python26/include/Python.h:58,
1780                       from python/python-internal.h:94,
1781                       from python/py-arch.c:24:
1782              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
1783         using ::hypot;
1784                 ^~~~~
1785
1786         This happens because Python headers define 'hypot' to expand t
1787         '_hypot' in the Windows builds.
1788         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
1789         'hypoth'.  This avoids a compilation error.
1790
1791 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
1792
1793         * MAINTAINERS (Write After Approval): Fix ordering.
1794
1795 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
1796
1797         * MAINTAINERS (Write After Approval): Add Alan Hayward.
1798
1799 2018-01-26  Alan Modra  <amodra@gmail.com>
1800
1801         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
1802         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
1803         Remove nop.  Make const.  Comment.
1804         (powerpc32_plt_stub_so_2): New.
1805         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
1806         Correct count.  Update uses.
1807         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
1808         Move common code reading PLT entry word.  Correct
1809         powerpc32_plt_stub PLT address calculation.
1810         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
1811         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
1812         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
1813         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
1814         (ppc64_standard_linkage8): Likewise.
1815         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
1816         Correct insns description.
1817         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
1818
1819 2018-01-24  Pedro Alves  <palves@redhat.com>
1820
1821         GCC PR libstdc++/83906
1822         * gdbtypes.c (operator==(const dynamic_prop &,
1823         const dynamic_prop &)): New.
1824         (operator==(const range_bounds &, const range_bounds &)): New.
1825         (check_types_equal): Use them instead of memcmp.
1826         * gdbtypes.h (operator==(const dynamic_prop &,
1827         const dynamic_prop &)): Declare.
1828         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
1829         (operator==(const range_bounds &, const range_bounds &)): Declare.
1830         (operator!=(const range_bounds &, const range_bounds &)): Declare.
1831
1832 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
1833
1834         * s390-linux-tdep.c (s390_record_address_mask)
1835         (s390_record_calc_disp_common, s390_record_calc_disp)
1836         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
1837         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
1838         (s390_process_record): Move to s390-tdep.c.
1839         (s390_linux_init_abi_any): Adjust.
1840         * s390-tdep.c (s390_record_address_mask)
1841         (s390_record_calc_disp_common, s390_record_calc_disp)
1842         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
1843         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
1844         (s390_process_record): Moved from s390-linux-tdep.c
1845         (s390_gdbarch_init): Adjust.
1846
1847 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
1848
1849         * s390-linux-nat.c (s390-tdep.h): New include.
1850         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
1851         (HFILES_NO_SRCDIR): Add s390-tdep.h.
1852         (ALLDEPFILES): Add s390-tdep.c.
1853         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
1854         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
1855         * s390-tdep.h: ...this.  New file.
1856         * s390-linux-tdep.c (s390-tdep.h): New include.
1857         (_initialize_s390_tdep): Rename to...
1858         (_initialize_s390_linux_tdep): ...this and adjust.
1859         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
1860         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
1861         s390-tdep.h.
1862         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
1863         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
1864         (s390_is_partial_instruction, s390_software_single_step)
1865         (is_non_branch_ril, s390_displaced_step_copy_insn)
1866         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
1867         (s390_prologue_data, s390_addr, s390_store, s390_load)
1868         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
1869         (s390_register_call_saved, s390_guess_tracepoint_registers)
1870         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
1871         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
1872         (s390_pseudo_register_name, s390_pseudo_register_type)
1873         (s390_pseudo_register_read, s390_pseudo_register_write)
1874         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
1875         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
1876         (s390_addr_bits_remove, s390_address_class_type_flags)
1877         (s390_address_class_type_flags_to_name)
1878         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
1879         (s390_function_arg_float, s390_function_arg_vector)
1880         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
1881         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
1882         (s390_frame_align, s390_register_return_value, s390_return_value)
1883         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
1884         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
1885         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
1886         (s390_trad_frame_prev_register, s390_unwind_cache)
1887         (s390_prologue_frame_unwind_cache)
1888         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
1889         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
1890         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
1891         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
1892         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
1893         (s390_frame_base_address, s390_local_base_address)
1894         (s390_frame_base, s390_gcc_target_options)
1895         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
1896         (s390_validate_reg_range, s390_tdesc_valid)
1897         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
1898         * s390-tdep.c: ...this.  New file.
1899
1900 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
1901
1902         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
1903         (s390_process_record, s390_gdbarch_tdep_alloc)
1904         (s390_linux_init_abi_any): Use/set new hook.
1905
1906 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
1907
1908         * s390-linux-tdep.c (osabi.h): New include.
1909         (s390_linux_init_abi_31, s390_linux_init_abi_64)
1910         (s390_linux_init_abi_any): New functions.
1911         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
1912
1913 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
1914
1915         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
1916         tdesc_has_registers check
1917
1918 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
1919
1920         * s390-linux-tdep.c (s390_tdesc_valid): New function.
1921         (s390_validate_reg_range): New macro.
1922         (s390_gdbarch_init): Adjust.
1923
1924 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
1925
1926         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
1927         (s390_gdbarch_tdep_alloc): Adjust.
1928         (s390_gdbarch_init): Adjust.
1929
1930 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
1931
1932         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
1933         <have_tdb>: Change type to bool.
1934         (s390_gdbarch_tdep_alloc): Adjust.
1935         (s390_gdbarch_init): Adjust.
1936
1937 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
1938
1939         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
1940         (gdbarch_tdep) <have_upper, have_vx>: New fields.
1941         (s390_gdbarch_tdep_alloc): New function.
1942         (s390_gdbarch_init): Allocate tdep at start and use its fields
1943         instead of separate variables.
1944
1945 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
1946
1947         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
1948         when looking for cached gdbarch and add comment for remaining.
1949
1950 2018-01-22  Pedro Alves  <palves@redhat.com>
1951             Sergio Durigan Junior  <sergiodj@redhat.com>
1952
1953         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
1954         case.
1955
1956 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
1957
1958         * MAINTAINERS: Update my company e-mail address.
1959
1960 2018-01-22  Yao Qi  <yao.qi@linaro.org>
1961
1962         * regcache.c (cooked_write_test): New function.
1963         (_initialize_regcache): Register the test.
1964
1965 2018-01-22  Yao Qi  <yao.qi@linaro.org>
1966
1967         * ia64-tdep.c (ia64_pseudo_register_read): Call
1968         regcache->cooked_read instead of regcache_cooked_read_unsigned.
1969         * m32c-tdep.c (m32c_cat_read): Likewise.
1970         (m32c_r3r2r1r0_read): Likewise.
1971         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
1972         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
1973
1974 2018-01-22  Yao Qi  <yao.qi@linaro.org>
1975
1976         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
1977         method raw_read instead of regcache_raw_read.
1978         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
1979         * arm-tdep.c (arm_neon_quad_read): Likewise.
1980         * avr-tdep.c (avr_pseudo_register_read): Likewise.
1981         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
1982         * frv-tdep.c (frv_pseudo_register_read): Likewise.
1983         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
1984         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
1985         (i386_pseudo_register_read_into_value): Likewise.
1986         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
1987         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
1988         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
1989         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
1990         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
1991         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
1992         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
1993         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
1994         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
1995
1996 2018-01-22  Yao Qi  <yao.qi@linaro.org>
1997
1998         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
1999         * configure.tgt: Remove target mt.
2000         * mt-tdep.c: Remove.
2001         * regcache.c (cooked_read_test): Remove the check for mt.
2002
2003 2018-01-22  Yao Qi  <yao.qi@linaro.org>
2004
2005         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
2006         instead of gdbarch_pseudo_register_read_value.
2007
2008 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
2009
2010         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
2011         language is Ada.
2012
2013 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
2014
2015         * linespec.c (create_sals_line_offset): Remove code that preserved
2016         the symtab_and_line's line number.
2017
2018 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
2019
2020         * varobj.c (varobj_create): Don't set valid_block when creating a
2021         floating varobj.
2022
2023 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
2024
2025         * varobj.c (varobj_create): Remove out of date comment.
2026
2027 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
2028
2029         PR mi/20395
2030         * ada-exp.y (write_var_from_sym): Pass extra parameter when
2031         updating innermost block.
2032         * parse.c (innermost_block_tracker::update): Take extra type
2033         parameter, and check types match before updating innermost block.
2034         (write_dollar_variable): Update innermost block for registers.
2035         * parser-defs.h (enum innermost_block_tracker_type): New enum.
2036         (innermost_block_tracker::innermost_block_tracker): Initialise
2037         m_types member.
2038         (innermost_block_tracker::reset): Take type parameter.
2039         (innermost_block_tracker::update): Take type parameter, and pass
2040         type through as needed.
2041         (innermost_block_tracker::m_types): New member.
2042         * varobj.c (varobj_create): Pass type when reseting innermost
2043         block.
2044
2045 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
2046
2047         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
2048         * ada-lang.c (resolve_subexp): Likewise.
2049         * breakpoint.c (set_breakpoint_condition) Likewise.
2050         (watch_command_1) Likewise.
2051         * c-exp.y (variable): Likewise.
2052         * d-exp.y (PrimaryExpression): Likewise.
2053         * f-exp.y (variable): Likewise.
2054         * go-exp.y (variable): Likewise.
2055         * m2-exp.y (variable): Likewise.
2056         * objfiles.c (objfile::~objfile): Likewise.
2057         * p-exp.y (variable): Likewise.
2058         * parse.c (innermost_block): Change type.
2059         * parser-defs.h (class innermost_block_tracker): New.
2060         (innermost_block): Change to innermost_block_tracker.
2061         * printcmd.c (display_command): Switch to innermost_block API.
2062         (do_one_display): Likewise.
2063         * rust-exp.y (do_one_display): Likewise.
2064         * symfile.c (clear_symtab_users): Likewise.
2065         * varobj.c (varobj_create): Switch to innermost_block API, replace
2066         use of innermost_block with block stored on varobj object.
2067
2068 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
2069
2070         * expression.h (innermost_block): Remove declaration.
2071         * varobj.c: Add 'parser-defs.h' include.
2072
2073 2018-01-19  Tom Tromey  <tom@tromey.com>
2074
2075         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
2076         symbols in the static and global blocks.
2077
2078 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
2079
2080         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
2081         gdb_ptrace.h, and move including gdb_wait.h ...
2082         * nat/linux-ptrace.h: ... to here.
2083
2084 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
2085
2086         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
2087         inf_ptrace_detach_success.
2088         (inf_ptrace_detach_success): Add inferior parameter, use it
2089         instead of inferior_ptid, pass it to detach_inferior.
2090         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
2091         parameter.
2092         * inferior.c (detach_inferior): Add overload that takes an
2093         inferior object.
2094         * inferior.h (detach_inferior): Likewise.
2095         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
2096         use inferior_ptid, adjust call to inf_ptrace_detach_success.
2097         * linux-thread-db.c (thread_db_detach): Use inf parameter.
2098
2099 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
2100
2101         * target.h (struct target_ops) <to_detach>: Add inferior
2102         parameter.
2103         (target_detach): Likewise.
2104         * target.c (dispose_inferior): Pass inferior down.
2105         (target_detach): Pass inferior down.  Assert that it is equal to
2106         the current inferior.
2107         * aix-thread.c (aix_thread_detach): Pass inferior down.
2108         * corefile.c (core_file_command): Pass current_inferior() down.
2109         * corelow.c (core_detach): Add inferior parameter.
2110         * darwin-nat.c (darwin_detach): Likewise.
2111         * gnu-nat.c (gnu_detach): Likewise.
2112         * inf-ptrace.c (inf_ptrace_detach): Likewise.
2113         * infcmd.c (detach_command): Pass current_inferior() down to
2114         target_detach.
2115         * infrun.c (follow_fork_inferior): Pass parent_inf to
2116         target_detach.
2117         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
2118         target_detach.
2119         * linux-nat.c (linux_nat_detach): Add inferior parameter.
2120         * linux-thread-db.c (thread_db_detach): Likewise.
2121         * nto-procfs.c (procfs_detach): Likewise.
2122         * procfs.c (procfs_detach): Likewise.
2123         * record.c (record_detach): Likewise.
2124         * record.h (struct inferior): Forward-declare.
2125         (record_detach): Add inferior parameter.
2126         * remote-sim.c (gdbsim_detach): Likewise.
2127         * remote.c (remote_detach_1): Likewise.
2128         (remote_detach): Likewise.
2129         (extended_remote_detach): Likewise.
2130         * sol-thread.c (sol_thread_detach): Likewise.
2131         * target-debug.h (target_debug_print_inferior_p): New macro.
2132         * target-delegates.c: Re-generate.
2133         * top.c (kill_or_detach): Pass inferior down to target_detach.
2134         * windows-nat.c (windows_detach): Add inferior parameter.
2135
2136 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
2137
2138         * target.h (struct target_ops) <to_detach>: Remove args
2139         parameter.
2140         (target_detach): Likewise.
2141         * target.c (dispose_inferior): Adjust.
2142         (target_detach): Remove args parameter, adjust.
2143         * aix-thread.c (aix_thread_detach): Adjust.
2144         * corefile.c (core_file_command): Adjust.
2145         * corelow.c (core_detach): Adjust.
2146         * darwin-nat.c (darwin_detach): Adjust.
2147         * gnu-nat.c (gnu_detach): Adjust.
2148         * inf-ptrace.c (inf_ptrace_detach): Adjust.
2149         * infcmd.c (detach_command): Adjust
2150         * infrun.c (follow_fork_inferior): Adjust.
2151         (handle_vfork_child_exec_or_exit): Adjust.
2152         * linux-fork.c (linux_fork_detach): Remove args parameter.
2153         * linux-fork.h (linux_fork_detach): Likewise.
2154         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
2155         * linux-thread-db.c (thread_db_detach): Likewise.
2156         * nto-procfs.c (procfs_detach): Likewise.
2157         * procfs.c (procfs_detach): Likewise.
2158         (do_detach): Remove signo parameter.
2159         * record.c (record_detach): Remove args parameter.
2160         * record.h (record_detach): Likewise.
2161         * remote-sim.c (gdbsim_detach): Likewise.
2162         * remote.c (remote_detach_1): Likewise.
2163         (remote_detach): Likewise.
2164         (extended_remote_detach): Likewise.
2165         * sol-thread.c (sol_thread_detach): Likewise.
2166         * target-delegates.c: Re-generate.
2167         * top.c (struct qt_args) <args>: Remove field.
2168         (kill_or_detach): Don't pass args.
2169         (quit_force): Don't set args.
2170         * windows-nat.c (windows_detach): Remove args parameter.
2171
2172 2018-01-19  Yao Qi  <yao.qi@linaro.org>
2173
2174         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
2175         (arm_linux_init_abi): Install it.
2176
2177 2018-01-19  Yao Qi  <yao.qi@linaro.org>
2178
2179         * osabi.c (gdb_osabi_names): Extend the regexp for
2180         arm-linux-gnueabihf.
2181
2182 2018-01-18  Yao Qi  <yao.qi@linaro.org>
2183
2184         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
2185         m_abbrevs.
2186         (abbrev_table::add_abbrev): Update.
2187         (abbrev_table::lookup_abbrev): Update.
2188
2189 2018-01-18  Yao Qi  <yao.qi@linaro.org>
2190
2191         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
2192
2193 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
2194
2195         * compile/compile.c (compile_to_object): Convert "triplet_rx"
2196         to "std::string".
2197
2198 2018-01-17  Tom Tromey  <tom@tromey.com>
2199
2200         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
2201
2202 2018-01-17  Tom Tromey  <tom@tromey.com>
2203
2204         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
2205         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
2206         (create_array_type_with_stride): Update.
2207         * dwarf2read.c (set_die_type): Update.
2208
2209 2018-01-17  Tom Tromey  <tom@tromey.com>
2210
2211         * dwarf2read.c (delayed_method_info): Remove typedef.
2212         (dwarf2_cu::method_info): Now a std::vector.
2213         (add_to_method_list): Update.
2214         (free_delayed_list): Remove.
2215         (compute_delayed_physnames): Update.
2216         (process_full_comp_unit, process_full_type_unit): Clear the method
2217         list.  Remove cleanups.
2218         (psymtab_include_file_name): Add name_holder parameter.  Use
2219         unique_xmalloc_ptr.
2220         (dwarf_decode_lines): Update.
2221
2222 2018-01-17  Tom Tromey  <tom@tromey.com>
2223             Simon Marchi  <simon.marchi@ericsson.com>
2224
2225         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
2226         (dwarf2_per_objfile::free_cached_comp_units)
2227         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
2228         (init_cutu_and_read_dies_no_follow): Update.
2229         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
2230         (dwarf2_cu::~dwarf2_cu): New.
2231         (free_heap_comp_unit, free_stack_comp_unit): Remove.
2232         (age_cached_comp_units, free_one_cached_comp_unit): Update.
2233
2234 2018-01-17  Tom Tromey  <tom@tromey.com>
2235             Simon Marchi  <simon.marchi@ericsson.com>
2236
2237         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
2238         (struct die_reader_specs) <abbrev_table>: New member.
2239         (struct abbrev_table): Add constructor.
2240         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
2241         <abbrev_obstack>: Now an auto_obstack.
2242         (abbrev_table_up): New typedef.
2243         (init_cu_die_reader): Add abbrev_table parameter.
2244         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
2245         Add result_dwo_abbrev_table.
2246         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
2247         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
2248         Update.
2249         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
2250         parameter.
2251         (skip_children): Update.
2252         (abbrev_table::alloc_abbrev): Rename from
2253         abbrev_table_alloc_abbrev.
2254         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
2255         (abbrev_table::lookup_abbrev): Rename from
2256         abbrev_table_lookup_abbrev.
2257         (abbrev_table_read_table): Return abbrev_table_up.
2258         (abbrev_table_free, abbrev_table_free_cleanup)
2259         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
2260         (load_partial_dies): Update.
2261
2262 2018-01-17  Tom Tromey  <tom@tromey.com>
2263
2264         * dwarf2read.c (dwarf2_compute_name): Update comment.
2265         (read_func_scope, read_variable): Update.
2266         (new_symbol): Remove.
2267         (new_symbol_full): Rename to new_symbol.
2268
2269 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
2270
2271         PR gdb/16577
2272         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
2273         a warning instead of throwing an error, set section size to 0 and return
2274         NULL.
2275         * gdb_bfd.h (gdb_bfd_map_section): Update description.
2276
2277 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
2278
2279         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
2280         std::string.
2281         (linux_ptrace_attach_fail_reason_string): Likewise.
2282         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
2283         Likewise.
2284         (linux_ptrace_attach_fail_reason_string): Likewise.
2285         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
2286
2287 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
2288
2289         * linux-nat.c (linux_nat_attach): Remove xstrdup.
2290
2291 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
2292
2293         PR gdb/21559
2294         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
2295         checking for fs_base/gs_base fields in struct user_regs_struct.
2296         * configure: Regenerate.
2297
2298 2018-01-17  Yao Qi  <yao.qi@linaro.org>
2299
2300         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
2301         function.
2302         (aarch64_linux_init_abi): Install it to gdbarch hook
2303         gcc_target_options.
2304
2305 2018-01-15  Pedro Alves  <palves@redhat.com>
2306
2307         * common/signals-state-save-restore.c
2308         (save_original_signals_state): Fix typos.
2309
2310 2017-01-12  Tom Tromey  <tom@tromey.com>
2311             Sergio Durigan Junior  <sergiodj@redhat.com>
2312
2313         * Makefile.in (install-only): Install gdb-add-index.
2314
2315 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
2316
2317         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
2318
2319 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2320
2321         * infrun.c (keep_going_pass_signal): Clear step-over info when
2322         insert_breakpoints fails.
2323
2324 2018-01-11  Pedro Alves  <palves@redhat.com>
2325
2326         PR gdb/22583
2327         * infrun.c (resume): Rename to ...
2328         (resume_1): ... this.
2329         (resume): Reimplement as wrapper around resume_1.
2330
2331 2018-01-11  Pedro Alves  <palves@redhat.com>
2332
2333         PR remote/22597
2334         * remote.c (remote_parse_stop_reply): Default to the last-set
2335         general thread instead of to 'magic_null_ptid'.
2336
2337 2018-01-10  Pedro Alves  <palves@redhat.com>
2338
2339         * language.h (language_get_symbol_name_matcher): Rename ...
2340         (get_symbol_name_matcher): ... this.
2341         * language.c (language_get_symbol_name_matcher): Ditto.
2342         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
2343         callers adjusted.
2344
2345 2018-01-10  Pedro Alves  <palves@redhat.com>
2346
2347         PR gdb/22670
2348         * dwarf2read.c
2349         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
2350         Adjust to use language_get_symbol_name_matcher instead of
2351         language_defn::la_get_symbol_name_matcher.
2352         * language.c (language_get_symbol_name_matcher): If in Ada mode
2353         and the lookup name is a verbatim match, return Ada's matcher.
2354         * language.h (language_get_symbol_name_matcher): Adjust comment.
2355         (ada_lookup_name_info::verbatim_p):: New method.
2356
2357 2018-01-10  Pedro Alves  <palves@redhat.com>
2358
2359         PR gdb/22670
2360         * ada-lang.c (ada_collect_symbol_completion_matches): If the
2361         minsym's language is language_auto or language_cplus, pass down
2362         language_ada instead.
2363         * symtab.c (compare_symbol_name): Don't frob symbol language here.
2364
2365 2018-01-10  Pedro Alves  <palves@redhat.com>
2366
2367         PR gdb/22670
2368         * minsyms.c (linkage_name_str): New function.
2369         (iterate_over_minimal_symbols): Use it.
2370
2371 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
2372
2373         * NEWS: Document that 'info proc' now works on FreeBSD.
2374
2375 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
2376
2377         * configure.ac: Check for kinfo_getfile in libutil.
2378         * configure: Regenerate.
2379         * config.in: Regenerate.
2380         * fbsd-nat.c: Include "fbsd-tdep.h".
2381         (fbsd_fetch_cmdline): New.
2382         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
2383         rather than calling error.
2384         (fbsd_info_proc): New.
2385         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
2386         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
2387         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
2388
2389 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
2390
2391         * fbsd-nat.c (struct free_deleter): Remove.
2392         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
2393
2394 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
2395
2396         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
2397         NULL for an empty pathname.
2398
2399 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
2400
2401         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
2402         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
2403         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
2404         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
2405         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
2406         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
2407         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
2408         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
2409         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
2410         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
2411         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
2412         (fbsd_core_fetch_timeval, fbsd_print_sigset)
2413         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
2414         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
2415         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
2416
2417 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
2418
2419         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
2420         (gnu_xfer_auxv): New function.
2421         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
2422         TARGET_OBJECT_AUXV.
2423
2424 2018-01-08  Yao Qi  <yao.qi@linaro.org>
2425             Simon Marchi  <simon.marchi@ericsson.com>
2426
2427         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
2428         common/selftest.c.
2429         (COMMON_OBS): Remove selftest.o.
2430         * configure.ac: Append selftest-arch.c and common/selftest.c to
2431         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
2432         * configure: Re-generated.
2433         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
2434         GDB_SELF_TEST.
2435         (maintenance_info_selftests): Likewise.
2436
2437 2018-01-08  Xavier Roirand  <roirand@adacore.com>
2438
2439         * ada-valprint.c (val_print_packed_array_elements): Use
2440         proper number of elements when printing an array indexed
2441         by an enumeration type.
2442
2443 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
2444
2445         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
2446         (dw2_get_file_names_reader): Adjust.
2447         (lookup_dwo_signatured_type): Adjust.
2448         (lookup_dwp_signatured_type): Adjust.
2449         (lookup_signatured_type): Adjust.
2450         (create_type_unit_group): Adjust.
2451         (get_type_unit_group): Adjust.
2452         (process_psymtab_comp_unit_reader): Adjust.
2453         (build_type_psymtabs_reader): Adjust.
2454         (scan_partial_symbols): Adjust.
2455         (add_partial_symbol): Adjust.
2456         (add_partial_subprogram): Adjust.
2457         (peek_die_abbrev): Adjust.
2458         (fixup_go_packaging): Adjust.
2459         (process_imported_unit_die): Adjust.
2460         (dwarf2_compute_name): Adjust.
2461         (dwarf2_physname): Adjust.
2462         (read_import_statement): Adjust.
2463         (handle_DW_AT_stmt_list): Adjust.
2464         (read_file_scope): Adjust.
2465         (read_func_scope): Adjust.
2466         (read_lexical_block_scope): Adjust.
2467         (read_call_site_scope): Adjust.
2468         (read_variable): Adjust.
2469         (dwarf2_rnglists_process): Adjust.
2470         (dwarf2_ranges_process): Adjust.
2471         (dwarf2_ranges_read): Adjust.
2472         (dwarf2_get_pc_bounds): Adjust.
2473         (dwarf2_record_block_ranges): Adjust.
2474         (dwarf2_add_field): Adjust.
2475         (dwarf2_add_member_fn): Adjust.
2476         (read_structure_type): Adjust.
2477         (process_structure_scope): Adjust.
2478         (read_enumeration_type): Adjust.
2479         (read_array_type): Adjust.
2480         (mark_common_block_symbol_computed): Adjust.
2481         (read_common_block): Adjust.
2482         (read_namespace_type): Adjust.
2483         (read_namespace): Adjust.
2484         (read_module_type): Adjust.
2485         (read_tag_pointer_type): Adjust.
2486         (read_tag_ptr_to_member_type): Adjust.
2487         (read_tag_string_type): Adjust.
2488         (read_subroutine_type): Adjust.
2489         (read_typedef): Adjust.
2490         (read_base_type): Adjust.
2491         (attr_to_dynamic_prop): Adjust.
2492         (read_subrange_type): Adjust.
2493         (read_unspecified_type): Adjust.
2494         (dwarf2_read_abbrevs): Adjust.
2495         (load_partial_dies): Adjust.
2496         (read_partial_die): Adjust.
2497         (find_partial_die): Adjust.
2498         (guess_partial_die_structure_name): Adjust.
2499         (fixup_partial_die): Adjust.
2500         (read_attribute_value): Adjust.
2501         (read_addr_index): Adjust.
2502         (read_addr_index_from_leb128): Adjust.
2503         (read_str_index): Adjust.
2504         (dwarf2_string_attr): Adjust.
2505         (get_debug_line_section): Adjust.
2506         (dwarf_decode_line_header): Adjust.
2507         (lnp_state_machine::check_line_address): Adjust.
2508         (dwarf_decode_lines_1): Adjust.
2509         (dwarf_decode_lines): Adjust.
2510         (dwarf2_start_symtab): Adjust.
2511         (var_decode_location): Adjust.
2512         (new_symbol_full): Adjust.
2513         (dwarf2_const_value_data): Adjust.
2514         (dwarf2_const_value_attr): Adjust.
2515         (dwarf2_const_value): Adjust.
2516         (die_type): Adjust.
2517         (die_containing_type): Adjust.
2518         (build_error_marker_type): Adjust.
2519         (lookup_die_type): Adjust.
2520         (guess_full_die_structure_name): Adjust.
2521         (anonymous_struct_prefix): Adjust.
2522         (determine_prefix): Adjust.
2523         (dwarf2_name): Adjust.
2524         (follow_die_ref_or_sig): Adjust.
2525         (follow_die_offset): Adjust.
2526         (follow_die_ref): Adjust.
2527         (follow_die_sig_1): Adjust.
2528         (follow_die_sig): Adjust.
2529         (get_signatured_type): Adjust.
2530         (get_DW_AT_signature_type): Adjust.
2531         (decode_locdesc): Adjust.
2532         (dwarf_decode_macros): Adjust.
2533         (cu_debug_loc_section): Adjust.
2534         (fill_in_loclist_baton): Adjust.
2535         (dwarf2_symbol_mark_computed): Adjust.
2536         (init_one_comp_unit): Don't assign
2537         dwarf2_cu::dwarf2_per_objfile.
2538         (set_die_type): Adjust.
2539
2540 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
2541
2542         * dwarf2read.c (struct mapped_debug_names): Add constructor.
2543         <dwarf2_per_objfile>: New field.
2544         (dwarf2_per_objfile): Remove global.
2545         (get_dwarf2_per_objfile): New function.
2546         (set_dwarf2_per_objfile): New function.
2547         (dwarf2_build_psymtabs_hard): Change objfile parameter to
2548         dwarf2_per_objfile.
2549         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
2550         (read_abbrev_offset): Likewise.
2551         (read_indirect_string): Likewise.
2552         (read_indirect_line_string): Likewise.
2553         (read_indirect_string_at_offset): Likewise.
2554         (read_indirect_string_from_dwz): Likewise.
2555         (dwarf2_find_containing_comp_unit): Change objfile parameter to
2556         dwarf2_per_objfile.
2557         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
2558         (create_all_comp_units): Change objfile parameter to
2559         dwarf2_per_objfile.
2560         (create_all_type_units): Likewise.
2561         (process_queue): Add dwarf2_per_objfile parameter.
2562         (read_and_check_comp_unit_head): Likewise.
2563         (lookup_dwo_unit_in_dwp): Likewise.
2564         (get_dwp_file): Likewise.
2565         (process_cu_includes): Likewise.
2566         (struct free_dwo_file_cleanup_data): New struct.
2567         (dwarf2_has_info): Use get_dwarf2_per_objfile and
2568         set_dwarf2_per_objfile.
2569         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
2570         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
2571         context, adjust calls.
2572         (dw2_instantiate_symtab): Likewise.
2573         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
2574         (dw2_get_cu): Likewise.
2575         (create_cu_from_index_list): Change objfile parameter to
2576         dwarf2_per_objfile.
2577         (create_cus_from_index_list): Get dwarf2_per_objfile from
2578         context, adjust calls.
2579         (create_cus_from_index): Likewise.
2580         (create_signatured_type_table_from_index): Change objfile
2581         parameter to dwarf2_per_objfile.
2582         (create_signatured_type_table_from_debug_names): Change objfile
2583         parameter to dwarf2_per_objfile.
2584         (create_addrmap_from_index): Likewise.
2585         (create_addrmap_from_aranges): Likewise.
2586         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
2587         (dw2_setup): Remove.
2588         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
2589         context.
2590         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
2591         get_dwarf2_per_objfile.
2592         (dw2_forget_cached_source_info): Likewise.
2593         (dw2_map_symtabs_matching_filename): Likewise.
2594         (struct dw2_symtab_iterator) <index>: Remove.
2595         <dwarf2_per_objfile>: New field.
2596         (dw2_symtab_iter_init): Replace index parameter with
2597         dwarf2_per_objfile.
2598         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
2599         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
2600         (dw2_print_stats): Likewise.
2601         (dw2_dump): Likewise.
2602         (dw2_expand_symtabs_for_function): Likewise.
2603         (dw2_expand_all_symtabs): Likewise.
2604         (dw2_expand_symtabs_with_fullname): Likewise.
2605         (dw2_expand_marked_cus): Replace index and objfile parameters
2606         with dwarf2_per_objfile.
2607         (dw_expand_symtabs_matching_file_matcher): Add
2608         dwarf2_per_objfile parameter and adjust calls.
2609         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
2610         adjust calls.
2611         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
2612         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
2613         adjust calls.
2614         (create_cus_from_debug_names_list): Replace objfile parameter
2615         with dwarf2_per_objfile and adjust calls.
2616         (create_cus_from_debug_names): Likewise.
2617         (dwarf2_read_debug_names): Likewise.
2618         (mapped_debug_names::namei_to_name): Adjust call.
2619         (dw2_debug_names_iterator::next): Likewise.
2620         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
2621         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
2622         (dw2_debug_names_dump): Likewise.
2623         (dw2_debug_names_expand_symtabs_for_function): Likewise.
2624         (dw2_debug_names_expand_symtabs_matching): Likewise.
2625         (dwarf2_initialize_objfile): Likewise.
2626         (dwarf2_build_psymtabs): Likewise.
2627         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
2628         this_cu.
2629         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
2630         (read_and_check_comp_unit_head): Likewise.
2631         (read_abbrev_offset): Likewise.
2632         (create_debug_type_hash_table): Likewise.
2633         (create_debug_types_hash_table): Likewise.
2634         (create_all_type_units): Replace objfile parameter with
2635         dwarf2_per_objfile.
2636         (add_type_unit): Add dwarf2_per_objfile parameter.
2637         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
2638         with dwarf2_per_objfile.
2639         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
2640         (lookup_dwp_signatured_type): Likewise.
2641         (lookup_signatured_type): Likewise.
2642         (read_cutu_die_from_dwo): Likewise.
2643         (init_tu_and_read_dwo_dies): Likewise.
2644         (init_cutu_and_read_dies): Likewise.
2645         (init_cutu_and_read_dies_no_follow): Likewise.
2646         (allocate_type_unit_groups_table): Add objfile parameter.
2647         (create_type_unit_group): Use dwarf2_per_objfile from cu.
2648         (get_type_unit_group): Likewise.
2649         (process_psymtab_comp_unit): Update call.
2650         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
2651         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
2652         (print_tu_stats): Likewise.
2653         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
2654         in void* parameter.
2655         (build_type_psymtabs): Change objfile parameter to
2656         dwarf2_per_objfile.
2657         (process_skeletonless_type_unit): Use dwarf2_per_objfile
2658         passed in void* parameter.
2659         (process_skeletonless_type_units): Change objfile parameter to
2660         dwarf2_per_objfile.
2661         (set_partial_user): Likewise.
2662         (dwarf2_build_psymtabs_hard): Likewise.
2663         (read_comp_units_from_section): Likewise.
2664         (create_all_comp_units): Likewise.
2665         (scan_partial_symbols): Update calls.
2666         (add_partial_symbol): Likewise.
2667         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
2668         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
2669         (process_queue): Add dwarf2_per_objfile parameter.
2670         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
2671         (compute_compunit_symtab_includes): Likewise.
2672         (process_cu_includes): Add dwarf2_per_objfile parameter.
2673         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
2674         (process_full_type_unit): Likewise.
2675         (process_imported_unit_die): Update call.
2676         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
2677         (read_file_scope): Likewise.
2678         (allocate_dwo_file_hash_table): Add objfile parameter.
2679         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
2680         (create_cus_hash_table): Likewise.
2681         (create_dwp_hash_table): Likewise.
2682         (create_dwo_unit_in_dwp_v1): Likewise.
2683         (create_dwp_v2_section): Likewise.
2684         (create_dwo_unit_in_dwp_v2): Likewise.
2685         (lookup_dwo_unit_in_dwp): Likewise.
2686         (try_open_dwop_file): Likewise.
2687         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
2688         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
2689         cleanup to include a reference to dwarf2_per_objfile.
2690         (open_dwp_file): Add dwarf2_per_objfile parameter.
2691         (open_and_init_dwp_file): Likewise.
2692         (get_dwp_file): Likewise.
2693         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
2694         (queue_and_load_all_dwo_tus): Update call.
2695         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
2696         data.
2697         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
2698         (dwarf2_ranges_process): Likewise.
2699         (dwarf2_get_pc_bounds): Likewise.
2700         (mark_common_block_symbol_computed): Likewise.
2701         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
2702         (dwarf2_read_abbrevs): Update call.
2703         (read_partial_die): Use dwarf2_per_objfile from cu.
2704         (find_partial_die): Likewise.
2705         (fixup_partial_die): Likewise.
2706         (read_attribute_value): Likewise.
2707         (read_indirect_string_at_offset_from): Add objfile parameter.
2708         (read_indirect_string_at_offset): Add dwarf2_per_objfile
2709         parameter.
2710         (read_indirect_string_from_dwz): Add objfile parameter.
2711         (read_indirect_string): Add objfile parameter.
2712         (read_addr_index_1): Add dwarf2_per_objfile parameter.
2713         (read_addr_index): Use dwarf2_per_objfile from cu.
2714         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
2715         call dw2_setup.
2716         (read_str_index): Use dwarf2_per_objfile from cu.
2717         (get_debug_line_section): Likewise.
2718         (read_formatted_entries): Add dwarf2_per_objfile parameter.
2719         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
2720         (new_symbol_full): Use dwarf2_per_objfile from cu.
2721         (build_error_marker_type): Likewise.
2722         (lookup_die_type): Likewise.
2723         (determine_prefix): Likewise.
2724         (follow_die_offset): Likewise.
2725         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
2726         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
2727         (dwarf2_fetch_die_type_sect_off): Likewise.
2728         (dwarf2_get_die_type): Likewise.
2729         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
2730         (get_signatured_type): Likewise.
2731         (get_DW_AT_signature_type): Likewise.
2732         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
2733         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
2734         (cu_debug_loc_section): Likewise.
2735         (fill_in_loclist_baton): Likewise.
2736         (dwarf2_symbol_mark_computed): Likewise.
2737         (dwarf2_find_containing_comp_unit): Change objfile parameter to
2738         dwarf2_per_objfile.
2739         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
2740         parameter.
2741         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
2742         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
2743         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
2744         (set_die_type): Use dwarf2_free_objfile from cu.
2745         (get_die_type_at_offset): Likewise.
2746         (dwarf2_per_objfile_free): Don't assign global variable.
2747         (debug_names) <constructor>: Add dwarf2_per_objfile
2748         parameter, update m_debugstrlookup construction.
2749         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
2750         parameter.
2751         <m_dwarf2_per_objfile>: New field.
2752         <lookup>: Use m_dwarf2_per_objfile.
2753         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
2754         (psyms_seen_size): Likewise.
2755         (write_gdbindex): Replace objfile parameter with
2756         dwarf2_per_objfile.
2757         (write_debug_names): Likewise.
2758         (write_psymtabs_to_index): Likewise.
2759         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
2760         calls.
2761
2762 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
2763
2764         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
2765         <dwarf2_per_objfile>: New field.
2766         (struct dwarf2_per_cu_data) <objfile>: Remove.
2767         <dwarf2_per_objfile>: New field.
2768         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
2769         of objfile.
2770         (create_signatured_type_table_from_index): Likewise.
2771         (create_debug_type_hash_table): Likewise.
2772         (fill_in_sig_entry_from_dwo_entry): Likewise.
2773         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
2774         (create_type_unit_group): Assign dwarf2_per_objfile instead of
2775         objfile.
2776         (create_partial_symtab): Access objfile through
2777         dwarf2_per_objfile.
2778         (process_psymtab_comp_unit_reader): Likewise.
2779         (read_comp_units_from_section): Likewise.
2780         (scan_partial_symbols): Likewise.
2781         (add_partial_symbol): Likewise.
2782         (add_partial_subprogram): Likewise.
2783         (peek_die_abbrev): Likewise.
2784         (fixup_go_packaging): Likewise.
2785         (process_full_comp_unit): Likewise.
2786         (process_full_type_unit): Likewise.
2787         (process_imported_unit_die): Likewise.
2788         (dwarf2_compute_name): Likewise.
2789         (dwarf2_physname): Likewise.
2790         (read_import_statement): Likewise.
2791         (create_cus_hash_table): Assign dwarf2_physname instead of
2792         objfile.
2793         (read_func_scope): Access objfile through dwarf2_per_objfile.
2794         (read_lexical_block_scope): Likewise.
2795         (read_call_site_scope): Likewise.
2796         (read_variable): Likewise.
2797         (dwarf2_rnglists_process): Likewise.
2798         (dwarf2_ranges_process): Likewise.
2799         (dwarf2_ranges_read): Likewise.
2800         (dwarf2_record_block_ranges): Likewise.
2801         (dwarf2_add_field): Likewise.
2802         (dwarf2_add_member_fn): Likewise.
2803         (read_structure_type): Likewise.
2804         (process_structure_scope): Likewise.
2805         (read_enumeration_type): Likewise.
2806         (read_array_type): Likewise.
2807         (read_common_block): Likewise.
2808         (read_namespace_type): Likewise.
2809         (read_namespace): Likewise.
2810         (read_module_type): Likewise.
2811         (read_tag_pointer_type): Likewise.
2812         (read_tag_ptr_to_member_type): Likewise.
2813         (read_tag_string_type): Likewise.
2814         (read_subroutine_type): Likewise.
2815         (read_typedef): Likewise.
2816         (read_base_type): Likewise.
2817         (attr_to_dynamic_prop): Likewise.
2818         (read_subrange_type): Likewise.
2819         (read_unspecified_type): Likewise.
2820         (load_partial_dies): Likewise.
2821         (read_partial_die): Likewise.
2822         (find_partial_die): Likewise.
2823         (guess_partial_die_structure_name): Likewise.
2824         (fixup_partial_die): Likewise.
2825         (read_attribute_value): Likewise.
2826         (read_addr_index_from_leb128): Likewise.
2827         (dwarf2_read_addr_index): Likewise.
2828         (dwarf2_string_attr): Likewise.
2829         (lnp_state_machine::check_line_address): Likewise.
2830         (dwarf_decode_lines_1): Likewise.
2831         (dwarf_decode_lines): Likewise.
2832         (dwarf2_start_symtab): Likewise.
2833         (var_decode_location): Likewise.
2834         (new_symbol_full): Likewise.
2835         (dwarf2_const_value_data): Likewise.
2836         (dwarf2_const_value_attr): Likewise.
2837         (dwarf2_const_value): Likewise.
2838         (die_type): Likewise.
2839         (die_containing_type): Likewise.
2840         (lookup_die_type): Likewise.
2841         (guess_full_die_structure_name): Likewise.
2842         (anonymous_struct_prefix): Likewise.
2843         (dwarf2_name): Likewise.
2844         (follow_die_ref_or_sig): Likewise.
2845         (follow_die_offset): Likewise.
2846         (follow_die_ref): Likewise.
2847         (dwarf2_fetch_die_loc_sect_off): Likewise.
2848         (dwarf2_fetch_constant_bytes): Likewise.
2849         (dwarf2_fetch_die_type_sect_off): Likewise.
2850         (dwarf2_get_die_type): Likewise.
2851         (follow_die_sig): Likewise.
2852         (decode_locdesc): Likewise.
2853         (dwarf2_per_cu_objfile): Likewise.
2854         (dwarf2_per_cu_text_offset): Likewise.
2855         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
2856         objfile.
2857         (set_die_type): Access objfile through
2858         dwarf2_per_objfile.
2859
2860 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
2861
2862         * valprint.c (converted_character_d): Remove typedef.
2863         (DEF_VEC_O (converted_character_d)): Remove.
2864         (count_next_character): Use std::vector.
2865         (print_converted_chars_to_obstack): Likewise.
2866         (generic_printstr): Likewise.
2867
2868 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
2869
2870         * xml-support.h (struct gdb_xml_value): Add constructor.
2871         <value>: Change type to unique_xmalloc_ptr.
2872         (gdb_xml_value_s): Remove typedef.
2873         (DEF_VEC_O (gdb_xml_value_s)): Remove.
2874         (gdb_xml_element_start_handler): Change parameter type to
2875         std::vector.
2876         (xml_find_attribute): Likewise.
2877         * xml-support.c (xml_find_attribute): Change parameter type to
2878         std::vector and adjust.
2879         (gdb_xml_values_cleanup): Remove.
2880         (gdb_xml_parser::start_element): Adjust to std::vector.
2881         (xinclude_start_include): Change paraeter type to std::vector
2882         and adjust.
2883         * btrace.c (check_xml_btrace_version): Likewise.
2884         (parse_xml_btrace_block): Likewise.
2885         (parse_xml_btrace_pt_config_cpu): Likewise.
2886         (parse_xml_btrace_pt): Likewise.
2887         (parse_xml_btrace_conf_bts): Likewise.
2888         (parse_xml_btrace_conf_pt): Likewise.
2889         * memory-map.c (memory_map_start_memory): Likewise.
2890         (memory_map_start_property): Likewise.
2891         * osdata.c (osdata_start_osdata): Likewise.
2892         (osdata_start_item): Likewise.
2893         (osdata_start_column): Likewise.
2894         * remote.c (start_thread): Likewise.
2895         * solib-aix.c (library_list_start_library): Likewise.
2896         (library_list_start_list): Likewise.
2897         * solib-svr4.c (library_list_start_library): Likewise.
2898         (svr4_library_list_start_list): Likewise.
2899         * solib-target.c (library_list_start_segment): Likewise.
2900         (library_list_start_section): Likewise.
2901         (library_list_start_library): Likewise.
2902         (library_list_start_list): Likewise.
2903         * tracepoint.c (traceframe_info_start_memory): Likewise.
2904         (traceframe_info_start_tvar): Likewise.
2905         * xml-syscall.c (syscall_start_syscall): Likewise.
2906         * xml-tdesc.c (tdesc_start_target): Likewise.
2907         (tdesc_start_feature): Likewise.
2908         (tdesc_start_reg): Likewise.
2909         (tdesc_start_union): Likewise.
2910         (tdesc_start_struct): Likewise.
2911         (tdesc_start_flags): Likewise.
2912         (tdesc_start_enum): Likewise.
2913         (tdesc_start_field): Likewise.
2914         (tdesc_start_enum_value): Likewise.
2915         (tdesc_start_vector): Likewise.
2916
2917 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
2918
2919         * extension.h (struct xmethod_worker) <clone>: Remove.
2920         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
2921         Remove.
2922         (python_xmethod_worker::clone): Remove.
2923         * valops.c (find_overload_match): Use std::move instead of
2924         clone.
2925
2926 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
2927
2928         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
2929         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
2930         <free_xmethod_worker_data>: Remove.
2931         <get_matching_xmethod_workers>: Chance VEC to std::vector.
2932         <get_xmethod_arg_types>: Remove.
2933         <get_xmethod_result_type>: Remove.
2934         <invoke_xmethod>: Remove.
2935         * extension.c (new_xmethod_worker): Remove.
2936         (clone_xmethod_worker): Remove.
2937         (get_matching_xmethod_workers): Return void, pass std::vector by
2938         pointer.
2939         (get_xmethod_arg_types): Rename to...
2940         (xmethod_worker::get_arg_types): ... this, and adjust.
2941         (get_xmethod_result_type): Rename to...
2942         (xmethod_worker::get_result_type): ... this, and adjust.
2943         (invoke_xmethod): Remove.
2944         (free_xmethod_worker): Remove.
2945         (free_xmethod_worker_vec): Remove.
2946         * extension.h (enum ext_lang_rc): Move here from
2947         extension-priv.h.
2948         (struct xmethod_worker): Add constructor and destructor.
2949         <data>: Remove.
2950         <value>: Remove.
2951         <invoke, clone, do_get_result_type, do_get_arg_types>: New
2952         virtual pure methods.
2953         <get_arg_types, get_result_type>: New methods.
2954         (xmethod_worker_ptr): Remove typedef.
2955         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
2956         (xmethod_worker_vec): Remove typedef.
2957         (xmethod_worker_up): New typedef.
2958         (invoke_xmethod): Remove.
2959         (clone_xmethod_worker): Remove.
2960         (free_xmethod_worker): Remove.
2961         (free_xmethod_worker_vec): Remove.
2962         (get_xmethod_arg_types): Remove.
2963         (get_xmethod_result_type): Remove.
2964         * valops.c (find_method_list): Use std::vector, don't use
2965         intermediate vector.
2966         (value_find_oload_method_list): Use std::vector.
2967         (find_overload_match): Use std::vector.
2968         (find_oload_champ): Use std::vector.
2969         * value.c (value_free): Use operator delete.
2970         (value_of_xmethod): Rename to...
2971         (value_from_xmethod): ... this.  Don't assign
2972         xmethod_worker::value, take rvalue-reference.
2973         (result_type_of_xmethod): Adjust.
2974         (call_xmethod): Adjust.
2975         * value.h: Include extension.h.
2976         (struct xmethod_worker): Don't forward-declare.
2977         (value_of_xmethod): Rename to...
2978         (value_from_xmethod): ... this, take rvalue-reference.
2979         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
2980         (struct python_xmethod_worker): ... this, add constructor and
2981         destructor.
2982         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
2983         (gdbpy_free_xmethod_worker_data): Rename to...
2984         (python_xmethod_worker::~python_xmethod_worker): ... this and
2985         adjust.
2986         (gdbpy_clone_xmethod_worker_data): Rename to...
2987         (python_xmethod_worker::clone): ... this and adjust.
2988         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
2989         temporary vector.
2990         (gdbpy_get_xmethod_arg_types): Rename to...
2991         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
2992         (gdbpy_get_xmethod_result_type): Rename to...
2993         (python_xmethod_worker::do_get_result_type): ... this and
2994         adjust.
2995         (gdbpy_invoke_xmethod): Rename to...
2996         (python_xmethod_worker::invoke): ... this and adjust.
2997         (new_python_xmethod_worker): Rename to...
2998         (python_xmethod_worker::python_xmethod_worker): ... this and
2999         adjust.
3000         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
3001         Remove.
3002         (gdbpy_free_xmethod_worker_data): Remove.
3003         (gdbpy_get_matching_xmethod_workers): Use std::vector.
3004         (gdbpy_get_xmethod_arg_types): Remove.
3005         (gdbpy_get_xmethod_result_type): Remove.
3006         (gdbpy_invoke_xmethod): Remove.
3007         * python/python.c (python_extension_ops): Remove obsolete
3008         callbacks.
3009
3010 2018-01-05  Pedro Alves  <palves@redhat.com>
3011
3012         PR gdb/18653
3013         * common/signals-state-save-restore.c
3014         (save_original_signals_state): New parameter 'quiet'.  Warn if we
3015         find a custom handler preinstalled, instead of internal erroring.
3016         But only warn if !quiet.
3017         * common/signals-state-save-restore.h
3018         (save_original_signals_state): New parameter 'quiet'.
3019         * main.c (captured_main_1): Move save_original_signals_state call
3020         after option handling, and pass QUIET.
3021
3022 2018-01-05  Pedro Alves  <palves@redhat.com>
3023
3024         * spu-tdep.c (spu_catch_start): Pass
3025         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
3026
3027 2018-01-05  Pedro Alves  <palves@redhat.com>
3028
3029         PR gdb/22670
3030         * ada-lang.c (literal_symbol_name_matcher): New function.
3031         (ada_get_symbol_name_matcher): Use it for
3032         symbol_name_match_type::SEARCH_NAME.
3033         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
3034         it down instead of assuming symbol_name_match_type::FULL.
3035         * block.h (block_lookup_symbol): New parameter 'match_type'.
3036         * c-valprint.c (print_unpacked_pointer): Use
3037         lookup_symbol_search_name instead of lookup_symbol.
3038         * compile/compile-object-load.c (get_out_value_type): Pass down
3039         symbol_name_match_type::SEARCH_NAME.
3040         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
3041         symbol_name_match_type::FULL.
3042         * cp-support.c (cp_get_symbol_name_matcher): Handle
3043         symbol_name_match_type::SEARCH_NAME.
3044         * infrun.c (insert_exception_resume_breakpoint): Use
3045         lookup_symbol_search_name.
3046         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
3047         * psymtab.c (maintenance_check_psymtabs): Use
3048         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
3049         * stack.c (print_frame_args): Use lookup_symbol_search_name and
3050         SYMBOL_SEARCH_NAME.
3051         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
3052         if symbol_name_match_type::SEARCH_NAME.
3053         (lookup_symbol_in_language): Pass down
3054         symbol_name_match_type::FULL.
3055         (lookup_symbol_search_name): New.
3056         (lookup_language_this): Pass down
3057         symbol_name_match_type::SEARCH_NAME.
3058         (lookup_symbol_aux, lookup_local_symbol): New parameter
3059         'match_type'.  Pass it down.
3060         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
3061         (lookup_symbol_search_name): New declaration.
3062         (lookup_symbol_in_block): New 'match_type' parameter.
3063
3064 2018-01-05  Pedro Alves  <palves@redhat.com>
3065
3066         PR gdb/22670
3067         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
3068         ada_lookup_symbol.
3069         (ada_lookup_symbol): Reimplement in terms of
3070         ada_lookup_symbol_list, bits factored out from
3071         ada_lookup_encoded_symbol.
3072
3073 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
3074
3075         * ada-exp.y (write_object_renaming): When subscripting an array
3076         using a symbol as the index, pass the block in call to
3077         ada_lookup_encoded_symbol when looking that symbol up.
3078
3079 2018-01-05  Jerome Guitton  <guitton@adacore.com>
3080
3081         * ada-lang.c (ada_array_length): Use ada_index_type instead of
3082         TYPE_INDEX_TYPE.
3083
3084 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
3085
3086         * ada-lang.c (ada_to_fixed_value_create): Add handling of
3087         the case where VALUE_LVAL (val0) is not lval_memory.
3088
3089 2018-01-05  Xavier Roirand  <roirand@adacore.com>
3090
3091         * ada-valprint.c (print_optional_low_bound): Handle
3092         character-indexed array printing like boolean-indexed array
3093         printing.
3094
3095 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
3096
3097         * NEWS: Create a new section for the next release branch.
3098         Rename the section of the current branch, now that it has
3099         been cut.
3100
3101 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
3102
3103         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
3104         * version.in: Bump version to 8.1.50.DATE-git.
3105
3106 2018-01-03  Xavier Roirand  <roirand@adacore.com>
3107
3108         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
3109         Add field.
3110         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
3111         Add field.
3112         (default_exception_support_info) <catch_handlers_sym>: Add field.
3113         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
3114         (ada_exception_name_addr_1): Add "catch handlers" handling.
3115         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
3116         Update all callers.
3117         (create_excep_cond_exprs) <ex>: Add parameter.
3118         (re_set_exception): Update create_excep_cond_exprs call.
3119         (print_it_exception, print_one_exception, print_mention_exception)
3120         (print_recreate_exception): Add "catch handler" handling.
3121         (allocate_location_catch_handlers, re_set_catch_handlers)
3122         (check_status_catch_handlers, print_it_catch_handlers)
3123         (print_one_catch_handlers, print_mention_catch_handlers)
3124         (print_recreate_catch_handlers): New function.
3125         (catch_handlers_breakpoint_ops): New variable.
3126         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
3127         Add parameter.  Add "catch handler" handling.
3128         (ada_exception_sym_name, ada_exception_breakpoint_ops):
3129         Add "catch handler" handling.
3130         (ada_exception_catchpoint_cond_string): Add "catch handler"
3131         handling.
3132         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
3133         call.
3134         (catch_ada_handlers_command): New function.
3135         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
3136         operations structure.
3137         (_initialize_ada_language): Add "catch handlers" command entry.
3138         * NEWS: Document "catch handlers" feature.
3139
3140 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
3141
3142         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
3143         account when creating the array type of the slice.
3144         (ada_value_slice): Likewise.
3145
3146 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
3147
3148         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
3149         New enum value.
3150         (create_array_type_with_stride): Add byte_stride_prop parameter.
3151         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
3152         New parameter.  Update all callers in this file.
3153         (array_type_has_dynamic_stride): New function.
3154         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
3155         of arrays with dynamic byte strides.
3156         * dwarf2read.c (read_array_type): Add support for dynamic
3157         DW_AT_byte_stride attributes.
3158
3159 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
3160
3161         * dwarf2read.c (read_unspecified_type): Treat
3162         DW_TAG_enumeration_type DIEs from Ada units as stubs.
3163
3164 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
3165
3166         Update copyright year range in all GDB files.
3167
3168 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
3169
3170         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
3171         and gdb/testsuite/gdb.base/step-line.c.
3172
3173 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
3174
3175         * copyright.py (main): Dump the contents of
3176         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
3177         even if BY_HAND is empty.
3178
3179 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
3180
3181         * top.c (print_gdb_version): Update Copyright year in version
3182         message.
3183
3184 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
3185
3186         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
3187
3188 For older changes see ChangeLog-2017.
3189 \f
3190 Local Variables:
3191 mode: change-log
3192 left-margin: 8
3193 fill-column: 74
3194 version-control: never
3195 coding: utf-8
3196 End: