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