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