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