s390: Remove duplicate checks for cached gdbarch at init
[external/binutils.git] / gdb / ChangeLog
1 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
2
3         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
4         when looking for cached gdbarch and add comment for remaining.
5
6 2018-01-22  Pedro Alves  <palves@redhat.com>
7             Sergio Durigan Junior  <sergiodj@redhat.com>
8
9         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
10         case.
11
12 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
13
14         * MAINTAINERS: Update my company e-mail address.
15
16 2018-01-22  Yao Qi  <yao.qi@linaro.org>
17
18         * regcache.c (cooked_write_test): New function.
19         (_initialize_regcache): Register the test.
20
21 2018-01-22  Yao Qi  <yao.qi@linaro.org>
22
23         * ia64-tdep.c (ia64_pseudo_register_read): Call
24         regcache->cooked_read instead of regcache_cooked_read_unsigned.
25         * m32c-tdep.c (m32c_cat_read): Likewise.
26         (m32c_r3r2r1r0_read): Likewise.
27         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
28         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
29
30 2018-01-22  Yao Qi  <yao.qi@linaro.org>
31
32         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
33         method raw_read instead of regcache_raw_read.
34         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
35         * arm-tdep.c (arm_neon_quad_read): Likewise.
36         * avr-tdep.c (avr_pseudo_register_read): Likewise.
37         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
38         * frv-tdep.c (frv_pseudo_register_read): Likewise.
39         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
40         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
41         (i386_pseudo_register_read_into_value): Likewise.
42         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
43         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
44         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
45         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
46         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
47         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
48         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
49         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
50         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
51
52 2018-01-22  Yao Qi  <yao.qi@linaro.org>
53
54         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
55         * configure.tgt: Remove target mt.
56         * mt-tdep.c: Remove.
57         * regcache.c (cooked_read_test): Remove the check for mt.
58
59 2018-01-22  Yao Qi  <yao.qi@linaro.org>
60
61         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
62         instead of gdbarch_pseudo_register_read_value.
63
64 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
65
66         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
67         language is Ada.
68
69 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
70
71         * linespec.c (create_sals_line_offset): Remove code that preserved
72         the symtab_and_line's line number.
73
74 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
75
76         * varobj.c (varobj_create): Don't set valid_block when creating a
77         floating varobj.
78
79 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
80
81         * varobj.c (varobj_create): Remove out of date comment.
82
83 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
84
85         PR mi/20395
86         * ada-exp.y (write_var_from_sym): Pass extra parameter when
87         updating innermost block.
88         * parse.c (innermost_block_tracker::update): Take extra type
89         parameter, and check types match before updating innermost block.
90         (write_dollar_variable): Update innermost block for registers.
91         * parser-defs.h (enum innermost_block_tracker_type): New enum.
92         (innermost_block_tracker::innermost_block_tracker): Initialise
93         m_types member.
94         (innermost_block_tracker::reset): Take type parameter.
95         (innermost_block_tracker::update): Take type parameter, and pass
96         type through as needed.
97         (innermost_block_tracker::m_types): New member.
98         * varobj.c (varobj_create): Pass type when reseting innermost
99         block.
100
101 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
102
103         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
104         * ada-lang.c (resolve_subexp): Likewise.
105         * breakpoint.c (set_breakpoint_condition) Likewise.
106         (watch_command_1) Likewise.
107         * c-exp.y (variable): Likewise.
108         * d-exp.y (PrimaryExpression): Likewise.
109         * f-exp.y (variable): Likewise.
110         * go-exp.y (variable): Likewise.
111         * m2-exp.y (variable): Likewise.
112         * objfiles.c (objfile::~objfile): Likewise.
113         * p-exp.y (variable): Likewise.
114         * parse.c (innermost_block): Change type.
115         * parser-defs.h (class innermost_block_tracker): New.
116         (innermost_block): Change to innermost_block_tracker.
117         * printcmd.c (display_command): Switch to innermost_block API.
118         (do_one_display): Likewise.
119         * rust-exp.y (do_one_display): Likewise.
120         * symfile.c (clear_symtab_users): Likewise.
121         * varobj.c (varobj_create): Switch to innermost_block API, replace
122         use of innermost_block with block stored on varobj object.
123
124 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
125
126         * expression.h (innermost_block): Remove declaration.
127         * varobj.c: Add 'parser-defs.h' include.
128
129 2018-01-19  Tom Tromey  <tom@tromey.com>
130
131         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
132         symbols in the static and global blocks.
133
134 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
135
136         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
137         gdb_ptrace.h, and move including gdb_wait.h ...
138         * nat/linux-ptrace.h: ... to here.
139
140 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
141
142         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
143         inf_ptrace_detach_success.
144         (inf_ptrace_detach_success): Add inferior parameter, use it
145         instead of inferior_ptid, pass it to detach_inferior.
146         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
147         parameter.
148         * inferior.c (detach_inferior): Add overload that takes an
149         inferior object.
150         * inferior.h (detach_inferior): Likewise.
151         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
152         use inferior_ptid, adjust call to inf_ptrace_detach_success.
153         * linux-thread-db.c (thread_db_detach): Use inf parameter.
154
155 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
156
157         * target.h (struct target_ops) <to_detach>: Add inferior
158         parameter.
159         (target_detach): Likewise.
160         * target.c (dispose_inferior): Pass inferior down.
161         (target_detach): Pass inferior down.  Assert that it is equal to
162         the current inferior.
163         * aix-thread.c (aix_thread_detach): Pass inferior down.
164         * corefile.c (core_file_command): Pass current_inferior() down.
165         * corelow.c (core_detach): Add inferior parameter.
166         * darwin-nat.c (darwin_detach): Likewise.
167         * gnu-nat.c (gnu_detach): Likewise.
168         * inf-ptrace.c (inf_ptrace_detach): Likewise.
169         * infcmd.c (detach_command): Pass current_inferior() down to
170         target_detach.
171         * infrun.c (follow_fork_inferior): Pass parent_inf to
172         target_detach.
173         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
174         target_detach.
175         * linux-nat.c (linux_nat_detach): Add inferior parameter.
176         * linux-thread-db.c (thread_db_detach): Likewise.
177         * nto-procfs.c (procfs_detach): Likewise.
178         * procfs.c (procfs_detach): Likewise.
179         * record.c (record_detach): Likewise.
180         * record.h (struct inferior): Forward-declare.
181         (record_detach): Add inferior parameter.
182         * remote-sim.c (gdbsim_detach): Likewise.
183         * remote.c (remote_detach_1): Likewise.
184         (remote_detach): Likewise.
185         (extended_remote_detach): Likewise.
186         * sol-thread.c (sol_thread_detach): Likewise.
187         * target-debug.h (target_debug_print_inferior_p): New macro.
188         * target-delegates.c: Re-generate.
189         * top.c (kill_or_detach): Pass inferior down to target_detach.
190         * windows-nat.c (windows_detach): Add inferior parameter.
191
192 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
193
194         * target.h (struct target_ops) <to_detach>: Remove args
195         parameter.
196         (target_detach): Likewise.
197         * target.c (dispose_inferior): Adjust.
198         (target_detach): Remove args parameter, adjust.
199         * aix-thread.c (aix_thread_detach): Adjust.
200         * corefile.c (core_file_command): Adjust.
201         * corelow.c (core_detach): Adjust.
202         * darwin-nat.c (darwin_detach): Adjust.
203         * gnu-nat.c (gnu_detach): Adjust.
204         * inf-ptrace.c (inf_ptrace_detach): Adjust.
205         * infcmd.c (detach_command): Adjust
206         * infrun.c (follow_fork_inferior): Adjust.
207         (handle_vfork_child_exec_or_exit): Adjust.
208         * linux-fork.c (linux_fork_detach): Remove args parameter.
209         * linux-fork.h (linux_fork_detach): Likewise.
210         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
211         * linux-thread-db.c (thread_db_detach): Likewise.
212         * nto-procfs.c (procfs_detach): Likewise.
213         * procfs.c (procfs_detach): Likewise.
214         (do_detach): Remove signo parameter.
215         * record.c (record_detach): Remove args parameter.
216         * record.h (record_detach): Likewise.
217         * remote-sim.c (gdbsim_detach): Likewise.
218         * remote.c (remote_detach_1): Likewise.
219         (remote_detach): Likewise.
220         (extended_remote_detach): Likewise.
221         * sol-thread.c (sol_thread_detach): Likewise.
222         * target-delegates.c: Re-generate.
223         * top.c (struct qt_args) <args>: Remove field.
224         (kill_or_detach): Don't pass args.
225         (quit_force): Don't set args.
226         * windows-nat.c (windows_detach): Remove args parameter.
227
228 2018-01-19  Yao Qi  <yao.qi@linaro.org>
229
230         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
231         (arm_linux_init_abi): Install it.
232
233 2018-01-19  Yao Qi  <yao.qi@linaro.org>
234
235         * osabi.c (gdb_osabi_names): Extend the regexp for
236         arm-linux-gnueabihf.
237
238 2018-01-18  Yao Qi  <yao.qi@linaro.org>
239
240         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
241         m_abbrevs.
242         (abbrev_table::add_abbrev): Update.
243         (abbrev_table::lookup_abbrev): Update.
244
245 2018-01-18  Yao Qi  <yao.qi@linaro.org>
246
247         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
248
249 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
250
251         * compile/compile.c (compile_to_object): Convert "triplet_rx"
252         to "std::string".
253
254 2018-01-17  Tom Tromey  <tom@tromey.com>
255
256         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
257
258 2018-01-17  Tom Tromey  <tom@tromey.com>
259
260         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
261         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
262         (create_array_type_with_stride): Update.
263         * dwarf2read.c (set_die_type): Update.
264
265 2018-01-17  Tom Tromey  <tom@tromey.com>
266
267         * dwarf2read.c (delayed_method_info): Remove typedef.
268         (dwarf2_cu::method_info): Now a std::vector.
269         (add_to_method_list): Update.
270         (free_delayed_list): Remove.
271         (compute_delayed_physnames): Update.
272         (process_full_comp_unit, process_full_type_unit): Clear the method
273         list.  Remove cleanups.
274         (psymtab_include_file_name): Add name_holder parameter.  Use
275         unique_xmalloc_ptr.
276         (dwarf_decode_lines): Update.
277
278 2018-01-17  Tom Tromey  <tom@tromey.com>
279             Simon Marchi  <simon.marchi@ericsson.com>
280
281         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
282         (dwarf2_per_objfile::free_cached_comp_units)
283         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
284         (init_cutu_and_read_dies_no_follow): Update.
285         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
286         (dwarf2_cu::~dwarf2_cu): New.
287         (free_heap_comp_unit, free_stack_comp_unit): Remove.
288         (age_cached_comp_units, free_one_cached_comp_unit): Update.
289
290 2018-01-17  Tom Tromey  <tom@tromey.com>
291             Simon Marchi  <simon.marchi@ericsson.com>
292
293         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
294         (struct die_reader_specs) <abbrev_table>: New member.
295         (struct abbrev_table): Add constructor.
296         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
297         <abbrev_obstack>: Now an auto_obstack.
298         (abbrev_table_up): New typedef.
299         (init_cu_die_reader): Add abbrev_table parameter.
300         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
301         Add result_dwo_abbrev_table.
302         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
303         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
304         Update.
305         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
306         parameter.
307         (skip_children): Update.
308         (abbrev_table::alloc_abbrev): Rename from
309         abbrev_table_alloc_abbrev.
310         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
311         (abbrev_table::lookup_abbrev): Rename from
312         abbrev_table_lookup_abbrev.
313         (abbrev_table_read_table): Return abbrev_table_up.
314         (abbrev_table_free, abbrev_table_free_cleanup)
315         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
316         (load_partial_dies): Update.
317
318 2018-01-17  Tom Tromey  <tom@tromey.com>
319
320         * dwarf2read.c (dwarf2_compute_name): Update comment.
321         (read_func_scope, read_variable): Update.
322         (new_symbol): Remove.
323         (new_symbol_full): Rename to new_symbol.
324
325 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
326
327         PR gdb/16577
328         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
329         a warning instead of throwing an error, set section size to 0 and return
330         NULL.
331         * gdb_bfd.h (gdb_bfd_map_section): Update description.
332
333 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
334
335         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
336         std::string.
337         (linux_ptrace_attach_fail_reason_string): Likewise.
338         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
339         Likewise.
340         (linux_ptrace_attach_fail_reason_string): Likewise.
341         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
342
343 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
344
345         * linux-nat.c (linux_nat_attach): Remove xstrdup.
346
347 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
348
349         PR gdb/21559
350         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
351         checking for fs_base/gs_base fields in struct user_regs_struct.
352         * configure: Regenerate.
353
354 2018-01-17  Yao Qi  <yao.qi@linaro.org>
355
356         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
357         function.
358         (aarch64_linux_init_abi): Install it to gdbarch hook
359         gcc_target_options.
360
361 2018-01-15  Pedro Alves  <palves@redhat.com>
362
363         * common/signals-state-save-restore.c
364         (save_original_signals_state): Fix typos.
365
366 2017-01-12  Tom Tromey  <tom@tromey.com>
367             Sergio Durigan Junior  <sergiodj@redhat.com>
368
369         * Makefile.in (install-only): Install gdb-add-index.
370
371 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
372
373         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
374
375 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
376
377         * infrun.c (keep_going_pass_signal): Clear step-over info when
378         insert_breakpoints fails.
379
380 2018-01-11  Pedro Alves  <palves@redhat.com>
381
382         PR gdb/22583
383         * infrun.c (resume): Rename to ...
384         (resume_1): ... this.
385         (resume): Reimplement as wrapper around resume_1.
386
387 2018-01-11  Pedro Alves  <palves@redhat.com>
388
389         PR remote/22597
390         * remote.c (remote_parse_stop_reply): Default to the last-set
391         general thread instead of to 'magic_null_ptid'.
392
393 2018-01-10  Pedro Alves  <palves@redhat.com>
394
395         * language.h (language_get_symbol_name_matcher): Rename ...
396         (get_symbol_name_matcher): ... this.
397         * language.c (language_get_symbol_name_matcher): Ditto.
398         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
399         callers adjusted.
400
401 2018-01-10  Pedro Alves  <palves@redhat.com>
402
403         PR gdb/22670
404         * dwarf2read.c
405         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
406         Adjust to use language_get_symbol_name_matcher instead of
407         language_defn::la_get_symbol_name_matcher.
408         * language.c (language_get_symbol_name_matcher): If in Ada mode
409         and the lookup name is a verbatim match, return Ada's matcher.
410         * language.h (language_get_symbol_name_matcher): Adjust comment.
411         (ada_lookup_name_info::verbatim_p):: New method.
412
413 2018-01-10  Pedro Alves  <palves@redhat.com>
414
415         PR gdb/22670
416         * ada-lang.c (ada_collect_symbol_completion_matches): If the
417         minsym's language is language_auto or language_cplus, pass down
418         language_ada instead.
419         * symtab.c (compare_symbol_name): Don't frob symbol language here.
420
421 2018-01-10  Pedro Alves  <palves@redhat.com>
422
423         PR gdb/22670
424         * minsyms.c (linkage_name_str): New function.
425         (iterate_over_minimal_symbols): Use it.
426
427 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
428
429         * NEWS: Document that 'info proc' now works on FreeBSD.
430
431 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
432
433         * configure.ac: Check for kinfo_getfile in libutil.
434         * configure: Regenerate.
435         * config.in: Regenerate.
436         * fbsd-nat.c: Include "fbsd-tdep.h".
437         (fbsd_fetch_cmdline): New.
438         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
439         rather than calling error.
440         (fbsd_info_proc): New.
441         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
442         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
443         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
444
445 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
446
447         * fbsd-nat.c (struct free_deleter): Remove.
448         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
449
450 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
451
452         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
453         NULL for an empty pathname.
454
455 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
456
457         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
458         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
459         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
460         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
461         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
462         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
463         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
464         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
465         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
466         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
467         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
468         (fbsd_core_fetch_timeval, fbsd_print_sigset)
469         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
470         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
471         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
472
473 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
474
475         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
476         (gnu_xfer_auxv): New function.
477         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
478         TARGET_OBJECT_AUXV.
479
480 2018-01-08  Yao Qi  <yao.qi@linaro.org>
481             Simon Marchi  <simon.marchi@ericsson.com>
482
483         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
484         common/selftest.c.
485         (COMMON_OBS): Remove selftest.o.
486         * configure.ac: Append selftest-arch.c and common/selftest.c to
487         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
488         * configure: Re-generated.
489         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
490         GDB_SELF_TEST.
491         (maintenance_info_selftests): Likewise.
492
493 2018-01-08  Xavier Roirand  <roirand@adacore.com>
494
495         * ada-valprint.c (val_print_packed_array_elements): Use
496         proper number of elements when printing an array indexed
497         by an enumeration type.
498
499 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
500
501         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
502         (dw2_get_file_names_reader): Adjust.
503         (lookup_dwo_signatured_type): Adjust.
504         (lookup_dwp_signatured_type): Adjust.
505         (lookup_signatured_type): Adjust.
506         (create_type_unit_group): Adjust.
507         (get_type_unit_group): Adjust.
508         (process_psymtab_comp_unit_reader): Adjust.
509         (build_type_psymtabs_reader): Adjust.
510         (scan_partial_symbols): Adjust.
511         (add_partial_symbol): Adjust.
512         (add_partial_subprogram): Adjust.
513         (peek_die_abbrev): Adjust.
514         (fixup_go_packaging): Adjust.
515         (process_imported_unit_die): Adjust.
516         (dwarf2_compute_name): Adjust.
517         (dwarf2_physname): Adjust.
518         (read_import_statement): Adjust.
519         (handle_DW_AT_stmt_list): Adjust.
520         (read_file_scope): Adjust.
521         (read_func_scope): Adjust.
522         (read_lexical_block_scope): Adjust.
523         (read_call_site_scope): Adjust.
524         (read_variable): Adjust.
525         (dwarf2_rnglists_process): Adjust.
526         (dwarf2_ranges_process): Adjust.
527         (dwarf2_ranges_read): Adjust.
528         (dwarf2_get_pc_bounds): Adjust.
529         (dwarf2_record_block_ranges): Adjust.
530         (dwarf2_add_field): Adjust.
531         (dwarf2_add_member_fn): Adjust.
532         (read_structure_type): Adjust.
533         (process_structure_scope): Adjust.
534         (read_enumeration_type): Adjust.
535         (read_array_type): Adjust.
536         (mark_common_block_symbol_computed): Adjust.
537         (read_common_block): Adjust.
538         (read_namespace_type): Adjust.
539         (read_namespace): Adjust.
540         (read_module_type): Adjust.
541         (read_tag_pointer_type): Adjust.
542         (read_tag_ptr_to_member_type): Adjust.
543         (read_tag_string_type): Adjust.
544         (read_subroutine_type): Adjust.
545         (read_typedef): Adjust.
546         (read_base_type): Adjust.
547         (attr_to_dynamic_prop): Adjust.
548         (read_subrange_type): Adjust.
549         (read_unspecified_type): Adjust.
550         (dwarf2_read_abbrevs): Adjust.
551         (load_partial_dies): Adjust.
552         (read_partial_die): Adjust.
553         (find_partial_die): Adjust.
554         (guess_partial_die_structure_name): Adjust.
555         (fixup_partial_die): Adjust.
556         (read_attribute_value): Adjust.
557         (read_addr_index): Adjust.
558         (read_addr_index_from_leb128): Adjust.
559         (read_str_index): Adjust.
560         (dwarf2_string_attr): Adjust.
561         (get_debug_line_section): Adjust.
562         (dwarf_decode_line_header): Adjust.
563         (lnp_state_machine::check_line_address): Adjust.
564         (dwarf_decode_lines_1): Adjust.
565         (dwarf_decode_lines): Adjust.
566         (dwarf2_start_symtab): Adjust.
567         (var_decode_location): Adjust.
568         (new_symbol_full): Adjust.
569         (dwarf2_const_value_data): Adjust.
570         (dwarf2_const_value_attr): Adjust.
571         (dwarf2_const_value): Adjust.
572         (die_type): Adjust.
573         (die_containing_type): Adjust.
574         (build_error_marker_type): Adjust.
575         (lookup_die_type): Adjust.
576         (guess_full_die_structure_name): Adjust.
577         (anonymous_struct_prefix): Adjust.
578         (determine_prefix): Adjust.
579         (dwarf2_name): Adjust.
580         (follow_die_ref_or_sig): Adjust.
581         (follow_die_offset): Adjust.
582         (follow_die_ref): Adjust.
583         (follow_die_sig_1): Adjust.
584         (follow_die_sig): Adjust.
585         (get_signatured_type): Adjust.
586         (get_DW_AT_signature_type): Adjust.
587         (decode_locdesc): Adjust.
588         (dwarf_decode_macros): Adjust.
589         (cu_debug_loc_section): Adjust.
590         (fill_in_loclist_baton): Adjust.
591         (dwarf2_symbol_mark_computed): Adjust.
592         (init_one_comp_unit): Don't assign
593         dwarf2_cu::dwarf2_per_objfile.
594         (set_die_type): Adjust.
595
596 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
597
598         * dwarf2read.c (struct mapped_debug_names): Add constructor.
599         <dwarf2_per_objfile>: New field.
600         (dwarf2_per_objfile): Remove global.
601         (get_dwarf2_per_objfile): New function.
602         (set_dwarf2_per_objfile): New function.
603         (dwarf2_build_psymtabs_hard): Change objfile parameter to
604         dwarf2_per_objfile.
605         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
606         (read_abbrev_offset): Likewise.
607         (read_indirect_string): Likewise.
608         (read_indirect_line_string): Likewise.
609         (read_indirect_string_at_offset): Likewise.
610         (read_indirect_string_from_dwz): Likewise.
611         (dwarf2_find_containing_comp_unit): Change objfile parameter to
612         dwarf2_per_objfile.
613         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
614         (create_all_comp_units): Change objfile parameter to
615         dwarf2_per_objfile.
616         (create_all_type_units): Likewise.
617         (process_queue): Add dwarf2_per_objfile parameter.
618         (read_and_check_comp_unit_head): Likewise.
619         (lookup_dwo_unit_in_dwp): Likewise.
620         (get_dwp_file): Likewise.
621         (process_cu_includes): Likewise.
622         (struct free_dwo_file_cleanup_data): New struct.
623         (dwarf2_has_info): Use get_dwarf2_per_objfile and
624         set_dwarf2_per_objfile.
625         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
626         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
627         context, adjust calls.
628         (dw2_instantiate_symtab): Likewise.
629         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
630         (dw2_get_cu): Likewise.
631         (create_cu_from_index_list): Change objfile parameter to
632         dwarf2_per_objfile.
633         (create_cus_from_index_list): Get dwarf2_per_objfile from
634         context, adjust calls.
635         (create_cus_from_index): Likewise.
636         (create_signatured_type_table_from_index): Change objfile
637         parameter to dwarf2_per_objfile.
638         (create_signatured_type_table_from_debug_names): Change objfile
639         parameter to dwarf2_per_objfile.
640         (create_addrmap_from_index): Likewise.
641         (create_addrmap_from_aranges): Likewise.
642         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
643         (dw2_setup): Remove.
644         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
645         context.
646         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
647         get_dwarf2_per_objfile.
648         (dw2_forget_cached_source_info): Likewise.
649         (dw2_map_symtabs_matching_filename): Likewise.
650         (struct dw2_symtab_iterator) <index>: Remove.
651         <dwarf2_per_objfile>: New field.
652         (dw2_symtab_iter_init): Replace index parameter with
653         dwarf2_per_objfile.
654         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
655         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
656         (dw2_print_stats): Likewise.
657         (dw2_dump): Likewise.
658         (dw2_expand_symtabs_for_function): Likewise.
659         (dw2_expand_all_symtabs): Likewise.
660         (dw2_expand_symtabs_with_fullname): Likewise.
661         (dw2_expand_marked_cus): Replace index and objfile parameters
662         with dwarf2_per_objfile.
663         (dw_expand_symtabs_matching_file_matcher): Add
664         dwarf2_per_objfile parameter and adjust calls.
665         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
666         adjust calls.
667         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
668         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
669         adjust calls.
670         (create_cus_from_debug_names_list): Replace objfile parameter
671         with dwarf2_per_objfile and adjust calls.
672         (create_cus_from_debug_names): Likewise.
673         (dwarf2_read_debug_names): Likewise.
674         (mapped_debug_names::namei_to_name): Adjust call.
675         (dw2_debug_names_iterator::next): Likewise.
676         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
677         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
678         (dw2_debug_names_dump): Likewise.
679         (dw2_debug_names_expand_symtabs_for_function): Likewise.
680         (dw2_debug_names_expand_symtabs_matching): Likewise.
681         (dwarf2_initialize_objfile): Likewise.
682         (dwarf2_build_psymtabs): Likewise.
683         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
684         this_cu.
685         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
686         (read_and_check_comp_unit_head): Likewise.
687         (read_abbrev_offset): Likewise.
688         (create_debug_type_hash_table): Likewise.
689         (create_debug_types_hash_table): Likewise.
690         (create_all_type_units): Replace objfile parameter with
691         dwarf2_per_objfile.
692         (add_type_unit): Add dwarf2_per_objfile parameter.
693         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
694         with dwarf2_per_objfile.
695         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
696         (lookup_dwp_signatured_type): Likewise.
697         (lookup_signatured_type): Likewise.
698         (read_cutu_die_from_dwo): Likewise.
699         (init_tu_and_read_dwo_dies): Likewise.
700         (init_cutu_and_read_dies): Likewise.
701         (init_cutu_and_read_dies_no_follow): Likewise.
702         (allocate_type_unit_groups_table): Add objfile parameter.
703         (create_type_unit_group): Use dwarf2_per_objfile from cu.
704         (get_type_unit_group): Likewise.
705         (process_psymtab_comp_unit): Update call.
706         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
707         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
708         (print_tu_stats): Likewise.
709         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
710         in void* parameter.
711         (build_type_psymtabs): Change objfile parameter to
712         dwarf2_per_objfile.
713         (process_skeletonless_type_unit): Use dwarf2_per_objfile
714         passed in void* parameter.
715         (process_skeletonless_type_units): Change objfile parameter to
716         dwarf2_per_objfile.
717         (set_partial_user): Likewise.
718         (dwarf2_build_psymtabs_hard): Likewise.
719         (read_comp_units_from_section): Likewise.
720         (create_all_comp_units): Likewise.
721         (scan_partial_symbols): Update calls.
722         (add_partial_symbol): Likewise.
723         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
724         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
725         (process_queue): Add dwarf2_per_objfile parameter.
726         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
727         (compute_compunit_symtab_includes): Likewise.
728         (process_cu_includes): Add dwarf2_per_objfile parameter.
729         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
730         (process_full_type_unit): Likewise.
731         (process_imported_unit_die): Update call.
732         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
733         (read_file_scope): Likewise.
734         (allocate_dwo_file_hash_table): Add objfile parameter.
735         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
736         (create_cus_hash_table): Likewise.
737         (create_dwp_hash_table): Likewise.
738         (create_dwo_unit_in_dwp_v1): Likewise.
739         (create_dwp_v2_section): Likewise.
740         (create_dwo_unit_in_dwp_v2): Likewise.
741         (lookup_dwo_unit_in_dwp): Likewise.
742         (try_open_dwop_file): Likewise.
743         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
744         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
745         cleanup to include a reference to dwarf2_per_objfile.
746         (open_dwp_file): Add dwarf2_per_objfile parameter.
747         (open_and_init_dwp_file): Likewise.
748         (get_dwp_file): Likewise.
749         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
750         (queue_and_load_all_dwo_tus): Update call.
751         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
752         data.
753         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
754         (dwarf2_ranges_process): Likewise.
755         (dwarf2_get_pc_bounds): Likewise.
756         (mark_common_block_symbol_computed): Likewise.
757         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
758         (dwarf2_read_abbrevs): Update call.
759         (read_partial_die): Use dwarf2_per_objfile from cu.
760         (find_partial_die): Likewise.
761         (fixup_partial_die): Likewise.
762         (read_attribute_value): Likewise.
763         (read_indirect_string_at_offset_from): Add objfile parameter.
764         (read_indirect_string_at_offset): Add dwarf2_per_objfile
765         parameter.
766         (read_indirect_string_from_dwz): Add objfile parameter.
767         (read_indirect_string): Add objfile parameter.
768         (read_addr_index_1): Add dwarf2_per_objfile parameter.
769         (read_addr_index): Use dwarf2_per_objfile from cu.
770         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
771         call dw2_setup.
772         (read_str_index): Use dwarf2_per_objfile from cu.
773         (get_debug_line_section): Likewise.
774         (read_formatted_entries): Add dwarf2_per_objfile parameter.
775         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
776         (new_symbol_full): Use dwarf2_per_objfile from cu.
777         (build_error_marker_type): Likewise.
778         (lookup_die_type): Likewise.
779         (determine_prefix): Likewise.
780         (follow_die_offset): Likewise.
781         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
782         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
783         (dwarf2_fetch_die_type_sect_off): Likewise.
784         (dwarf2_get_die_type): Likewise.
785         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
786         (get_signatured_type): Likewise.
787         (get_DW_AT_signature_type): Likewise.
788         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
789         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
790         (cu_debug_loc_section): Likewise.
791         (fill_in_loclist_baton): Likewise.
792         (dwarf2_symbol_mark_computed): Likewise.
793         (dwarf2_find_containing_comp_unit): Change objfile parameter to
794         dwarf2_per_objfile.
795         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
796         parameter.
797         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
798         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
799         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
800         (set_die_type): Use dwarf2_free_objfile from cu.
801         (get_die_type_at_offset): Likewise.
802         (dwarf2_per_objfile_free): Don't assign global variable.
803         (debug_names) <constructor>: Add dwarf2_per_objfile
804         parameter, update m_debugstrlookup construction.
805         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
806         parameter.
807         <m_dwarf2_per_objfile>: New field.
808         <lookup>: Use m_dwarf2_per_objfile.
809         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
810         (psyms_seen_size): Likewise.
811         (write_gdbindex): Replace objfile parameter with
812         dwarf2_per_objfile.
813         (write_debug_names): Likewise.
814         (write_psymtabs_to_index): Likewise.
815         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
816         calls.
817
818 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
819
820         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
821         <dwarf2_per_objfile>: New field.
822         (struct dwarf2_per_cu_data) <objfile>: Remove.
823         <dwarf2_per_objfile>: New field.
824         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
825         of objfile.
826         (create_signatured_type_table_from_index): Likewise.
827         (create_debug_type_hash_table): Likewise.
828         (fill_in_sig_entry_from_dwo_entry): Likewise.
829         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
830         (create_type_unit_group): Assign dwarf2_per_objfile instead of
831         objfile.
832         (create_partial_symtab): Access objfile through
833         dwarf2_per_objfile.
834         (process_psymtab_comp_unit_reader): Likewise.
835         (read_comp_units_from_section): Likewise.
836         (scan_partial_symbols): Likewise.
837         (add_partial_symbol): Likewise.
838         (add_partial_subprogram): Likewise.
839         (peek_die_abbrev): Likewise.
840         (fixup_go_packaging): Likewise.
841         (process_full_comp_unit): Likewise.
842         (process_full_type_unit): Likewise.
843         (process_imported_unit_die): Likewise.
844         (dwarf2_compute_name): Likewise.
845         (dwarf2_physname): Likewise.
846         (read_import_statement): Likewise.
847         (create_cus_hash_table): Assign dwarf2_physname instead of
848         objfile.
849         (read_func_scope): Access objfile through dwarf2_per_objfile.
850         (read_lexical_block_scope): Likewise.
851         (read_call_site_scope): Likewise.
852         (read_variable): Likewise.
853         (dwarf2_rnglists_process): Likewise.
854         (dwarf2_ranges_process): Likewise.
855         (dwarf2_ranges_read): Likewise.
856         (dwarf2_record_block_ranges): Likewise.
857         (dwarf2_add_field): Likewise.
858         (dwarf2_add_member_fn): Likewise.
859         (read_structure_type): Likewise.
860         (process_structure_scope): Likewise.
861         (read_enumeration_type): Likewise.
862         (read_array_type): Likewise.
863         (read_common_block): Likewise.
864         (read_namespace_type): Likewise.
865         (read_namespace): Likewise.
866         (read_module_type): Likewise.
867         (read_tag_pointer_type): Likewise.
868         (read_tag_ptr_to_member_type): Likewise.
869         (read_tag_string_type): Likewise.
870         (read_subroutine_type): Likewise.
871         (read_typedef): Likewise.
872         (read_base_type): Likewise.
873         (attr_to_dynamic_prop): Likewise.
874         (read_subrange_type): Likewise.
875         (read_unspecified_type): Likewise.
876         (load_partial_dies): Likewise.
877         (read_partial_die): Likewise.
878         (find_partial_die): Likewise.
879         (guess_partial_die_structure_name): Likewise.
880         (fixup_partial_die): Likewise.
881         (read_attribute_value): Likewise.
882         (read_addr_index_from_leb128): Likewise.
883         (dwarf2_read_addr_index): Likewise.
884         (dwarf2_string_attr): Likewise.
885         (lnp_state_machine::check_line_address): Likewise.
886         (dwarf_decode_lines_1): Likewise.
887         (dwarf_decode_lines): Likewise.
888         (dwarf2_start_symtab): Likewise.
889         (var_decode_location): Likewise.
890         (new_symbol_full): Likewise.
891         (dwarf2_const_value_data): Likewise.
892         (dwarf2_const_value_attr): Likewise.
893         (dwarf2_const_value): Likewise.
894         (die_type): Likewise.
895         (die_containing_type): Likewise.
896         (lookup_die_type): Likewise.
897         (guess_full_die_structure_name): Likewise.
898         (anonymous_struct_prefix): Likewise.
899         (dwarf2_name): Likewise.
900         (follow_die_ref_or_sig): Likewise.
901         (follow_die_offset): Likewise.
902         (follow_die_ref): Likewise.
903         (dwarf2_fetch_die_loc_sect_off): Likewise.
904         (dwarf2_fetch_constant_bytes): Likewise.
905         (dwarf2_fetch_die_type_sect_off): Likewise.
906         (dwarf2_get_die_type): Likewise.
907         (follow_die_sig): Likewise.
908         (decode_locdesc): Likewise.
909         (dwarf2_per_cu_objfile): Likewise.
910         (dwarf2_per_cu_text_offset): Likewise.
911         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
912         objfile.
913         (set_die_type): Access objfile through
914         dwarf2_per_objfile.
915
916 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
917
918         * valprint.c (converted_character_d): Remove typedef.
919         (DEF_VEC_O (converted_character_d)): Remove.
920         (count_next_character): Use std::vector.
921         (print_converted_chars_to_obstack): Likewise.
922         (generic_printstr): Likewise.
923
924 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
925
926         * xml-support.h (struct gdb_xml_value): Add constructor.
927         <value>: Change type to unique_xmalloc_ptr.
928         (gdb_xml_value_s): Remove typedef.
929         (DEF_VEC_O (gdb_xml_value_s)): Remove.
930         (gdb_xml_element_start_handler): Change parameter type to
931         std::vector.
932         (xml_find_attribute): Likewise.
933         * xml-support.c (xml_find_attribute): Change parameter type to
934         std::vector and adjust.
935         (gdb_xml_values_cleanup): Remove.
936         (gdb_xml_parser::start_element): Adjust to std::vector.
937         (xinclude_start_include): Change paraeter type to std::vector
938         and adjust.
939         * btrace.c (check_xml_btrace_version): Likewise.
940         (parse_xml_btrace_block): Likewise.
941         (parse_xml_btrace_pt_config_cpu): Likewise.
942         (parse_xml_btrace_pt): Likewise.
943         (parse_xml_btrace_conf_bts): Likewise.
944         (parse_xml_btrace_conf_pt): Likewise.
945         * memory-map.c (memory_map_start_memory): Likewise.
946         (memory_map_start_property): Likewise.
947         * osdata.c (osdata_start_osdata): Likewise.
948         (osdata_start_item): Likewise.
949         (osdata_start_column): Likewise.
950         * remote.c (start_thread): Likewise.
951         * solib-aix.c (library_list_start_library): Likewise.
952         (library_list_start_list): Likewise.
953         * solib-svr4.c (library_list_start_library): Likewise.
954         (svr4_library_list_start_list): Likewise.
955         * solib-target.c (library_list_start_segment): Likewise.
956         (library_list_start_section): Likewise.
957         (library_list_start_library): Likewise.
958         (library_list_start_list): Likewise.
959         * tracepoint.c (traceframe_info_start_memory): Likewise.
960         (traceframe_info_start_tvar): Likewise.
961         * xml-syscall.c (syscall_start_syscall): Likewise.
962         * xml-tdesc.c (tdesc_start_target): Likewise.
963         (tdesc_start_feature): Likewise.
964         (tdesc_start_reg): Likewise.
965         (tdesc_start_union): Likewise.
966         (tdesc_start_struct): Likewise.
967         (tdesc_start_flags): Likewise.
968         (tdesc_start_enum): Likewise.
969         (tdesc_start_field): Likewise.
970         (tdesc_start_enum_value): Likewise.
971         (tdesc_start_vector): Likewise.
972
973 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
974
975         * extension.h (struct xmethod_worker) <clone>: Remove.
976         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
977         Remove.
978         (python_xmethod_worker::clone): Remove.
979         * valops.c (find_overload_match): Use std::move instead of
980         clone.
981
982 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
983
984         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
985         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
986         <free_xmethod_worker_data>: Remove.
987         <get_matching_xmethod_workers>: Chance VEC to std::vector.
988         <get_xmethod_arg_types>: Remove.
989         <get_xmethod_result_type>: Remove.
990         <invoke_xmethod>: Remove.
991         * extension.c (new_xmethod_worker): Remove.
992         (clone_xmethod_worker): Remove.
993         (get_matching_xmethod_workers): Return void, pass std::vector by
994         pointer.
995         (get_xmethod_arg_types): Rename to...
996         (xmethod_worker::get_arg_types): ... this, and adjust.
997         (get_xmethod_result_type): Rename to...
998         (xmethod_worker::get_result_type): ... this, and adjust.
999         (invoke_xmethod): Remove.
1000         (free_xmethod_worker): Remove.
1001         (free_xmethod_worker_vec): Remove.
1002         * extension.h (enum ext_lang_rc): Move here from
1003         extension-priv.h.
1004         (struct xmethod_worker): Add constructor and destructor.
1005         <data>: Remove.
1006         <value>: Remove.
1007         <invoke, clone, do_get_result_type, do_get_arg_types>: New
1008         virtual pure methods.
1009         <get_arg_types, get_result_type>: New methods.
1010         (xmethod_worker_ptr): Remove typedef.
1011         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
1012         (xmethod_worker_vec): Remove typedef.
1013         (xmethod_worker_up): New typedef.
1014         (invoke_xmethod): Remove.
1015         (clone_xmethod_worker): Remove.
1016         (free_xmethod_worker): Remove.
1017         (free_xmethod_worker_vec): Remove.
1018         (get_xmethod_arg_types): Remove.
1019         (get_xmethod_result_type): Remove.
1020         * valops.c (find_method_list): Use std::vector, don't use
1021         intermediate vector.
1022         (value_find_oload_method_list): Use std::vector.
1023         (find_overload_match): Use std::vector.
1024         (find_oload_champ): Use std::vector.
1025         * value.c (value_free): Use operator delete.
1026         (value_of_xmethod): Rename to...
1027         (value_from_xmethod): ... this.  Don't assign
1028         xmethod_worker::value, take rvalue-reference.
1029         (result_type_of_xmethod): Adjust.
1030         (call_xmethod): Adjust.
1031         * value.h: Include extension.h.
1032         (struct xmethod_worker): Don't forward-declare.
1033         (value_of_xmethod): Rename to...
1034         (value_from_xmethod): ... this, take rvalue-reference.
1035         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
1036         (struct python_xmethod_worker): ... this, add constructor and
1037         destructor.
1038         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
1039         (gdbpy_free_xmethod_worker_data): Rename to...
1040         (python_xmethod_worker::~python_xmethod_worker): ... this and
1041         adjust.
1042         (gdbpy_clone_xmethod_worker_data): Rename to...
1043         (python_xmethod_worker::clone): ... this and adjust.
1044         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
1045         temporary vector.
1046         (gdbpy_get_xmethod_arg_types): Rename to...
1047         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
1048         (gdbpy_get_xmethod_result_type): Rename to...
1049         (python_xmethod_worker::do_get_result_type): ... this and
1050         adjust.
1051         (gdbpy_invoke_xmethod): Rename to...
1052         (python_xmethod_worker::invoke): ... this and adjust.
1053         (new_python_xmethod_worker): Rename to...
1054         (python_xmethod_worker::python_xmethod_worker): ... this and
1055         adjust.
1056         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
1057         Remove.
1058         (gdbpy_free_xmethod_worker_data): Remove.
1059         (gdbpy_get_matching_xmethod_workers): Use std::vector.
1060         (gdbpy_get_xmethod_arg_types): Remove.
1061         (gdbpy_get_xmethod_result_type): Remove.
1062         (gdbpy_invoke_xmethod): Remove.
1063         * python/python.c (python_extension_ops): Remove obsolete
1064         callbacks.
1065
1066 2018-01-05  Pedro Alves  <palves@redhat.com>
1067
1068         PR gdb/18653
1069         * common/signals-state-save-restore.c
1070         (save_original_signals_state): New parameter 'quiet'.  Warn if we
1071         find a custom handler preinstalled, instead of internal erroring.
1072         But only warn if !quiet.
1073         * common/signals-state-save-restore.h
1074         (save_original_signals_state): New parameter 'quiet'.
1075         * main.c (captured_main_1): Move save_original_signals_state call
1076         after option handling, and pass QUIET.
1077
1078 2018-01-05  Pedro Alves  <palves@redhat.com>
1079
1080         * spu-tdep.c (spu_catch_start): Pass
1081         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
1082
1083 2018-01-05  Pedro Alves  <palves@redhat.com>
1084
1085         PR gdb/22670
1086         * ada-lang.c (literal_symbol_name_matcher): New function.
1087         (ada_get_symbol_name_matcher): Use it for
1088         symbol_name_match_type::SEARCH_NAME.
1089         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
1090         it down instead of assuming symbol_name_match_type::FULL.
1091         * block.h (block_lookup_symbol): New parameter 'match_type'.
1092         * c-valprint.c (print_unpacked_pointer): Use
1093         lookup_symbol_search_name instead of lookup_symbol.
1094         * compile/compile-object-load.c (get_out_value_type): Pass down
1095         symbol_name_match_type::SEARCH_NAME.
1096         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
1097         symbol_name_match_type::FULL.
1098         * cp-support.c (cp_get_symbol_name_matcher): Handle
1099         symbol_name_match_type::SEARCH_NAME.
1100         * infrun.c (insert_exception_resume_breakpoint): Use
1101         lookup_symbol_search_name.
1102         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
1103         * psymtab.c (maintenance_check_psymtabs): Use
1104         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
1105         * stack.c (print_frame_args): Use lookup_symbol_search_name and
1106         SYMBOL_SEARCH_NAME.
1107         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
1108         if symbol_name_match_type::SEARCH_NAME.
1109         (lookup_symbol_in_language): Pass down
1110         symbol_name_match_type::FULL.
1111         (lookup_symbol_search_name): New.
1112         (lookup_language_this): Pass down
1113         symbol_name_match_type::SEARCH_NAME.
1114         (lookup_symbol_aux, lookup_local_symbol): New parameter
1115         'match_type'.  Pass it down.
1116         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
1117         (lookup_symbol_search_name): New declaration.
1118         (lookup_symbol_in_block): New 'match_type' parameter.
1119
1120 2018-01-05  Pedro Alves  <palves@redhat.com>
1121
1122         PR gdb/22670
1123         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
1124         ada_lookup_symbol.
1125         (ada_lookup_symbol): Reimplement in terms of
1126         ada_lookup_symbol_list, bits factored out from
1127         ada_lookup_encoded_symbol.
1128
1129 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
1130
1131         * ada-exp.y (write_object_renaming): When subscripting an array
1132         using a symbol as the index, pass the block in call to
1133         ada_lookup_encoded_symbol when looking that symbol up.
1134
1135 2018-01-05  Jerome Guitton  <guitton@adacore.com>
1136
1137         * ada-lang.c (ada_array_length): Use ada_index_type instead of
1138         TYPE_INDEX_TYPE.
1139
1140 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
1141
1142         * ada-lang.c (ada_to_fixed_value_create): Add handling of
1143         the case where VALUE_LVAL (val0) is not lval_memory.
1144
1145 2018-01-05  Xavier Roirand  <roirand@adacore.com>
1146
1147         * ada-valprint.c (print_optional_low_bound): Handle
1148         character-indexed array printing like boolean-indexed array
1149         printing.
1150
1151 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
1152
1153         * NEWS: Create a new section for the next release branch.
1154         Rename the section of the current branch, now that it has
1155         been cut.
1156
1157 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
1158
1159         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
1160         * version.in: Bump version to 8.1.50.DATE-git.
1161
1162 2018-01-03  Xavier Roirand  <roirand@adacore.com>
1163
1164         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
1165         Add field.
1166         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
1167         Add field.
1168         (default_exception_support_info) <catch_handlers_sym>: Add field.
1169         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
1170         (ada_exception_name_addr_1): Add "catch handlers" handling.
1171         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
1172         Update all callers.
1173         (create_excep_cond_exprs) <ex>: Add parameter.
1174         (re_set_exception): Update create_excep_cond_exprs call.
1175         (print_it_exception, print_one_exception, print_mention_exception)
1176         (print_recreate_exception): Add "catch handler" handling.
1177         (allocate_location_catch_handlers, re_set_catch_handlers)
1178         (check_status_catch_handlers, print_it_catch_handlers)
1179         (print_one_catch_handlers, print_mention_catch_handlers)
1180         (print_recreate_catch_handlers): New function.
1181         (catch_handlers_breakpoint_ops): New variable.
1182         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
1183         Add parameter.  Add "catch handler" handling.
1184         (ada_exception_sym_name, ada_exception_breakpoint_ops):
1185         Add "catch handler" handling.
1186         (ada_exception_catchpoint_cond_string): Add "catch handler"
1187         handling.
1188         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
1189         call.
1190         (catch_ada_handlers_command): New function.
1191         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
1192         operations structure.
1193         (_initialize_ada_language): Add "catch handlers" command entry.
1194         * NEWS: Document "catch handlers" feature.
1195
1196 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
1197
1198         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
1199         account when creating the array type of the slice.
1200         (ada_value_slice): Likewise.
1201
1202 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
1203
1204         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
1205         New enum value.
1206         (create_array_type_with_stride): Add byte_stride_prop parameter.
1207         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
1208         New parameter.  Update all callers in this file.
1209         (array_type_has_dynamic_stride): New function.
1210         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
1211         of arrays with dynamic byte strides.
1212         * dwarf2read.c (read_array_type): Add support for dynamic
1213         DW_AT_byte_stride attributes.
1214
1215 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
1216
1217         * dwarf2read.c (read_unspecified_type): Treat
1218         DW_TAG_enumeration_type DIEs from Ada units as stubs.
1219
1220 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
1221
1222         Update copyright year range in all GDB files.
1223
1224 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
1225
1226         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
1227         and gdb/testsuite/gdb.base/step-line.c.
1228
1229 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
1230
1231         * copyright.py (main): Dump the contents of
1232         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
1233         even if BY_HAND is empty.
1234
1235 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
1236
1237         * top.c (print_gdb_version): Update Copyright year in version
1238         message.
1239
1240 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
1241
1242         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
1243
1244 For older changes see ChangeLog-2017.
1245 \f
1246 Local Variables:
1247 mode: change-log
1248 left-margin: 8
1249 fill-column: 74
1250 version-control: never
1251 coding: utf-8
1252 End: