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