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