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