769858b764840840c750dd72929d187efd81c4e6
[external/binutils.git] / gdb / ChangeLog
1 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
2
3         * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
4         Remove parameter and change return type.  Update callers.  Move it.
5         (linux_enable_bts, linux_enable_pt): Improve error message.
6         (linux_enable_pt): Remove zero buffer size check.
7         (linux_enable_btrace): Improve error messages.  Remove NULL return
8         check.
9
10 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
11
12         * btrace.c (btrace_enable): Remove target_supports_btrace call.
13         * nat/linux-btrace.c (perf_event_pt_event_type): Move.
14         (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
15         (linux_supports_pt, linux_supports_btrace): Remove.
16         (linux_enable_bts): Call cpu_supports_bts.
17         * nat/linux-btrace.h (linux_supports_btrace): Remove.
18         * remote.c (remote_supports_btrace): Remove.
19         (init_remote_ops): Remove remote_supports_btrace.
20         * target-delegates.c: Regenerated.
21         * target.c (target_supports_btrace): Remove.
22         * target.h (target_ops) <to_supports_btrace>: Remove
23         (target_supports_btrace): Remove.
24         * x86-linux-nat.c (x86_linux_create_target): Remove
25         linux_supports_btrace.
26
27 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
28
29         * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
30         btrace failed.
31         * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
32         exception and use message in own exception.
33
34 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
35
36         * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
37         (perf_event_pt_event_type): Use gdb_file_up.
38         (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
39         scoped_fd, and scoped_mmap.
40
41 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
42
43         * common/scoped_mmap.h: New.
44         * unittests/scoped_mmap-selftest.c: New.
45         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
46         unittests/scoped_mmap-selftest.c.
47
48 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
49
50         * common/scoped_fd.h: New.
51         * unittests/scoped_fd-selftest.c: New.
52         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
53         unittests/scoped_fd-selftest.c.
54
55 2018-02-09  Tom Tromey  <tom@tromey.com>
56
57         * auto-load.c (auto_load_section_scripts): Use
58         gdb::unique_xmalloc_ptr.
59
60 2018-02-09  Tom Tromey  <tom@tromey.com>
61
62         * auto-load.c (execute_script_contents): Use std::string.
63
64 2018-02-09  Joel Brobecker  <brobecker@adacore.com>
65
66         * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
67         Python function, rather than a new command.
68
69 2018-02-08  Tom Tromey  <tom@tromey.com>
70
71         * solib.c (solib_find_1): Use std::string.
72         (solib_bfd_fopen): Use unique_xmalloc_ptr.
73
74 2018-02-08  Tom Tromey  <tom@tromey.com>
75
76         * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
77
78 2018-02-08  Tom Tromey  <tom@tromey.com>
79
80         * source.c (find_source_lines): Use gdb::def_vector.
81
82 2018-02-08  Tom Tromey  <tom@tromey.com>
83
84         * macrocmd.c (struct temporary_macro_definition): New.
85         (macro_define_command): Use temporary_macro_definition.  Remove
86         cleanups.
87         (free_macro_definition_ptr): Remove.
88
89 2018-02-08  Tom Tromey  <tom@tromey.com>
90
91         * macroexp.c (maybe_expand): Use std::string.
92
93 2018-02-08  Tom Tromey  <tom@tromey.com>
94
95         * macroexp.c (struct macro_buffer): Add initializers for some
96         members.
97         (init_buffer, init_shared_buffer, free_buffer)
98         (free_buffer_return_text): Remove.
99         (macro_buffer): New constructors.
100         (~macro_buffer): New destructor.
101         (macro_buffer::set_shared): New method.
102         (macro_buffer::resize_buffer, macro_buffer::appendc)
103         (macro_buffer::appendmem): Now methods, not free functions.
104         (set_token, append_tokens_without_splicing, stringify)
105         (macro_stringify): Update.
106         (gather_arguments): Change return type.  Remove argc_p argument,
107         add args_ptr argument.  Use std::vector.
108         (substitute_args): Remove argc argument.  Accept std::vector.
109         (expand): Update.  Use std::vector.
110         (scan, macro_expand, macro_expand_next): Update.
111
112 2018-02-08  Tom Tromey  <tom@tromey.com>
113
114         * symtab.c (default_collect_symbol_completion_matches_break_on):
115         Use unique_xmalloc_ptr.
116         * macroscope.h: (sal_macro_scope, user_macro_scope)
117         (default_macro_scope): Return unique_xmalloc_ptr.
118         * macroscope.c (sal_macro_scope, user_macro_scope)
119         (default_macro_scope): Return unique_xmalloc_ptr.
120         * macroexp.h (macro_expand, macro_expand_once): Return
121         unique_xmalloc_ptr.
122         * macroexp.c (macro_expand, macro_expand_once): Return
123         unique_xmalloc_ptr.
124         * macrocmd.c (macro_expand_command, macro_expand_once_command)
125         (info_macro_command, info_macros_command): Use
126         unique_xmalloc_ptr.
127         * compile/compile-c-support.c (write_macro_definitions): Use
128         unique_xmalloc_ptr.
129         * c-exp.y (c_parse): Use unique_xmalloc_ptr.
130
131 2018-02-07  Simon Marchi  <simon.marchi@ericsson.com>
132
133         * value.c (value_static_field): Assign field type instead of
134         containing type when returning an optimized out value.
135
136 2018-02-06  Yao Qi  <yao.qi@linaro.org>
137
138         * ft32-tdep.c (ft32_read_pc): Remove.
139         (ft32_write_pc): Remove.
140         (ft32_gdbarch_init): Update.
141         * m32r-tdep.c (m32r_read_pc): Remove.
142         (m32r_gdbarch_init): Update.
143         * mep-tdep.c (mep_read_pc): Remove.
144         (mep_gdbarch_init): Update.
145         * microblaze-tdep.c (microblaze_write_pc): Remove.
146         (microblaze_gdbarch_init): Update.
147         * mn10300-tdep.c (mn10300_read_pc): Remove.
148         (mn10300_write_pc): Remove.
149         (mn10300_gdbarch_init): Update.
150         * moxie-tdep.c (moxie_read_pc): Remove.
151         (moxie_write_pc): Remove.
152         (moxie_gdbarch_init): Update.
153
154 2018-02-06  Yao Qi  <yao.qi@linaro.org>
155
156         * expprint.c (print_subexp_standard): Handle
157         OP_F77_UNDETERMINED_ARGLIST.
158         (dump_subexp_body_standard): Likewise.
159
160 2018-02-05  Alan Hayward  <alan.hayward@arm.com>
161
162         * target-descriptions.c (tdesc_element_visitor) Add empty
163         implementations.
164         (tdesc_type): Move make_gdb_type from here.
165         (tdesc_type_builtin): Likewise.
166         (tdesc_type_vector): Likewise.
167         (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
168         (make_gdb_type_struct): Move from tdesc_type_with_fields.
169         (make_gdb_type_union): Likewise.
170         (make_gdb_type_flags): Likewise.
171         (make_gdb_type_enum): Likewise.
172         (make_gdb_type): New function.
173         (tdesc_register_type): Use static make_gdb_type.
174
175 2018-02-05  Ruslan Kabatsayev <b7.10110111@gmail.com>
176
177         * infcmd.c (default_print_one_register_info): Align natural-format
178         column values consistently one under another.
179         (pad_to_column): New function.
180
181 2018-02-05  Joel Brobecker  <brobecker@adacore.com>
182
183         * dwarf2read.c (dwarf2_physname): Move commment.
184
185 2018-02-01  Leszek Swirski  <leszeks@google.com>
186
187         * varobj.c (varobj_formatted_print_options): Allow recursive
188         pretty printing if pretty printing is enabled.
189
190 2018-02-01  Leszek Swirski  <leszeks@google.com>
191
192         * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
193         names after a structop as a filename.
194
195 2018-02-01  Yao Qi  <yao.qi@linaro.org>
196
197         * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
198         (arm_record_coproc_data_proc): Likewise.
199
200 2018-02-01  Yao Qi  <yao.qi@linaro.org>
201
202         * arm-tdep.c (arm_record_extension_space): Change ret to signed.
203
204 2018-01-31  Nikola Prica  <nikola.prica@rt-rk.com>
205
206         * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
207         assign shifted lr_reg to fdata->lr_register when lr_reg is set.
208
209 2018-01-31  Pedro Alves  <palves@redhat.com>
210
211         * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
212         * inflow.c (child_terminal_save_inferior): Wrap reference to
213         tcgetpgrp in HAVE_TERMIOS_H.
214         (child_interrupt, child_pass_ctrlc): Wrap references to signal in
215         _WIN32.
216         * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
217         always iterate over all inferiors.
218         (gdbsim_cntrl_c): Adjust.
219         * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
220
221 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
222
223         * gdbtypes.c (lookup_array_range_type): Make sure the array's
224         index type is objfile-owned if the element type is as well.
225
226 2018-01-31  Joel Brobecker  <brobecker@adacore.com>
227
228         GDB 8.1 released.
229
230 2018-01-30  Philipp Rudo  <prudo@linux.vnet.ibm.com>
231
232         * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
233         "features/s390x-linux64.c".
234         (_initialize_s390_linux_tdep): Remove initialization of tdescs
235         s390_linux32 and s390x_linux64.
236         (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
237         default tdesc.
238         * s390-tdep.c: Include "features/s390-linux32.c" and
239         "features/s390x-linux64.c".
240         (s390_tdesc_valid): Add check for tdesc_has_registers.
241         (s390_gdbarch_init): Make sure there is always a valid tdesc.
242         (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
243         tdesc_s390x_linux64.
244         * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
245         tdesc_s390x_linux64 to...
246         * s390-tdep.h: ...here.
247
248 2018-01-30  Pedro Alves  <palves@redhat.com>
249
250         PR gdb/13211
251         * config.in, configure: Regenerate.
252         * configure.ac: Check for getpgid.
253         * go32-nat.c (go32_pass_ctrlc): New.
254         (go32_target): Install it.
255         * inf-child.c (inf_child_target): Install
256         child_terminal_save_inferior, child_pass_ctrlc and
257         child_interrupt.
258         * inf-ptrace.c (inf_ptrace_interrupt): Delete.
259         (inf_ptrace_target): No longer install it.
260         * infcmd.c (interrupt_target_1): Adjust.
261         * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
262         (child_interrupt): Declare.
263         (inferior::terminal_state): New.
264         * inflow.c (struct terminal_info): Update comments.
265         (inferior_process_group): Delete.
266         (terminal_is_ours): Delete.
267         (gdb_tty_state): New.
268         (child_terminal_init): Adjust.
269         (is_gdb_terminal, sharing_input_terminal_1)
270         (sharing_input_terminal): New functions.
271         (child_terminal_inferior): Adjust.  Use sharing_input_terminal.
272         Set the process's actual process group in the foreground if
273         possible.  Handle is_ours_for_output/is_ours distinction.  Don't
274         mark terminal as the inferior's if not sharing GDB's terminal.
275         Don't check attach_flag.
276         (child_terminal_ours_for_output, child_terminal_ours): Adjust to
277         pass down a target_terminal_state.
278         (child_terminal_save_inferior): New, factored out from ...
279         (child_terminal_ours_1): ... this.  Handle
280         target_terminal_state::is_ours_for_output.
281         (child_interrupt, child_pass_ctrlc): New.
282         (inflow_inferior_exit): Clear the inferior's terminal_state.
283         (copy_terminal_info): Copy the inferior's terminal state.
284         (_initialize_inflow): Remove reference to terminal_is_ours.
285         * inflow.h (inferior_process_group): Delete.
286         * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
287         * procfs.c (procfs_target): Don't install procfs_interrupt.
288         (procfs_interrupt): Delete.
289         * remote.c (remote_serial_quit_handler): Adjust.
290         (remote_interrupt): Remove ptid parameter.  Adjust.
291         * target-delegates.c: Regenerate.
292         * target.c: Include "terminal.h".
293         (target_terminal::terminal_state): Rename to ...
294         (target_terminal::m_terminal_state): ... this.
295         (target_terminal::init): Adjust.
296         (target_terminal::inferior): Adjust to per-inferior
297         terminal_state.
298         (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
299         (target_terminal::ours, target_terminal::ours_for_output): Use
300         target_terminal_is_ours_kind.
301         (target_interrupt): Remove ptid parameter.  Adjust.
302         (default_target_pass_ctrlc): Adjust.
303         * target.h (target_ops::to_terminal_save_inferior): New field.
304         (target_ops::to_interrupt): Remove ptid_t parameter.
305         (target_interrupt): Remove ptid_t parameter.  Update comment.
306         (target_pass_ctrlc): Update comment.
307         * target/target.h (target_terminal_state): New scoped enum,
308         factored out of ...
309         (target_terminal::terminal_state): ... here.
310         (target_terminal::inferior): Update comments.
311         (target_terminal::restore_inferior): New.
312         (target_terminal::is_inferior, target_terminal::is_ours)
313         (target_terminal::is_ours_for_output): Adjust.
314         (target_terminal::scoped_restore_terminal_state): Adjust to
315         rename, and call restore_inferior() instead of inferior().
316         (target_terminal::scoped_restore_terminal_state::m_state): Change
317         type.
318         (target_terminal::terminal_state): Rename to ...
319         (target_terminal::m_terminal_state): ... this and change type.
320
321 2018-01-30  Pedro Alves  <palves@redhat.com>
322
323         * linux-nat.c (wait_for_signal): New function.
324         (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
325         directly.
326         (async_terminal_is_ours)
327         (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
328         (linux_nat_add_target): Don't override
329         to_terminal_inferior/to_terminal_ours.
330
331 2018-01-29  Sergio Durigan Junior  <sergiodj@redhat.com>
332
333         * remote.c (remote_follow_fork): Don't call "detach_inferior".
334
335 2018-01-28  Simon Marchi  <simon.marchi@ericsson.com>
336
337         * dwarf2read.c (free_dwo_files): Add forward-declaration.
338         (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
339         dwarf2_per_objfile_free here.
340         (dwarf2_per_objfile_free): Remove.
341         (_initialize_dwarf2_read): Don't register
342         dwarf2_per_objfile_free as a registry cleanup.
343
344 2018-01-27  Eli Zaretskii  <eliz@gnu.org>
345
346         Avoid compilation errors in MinGW native builds
347
348         The error is triggered by including python-internal.h, and the
349         error message is:
350
351              In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
352                       from build-gnulib/import/math.h:27,
353                       from d:/usr/Python26/include/pyport.h:235,
354                       from d:/usr/Python26/include/Python.h:58,
355                       from python/python-internal.h:94,
356                       from python/py-arch.c:24:
357              d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
358         using ::hypot;
359                 ^~~~~
360
361         This happens because Python headers define 'hypot' to expand t
362         '_hypot' in the Windows builds.
363         * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
364         'hypoth'.  This avoids a compilation error.
365
366 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
367
368         * MAINTAINERS (Write After Approval): Fix ordering.
369
370 2018-01-26  Alan Hayward  <alan.hayward@arm.com>
371
372         * MAINTAINERS (Write After Approval): Add Alan Hayward.
373
374 2018-01-26  Alan Modra  <amodra@gmail.com>
375
376         * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
377         (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
378         Remove nop.  Make const.  Comment.
379         (powerpc32_plt_stub_so_2): New.
380         (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
381         Correct count.  Update uses.
382         (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
383         Move common code reading PLT entry word.  Correct
384         powerpc32_plt_stub PLT address calculation.
385         * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
386         (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
387         (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
388         (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
389         (ppc64_standard_linkage8): Likewise.
390         * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
391         Correct insns description.
392         * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
393
394 2018-01-24  Pedro Alves  <palves@redhat.com>
395
396         GCC PR libstdc++/83906
397         * gdbtypes.c (operator==(const dynamic_prop &,
398         const dynamic_prop &)): New.
399         (operator==(const range_bounds &, const range_bounds &)): New.
400         (check_types_equal): Use them instead of memcmp.
401         * gdbtypes.h (operator==(const dynamic_prop &,
402         const dynamic_prop &)): Declare.
403         (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
404         (operator==(const range_bounds &, const range_bounds &)): Declare.
405         (operator!=(const range_bounds &, const range_bounds &)): Declare.
406
407 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
408
409         * s390-linux-tdep.c (s390_record_address_mask)
410         (s390_record_calc_disp_common, s390_record_calc_disp)
411         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
412         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
413         (s390_process_record): Move to s390-tdep.c.
414         (s390_linux_init_abi_any): Adjust.
415         * s390-tdep.c (s390_record_address_mask)
416         (s390_record_calc_disp_common, s390_record_calc_disp)
417         (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
418         (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
419         (s390_process_record): Moved from s390-linux-tdep.c
420         (s390_gdbarch_init): Adjust.
421
422 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
423
424         * s390-linux-nat.c (s390-tdep.h): New include.
425         * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
426         (HFILES_NO_SRCDIR): Add s390-tdep.h.
427         (ALLDEPFILES): Add s390-tdep.c.
428         * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
429         * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
430         * s390-tdep.h: ...this.  New file.
431         * s390-linux-tdep.c (s390-tdep.h): New include.
432         (_initialize_s390_tdep): Rename to...
433         (_initialize_s390_linux_tdep): ...this and adjust.
434         (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
435         (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
436         s390-tdep.h.
437         (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
438         (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
439         (s390_is_partial_instruction, s390_software_single_step)
440         (is_non_branch_ril, s390_displaced_step_copy_insn)
441         (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
442         (s390_prologue_data, s390_addr, s390_store, s390_load)
443         (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
444         (s390_register_call_saved, s390_guess_tracepoint_registers)
445         (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
446         (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
447         (s390_pseudo_register_name, s390_pseudo_register_type)
448         (s390_pseudo_register_read, s390_pseudo_register_write)
449         (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
450         (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
451         (s390_addr_bits_remove, s390_address_class_type_flags)
452         (s390_address_class_type_flags_to_name)
453         (s390_address_class_name_to_type_flags, s390_effective_inner_type)
454         (s390_function_arg_float, s390_function_arg_vector)
455         (is_power_of_two, s390_function_arg_integer, s390_arg_state)
456         (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
457         (s390_frame_align, s390_register_return_value, s390_return_value)
458         (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
459         (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
460         (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
461         (s390_trad_frame_prev_register, s390_unwind_cache)
462         (s390_prologue_frame_unwind_cache)
463         (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
464         (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
465         (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
466         (s390_stub_frame_this_id, s390_stub_frame_prev_register)
467         (s390_stub_frame_sniffer, s390_stub_frame_unwind)
468         (s390_frame_base_address, s390_local_base_address)
469         (s390_frame_base, s390_gcc_target_options)
470         (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
471         (s390_validate_reg_range, s390_tdesc_valid)
472         (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
473         * s390-tdep.c: ...this.  New file.
474
475 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
476
477         * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
478         (s390_process_record, s390_gdbarch_tdep_alloc)
479         (s390_linux_init_abi_any): Use/set new hook.
480
481 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
482
483         * s390-linux-tdep.c (osabi.h): New include.
484         (s390_linux_init_abi_31, s390_linux_init_abi_64)
485         (s390_linux_init_abi_any): New functions.
486         (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
487
488 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
489
490         * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
491         tdesc_has_registers check
492
493 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
494
495         * s390-linux-tdep.c (s390_tdesc_valid): New function.
496         (s390_validate_reg_range): New macro.
497         (s390_gdbarch_init): Adjust.
498
499 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
500
501         * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
502         (s390_gdbarch_tdep_alloc): Adjust.
503         (s390_gdbarch_init): Adjust.
504
505 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
506
507         * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
508         <have_tdb>: Change type to bool.
509         (s390_gdbarch_tdep_alloc): Adjust.
510         (s390_gdbarch_init): Adjust.
511
512 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
513
514         * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
515         (gdbarch_tdep) <have_upper, have_vx>: New fields.
516         (s390_gdbarch_tdep_alloc): New function.
517         (s390_gdbarch_init): Allocate tdep at start and use its fields
518         instead of separate variables.
519
520 2018-01-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
521
522         * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
523         when looking for cached gdbarch and add comment for remaining.
524
525 2018-01-22  Pedro Alves  <palves@redhat.com>
526             Sergio Durigan Junior  <sergiodj@redhat.com>
527
528         * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
529         case.
530
531 2018-01-22  Maciej W. Rozycki  <macro@mips.com>
532
533         * MAINTAINERS: Update my company e-mail address.
534
535 2018-01-22  Yao Qi  <yao.qi@linaro.org>
536
537         * regcache.c (cooked_write_test): New function.
538         (_initialize_regcache): Register the test.
539
540 2018-01-22  Yao Qi  <yao.qi@linaro.org>
541
542         * ia64-tdep.c (ia64_pseudo_register_read): Call
543         regcache->cooked_read instead of regcache_cooked_read_unsigned.
544         * m32c-tdep.c (m32c_cat_read): Likewise.
545         (m32c_r3r2r1r0_read): Likewise.
546         * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
547         * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
548
549 2018-01-22  Yao Qi  <yao.qi@linaro.org>
550
551         * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
552         method raw_read instead of regcache_raw_read.
553         * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
554         * arm-tdep.c (arm_neon_quad_read): Likewise.
555         * avr-tdep.c (avr_pseudo_register_read): Likewise.
556         * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
557         * frv-tdep.c (frv_pseudo_register_read): Likewise.
558         * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
559         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
560         (i386_pseudo_register_read_into_value): Likewise.
561         * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
562         * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
563         * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
564         * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
565         * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
566         * sparc-tdep.c (sparc32_pseudo_register_read):  Likewise.
567         * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
568         * spu-tdep.c (spu_pseudo_register_read_spu):  Likewise.
569         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
570
571 2018-01-22  Yao Qi  <yao.qi@linaro.org>
572
573         * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
574         * configure.tgt: Remove target mt.
575         * mt-tdep.c: Remove.
576         * regcache.c (cooked_read_test): Remove the check for mt.
577
578 2018-01-22  Yao Qi  <yao.qi@linaro.org>
579
580         * jit.c (jit_frame_prev_register): Call regcache::cooked_read
581         instead of gdbarch_pseudo_register_read_value.
582
583 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
584
585         * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
586         language is Ada.
587
588 2018-01-22  Joel Brobecker  <brobecker@adacore.com>
589
590         * linespec.c (create_sals_line_offset): Remove code that preserved
591         the symtab_and_line's line number.
592
593 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
594
595         * varobj.c (varobj_create): Don't set valid_block when creating a
596         floating varobj.
597
598 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
599
600         * varobj.c (varobj_create): Remove out of date comment.
601
602 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
603
604         PR mi/20395
605         * ada-exp.y (write_var_from_sym): Pass extra parameter when
606         updating innermost block.
607         * parse.c (innermost_block_tracker::update): Take extra type
608         parameter, and check types match before updating innermost block.
609         (write_dollar_variable): Update innermost block for registers.
610         * parser-defs.h (enum innermost_block_tracker_type): New enum.
611         (innermost_block_tracker::innermost_block_tracker): Initialise
612         m_types member.
613         (innermost_block_tracker::reset): Take type parameter.
614         (innermost_block_tracker::update): Take type parameter, and pass
615         type through as needed.
616         (innermost_block_tracker::m_types): New member.
617         * varobj.c (varobj_create): Pass type when reseting innermost
618         block.
619
620 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
621
622         * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
623         * ada-lang.c (resolve_subexp): Likewise.
624         * breakpoint.c (set_breakpoint_condition) Likewise.
625         (watch_command_1) Likewise.
626         * c-exp.y (variable): Likewise.
627         * d-exp.y (PrimaryExpression): Likewise.
628         * f-exp.y (variable): Likewise.
629         * go-exp.y (variable): Likewise.
630         * m2-exp.y (variable): Likewise.
631         * objfiles.c (objfile::~objfile): Likewise.
632         * p-exp.y (variable): Likewise.
633         * parse.c (innermost_block): Change type.
634         * parser-defs.h (class innermost_block_tracker): New.
635         (innermost_block): Change to innermost_block_tracker.
636         * printcmd.c (display_command): Switch to innermost_block API.
637         (do_one_display): Likewise.
638         * rust-exp.y (do_one_display): Likewise.
639         * symfile.c (clear_symtab_users): Likewise.
640         * varobj.c (varobj_create): Switch to innermost_block API, replace
641         use of innermost_block with block stored on varobj object.
642
643 2018-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
644
645         * expression.h (innermost_block): Remove declaration.
646         * varobj.c: Add 'parser-defs.h' include.
647
648 2018-01-19  Tom Tromey  <tom@tromey.com>
649
650         * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
651         symbols in the static and global blocks.
652
653 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
654
655         * nat/linux-ptrace.c: Remove unnecessary reinclusion of
656         gdb_ptrace.h, and move including gdb_wait.h ...
657         * nat/linux-ptrace.h: ... to here.
658
659 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
660
661         * inf-ptrace.c (inf_ptrace_detach): Adjust call to
662         inf_ptrace_detach_success.
663         (inf_ptrace_detach_success): Add inferior parameter, use it
664         instead of inferior_ptid, pass it to detach_inferior.
665         * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
666         parameter.
667         * inferior.c (detach_inferior): Add overload that takes an
668         inferior object.
669         * inferior.h (detach_inferior): Likewise.
670         * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
671         use inferior_ptid, adjust call to inf_ptrace_detach_success.
672         * linux-thread-db.c (thread_db_detach): Use inf parameter.
673
674 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
675
676         * target.h (struct target_ops) <to_detach>: Add inferior
677         parameter.
678         (target_detach): Likewise.
679         * target.c (dispose_inferior): Pass inferior down.
680         (target_detach): Pass inferior down.  Assert that it is equal to
681         the current inferior.
682         * aix-thread.c (aix_thread_detach): Pass inferior down.
683         * corefile.c (core_file_command): Pass current_inferior() down.
684         * corelow.c (core_detach): Add inferior parameter.
685         * darwin-nat.c (darwin_detach): Likewise.
686         * gnu-nat.c (gnu_detach): Likewise.
687         * inf-ptrace.c (inf_ptrace_detach): Likewise.
688         * infcmd.c (detach_command): Pass current_inferior() down to
689         target_detach.
690         * infrun.c (follow_fork_inferior): Pass parent_inf to
691         target_detach.
692         (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
693         target_detach.
694         * linux-nat.c (linux_nat_detach): Add inferior parameter.
695         * linux-thread-db.c (thread_db_detach): Likewise.
696         * nto-procfs.c (procfs_detach): Likewise.
697         * procfs.c (procfs_detach): Likewise.
698         * record.c (record_detach): Likewise.
699         * record.h (struct inferior): Forward-declare.
700         (record_detach): Add inferior parameter.
701         * remote-sim.c (gdbsim_detach): Likewise.
702         * remote.c (remote_detach_1): Likewise.
703         (remote_detach): Likewise.
704         (extended_remote_detach): Likewise.
705         * sol-thread.c (sol_thread_detach): Likewise.
706         * target-debug.h (target_debug_print_inferior_p): New macro.
707         * target-delegates.c: Re-generate.
708         * top.c (kill_or_detach): Pass inferior down to target_detach.
709         * windows-nat.c (windows_detach): Add inferior parameter.
710
711 2018-01-19  Simon Marchi  <simon.marchi@ericsson.com>
712
713         * target.h (struct target_ops) <to_detach>: Remove args
714         parameter.
715         (target_detach): Likewise.
716         * target.c (dispose_inferior): Adjust.
717         (target_detach): Remove args parameter, adjust.
718         * aix-thread.c (aix_thread_detach): Adjust.
719         * corefile.c (core_file_command): Adjust.
720         * corelow.c (core_detach): Adjust.
721         * darwin-nat.c (darwin_detach): Adjust.
722         * gnu-nat.c (gnu_detach): Adjust.
723         * inf-ptrace.c (inf_ptrace_detach): Adjust.
724         * infcmd.c (detach_command): Adjust
725         * infrun.c (follow_fork_inferior): Adjust.
726         (handle_vfork_child_exec_or_exit): Adjust.
727         * linux-fork.c (linux_fork_detach): Remove args parameter.
728         * linux-fork.h (linux_fork_detach): Likewise.
729         * linux-nat.c (linux_nat_detach): Likewise, and adjust.
730         * linux-thread-db.c (thread_db_detach): Likewise.
731         * nto-procfs.c (procfs_detach): Likewise.
732         * procfs.c (procfs_detach): Likewise.
733         (do_detach): Remove signo parameter.
734         * record.c (record_detach): Remove args parameter.
735         * record.h (record_detach): Likewise.
736         * remote-sim.c (gdbsim_detach): Likewise.
737         * remote.c (remote_detach_1): Likewise.
738         (remote_detach): Likewise.
739         (extended_remote_detach): Likewise.
740         * sol-thread.c (sol_thread_detach): Likewise.
741         * target-delegates.c: Re-generate.
742         * top.c (struct qt_args) <args>: Remove field.
743         (kill_or_detach): Don't pass args.
744         (quit_force): Don't set args.
745         * windows-nat.c (windows_detach): Remove args parameter.
746
747 2018-01-19  Yao Qi  <yao.qi@linaro.org>
748
749         * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
750         (arm_linux_init_abi): Install it.
751
752 2018-01-19  Yao Qi  <yao.qi@linaro.org>
753
754         * osabi.c (gdb_osabi_names): Extend the regexp for
755         arm-linux-gnueabihf.
756
757 2018-01-18  Yao Qi  <yao.qi@linaro.org>
758
759         * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
760         m_abbrevs.
761         (abbrev_table::add_abbrev): Update.
762         (abbrev_table::lookup_abbrev): Update.
763
764 2018-01-18  Yao Qi  <yao.qi@linaro.org>
765
766         * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
767
768 2018-01-17  Sergio Durigan Junior  <sergiodj@redhat.com>
769
770         * compile/compile.c (compile_to_object): Convert "triplet_rx"
771         to "std::string".
772
773 2018-01-17  Tom Tromey  <tom@tromey.com>
774
775         * dwarf2read.c (symbolp): Remove typedef.  Don't instantiate VEC.
776
777 2018-01-17  Tom Tromey  <tom@tromey.com>
778
779         * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
780         * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
781         (create_array_type_with_stride): Update.
782         * dwarf2read.c (set_die_type): Update.
783
784 2018-01-17  Tom Tromey  <tom@tromey.com>
785
786         * dwarf2read.c (delayed_method_info): Remove typedef.
787         (dwarf2_cu::method_info): Now a std::vector.
788         (add_to_method_list): Update.
789         (free_delayed_list): Remove.
790         (compute_delayed_physnames): Update.
791         (process_full_comp_unit, process_full_type_unit): Clear the method
792         list.  Remove cleanups.
793         (psymtab_include_file_name): Add name_holder parameter.  Use
794         unique_xmalloc_ptr.
795         (dwarf_decode_lines): Update.
796
797 2018-01-17  Tom Tromey  <tom@tromey.com>
798             Simon Marchi  <simon.marchi@ericsson.com>
799
800         * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
801         (dwarf2_per_objfile::free_cached_comp_units)
802         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
803         (init_cutu_and_read_dies_no_follow): Update.
804         (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
805         (dwarf2_cu::~dwarf2_cu): New.
806         (free_heap_comp_unit, free_stack_comp_unit): Remove.
807         (age_cached_comp_units, free_one_cached_comp_unit): Update.
808
809 2018-01-17  Tom Tromey  <tom@tromey.com>
810             Simon Marchi  <simon.marchi@ericsson.com>
811
812         * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
813         (struct die_reader_specs) <abbrev_table>: New member.
814         (struct abbrev_table): Add constructor.
815         <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
816         <abbrev_obstack>: Now an auto_obstack.
817         (abbrev_table_up): New typedef.
818         (init_cu_die_reader): Add abbrev_table parameter.
819         (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
820         Add result_dwo_abbrev_table.
821         (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
822         (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
823         Update.
824         (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
825         parameter.
826         (skip_children): Update.
827         (abbrev_table::alloc_abbrev): Rename from
828         abbrev_table_alloc_abbrev.
829         (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
830         (abbrev_table::lookup_abbrev): Rename from
831         abbrev_table_lookup_abbrev.
832         (abbrev_table_read_table): Return abbrev_table_up.
833         (abbrev_table_free, abbrev_table_free_cleanup)
834         (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
835         (load_partial_dies): Update.
836
837 2018-01-17  Tom Tromey  <tom@tromey.com>
838
839         * dwarf2read.c (dwarf2_compute_name): Update comment.
840         (read_func_scope, read_variable): Update.
841         (new_symbol): Remove.
842         (new_symbol_full): Rename to new_symbol.
843
844 2018-01-17  Mike Gulick  <mgulick@mathworks.com>
845
846         PR gdb/16577
847         * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
848         a warning instead of throwing an error, set section size to 0 and return
849         NULL.
850         * gdb_bfd.h (gdb_bfd_map_section): Update description.
851
852 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
853
854         * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
855         std::string.
856         (linux_ptrace_attach_fail_reason_string): Likewise.
857         * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
858         Likewise.
859         (linux_ptrace_attach_fail_reason_string): Likewise.
860         * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
861
862 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
863
864         * linux-nat.c (linux_nat_attach): Remove xstrdup.
865
866 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
867
868         PR gdb/21559
869         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
870         checking for fs_base/gs_base fields in struct user_regs_struct.
871         * configure: Regenerate.
872
873 2018-01-17  Yao Qi  <yao.qi@linaro.org>
874
875         * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
876         function.
877         (aarch64_linux_init_abi): Install it to gdbarch hook
878         gcc_target_options.
879
880 2018-01-15  Pedro Alves  <palves@redhat.com>
881
882         * common/signals-state-save-restore.c
883         (save_original_signals_state): Fix typos.
884
885 2017-01-12  Tom Tromey  <tom@tromey.com>
886             Sergio Durigan Junior  <sergiodj@redhat.com>
887
888         * Makefile.in (install-only): Install gdb-add-index.
889
890 2018-01-12  John Baldwin  <jhb@FreeBSD.org>
891
892         * fbsd-tdep.c (KVE_PROTECTION): Correct value.
893
894 2018-01-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
895
896         * infrun.c (keep_going_pass_signal): Clear step-over info when
897         insert_breakpoints fails.
898
899 2018-01-11  Pedro Alves  <palves@redhat.com>
900
901         PR gdb/22583
902         * infrun.c (resume): Rename to ...
903         (resume_1): ... this.
904         (resume): Reimplement as wrapper around resume_1.
905
906 2018-01-11  Pedro Alves  <palves@redhat.com>
907
908         PR remote/22597
909         * remote.c (remote_parse_stop_reply): Default to the last-set
910         general thread instead of to 'magic_null_ptid'.
911
912 2018-01-10  Pedro Alves  <palves@redhat.com>
913
914         * language.h (language_get_symbol_name_matcher): Rename ...
915         (get_symbol_name_matcher): ... this.
916         * language.c (language_get_symbol_name_matcher): Ditto.
917         * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
918         callers adjusted.
919
920 2018-01-10  Pedro Alves  <palves@redhat.com>
921
922         PR gdb/22670
923         * dwarf2read.c
924         (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
925         Adjust to use language_get_symbol_name_matcher instead of
926         language_defn::la_get_symbol_name_matcher.
927         * language.c (language_get_symbol_name_matcher): If in Ada mode
928         and the lookup name is a verbatim match, return Ada's matcher.
929         * language.h (language_get_symbol_name_matcher): Adjust comment.
930         (ada_lookup_name_info::verbatim_p):: New method.
931
932 2018-01-10  Pedro Alves  <palves@redhat.com>
933
934         PR gdb/22670
935         * ada-lang.c (ada_collect_symbol_completion_matches): If the
936         minsym's language is language_auto or language_cplus, pass down
937         language_ada instead.
938         * symtab.c (compare_symbol_name): Don't frob symbol language here.
939
940 2018-01-10  Pedro Alves  <palves@redhat.com>
941
942         PR gdb/22670
943         * minsyms.c (linkage_name_str): New function.
944         (iterate_over_minimal_symbols): Use it.
945
946 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
947
948         * NEWS: Document that 'info proc' now works on FreeBSD.
949
950 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
951
952         * configure.ac: Check for kinfo_getfile in libutil.
953         * configure: Regenerate.
954         * config.in: Regenerate.
955         * fbsd-nat.c: Include "fbsd-tdep.h".
956         (fbsd_fetch_cmdline): New.
957         (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
958         rather than calling error.
959         (fbsd_info_proc): New.
960         (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
961         (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
962         (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
963
964 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
965
966         * fbsd-nat.c (struct free_deleter): Remove.
967         (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
968
969 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
970
971         * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
972         NULL for an empty pathname.
973
974 2018-01-09  John Baldwin  <jhb@FreeBSD.org>
975
976         * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
977         (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
978         (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
979         (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
980         (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
981         (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
982         (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
983         (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
984         (kinfo_proc_layout_32, kinfo_proc_layout_i386)
985         (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
986         (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
987         (fbsd_core_fetch_timeval, fbsd_print_sigset)
988         (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
989         (fbsd_init_abi):  Install gdbarch "core_info_proc" method.
990         * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
991
992 2018-01-08  Samuel Thibault  <samuel.thibault@ens-lyon.org>
993
994         * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
995         (gnu_xfer_auxv): New function.
996         (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
997         TARGET_OBJECT_AUXV.
998
999 2018-01-08  Yao Qi  <yao.qi@linaro.org>
1000             Simon Marchi  <simon.marchi@ericsson.com>
1001
1002         * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
1003         common/selftest.c.
1004         (COMMON_OBS): Remove selftest.o.
1005         * configure.ac: Append selftest-arch.c and common/selftest.c to
1006         CONFIG_SRCS.  Append selftest-arch.o and selftest.o to COMMON_OBS.
1007         * configure: Re-generated.
1008         * maint.c (maintenance_selftest): Wrap selftests::run_tests with
1009         GDB_SELF_TEST.
1010         (maintenance_info_selftests): Likewise.
1011
1012 2018-01-08  Xavier Roirand  <roirand@adacore.com>
1013
1014         * ada-valprint.c (val_print_packed_array_elements): Use
1015         proper number of elements when printing an array indexed
1016         by an enumeration type.
1017
1018 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
1019
1020         * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
1021         (dw2_get_file_names_reader): Adjust.
1022         (lookup_dwo_signatured_type): Adjust.
1023         (lookup_dwp_signatured_type): Adjust.
1024         (lookup_signatured_type): Adjust.
1025         (create_type_unit_group): Adjust.
1026         (get_type_unit_group): Adjust.
1027         (process_psymtab_comp_unit_reader): Adjust.
1028         (build_type_psymtabs_reader): Adjust.
1029         (scan_partial_symbols): Adjust.
1030         (add_partial_symbol): Adjust.
1031         (add_partial_subprogram): Adjust.
1032         (peek_die_abbrev): Adjust.
1033         (fixup_go_packaging): Adjust.
1034         (process_imported_unit_die): Adjust.
1035         (dwarf2_compute_name): Adjust.
1036         (dwarf2_physname): Adjust.
1037         (read_import_statement): Adjust.
1038         (handle_DW_AT_stmt_list): Adjust.
1039         (read_file_scope): Adjust.
1040         (read_func_scope): Adjust.
1041         (read_lexical_block_scope): Adjust.
1042         (read_call_site_scope): Adjust.
1043         (read_variable): Adjust.
1044         (dwarf2_rnglists_process): Adjust.
1045         (dwarf2_ranges_process): Adjust.
1046         (dwarf2_ranges_read): Adjust.
1047         (dwarf2_get_pc_bounds): Adjust.
1048         (dwarf2_record_block_ranges): Adjust.
1049         (dwarf2_add_field): Adjust.
1050         (dwarf2_add_member_fn): Adjust.
1051         (read_structure_type): Adjust.
1052         (process_structure_scope): Adjust.
1053         (read_enumeration_type): Adjust.
1054         (read_array_type): Adjust.
1055         (mark_common_block_symbol_computed): Adjust.
1056         (read_common_block): Adjust.
1057         (read_namespace_type): Adjust.
1058         (read_namespace): Adjust.
1059         (read_module_type): Adjust.
1060         (read_tag_pointer_type): Adjust.
1061         (read_tag_ptr_to_member_type): Adjust.
1062         (read_tag_string_type): Adjust.
1063         (read_subroutine_type): Adjust.
1064         (read_typedef): Adjust.
1065         (read_base_type): Adjust.
1066         (attr_to_dynamic_prop): Adjust.
1067         (read_subrange_type): Adjust.
1068         (read_unspecified_type): Adjust.
1069         (dwarf2_read_abbrevs): Adjust.
1070         (load_partial_dies): Adjust.
1071         (read_partial_die): Adjust.
1072         (find_partial_die): Adjust.
1073         (guess_partial_die_structure_name): Adjust.
1074         (fixup_partial_die): Adjust.
1075         (read_attribute_value): Adjust.
1076         (read_addr_index): Adjust.
1077         (read_addr_index_from_leb128): Adjust.
1078         (read_str_index): Adjust.
1079         (dwarf2_string_attr): Adjust.
1080         (get_debug_line_section): Adjust.
1081         (dwarf_decode_line_header): Adjust.
1082         (lnp_state_machine::check_line_address): Adjust.
1083         (dwarf_decode_lines_1): Adjust.
1084         (dwarf_decode_lines): Adjust.
1085         (dwarf2_start_symtab): Adjust.
1086         (var_decode_location): Adjust.
1087         (new_symbol_full): Adjust.
1088         (dwarf2_const_value_data): Adjust.
1089         (dwarf2_const_value_attr): Adjust.
1090         (dwarf2_const_value): Adjust.
1091         (die_type): Adjust.
1092         (die_containing_type): Adjust.
1093         (build_error_marker_type): Adjust.
1094         (lookup_die_type): Adjust.
1095         (guess_full_die_structure_name): Adjust.
1096         (anonymous_struct_prefix): Adjust.
1097         (determine_prefix): Adjust.
1098         (dwarf2_name): Adjust.
1099         (follow_die_ref_or_sig): Adjust.
1100         (follow_die_offset): Adjust.
1101         (follow_die_ref): Adjust.
1102         (follow_die_sig_1): Adjust.
1103         (follow_die_sig): Adjust.
1104         (get_signatured_type): Adjust.
1105         (get_DW_AT_signature_type): Adjust.
1106         (decode_locdesc): Adjust.
1107         (dwarf_decode_macros): Adjust.
1108         (cu_debug_loc_section): Adjust.
1109         (fill_in_loclist_baton): Adjust.
1110         (dwarf2_symbol_mark_computed): Adjust.
1111         (init_one_comp_unit): Don't assign
1112         dwarf2_cu::dwarf2_per_objfile.
1113         (set_die_type): Adjust.
1114
1115 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
1116
1117         * dwarf2read.c (struct mapped_debug_names): Add constructor.
1118         <dwarf2_per_objfile>: New field.
1119         (dwarf2_per_objfile): Remove global.
1120         (get_dwarf2_per_objfile): New function.
1121         (set_dwarf2_per_objfile): New function.
1122         (dwarf2_build_psymtabs_hard): Change objfile parameter to
1123         dwarf2_per_objfile.
1124         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
1125         (read_abbrev_offset): Likewise.
1126         (read_indirect_string): Likewise.
1127         (read_indirect_line_string): Likewise.
1128         (read_indirect_string_at_offset): Likewise.
1129         (read_indirect_string_from_dwz): Likewise.
1130         (dwarf2_find_containing_comp_unit): Change objfile parameter to
1131         dwarf2_per_objfile.
1132         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
1133         (create_all_comp_units): Change objfile parameter to
1134         dwarf2_per_objfile.
1135         (create_all_type_units): Likewise.
1136         (process_queue): Add dwarf2_per_objfile parameter.
1137         (read_and_check_comp_unit_head): Likewise.
1138         (lookup_dwo_unit_in_dwp): Likewise.
1139         (get_dwp_file): Likewise.
1140         (process_cu_includes): Likewise.
1141         (struct free_dwo_file_cleanup_data): New struct.
1142         (dwarf2_has_info): Use get_dwarf2_per_objfile and
1143         set_dwarf2_per_objfile.
1144         (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
1145         (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
1146         context, adjust calls.
1147         (dw2_instantiate_symtab): Likewise.
1148         (dw2_get_cutu): Add dwarf2_per_objfile parameter.
1149         (dw2_get_cu): Likewise.
1150         (create_cu_from_index_list): Change objfile parameter to
1151         dwarf2_per_objfile.
1152         (create_cus_from_index_list): Get dwarf2_per_objfile from
1153         context, adjust calls.
1154         (create_cus_from_index): Likewise.
1155         (create_signatured_type_table_from_index): Change objfile
1156         parameter to dwarf2_per_objfile.
1157         (create_signatured_type_table_from_debug_names): Change objfile
1158         parameter to dwarf2_per_objfile.
1159         (create_addrmap_from_index): Likewise.
1160         (create_addrmap_from_aranges): Likewise.
1161         (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
1162         (dw2_setup): Remove.
1163         (dw2_get_file_names_reader): Get dwarf2_per_objfile from
1164         context.
1165         (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
1166         get_dwarf2_per_objfile.
1167         (dw2_forget_cached_source_info): Likewise.
1168         (dw2_map_symtabs_matching_filename): Likewise.
1169         (struct dw2_symtab_iterator) <index>: Remove.
1170         <dwarf2_per_objfile>: New field.
1171         (dw2_symtab_iter_init): Replace index parameter with
1172         dwarf2_per_objfile.
1173         (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
1174         (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
1175         (dw2_print_stats): Likewise.
1176         (dw2_dump): Likewise.
1177         (dw2_expand_symtabs_for_function): Likewise.
1178         (dw2_expand_all_symtabs): Likewise.
1179         (dw2_expand_symtabs_with_fullname): Likewise.
1180         (dw2_expand_marked_cus): Replace index and objfile parameters
1181         with dwarf2_per_objfile.
1182         (dw_expand_symtabs_matching_file_matcher): Add
1183         dwarf2_per_objfile parameter and adjust calls.
1184         (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
1185         adjust calls.
1186         (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
1187         (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
1188         adjust calls.
1189         (create_cus_from_debug_names_list): Replace objfile parameter
1190         with dwarf2_per_objfile and adjust calls.
1191         (create_cus_from_debug_names): Likewise.
1192         (dwarf2_read_debug_names): Likewise.
1193         (mapped_debug_names::namei_to_name): Adjust call.
1194         (dw2_debug_names_iterator::next): Likewise.
1195         (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
1196         (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
1197         (dw2_debug_names_dump): Likewise.
1198         (dw2_debug_names_expand_symtabs_for_function): Likewise.
1199         (dw2_debug_names_expand_symtabs_matching): Likewise.
1200         (dwarf2_initialize_objfile): Likewise.
1201         (dwarf2_build_psymtabs): Likewise.
1202         (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
1203         this_cu.
1204         (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
1205         (read_and_check_comp_unit_head): Likewise.
1206         (read_abbrev_offset): Likewise.
1207         (create_debug_type_hash_table): Likewise.
1208         (create_debug_types_hash_table): Likewise.
1209         (create_all_type_units): Replace objfile parameter with
1210         dwarf2_per_objfile.
1211         (add_type_unit): Add dwarf2_per_objfile parameter.
1212         (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
1213         with dwarf2_per_objfile.
1214         (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
1215         (lookup_dwp_signatured_type): Likewise.
1216         (lookup_signatured_type): Likewise.
1217         (read_cutu_die_from_dwo): Likewise.
1218         (init_tu_and_read_dwo_dies): Likewise.
1219         (init_cutu_and_read_dies): Likewise.
1220         (init_cutu_and_read_dies_no_follow): Likewise.
1221         (allocate_type_unit_groups_table): Add objfile parameter.
1222         (create_type_unit_group): Use dwarf2_per_objfile from cu.
1223         (get_type_unit_group): Likewise.
1224         (process_psymtab_comp_unit): Update call.
1225         (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
1226         (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
1227         (print_tu_stats): Likewise.
1228         (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
1229         in void* parameter.
1230         (build_type_psymtabs): Change objfile parameter to
1231         dwarf2_per_objfile.
1232         (process_skeletonless_type_unit): Use dwarf2_per_objfile
1233         passed in void* parameter.
1234         (process_skeletonless_type_units): Change objfile parameter to
1235         dwarf2_per_objfile.
1236         (set_partial_user): Likewise.
1237         (dwarf2_build_psymtabs_hard): Likewise.
1238         (read_comp_units_from_section): Likewise.
1239         (create_all_comp_units): Likewise.
1240         (scan_partial_symbols): Update calls.
1241         (add_partial_symbol): Likewise.
1242         (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
1243         (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
1244         (process_queue): Add dwarf2_per_objfile parameter.
1245         (get_compunit_symtab): Use dwarf2_per_objfile from cu.
1246         (compute_compunit_symtab_includes): Likewise.
1247         (process_cu_includes): Add dwarf2_per_objfile parameter.
1248         (process_full_comp_unit): Use dwarf2_per_objfile from cu.
1249         (process_full_type_unit): Likewise.
1250         (process_imported_unit_die): Update call.
1251         (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
1252         (read_file_scope): Likewise.
1253         (allocate_dwo_file_hash_table): Add objfile parameter.
1254         (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
1255         (create_cus_hash_table): Likewise.
1256         (create_dwp_hash_table): Likewise.
1257         (create_dwo_unit_in_dwp_v1): Likewise.
1258         (create_dwp_v2_section): Likewise.
1259         (create_dwo_unit_in_dwp_v2): Likewise.
1260         (lookup_dwo_unit_in_dwp): Likewise.
1261         (try_open_dwop_file): Likewise.
1262         (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
1263         (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
1264         cleanup to include a reference to dwarf2_per_objfile.
1265         (open_dwp_file): Add dwarf2_per_objfile parameter.
1266         (open_and_init_dwp_file): Likewise.
1267         (get_dwp_file): Likewise.
1268         (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
1269         (queue_and_load_all_dwo_tus): Update call.
1270         (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
1271         data.
1272         (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
1273         (dwarf2_ranges_process): Likewise.
1274         (dwarf2_get_pc_bounds): Likewise.
1275         (mark_common_block_symbol_computed): Likewise.
1276         (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
1277         (dwarf2_read_abbrevs): Update call.
1278         (read_partial_die): Use dwarf2_per_objfile from cu.
1279         (find_partial_die): Likewise.
1280         (fixup_partial_die): Likewise.
1281         (read_attribute_value): Likewise.
1282         (read_indirect_string_at_offset_from): Add objfile parameter.
1283         (read_indirect_string_at_offset): Add dwarf2_per_objfile
1284         parameter.
1285         (read_indirect_string_from_dwz): Add objfile parameter.
1286         (read_indirect_string): Add objfile parameter.
1287         (read_addr_index_1): Add dwarf2_per_objfile parameter.
1288         (read_addr_index): Use dwarf2_per_objfile from cu.
1289         (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
1290         call dw2_setup.
1291         (read_str_index): Use dwarf2_per_objfile from cu.
1292         (get_debug_line_section): Likewise.
1293         (read_formatted_entries): Add dwarf2_per_objfile parameter.
1294         (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
1295         (new_symbol_full): Use dwarf2_per_objfile from cu.
1296         (build_error_marker_type): Likewise.
1297         (lookup_die_type): Likewise.
1298         (determine_prefix): Likewise.
1299         (follow_die_offset): Likewise.
1300         (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
1301         (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
1302         (dwarf2_fetch_die_type_sect_off): Likewise.
1303         (dwarf2_get_die_type): Likewise.
1304         (follow_die_sig_1): Use dwarf2_per_objfile from cu.
1305         (get_signatured_type): Likewise.
1306         (get_DW_AT_signature_type): Likewise.
1307         (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
1308         (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
1309         (cu_debug_loc_section): Likewise.
1310         (fill_in_loclist_baton): Likewise.
1311         (dwarf2_symbol_mark_computed): Likewise.
1312         (dwarf2_find_containing_comp_unit): Change objfile parameter to
1313         dwarf2_per_objfile.
1314         (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
1315         parameter.
1316         (age_cached_comp_units): Add dwarf2_per_objfile parameter.
1317         (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
1318         (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
1319         (set_die_type): Use dwarf2_free_objfile from cu.
1320         (get_die_type_at_offset): Likewise.
1321         (dwarf2_per_objfile_free): Don't assign global variable.
1322         (debug_names) <constructor>: Add dwarf2_per_objfile
1323         parameter, update m_debugstrlookup construction.
1324         (debug_names::debug_str_lookup): Add dwarf2_per_objfile
1325         parameter.
1326         <m_dwarf2_per_objfile>: New field.
1327         <lookup>: Use m_dwarf2_per_objfile.
1328         (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
1329         (psyms_seen_size): Likewise.
1330         (write_gdbindex): Replace objfile parameter with
1331         dwarf2_per_objfile.
1332         (write_debug_names): Likewise.
1333         (write_psymtabs_to_index): Likewise.
1334         (save_gdb_index_command): Use get_dwarf2_per_objfile, update
1335         calls.
1336
1337 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
1338
1339         * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
1340         <dwarf2_per_objfile>: New field.
1341         (struct dwarf2_per_cu_data) <objfile>: Remove.
1342         <dwarf2_per_objfile>: New field.
1343         (create_cu_from_index_list): Assign dwarf2_per_objfile instead
1344         of objfile.
1345         (create_signatured_type_table_from_index): Likewise.
1346         (create_debug_type_hash_table): Likewise.
1347         (fill_in_sig_entry_from_dwo_entry): Likewise.
1348         (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
1349         (create_type_unit_group): Assign dwarf2_per_objfile instead of
1350         objfile.
1351         (create_partial_symtab): Access objfile through
1352         dwarf2_per_objfile.
1353         (process_psymtab_comp_unit_reader): Likewise.
1354         (read_comp_units_from_section): Likewise.
1355         (scan_partial_symbols): Likewise.
1356         (add_partial_symbol): Likewise.
1357         (add_partial_subprogram): Likewise.
1358         (peek_die_abbrev): Likewise.
1359         (fixup_go_packaging): Likewise.
1360         (process_full_comp_unit): Likewise.
1361         (process_full_type_unit): Likewise.
1362         (process_imported_unit_die): Likewise.
1363         (dwarf2_compute_name): Likewise.
1364         (dwarf2_physname): Likewise.
1365         (read_import_statement): Likewise.
1366         (create_cus_hash_table): Assign dwarf2_physname instead of
1367         objfile.
1368         (read_func_scope): Access objfile through dwarf2_per_objfile.
1369         (read_lexical_block_scope): Likewise.
1370         (read_call_site_scope): Likewise.
1371         (read_variable): Likewise.
1372         (dwarf2_rnglists_process): Likewise.
1373         (dwarf2_ranges_process): Likewise.
1374         (dwarf2_ranges_read): Likewise.
1375         (dwarf2_record_block_ranges): Likewise.
1376         (dwarf2_add_field): Likewise.
1377         (dwarf2_add_member_fn): Likewise.
1378         (read_structure_type): Likewise.
1379         (process_structure_scope): Likewise.
1380         (read_enumeration_type): Likewise.
1381         (read_array_type): Likewise.
1382         (read_common_block): Likewise.
1383         (read_namespace_type): Likewise.
1384         (read_namespace): Likewise.
1385         (read_module_type): Likewise.
1386         (read_tag_pointer_type): Likewise.
1387         (read_tag_ptr_to_member_type): Likewise.
1388         (read_tag_string_type): Likewise.
1389         (read_subroutine_type): Likewise.
1390         (read_typedef): Likewise.
1391         (read_base_type): Likewise.
1392         (attr_to_dynamic_prop): Likewise.
1393         (read_subrange_type): Likewise.
1394         (read_unspecified_type): Likewise.
1395         (load_partial_dies): Likewise.
1396         (read_partial_die): Likewise.
1397         (find_partial_die): Likewise.
1398         (guess_partial_die_structure_name): Likewise.
1399         (fixup_partial_die): Likewise.
1400         (read_attribute_value): Likewise.
1401         (read_addr_index_from_leb128): Likewise.
1402         (dwarf2_read_addr_index): Likewise.
1403         (dwarf2_string_attr): Likewise.
1404         (lnp_state_machine::check_line_address): Likewise.
1405         (dwarf_decode_lines_1): Likewise.
1406         (dwarf_decode_lines): Likewise.
1407         (dwarf2_start_symtab): Likewise.
1408         (var_decode_location): Likewise.
1409         (new_symbol_full): Likewise.
1410         (dwarf2_const_value_data): Likewise.
1411         (dwarf2_const_value_attr): Likewise.
1412         (dwarf2_const_value): Likewise.
1413         (die_type): Likewise.
1414         (die_containing_type): Likewise.
1415         (lookup_die_type): Likewise.
1416         (guess_full_die_structure_name): Likewise.
1417         (anonymous_struct_prefix): Likewise.
1418         (dwarf2_name): Likewise.
1419         (follow_die_ref_or_sig): Likewise.
1420         (follow_die_offset): Likewise.
1421         (follow_die_ref): Likewise.
1422         (dwarf2_fetch_die_loc_sect_off): Likewise.
1423         (dwarf2_fetch_constant_bytes): Likewise.
1424         (dwarf2_fetch_die_type_sect_off): Likewise.
1425         (dwarf2_get_die_type): Likewise.
1426         (follow_die_sig): Likewise.
1427         (decode_locdesc): Likewise.
1428         (dwarf2_per_cu_objfile): Likewise.
1429         (dwarf2_per_cu_text_offset): Likewise.
1430         (init_one_comp_unit): Assign dwarf2_per_objfile instead of
1431         objfile.
1432         (set_die_type): Access objfile through
1433         dwarf2_per_objfile.
1434
1435 2018-01-07  Simon Marchi  <simon.marchi@ericsson.com>
1436
1437         * valprint.c (converted_character_d): Remove typedef.
1438         (DEF_VEC_O (converted_character_d)): Remove.
1439         (count_next_character): Use std::vector.
1440         (print_converted_chars_to_obstack): Likewise.
1441         (generic_printstr): Likewise.
1442
1443 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
1444
1445         * xml-support.h (struct gdb_xml_value): Add constructor.
1446         <value>: Change type to unique_xmalloc_ptr.
1447         (gdb_xml_value_s): Remove typedef.
1448         (DEF_VEC_O (gdb_xml_value_s)): Remove.
1449         (gdb_xml_element_start_handler): Change parameter type to
1450         std::vector.
1451         (xml_find_attribute): Likewise.
1452         * xml-support.c (xml_find_attribute): Change parameter type to
1453         std::vector and adjust.
1454         (gdb_xml_values_cleanup): Remove.
1455         (gdb_xml_parser::start_element): Adjust to std::vector.
1456         (xinclude_start_include): Change paraeter type to std::vector
1457         and adjust.
1458         * btrace.c (check_xml_btrace_version): Likewise.
1459         (parse_xml_btrace_block): Likewise.
1460         (parse_xml_btrace_pt_config_cpu): Likewise.
1461         (parse_xml_btrace_pt): Likewise.
1462         (parse_xml_btrace_conf_bts): Likewise.
1463         (parse_xml_btrace_conf_pt): Likewise.
1464         * memory-map.c (memory_map_start_memory): Likewise.
1465         (memory_map_start_property): Likewise.
1466         * osdata.c (osdata_start_osdata): Likewise.
1467         (osdata_start_item): Likewise.
1468         (osdata_start_column): Likewise.
1469         * remote.c (start_thread): Likewise.
1470         * solib-aix.c (library_list_start_library): Likewise.
1471         (library_list_start_list): Likewise.
1472         * solib-svr4.c (library_list_start_library): Likewise.
1473         (svr4_library_list_start_list): Likewise.
1474         * solib-target.c (library_list_start_segment): Likewise.
1475         (library_list_start_section): Likewise.
1476         (library_list_start_library): Likewise.
1477         (library_list_start_list): Likewise.
1478         * tracepoint.c (traceframe_info_start_memory): Likewise.
1479         (traceframe_info_start_tvar): Likewise.
1480         * xml-syscall.c (syscall_start_syscall): Likewise.
1481         * xml-tdesc.c (tdesc_start_target): Likewise.
1482         (tdesc_start_feature): Likewise.
1483         (tdesc_start_reg): Likewise.
1484         (tdesc_start_union): Likewise.
1485         (tdesc_start_struct): Likewise.
1486         (tdesc_start_flags): Likewise.
1487         (tdesc_start_enum): Likewise.
1488         (tdesc_start_field): Likewise.
1489         (tdesc_start_enum_value): Likewise.
1490         (tdesc_start_vector): Likewise.
1491
1492 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
1493
1494         * extension.h (struct xmethod_worker) <clone>: Remove.
1495         * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
1496         Remove.
1497         (python_xmethod_worker::clone): Remove.
1498         * valops.c (find_overload_match): Use std::move instead of
1499         clone.
1500
1501 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
1502
1503         * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
1504         (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
1505         <free_xmethod_worker_data>: Remove.
1506         <get_matching_xmethod_workers>: Chance VEC to std::vector.
1507         <get_xmethod_arg_types>: Remove.
1508         <get_xmethod_result_type>: Remove.
1509         <invoke_xmethod>: Remove.
1510         * extension.c (new_xmethod_worker): Remove.
1511         (clone_xmethod_worker): Remove.
1512         (get_matching_xmethod_workers): Return void, pass std::vector by
1513         pointer.
1514         (get_xmethod_arg_types): Rename to...
1515         (xmethod_worker::get_arg_types): ... this, and adjust.
1516         (get_xmethod_result_type): Rename to...
1517         (xmethod_worker::get_result_type): ... this, and adjust.
1518         (invoke_xmethod): Remove.
1519         (free_xmethod_worker): Remove.
1520         (free_xmethod_worker_vec): Remove.
1521         * extension.h (enum ext_lang_rc): Move here from
1522         extension-priv.h.
1523         (struct xmethod_worker): Add constructor and destructor.
1524         <data>: Remove.
1525         <value>: Remove.
1526         <invoke, clone, do_get_result_type, do_get_arg_types>: New
1527         virtual pure methods.
1528         <get_arg_types, get_result_type>: New methods.
1529         (xmethod_worker_ptr): Remove typedef.
1530         (DEF_VEC_P (xmethod_worker_ptr)): Remove.
1531         (xmethod_worker_vec): Remove typedef.
1532         (xmethod_worker_up): New typedef.
1533         (invoke_xmethod): Remove.
1534         (clone_xmethod_worker): Remove.
1535         (free_xmethod_worker): Remove.
1536         (free_xmethod_worker_vec): Remove.
1537         (get_xmethod_arg_types): Remove.
1538         (get_xmethod_result_type): Remove.
1539         * valops.c (find_method_list): Use std::vector, don't use
1540         intermediate vector.
1541         (value_find_oload_method_list): Use std::vector.
1542         (find_overload_match): Use std::vector.
1543         (find_oload_champ): Use std::vector.
1544         * value.c (value_free): Use operator delete.
1545         (value_of_xmethod): Rename to...
1546         (value_from_xmethod): ... this.  Don't assign
1547         xmethod_worker::value, take rvalue-reference.
1548         (result_type_of_xmethod): Adjust.
1549         (call_xmethod): Adjust.
1550         * value.h: Include extension.h.
1551         (struct xmethod_worker): Don't forward-declare.
1552         (value_of_xmethod): Rename to...
1553         (value_from_xmethod): ... this, take rvalue-reference.
1554         * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
1555         (struct python_xmethod_worker): ... this, add constructor and
1556         destructor.
1557         <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
1558         (gdbpy_free_xmethod_worker_data): Rename to...
1559         (python_xmethod_worker::~python_xmethod_worker): ... this and
1560         adjust.
1561         (gdbpy_clone_xmethod_worker_data): Rename to...
1562         (python_xmethod_worker::clone): ... this and adjust.
1563         (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
1564         temporary vector.
1565         (gdbpy_get_xmethod_arg_types): Rename to...
1566         (python_xmethod_worker::do_get_arg_types): ... this and adjust.
1567         (gdbpy_get_xmethod_result_type): Rename to...
1568         (python_xmethod_worker::do_get_result_type): ... this and
1569         adjust.
1570         (gdbpy_invoke_xmethod): Rename to...
1571         (python_xmethod_worker::invoke): ... this and adjust.
1572         (new_python_xmethod_worker): Rename to...
1573         (python_xmethod_worker::python_xmethod_worker): ... this and
1574         adjust.
1575         * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
1576         Remove.
1577         (gdbpy_free_xmethod_worker_data): Remove.
1578         (gdbpy_get_matching_xmethod_workers): Use std::vector.
1579         (gdbpy_get_xmethod_arg_types): Remove.
1580         (gdbpy_get_xmethod_result_type): Remove.
1581         (gdbpy_invoke_xmethod): Remove.
1582         * python/python.c (python_extension_ops): Remove obsolete
1583         callbacks.
1584
1585 2018-01-05  Pedro Alves  <palves@redhat.com>
1586
1587         PR gdb/18653
1588         * common/signals-state-save-restore.c
1589         (save_original_signals_state): New parameter 'quiet'.  Warn if we
1590         find a custom handler preinstalled, instead of internal erroring.
1591         But only warn if !quiet.
1592         * common/signals-state-save-restore.h
1593         (save_original_signals_state): New parameter 'quiet'.
1594         * main.c (captured_main_1): Move save_original_signals_state call
1595         after option handling, and pass QUIET.
1596
1597 2018-01-05  Pedro Alves  <palves@redhat.com>
1598
1599         * spu-tdep.c (spu_catch_start): Pass
1600         symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
1601
1602 2018-01-05  Pedro Alves  <palves@redhat.com>
1603
1604         PR gdb/22670
1605         * ada-lang.c (literal_symbol_name_matcher): New function.
1606         (ada_get_symbol_name_matcher): Use it for
1607         symbol_name_match_type::SEARCH_NAME.
1608         * block.c (block_lookup_symbol): New parameter 'match_type'.  Pass
1609         it down instead of assuming symbol_name_match_type::FULL.
1610         * block.h (block_lookup_symbol): New parameter 'match_type'.
1611         * c-valprint.c (print_unpacked_pointer): Use
1612         lookup_symbol_search_name instead of lookup_symbol.
1613         * compile/compile-object-load.c (get_out_value_type): Pass down
1614         symbol_name_match_type::SEARCH_NAME.
1615         * cp-namespace.c (cp_basic_lookup_symbol): Pass down
1616         symbol_name_match_type::FULL.
1617         * cp-support.c (cp_get_symbol_name_matcher): Handle
1618         symbol_name_match_type::SEARCH_NAME.
1619         * infrun.c (insert_exception_resume_breakpoint): Use
1620         lookup_symbol_search_name.
1621         * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
1622         * psymtab.c (maintenance_check_psymtabs): Use
1623         symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
1624         * stack.c (print_frame_args): Use lookup_symbol_search_name and
1625         SYMBOL_SEARCH_NAME.
1626         * symtab.c (lookup_local_symbol): Don't demangle the lookup name
1627         if symbol_name_match_type::SEARCH_NAME.
1628         (lookup_symbol_in_language): Pass down
1629         symbol_name_match_type::FULL.
1630         (lookup_symbol_search_name): New.
1631         (lookup_language_this): Pass down
1632         symbol_name_match_type::SEARCH_NAME.
1633         (lookup_symbol_aux, lookup_local_symbol): New parameter
1634         'match_type'.  Pass it down.
1635         * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
1636         (lookup_symbol_search_name): New declaration.
1637         (lookup_symbol_in_block): New 'match_type' parameter.
1638
1639 2018-01-05  Pedro Alves  <palves@redhat.com>
1640
1641         PR gdb/22670
1642         * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
1643         ada_lookup_symbol.
1644         (ada_lookup_symbol): Reimplement in terms of
1645         ada_lookup_symbol_list, bits factored out from
1646         ada_lookup_encoded_symbol.
1647
1648 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
1649
1650         * ada-exp.y (write_object_renaming): When subscripting an array
1651         using a symbol as the index, pass the block in call to
1652         ada_lookup_encoded_symbol when looking that symbol up.
1653
1654 2018-01-05  Jerome Guitton  <guitton@adacore.com>
1655
1656         * ada-lang.c (ada_array_length): Use ada_index_type instead of
1657         TYPE_INDEX_TYPE.
1658
1659 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
1660
1661         * ada-lang.c (ada_to_fixed_value_create): Add handling of
1662         the case where VALUE_LVAL (val0) is not lval_memory.
1663
1664 2018-01-05  Xavier Roirand  <roirand@adacore.com>
1665
1666         * ada-valprint.c (print_optional_low_bound): Handle
1667         character-indexed array printing like boolean-indexed array
1668         printing.
1669
1670 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
1671
1672         * NEWS: Create a new section for the next release branch.
1673         Rename the section of the current branch, now that it has
1674         been cut.
1675
1676 2018-01-05  Joel Brobecker  <brobecker@adacore.com>
1677
1678         GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
1679         * version.in: Bump version to 8.1.50.DATE-git.
1680
1681 2018-01-03  Xavier Roirand  <roirand@adacore.com>
1682
1683         * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
1684         Add field.
1685         * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
1686         Add field.
1687         (default_exception_support_info) <catch_handlers_sym>: Add field.
1688         (exception_support_info_fallback) <catch_handlers_sym>: Add field.
1689         (ada_exception_name_addr_1): Add "catch handlers" handling.
1690         (ada_exception_catchpoint_cond_string) <ex>: New parameter.
1691         Update all callers.
1692         (create_excep_cond_exprs) <ex>: Add parameter.
1693         (re_set_exception): Update create_excep_cond_exprs call.
1694         (print_it_exception, print_one_exception, print_mention_exception)
1695         (print_recreate_exception): Add "catch handler" handling.
1696         (allocate_location_catch_handlers, re_set_catch_handlers)
1697         (check_status_catch_handlers, print_it_catch_handlers)
1698         (print_one_catch_handlers, print_mention_catch_handlers)
1699         (print_recreate_catch_handlers): New function.
1700         (catch_handlers_breakpoint_ops): New variable.
1701         (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
1702         Add parameter.  Add "catch handler" handling.
1703         (ada_exception_sym_name, ada_exception_breakpoint_ops):
1704         Add "catch handler" handling.
1705         (ada_exception_catchpoint_cond_string): Add "catch handler"
1706         handling.
1707         (create_ada_exception_catchpoint): Update create_excep_cond_exprs
1708         call.
1709         (catch_ada_handlers_command): New function.
1710         (initialize_ada_catchpoint_ops): Initialize "catch handlers"
1711         operations structure.
1712         (_initialize_ada_language): Add "catch handlers" command entry.
1713         * NEWS: Document "catch handlers" feature.
1714
1715 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
1716
1717         * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
1718         account when creating the array type of the slice.
1719         (ada_value_slice): Likewise.
1720
1721 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
1722
1723         * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
1724         New enum value.
1725         (create_array_type_with_stride): Add byte_stride_prop parameter.
1726         * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
1727         New parameter.  Update all callers in this file.
1728         (array_type_has_dynamic_stride): New function.
1729         (is_dynamic_type_internal, resolve_dynamic_array): Add handling
1730         of arrays with dynamic byte strides.
1731         * dwarf2read.c (read_array_type): Add support for dynamic
1732         DW_AT_byte_stride attributes.
1733
1734 2018-01-02  Joel Brobecker  <brobecker@adacore.com>
1735
1736         * dwarf2read.c (read_unspecified_type): Treat
1737         DW_TAG_enumeration_type DIEs from Ada units as stubs.
1738
1739 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
1740
1741         Update copyright year range in all GDB files.
1742
1743 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
1744
1745         * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
1746         and gdb/testsuite/gdb.base/step-line.c.
1747
1748 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
1749
1750         * copyright.py (main): Dump the contents of
1751         MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
1752         even if BY_HAND is empty.
1753
1754 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
1755
1756         * top.c (print_gdb_version): Update Copyright year in version
1757         message.
1758
1759 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
1760
1761         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
1762
1763 For older changes see ChangeLog-2017.
1764 \f
1765 Local Variables:
1766 mode: change-log
1767 left-margin: 8
1768 fill-column: 74
1769 version-control: never
1770 coding: utf-8
1771 End: