Allocate dwarf2_cu with new
[external/binutils.git] / gdb / ChangeLog
1 2018-01-17  Tom Tromey  <tom@tromey.com>
2             Simon Marchi  <simon.marchi@ericsson.com>
3
4         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
5         (dwarf2_per_objfile::free_cached_comp_units)
6         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
7         (init_cutu_and_read_dies_no_follow): Update.
8         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
9         (dwarf2_cu::~dwarf2_cu): New.
10         (free_heap_comp_unit, free_stack_comp_unit): Remove.
11         (age_cached_comp_units, free_one_cached_comp_unit): Update.
12
13 2018-01-17  Tom Tromey  <tom@tromey.com>
14             Simon Marchi  <simon.marchi@ericsson.com>
15
16         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
17         (struct die_reader_specs) <abbrev_table>: New member.
18         (struct abbrev_table): Add constructor.
19         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
20         <abbrev_obstack>: Now an auto_obstack.
21         (abbrev_table_up): New typedef.
22         (init_cu_die_reader): Add abbrev_table parameter.
23         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
24         Add result_dwo_abbrev_table.
25         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
26         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
27         Update.
28         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
29         parameter.
30         (skip_children): Update.
31         (abbrev_table::alloc_abbrev): Rename from
32         abbrev_table_alloc_abbrev.
33         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
34         (abbrev_table::lookup_abbrev): Rename from
35         abbrev_table_lookup_abbrev.
36         (abbrev_table_read_table): Return abbrev_table_up.
37         (abbrev_table_free, abbrev_table_free_cleanup)
38         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
39         (load_partial_dies): Update.
40
41 2018-01-17  Tom Tromey  <tom@tromey.com>
42
43         * dwarf2read.c (dwarf2_compute_name): Update comment.
44         (read_func_scope, read_variable): Update.
45         (new_symbol): Remove.
46         (new_symbol_full): Rename to new_symbol.
47
48 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
49
50         PR gdb/16577
51         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
52         a warning instead of throwing an error, set section size to 0 and return
53         NULL.
54         * gdb_bfd.h (gdb_bfd_map_section): Update description.
55
56 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
57
58         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
59         std::string.
60         (linux_ptrace_attach_fail_reason_string): Likewise.
61         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
62         Likewise.
63         (linux_ptrace_attach_fail_reason_string): Likewise.
64         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
65
66 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
67
68         * linux-nat.c (linux_nat_attach): Remove xstrdup.
69
70 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
71
72         PR gdb/21559
73         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
74         checking for fs_base/gs_base fields in struct user_regs_struct.
75         * configure: Regenerate.
76
77 2018-01-17  Yao Qi  <yao.qi@linaro.org>
78
79         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
80         function.
81         (aarch64_linux_init_abi): Install it to gdbarch hook
82         gcc_target_options.
83
84 2018-01-15  Pedro Alves  <palves@redhat.com>
85
86         * common/signals-state-save-restore.c
87         (save_original_signals_state): Fix typos.
88
89 2017-01-12  Tom Tromey  <tom@tromey.com>
90             Sergio Durigan Junior  <sergiodj@redhat.com>
91
92         * Makefile.in (install-only): Install gdb-add-index.
93
94 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
95
96         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
97
98 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
99
100         * infrun.c (keep_going_pass_signal): Clear step-over info when
101         insert_breakpoints fails.
102
103 2018-01-11  Pedro Alves  <palves@redhat.com>
104
105         PR gdb/22583
106         * infrun.c (resume): Rename to ...
107         (resume_1): ... this.
108         (resume): Reimplement as wrapper around resume_1.
109
110 2018-01-11  Pedro Alves  <palves@redhat.com>
111
112         PR remote/22597
113         * remote.c (remote_parse_stop_reply): Default to the last-set
114         general thread instead of to 'magic_null_ptid'.
115
116 2018-01-10  Pedro Alves  <palves@redhat.com>
117
118         * language.h (language_get_symbol_name_matcher): Rename ...
119         (get_symbol_name_matcher): ... this.
120         * language.c (language_get_symbol_name_matcher): Ditto.
121         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
122         callers adjusted.
123
124 2018-01-10  Pedro Alves  <palves@redhat.com>
125
126         PR gdb/22670
127         * dwarf2read.c
128         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
129         Adjust to use language_get_symbol_name_matcher instead of
130         language_defn::la_get_symbol_name_matcher.
131         * language.c (language_get_symbol_name_matcher): If in Ada mode
132         and the lookup name is a verbatim match, return Ada's matcher.
133         * language.h (language_get_symbol_name_matcher): Adjust comment.
134         (ada_lookup_name_info::verbatim_p):: New method.
135
136 2018-01-10  Pedro Alves  <palves@redhat.com>
137
138         PR gdb/22670
139         * ada-lang.c (ada_collect_symbol_completion_matches): If the
140         minsym's language is language_auto or language_cplus, pass down
141         language_ada instead.
142         * symtab.c (compare_symbol_name): Don't frob symbol language here.
143
144 2018-01-10  Pedro Alves  <palves@redhat.com>
145
146         PR gdb/22670
147         * minsyms.c (linkage_name_str): New function.
148         (iterate_over_minimal_symbols): Use it.
149
150 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
151
152         * NEWS: Document that 'info proc' now works on FreeBSD.
153
154 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
155
156         * configure.ac: Check for kinfo_getfile in libutil.
157         * configure: Regenerate.
158         * config.in: Regenerate.
159         * fbsd-nat.c: Include "fbsd-tdep.h".
160         (fbsd_fetch_cmdline): New.
161         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
162         rather than calling error.
163         (fbsd_info_proc): New.
164         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
165         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
166         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
167
168 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
169
170         * fbsd-nat.c (struct free_deleter): Remove.
171         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
172
173 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
174
175         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
176         NULL for an empty pathname.
177
178 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
179
180         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
181         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
182         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
183         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
184         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
185         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
186         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
187         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
188         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
189         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
190         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
191         (fbsd_core_fetch_timeval, fbsd_print_sigset)
192         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
193         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
194         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
195
196 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
197
198         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
199         (gnu_xfer_auxv): New function.
200         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
201         TARGET_OBJECT_AUXV.
202
203 2018-01-08  Yao Qi  <yao.qi@linaro.org>
204             Simon Marchi  <simon.marchi@ericsson.com>
205
206         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
207         common/selftest.c.
208         (COMMON_OBS): Remove selftest.o.
209         * configure.ac: Append selftest-arch.c and common/selftest.c to
210         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
211         * configure: Re-generated.
212         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
213         GDB_SELF_TEST.
214         (maintenance_info_selftests): Likewise.
215
216 2018-01-08  Xavier Roirand  <roirand@adacore.com>
217
218         * ada-valprint.c (val_print_packed_array_elements): Use
219         proper number of elements when printing an array indexed
220         by an enumeration type.
221
222 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
223
224         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
225         (dw2_get_file_names_reader): Adjust.
226         (lookup_dwo_signatured_type): Adjust.
227         (lookup_dwp_signatured_type): Adjust.
228         (lookup_signatured_type): Adjust.
229         (create_type_unit_group): Adjust.
230         (get_type_unit_group): Adjust.
231         (process_psymtab_comp_unit_reader): Adjust.
232         (build_type_psymtabs_reader): Adjust.
233         (scan_partial_symbols): Adjust.
234         (add_partial_symbol): Adjust.
235         (add_partial_subprogram): Adjust.
236         (peek_die_abbrev): Adjust.
237         (fixup_go_packaging): Adjust.
238         (process_imported_unit_die): Adjust.
239         (dwarf2_compute_name): Adjust.
240         (dwarf2_physname): Adjust.
241         (read_import_statement): Adjust.
242         (handle_DW_AT_stmt_list): Adjust.
243         (read_file_scope): Adjust.
244         (read_func_scope): Adjust.
245         (read_lexical_block_scope): Adjust.
246         (read_call_site_scope): Adjust.
247         (read_variable): Adjust.
248         (dwarf2_rnglists_process): Adjust.
249         (dwarf2_ranges_process): Adjust.
250         (dwarf2_ranges_read): Adjust.
251         (dwarf2_get_pc_bounds): Adjust.
252         (dwarf2_record_block_ranges): Adjust.
253         (dwarf2_add_field): Adjust.
254         (dwarf2_add_member_fn): Adjust.
255         (read_structure_type): Adjust.
256         (process_structure_scope): Adjust.
257         (read_enumeration_type): Adjust.
258         (read_array_type): Adjust.
259         (mark_common_block_symbol_computed): Adjust.
260         (read_common_block): Adjust.
261         (read_namespace_type): Adjust.
262         (read_namespace): Adjust.
263         (read_module_type): Adjust.
264         (read_tag_pointer_type): Adjust.
265         (read_tag_ptr_to_member_type): Adjust.
266         (read_tag_string_type): Adjust.
267         (read_subroutine_type): Adjust.
268         (read_typedef): Adjust.
269         (read_base_type): Adjust.
270         (attr_to_dynamic_prop): Adjust.
271         (read_subrange_type): Adjust.
272         (read_unspecified_type): Adjust.
273         (dwarf2_read_abbrevs): Adjust.
274         (load_partial_dies): Adjust.
275         (read_partial_die): Adjust.
276         (find_partial_die): Adjust.
277         (guess_partial_die_structure_name): Adjust.
278         (fixup_partial_die): Adjust.
279         (read_attribute_value): Adjust.
280         (read_addr_index): Adjust.
281         (read_addr_index_from_leb128): Adjust.
282         (read_str_index): Adjust.
283         (dwarf2_string_attr): Adjust.
284         (get_debug_line_section): Adjust.
285         (dwarf_decode_line_header): Adjust.
286         (lnp_state_machine::check_line_address): Adjust.
287         (dwarf_decode_lines_1): Adjust.
288         (dwarf_decode_lines): Adjust.
289         (dwarf2_start_symtab): Adjust.
290         (var_decode_location): Adjust.
291         (new_symbol_full): Adjust.
292         (dwarf2_const_value_data): Adjust.
293         (dwarf2_const_value_attr): Adjust.
294         (dwarf2_const_value): Adjust.
295         (die_type): Adjust.
296         (die_containing_type): Adjust.
297         (build_error_marker_type): Adjust.
298         (lookup_die_type): Adjust.
299         (guess_full_die_structure_name): Adjust.
300         (anonymous_struct_prefix): Adjust.
301         (determine_prefix): Adjust.
302         (dwarf2_name): Adjust.
303         (follow_die_ref_or_sig): Adjust.
304         (follow_die_offset): Adjust.
305         (follow_die_ref): Adjust.
306         (follow_die_sig_1): Adjust.
307         (follow_die_sig): Adjust.
308         (get_signatured_type): Adjust.
309         (get_DW_AT_signature_type): Adjust.
310         (decode_locdesc): Adjust.
311         (dwarf_decode_macros): Adjust.
312         (cu_debug_loc_section): Adjust.
313         (fill_in_loclist_baton): Adjust.
314         (dwarf2_symbol_mark_computed): Adjust.
315         (init_one_comp_unit): Don't assign
316         dwarf2_cu::dwarf2_per_objfile.
317         (set_die_type): Adjust.
318
319 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
320
321         * dwarf2read.c (struct mapped_debug_names): Add constructor.
322         <dwarf2_per_objfile>: New field.
323         (dwarf2_per_objfile): Remove global.
324         (get_dwarf2_per_objfile): New function.
325         (set_dwarf2_per_objfile): New function.
326         (dwarf2_build_psymtabs_hard): Change objfile parameter to
327         dwarf2_per_objfile.
328         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
329         (read_abbrev_offset): Likewise.
330         (read_indirect_string): Likewise.
331         (read_indirect_line_string): Likewise.
332         (read_indirect_string_at_offset): Likewise.
333         (read_indirect_string_from_dwz): Likewise.
334         (dwarf2_find_containing_comp_unit): Change objfile parameter to
335         dwarf2_per_objfile.
336         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
337         (create_all_comp_units): Change objfile parameter to
338         dwarf2_per_objfile.
339         (create_all_type_units): Likewise.
340         (process_queue): Add dwarf2_per_objfile parameter.
341         (read_and_check_comp_unit_head): Likewise.
342         (lookup_dwo_unit_in_dwp): Likewise.
343         (get_dwp_file): Likewise.
344         (process_cu_includes): Likewise.
345         (struct free_dwo_file_cleanup_data): New struct.
346         (dwarf2_has_info): Use get_dwarf2_per_objfile and
347         set_dwarf2_per_objfile.
348         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
349         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
350         context, adjust calls.
351         (dw2_instantiate_symtab): Likewise.
352         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
353         (dw2_get_cu): Likewise.
354         (create_cu_from_index_list): Change objfile parameter to
355         dwarf2_per_objfile.
356         (create_cus_from_index_list): Get dwarf2_per_objfile from
357         context, adjust calls.
358         (create_cus_from_index): Likewise.
359         (create_signatured_type_table_from_index): Change objfile
360         parameter to dwarf2_per_objfile.
361         (create_signatured_type_table_from_debug_names): Change objfile
362         parameter to dwarf2_per_objfile.
363         (create_addrmap_from_index): Likewise.
364         (create_addrmap_from_aranges): Likewise.
365         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
366         (dw2_setup): Remove.
367         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
368         context.
369         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
370         get_dwarf2_per_objfile.
371         (dw2_forget_cached_source_info): Likewise.
372         (dw2_map_symtabs_matching_filename): Likewise.
373         (struct dw2_symtab_iterator) <index>: Remove.
374         <dwarf2_per_objfile>: New field.
375         (dw2_symtab_iter_init): Replace index parameter with
376         dwarf2_per_objfile.
377         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
378         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
379         (dw2_print_stats): Likewise.
380         (dw2_dump): Likewise.
381         (dw2_expand_symtabs_for_function): Likewise.
382         (dw2_expand_all_symtabs): Likewise.
383         (dw2_expand_symtabs_with_fullname): Likewise.
384         (dw2_expand_marked_cus): Replace index and objfile parameters
385         with dwarf2_per_objfile.
386         (dw_expand_symtabs_matching_file_matcher): Add
387         dwarf2_per_objfile parameter and adjust calls.
388         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
389         adjust calls.
390         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
391         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
392         adjust calls.
393         (create_cus_from_debug_names_list): Replace objfile parameter
394         with dwarf2_per_objfile and adjust calls.
395         (create_cus_from_debug_names): Likewise.
396         (dwarf2_read_debug_names): Likewise.
397         (mapped_debug_names::namei_to_name): Adjust call.
398         (dw2_debug_names_iterator::next): Likewise.
399         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
400         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
401         (dw2_debug_names_dump): Likewise.
402         (dw2_debug_names_expand_symtabs_for_function): Likewise.
403         (dw2_debug_names_expand_symtabs_matching): Likewise.
404         (dwarf2_initialize_objfile): Likewise.
405         (dwarf2_build_psymtabs): Likewise.
406         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
407         this_cu.
408         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
409         (read_and_check_comp_unit_head): Likewise.
410         (read_abbrev_offset): Likewise.
411         (create_debug_type_hash_table): Likewise.
412         (create_debug_types_hash_table): Likewise.
413         (create_all_type_units): Replace objfile parameter with
414         dwarf2_per_objfile.
415         (add_type_unit): Add dwarf2_per_objfile parameter.
416         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
417         with dwarf2_per_objfile.
418         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
419         (lookup_dwp_signatured_type): Likewise.
420         (lookup_signatured_type): Likewise.
421         (read_cutu_die_from_dwo): Likewise.
422         (init_tu_and_read_dwo_dies): Likewise.
423         (init_cutu_and_read_dies): Likewise.
424         (init_cutu_and_read_dies_no_follow): Likewise.
425         (allocate_type_unit_groups_table): Add objfile parameter.
426         (create_type_unit_group): Use dwarf2_per_objfile from cu.
427         (get_type_unit_group): Likewise.
428         (process_psymtab_comp_unit): Update call.
429         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
430         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
431         (print_tu_stats): Likewise.
432         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
433         in void* parameter.
434         (build_type_psymtabs): Change objfile parameter to
435         dwarf2_per_objfile.
436         (process_skeletonless_type_unit): Use dwarf2_per_objfile
437         passed in void* parameter.
438         (process_skeletonless_type_units): Change objfile parameter to
439         dwarf2_per_objfile.
440         (set_partial_user): Likewise.
441         (dwarf2_build_psymtabs_hard): Likewise.
442         (read_comp_units_from_section): Likewise.
443         (create_all_comp_units): Likewise.
444         (scan_partial_symbols): Update calls.
445         (add_partial_symbol): Likewise.
446         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
447         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
448         (process_queue): Add dwarf2_per_objfile parameter.
449         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
450         (compute_compunit_symtab_includes): Likewise.
451         (process_cu_includes): Add dwarf2_per_objfile parameter.
452         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
453         (process_full_type_unit): Likewise.
454         (process_imported_unit_die): Update call.
455         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
456         (read_file_scope): Likewise.
457         (allocate_dwo_file_hash_table): Add objfile parameter.
458         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
459         (create_cus_hash_table): Likewise.
460         (create_dwp_hash_table): Likewise.
461         (create_dwo_unit_in_dwp_v1): Likewise.
462         (create_dwp_v2_section): Likewise.
463         (create_dwo_unit_in_dwp_v2): Likewise.
464         (lookup_dwo_unit_in_dwp): Likewise.
465         (try_open_dwop_file): Likewise.
466         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
467         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
468         cleanup to include a reference to dwarf2_per_objfile.
469         (open_dwp_file): Add dwarf2_per_objfile parameter.
470         (open_and_init_dwp_file): Likewise.
471         (get_dwp_file): Likewise.
472         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
473         (queue_and_load_all_dwo_tus): Update call.
474         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
475         data.
476         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
477         (dwarf2_ranges_process): Likewise.
478         (dwarf2_get_pc_bounds): Likewise.
479         (mark_common_block_symbol_computed): Likewise.
480         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
481         (dwarf2_read_abbrevs): Update call.
482         (read_partial_die): Use dwarf2_per_objfile from cu.
483         (find_partial_die): Likewise.
484         (fixup_partial_die): Likewise.
485         (read_attribute_value): Likewise.
486         (read_indirect_string_at_offset_from): Add objfile parameter.
487         (read_indirect_string_at_offset): Add dwarf2_per_objfile
488         parameter.
489         (read_indirect_string_from_dwz): Add objfile parameter.
490         (read_indirect_string): Add objfile parameter.
491         (read_addr_index_1): Add dwarf2_per_objfile parameter.
492         (read_addr_index): Use dwarf2_per_objfile from cu.
493         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
494         call dw2_setup.
495         (read_str_index): Use dwarf2_per_objfile from cu.
496         (get_debug_line_section): Likewise.
497         (read_formatted_entries): Add dwarf2_per_objfile parameter.
498         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
499         (new_symbol_full): Use dwarf2_per_objfile from cu.
500         (build_error_marker_type): Likewise.
501         (lookup_die_type): Likewise.
502         (determine_prefix): Likewise.
503         (follow_die_offset): Likewise.
504         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
505         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
506         (dwarf2_fetch_die_type_sect_off): Likewise.
507         (dwarf2_get_die_type): Likewise.
508         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
509         (get_signatured_type): Likewise.
510         (get_DW_AT_signature_type): Likewise.
511         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
512         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
513         (cu_debug_loc_section): Likewise.
514         (fill_in_loclist_baton): Likewise.
515         (dwarf2_symbol_mark_computed): Likewise.
516         (dwarf2_find_containing_comp_unit): Change objfile parameter to
517         dwarf2_per_objfile.
518         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
519         parameter.
520         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
521         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
522         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
523         (set_die_type): Use dwarf2_free_objfile from cu.
524         (get_die_type_at_offset): Likewise.
525         (dwarf2_per_objfile_free): Don't assign global variable.
526         (debug_names) <constructor>: Add dwarf2_per_objfile
527         parameter, update m_debugstrlookup construction.
528         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
529         parameter.
530         <m_dwarf2_per_objfile>: New field.
531         <lookup>: Use m_dwarf2_per_objfile.
532         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
533         (psyms_seen_size): Likewise.
534         (write_gdbindex): Replace objfile parameter with
535         dwarf2_per_objfile.
536         (write_debug_names): Likewise.
537         (write_psymtabs_to_index): Likewise.
538         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
539         calls.
540
541 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
542
543         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
544         <dwarf2_per_objfile>: New field.
545         (struct dwarf2_per_cu_data) <objfile>: Remove.
546         <dwarf2_per_objfile>: New field.
547         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
548         of objfile.
549         (create_signatured_type_table_from_index): Likewise.
550         (create_debug_type_hash_table): Likewise.
551         (fill_in_sig_entry_from_dwo_entry): Likewise.
552         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
553         (create_type_unit_group): Assign dwarf2_per_objfile instead of
554         objfile.
555         (create_partial_symtab): Access objfile through
556         dwarf2_per_objfile.
557         (process_psymtab_comp_unit_reader): Likewise.
558         (read_comp_units_from_section): Likewise.
559         (scan_partial_symbols): Likewise.
560         (add_partial_symbol): Likewise.
561         (add_partial_subprogram): Likewise.
562         (peek_die_abbrev): Likewise.
563         (fixup_go_packaging): Likewise.
564         (process_full_comp_unit): Likewise.
565         (process_full_type_unit): Likewise.
566         (process_imported_unit_die): Likewise.
567         (dwarf2_compute_name): Likewise.
568         (dwarf2_physname): Likewise.
569         (read_import_statement): Likewise.
570         (create_cus_hash_table): Assign dwarf2_physname instead of
571         objfile.
572         (read_func_scope): Access objfile through dwarf2_per_objfile.
573         (read_lexical_block_scope): Likewise.
574         (read_call_site_scope): Likewise.
575         (read_variable): Likewise.
576         (dwarf2_rnglists_process): Likewise.
577         (dwarf2_ranges_process): Likewise.
578         (dwarf2_ranges_read): Likewise.
579         (dwarf2_record_block_ranges): Likewise.
580         (dwarf2_add_field): Likewise.
581         (dwarf2_add_member_fn): Likewise.
582         (read_structure_type): Likewise.
583         (process_structure_scope): Likewise.
584         (read_enumeration_type): Likewise.
585         (read_array_type): Likewise.
586         (read_common_block): Likewise.
587         (read_namespace_type): Likewise.
588         (read_namespace): Likewise.
589         (read_module_type): Likewise.
590         (read_tag_pointer_type): Likewise.
591         (read_tag_ptr_to_member_type): Likewise.
592         (read_tag_string_type): Likewise.
593         (read_subroutine_type): Likewise.
594         (read_typedef): Likewise.
595         (read_base_type): Likewise.
596         (attr_to_dynamic_prop): Likewise.
597         (read_subrange_type): Likewise.
598         (read_unspecified_type): Likewise.
599         (load_partial_dies): Likewise.
600         (read_partial_die): Likewise.
601         (find_partial_die): Likewise.
602         (guess_partial_die_structure_name): Likewise.
603         (fixup_partial_die): Likewise.
604         (read_attribute_value): Likewise.
605         (read_addr_index_from_leb128): Likewise.
606         (dwarf2_read_addr_index): Likewise.
607         (dwarf2_string_attr): Likewise.
608         (lnp_state_machine::check_line_address): Likewise.
609         (dwarf_decode_lines_1): Likewise.
610         (dwarf_decode_lines): Likewise.
611         (dwarf2_start_symtab): Likewise.
612         (var_decode_location): Likewise.
613         (new_symbol_full): Likewise.
614         (dwarf2_const_value_data): Likewise.
615         (dwarf2_const_value_attr): Likewise.
616         (dwarf2_const_value): Likewise.
617         (die_type): Likewise.
618         (die_containing_type): Likewise.
619         (lookup_die_type): Likewise.
620         (guess_full_die_structure_name): Likewise.
621         (anonymous_struct_prefix): Likewise.
622         (dwarf2_name): Likewise.
623         (follow_die_ref_or_sig): Likewise.
624         (follow_die_offset): Likewise.
625         (follow_die_ref): Likewise.
626         (dwarf2_fetch_die_loc_sect_off): Likewise.
627         (dwarf2_fetch_constant_bytes): Likewise.
628         (dwarf2_fetch_die_type_sect_off): Likewise.
629         (dwarf2_get_die_type): Likewise.
630         (follow_die_sig): Likewise.
631         (decode_locdesc): Likewise.
632         (dwarf2_per_cu_objfile): Likewise.
633         (dwarf2_per_cu_text_offset): Likewise.
634         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
635         objfile.
636         (set_die_type): Access objfile through
637         dwarf2_per_objfile.
638
639 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
640
641         * valprint.c (converted_character_d): Remove typedef.
642         (DEF_VEC_O (converted_character_d)): Remove.
643         (count_next_character): Use std::vector.
644         (print_converted_chars_to_obstack): Likewise.
645         (generic_printstr): Likewise.
646
647 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
648
649         * xml-support.h (struct gdb_xml_value): Add constructor.
650         <value>: Change type to unique_xmalloc_ptr.
651         (gdb_xml_value_s): Remove typedef.
652         (DEF_VEC_O (gdb_xml_value_s)): Remove.
653         (gdb_xml_element_start_handler): Change parameter type to
654         std::vector.
655         (xml_find_attribute): Likewise.
656         * xml-support.c (xml_find_attribute): Change parameter type to
657         std::vector and adjust.
658         (gdb_xml_values_cleanup): Remove.
659         (gdb_xml_parser::start_element): Adjust to std::vector.
660         (xinclude_start_include): Change paraeter type to std::vector
661         and adjust.
662         * btrace.c (check_xml_btrace_version): Likewise.
663         (parse_xml_btrace_block): Likewise.
664         (parse_xml_btrace_pt_config_cpu): Likewise.
665         (parse_xml_btrace_pt): Likewise.
666         (parse_xml_btrace_conf_bts): Likewise.
667         (parse_xml_btrace_conf_pt): Likewise.
668         * memory-map.c (memory_map_start_memory): Likewise.
669         (memory_map_start_property): Likewise.
670         * osdata.c (osdata_start_osdata): Likewise.
671         (osdata_start_item): Likewise.
672         (osdata_start_column): Likewise.
673         * remote.c (start_thread): Likewise.
674         * solib-aix.c (library_list_start_library): Likewise.
675         (library_list_start_list): Likewise.
676         * solib-svr4.c (library_list_start_library): Likewise.
677         (svr4_library_list_start_list): Likewise.
678         * solib-target.c (library_list_start_segment): Likewise.
679         (library_list_start_section): Likewise.
680         (library_list_start_library): Likewise.
681         (library_list_start_list): Likewise.
682         * tracepoint.c (traceframe_info_start_memory): Likewise.
683         (traceframe_info_start_tvar): Likewise.
684         * xml-syscall.c (syscall_start_syscall): Likewise.
685         * xml-tdesc.c (tdesc_start_target): Likewise.
686         (tdesc_start_feature): Likewise.
687         (tdesc_start_reg): Likewise.
688         (tdesc_start_union): Likewise.
689         (tdesc_start_struct): Likewise.
690         (tdesc_start_flags): Likewise.
691         (tdesc_start_enum): Likewise.
692         (tdesc_start_field): Likewise.
693         (tdesc_start_enum_value): Likewise.
694         (tdesc_start_vector): Likewise.
695
696 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
697
698         * extension.h (struct xmethod_worker) <clone>: Remove.
699         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
700         Remove.
701         (python_xmethod_worker::clone): Remove.
702         * valops.c (find_overload_match): Use std::move instead of
703         clone.
704
705 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
706
707         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
708         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
709         <free_xmethod_worker_data>: Remove.
710         <get_matching_xmethod_workers>: Chance VEC to std::vector.
711         <get_xmethod_arg_types>: Remove.
712         <get_xmethod_result_type>: Remove.
713         <invoke_xmethod>: Remove.
714         * extension.c (new_xmethod_worker): Remove.
715         (clone_xmethod_worker): Remove.
716         (get_matching_xmethod_workers): Return void, pass std::vector by
717         pointer.
718         (get_xmethod_arg_types): Rename to...
719         (xmethod_worker::get_arg_types): ... this, and adjust.
720         (get_xmethod_result_type): Rename to...
721         (xmethod_worker::get_result_type): ... this, and adjust.
722         (invoke_xmethod): Remove.
723         (free_xmethod_worker): Remove.
724         (free_xmethod_worker_vec): Remove.
725         * extension.h (enum ext_lang_rc): Move here from
726         extension-priv.h.
727         (struct xmethod_worker): Add constructor and destructor.
728         <data>: Remove.
729         <value>: Remove.
730         <invoke, clone, do_get_result_type, do_get_arg_types>: New
731         virtual pure methods.
732         <get_arg_types, get_result_type>: New methods.
733         (xmethod_worker_ptr): Remove typedef.
734         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
735         (xmethod_worker_vec): Remove typedef.
736         (xmethod_worker_up): New typedef.
737         (invoke_xmethod): Remove.
738         (clone_xmethod_worker): Remove.
739         (free_xmethod_worker): Remove.
740         (free_xmethod_worker_vec): Remove.
741         (get_xmethod_arg_types): Remove.
742         (get_xmethod_result_type): Remove.
743         * valops.c (find_method_list): Use std::vector, don't use
744         intermediate vector.
745         (value_find_oload_method_list): Use std::vector.
746         (find_overload_match): Use std::vector.
747         (find_oload_champ): Use std::vector.
748         * value.c (value_free): Use operator delete.
749         (value_of_xmethod): Rename to...
750         (value_from_xmethod): ... this.  Don't assign
751         xmethod_worker::value, take rvalue-reference.
752         (result_type_of_xmethod): Adjust.
753         (call_xmethod): Adjust.
754         * value.h: Include extension.h.
755         (struct xmethod_worker): Don't forward-declare.
756         (value_of_xmethod): Rename to...
757         (value_from_xmethod): ... this, take rvalue-reference.
758         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
759         (struct python_xmethod_worker): ... this, add constructor and
760         destructor.
761         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
762         (gdbpy_free_xmethod_worker_data): Rename to...
763         (python_xmethod_worker::~python_xmethod_worker): ... this and
764         adjust.
765         (gdbpy_clone_xmethod_worker_data): Rename to...
766         (python_xmethod_worker::clone): ... this and adjust.
767         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
768         temporary vector.
769         (gdbpy_get_xmethod_arg_types): Rename to...
770         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
771         (gdbpy_get_xmethod_result_type): Rename to...
772         (python_xmethod_worker::do_get_result_type): ... this and
773         adjust.
774         (gdbpy_invoke_xmethod): Rename to...
775         (python_xmethod_worker::invoke): ... this and adjust.
776         (new_python_xmethod_worker): Rename to...
777         (python_xmethod_worker::python_xmethod_worker): ... this and
778         adjust.
779         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
780         Remove.
781         (gdbpy_free_xmethod_worker_data): Remove.
782         (gdbpy_get_matching_xmethod_workers): Use std::vector.
783         (gdbpy_get_xmethod_arg_types): Remove.
784         (gdbpy_get_xmethod_result_type): Remove.
785         (gdbpy_invoke_xmethod): Remove.
786         * python/python.c (python_extension_ops): Remove obsolete
787         callbacks.
788
789 2018-01-05  Pedro Alves  <palves@redhat.com>
790
791         PR gdb/18653
792         * common/signals-state-save-restore.c
793         (save_original_signals_state): New parameter 'quiet'.  Warn if we
794         find a custom handler preinstalled, instead of internal erroring.
795         But only warn if !quiet.
796         * common/signals-state-save-restore.h
797         (save_original_signals_state): New parameter 'quiet'.
798         * main.c (captured_main_1): Move save_original_signals_state call
799         after option handling, and pass QUIET.
800
801 2018-01-05  Pedro Alves  <palves@redhat.com>
802
803         * spu-tdep.c (spu_catch_start): Pass
804         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
805
806 2018-01-05  Pedro Alves  <palves@redhat.com>
807
808         PR gdb/22670
809         * ada-lang.c (literal_symbol_name_matcher): New function.
810         (ada_get_symbol_name_matcher): Use it for
811         symbol_name_match_type::SEARCH_NAME.
812         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
813         it down instead of assuming symbol_name_match_type::FULL.
814         * block.h (block_lookup_symbol): New parameter 'match_type'.
815         * c-valprint.c (print_unpacked_pointer): Use
816         lookup_symbol_search_name instead of lookup_symbol.
817         * compile/compile-object-load.c (get_out_value_type): Pass down
818         symbol_name_match_type::SEARCH_NAME.
819         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
820         symbol_name_match_type::FULL.
821         * cp-support.c (cp_get_symbol_name_matcher): Handle
822         symbol_name_match_type::SEARCH_NAME.
823         * infrun.c (insert_exception_resume_breakpoint): Use
824         lookup_symbol_search_name.
825         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
826         * psymtab.c (maintenance_check_psymtabs): Use
827         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
828         * stack.c (print_frame_args): Use lookup_symbol_search_name and
829         SYMBOL_SEARCH_NAME.
830         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
831         if symbol_name_match_type::SEARCH_NAME.
832         (lookup_symbol_in_language): Pass down
833         symbol_name_match_type::FULL.
834         (lookup_symbol_search_name): New.
835         (lookup_language_this): Pass down
836         symbol_name_match_type::SEARCH_NAME.
837         (lookup_symbol_aux, lookup_local_symbol): New parameter
838         'match_type'.  Pass it down.
839         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
840         (lookup_symbol_search_name): New declaration.
841         (lookup_symbol_in_block): New 'match_type' parameter.
842
843 2018-01-05  Pedro Alves  <palves@redhat.com>
844
845         PR gdb/22670
846         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
847         ada_lookup_symbol.
848         (ada_lookup_symbol): Reimplement in terms of
849         ada_lookup_symbol_list, bits factored out from
850         ada_lookup_encoded_symbol.
851
852 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
853
854         * ada-exp.y (write_object_renaming): When subscripting an array
855         using a symbol as the index, pass the block in call to
856         ada_lookup_encoded_symbol when looking that symbol up.
857
858 2018-01-05  Jerome Guitton  <guitton@adacore.com>
859
860         * ada-lang.c (ada_array_length): Use ada_index_type instead of
861         TYPE_INDEX_TYPE.
862
863 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
864
865         * ada-lang.c (ada_to_fixed_value_create): Add handling of
866         the case where VALUE_LVAL (val0) is not lval_memory.
867
868 2018-01-05  Xavier Roirand  <roirand@adacore.com>
869
870         * ada-valprint.c (print_optional_low_bound): Handle
871         character-indexed array printing like boolean-indexed array
872         printing.
873
874 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
875
876         * NEWS: Create a new section for the next release branch.
877         Rename the section of the current branch, now that it has
878         been cut.
879
880 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
881
882         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
883         * version.in: Bump version to 8.1.50.DATE-git.
884
885 2018-01-03  Xavier Roirand  <roirand@adacore.com>
886
887         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
888         Add field.
889         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
890         Add field.
891         (default_exception_support_info) <catch_handlers_sym>: Add field.
892         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
893         (ada_exception_name_addr_1): Add "catch handlers" handling.
894         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
895         Update all callers.
896         (create_excep_cond_exprs) <ex>: Add parameter.
897         (re_set_exception): Update create_excep_cond_exprs call.
898         (print_it_exception, print_one_exception, print_mention_exception)
899         (print_recreate_exception): Add "catch handler" handling.
900         (allocate_location_catch_handlers, re_set_catch_handlers)
901         (check_status_catch_handlers, print_it_catch_handlers)
902         (print_one_catch_handlers, print_mention_catch_handlers)
903         (print_recreate_catch_handlers): New function.
904         (catch_handlers_breakpoint_ops): New variable.
905         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
906         Add parameter.  Add "catch handler" handling.
907         (ada_exception_sym_name, ada_exception_breakpoint_ops):
908         Add "catch handler" handling.
909         (ada_exception_catchpoint_cond_string): Add "catch handler"
910         handling.
911         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
912         call.
913         (catch_ada_handlers_command): New function.
914         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
915         operations structure.
916         (_initialize_ada_language): Add "catch handlers" command entry.
917         * NEWS: Document "catch handlers" feature.
918
919 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
920
921         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
922         account when creating the array type of the slice.
923         (ada_value_slice): Likewise.
924
925 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
926
927         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
928         New enum value.
929         (create_array_type_with_stride): Add byte_stride_prop parameter.
930         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
931         New parameter.  Update all callers in this file.
932         (array_type_has_dynamic_stride): New function.
933         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
934         of arrays with dynamic byte strides.
935         * dwarf2read.c (read_array_type): Add support for dynamic
936         DW_AT_byte_stride attributes.
937
938 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
939
940         * dwarf2read.c (read_unspecified_type): Treat
941         DW_TAG_enumeration_type DIEs from Ada units as stubs.
942
943 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
944
945         Update copyright year range in all GDB files.
946
947 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
948
949         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
950         and gdb/testsuite/gdb.base/step-line.c.
951
952 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
953
954         * copyright.py (main): Dump the contents of
955         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
956         even if BY_HAND is empty.
957
958 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
959
960         * top.c (print_gdb_version): Update Copyright year in version
961         message.
962
963 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
964
965         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
966
967 For older changes see ChangeLog-2017.
968 \f
969 Local Variables:
970 mode: change-log
971 left-margin: 8
972 fill-column: 74
973 version-control: never
974 coding: utf-8
975 End: