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