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