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