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