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