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