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