Rationalize "backtrace" command line parsing
[deliverable/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
ea3b0687
TT
12018-03-26 Tom Tromey <tom@tromey.com>
2
3 * stack.c (backtrace_command): Rewrite command line parsing.
4
9f034d75
SM
52018-03-26 Simon Marchi <simon.marchi@ericsson.com>
6
7 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
8
ce1459e5
SM
92018-03-26 Simon Marchi <simon.marchi@ericsson.com>
10
11 * filename-seen-cache.h: Add include guard.
12
4f7ae6f5
KS
132018-03-26 Keith Seitz <keiths@redhat.com>
14
15 * symfile.c (place_section): Remove "struct" from section_addr_info
16 in comment.
17 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
18 "struct" keyword from section_addr_info.
19
5cd3e386
AH
202018-03-26 Alan Hayward <alan.hayward@arm.com>
21
22 * regformats/regdef.h (reg): Add constructors.
23
3e5ef9a4
PA
242018-03-25 Pedro Alves <palves@redhat.com>
25
26 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
27 if then/else bodies in var_func_name extraction.
28
c88d2fcc 292018-03-23 Weimin Pan <weimin.pan@oracle.com>
bce02d88
WP
30
31 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
32 lookup_minimal_symbol() to find symbol entry.
33 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
34
b7fee5a3
KS
352018-03-23 Keith Seitz <keiths@redhat.com>
36
37 PR c++/22968
38 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
39 nested type definitions for C++, too.
40
2cc9b304
TT
412018-03-23 Tom Tromey <tom@tromey.com>
42
43 * machoread.c (struct oso_el): Add a constructor. Don't define as
44 a typedef.
45 (macho_register_oso): Remove.
46 (macho_symtab_read): Take a std::vector.
47 (oso_el_compare_name): Now a std::sort comparator.
48 (macho_symfile_read_all_oso): Take a std::vector.
49 (macho_symfile_read): Use std::vector. Remove cleanups.
50
a2b2bc12
TT
512018-03-22 Tom Tromey <tom@tromey.com>
52
53 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
54 (record_full_goto_bookmark): Use std::string.
55
7a8f494c
PFC
562018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
57
58 PR tdep/18295
59 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
60 a single mask.
61
dd6d677f
PFC
622018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
63
64 * rs6000-tdep.c (store_insn_p): New function.
65 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
66 and cr_reg to their unshifted values. Use store_insn_p to
67 match LR saves using either R1 or fdata->alloca_reg. Use
68 store_insn_p to match CR saves. Set alloca_reg_offset
69 when alloca_reg and framep are set. Remove lr_reg shift
70 when assigning to fdata->lr_register.
71
26d6cec4
AA
722018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
73
74 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
75 command line args instead of emitting a warning.
76
5d9310c4
SM
772018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
78
79 * tracepoint.h (struct static_tracepoint_marker): Initialize
80 fields, define default constructor, move constructor and move
81 assignment, disable the rest.
82 <str_id, extra>: Make std::string.
83 (release_static_tracepoint_marker): Remove.
84 (free_current_marker): Remove.
85 * tracepoint.c (free_current_marker): Remove.
86 (parse_static_tracepoint_marker_definition): Adjust to
87 std::string, use new hex2str overload.
88 (release_static_tracepoint_marker): Remove.
89 (print_one_static_tracepoint_marker): Get marker by reference
90 and adjust to std::string.
91 (info_static_tracepoint_markers_command): Adjust to std::vector
92 changes
93 * target.h (static_tracepoint_marker_p): Remove typedef.
94 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
95 (struct target_ops) <to_static_tracepoint_marker_at>: Return
96 bool.
97 <to_static_tracepoint_markers_by_strid>: Return std::vector.
98 * target-debug.h
99 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
100 (target_debug_print_std_vector_static_tracepoint_marker): New.
101 (target_debug_print_struct_static_tracepoint_marker_p): Rename
102 to...
103 (target_debug_print_static_tracepoint_marker_p): ... this.
104 * target-delegates.c: Re-generate.
105 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
106 Make std::string.
107 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
108 (decode_static_tracepoint_spec): Adjust to std::vector.
109 (tracepoint_print_one_detail): Adjust to std::string.
110 (strace_marker_decode_location): Adjust to std::string.
111 (update_static_tracepoint): Adjust to std::string, remove call
112 to release_static_tracepoint_marker.
113 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
114 Adjust to std::vector.
115 * remote.c (remote_static_tracepoint_marker_at): Return bool.
116 (remote_static_tracepoint_markers_by_strid): Adjust to
117 std::vector.
118 * common/rsp-low.h (hex2str): New overload with explicit count
119 of bytes.
120 * common/rsp-low.c (hex2str): New overload with explicit count
121 of bytes.
122 * unittests/rsp-low-selftests.c (test_hex2str): New function.
123 (_initialize_rsp_low_selftests): Add test_hex2str test.
124 * unittests/tracepoint-selftests.c
125 (test_parse_static_tracepoint_marker_definition): Adjust to
126 std::string.
127
62c222b6
SM
1282018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
129
130 * tracepoint.c (parse_static_tracepoint_marker_definition):
131 Consider case where the definition is followed by more
132 definitions.
133 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
134 tracepoint-selftests.c.
135 * unittests/tracepoint-selftests.c: New.
136
7eb2418f
PFC
1372018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
138
139 * MAINTAINERS (Write After Approval): Add Pedro Franco de
140 Carvalho.
141
7cbe16e9
SR
1422018-03-20 Stephen Roberts <stephen.roberts@arm.com>
143
144 * gdb/symtab.c (find_pc_sect_line): fixed indentation.
145
4ee89e90
SR
1462018-03-20 Stephen Roberts <stephen.roberts@arm.com>
147
148 * gdb/symtab.c (find_pc_sect_line): now uses binary search.
149
92630041
TT
1502018-03-19 Tom Tromey <tom@tromey.com>
151
152 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
153 "IDENT" production.
154
76727919
TT
1552018-03-19 Pedro Alves <palves@redhat.com>
156 Tom Tromey <tom@tromey.com>
157
158 * unittests/observable-selftests.c: New file.
159 * common/observable.h: New file.
160 * observable.h: New file.
161 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
162 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
163 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
164 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
165 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
166 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
167 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
168 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
169 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
170 python/py-breakpoint.c, python/py-finishbreakpoint.c,
171 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
172 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
173 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
174 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
175 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
176 tui/tui-interp.c, valops.c: Update all users.
177 * tui/tui-hooks.c (tui_bp_created_observer)
178 (tui_bp_deleted_observer, tui_bp_modified_observer)
179 (tui_inferior_exit_observer, tui_before_prompt_observer)
180 (tui_normal_stop_observer, tui_register_changed_observer):
181 Remove.
182 (tui_observers_token): New global.
183 (attach_or_detach, tui_attach_detach_observers): New functions.
184 (tui_install_hooks, tui_remove_hooks): Use
185 tui_attach_detach_observers.
186 * record-btrace.c (record_btrace_thread_observer): Remove.
187 (record_btrace_thread_observer_token): New global.
188 * observer.sh: Remove.
189 * observer.c: Rename to observable.c.
190 * observable.c (namespace gdb_observers): Define new objects.
191 (observer_debug): Move into gdb_observers namespace.
192 (struct observer, struct observer_list, xalloc_observer_list_node)
193 (xfree_observer_list_node, generic_observer_attach)
194 (generic_observer_detach, generic_observer_notify): Remove.
195 (_initialize_observer): Update.
196 Don't include observer.inc.
197 * Makefile.in (generated_files): Remove observer.h, observer.inc.
198 (clean mostlyclean): Likewise.
199 (observer.h, observer.inc): Remove targets.
200 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
201 (COMMON_SFILES): Use observable.c, not observer.c.
202 * .gitignore: Remove observer.h.
203
1cb1f3da
TT
2042018-03-18 Tom Tromey <tom@tromey.com>
205
206 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
207 gdb::def_vector.
208 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
209
a06ab151
TT
2102018-03-17 Tom Tromey <tom@tromey.com>
211
212 * auto-load.c (auto_load_objfile_script_1): Use std::string.
213
770623f7
TT
2142018-03-17 Tom Tromey <tom@tromey.com>
215
216 * target.c (class scoped_target_fd): New.
217 (target_fileio_close_cleanup): Remove.
218 (target_fileio_read_alloc_1): Use scoped_target_fd.
219
39be3c7e
SM
2202018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
221
222 * silent-rules.mk: New.
223 * Makefile.in: Include silent-rules.mk
224 (srcdir, VPATH, top_srcdir): Move up.
225 (COMPILE): Add ECHO_CXX.
226 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
227 (init.c): Add ECHO_INIT_C.
228 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
229 (version.c): Add ECHO_GEN.
230 (printcmd.o): Add ECHO_CXX.
231 (target-float.o): Add ECHO_CXX.
232 (ada-exp.o): Add ECHO_CXX.
233 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
234 (insight$(EXEEXT)): Add ECHO_CXXLD.
235 * gnulib/configure.ac: Add AM_SILENT_RULES.
236 * gnulib/aclocal.m4: Re-generate.
237 * gnulib/configure: Re-generate.
238 * gnulib/import/Makefile.in: Re-generate.
239
37e136b1
TT
2402018-03-16 Tom Tromey <tom@tromey.com>
241
242 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
243 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
244 * utils.c (do_free_section_addr_info)
245 (make_cleanup_free_section_addr_info): Remove.
246 * symfile.h (struct other_sections): Add constructor.
247 (struct section_addr_info): Remove.
248 (section_addr_info): New typedef.
249 (struct sym_fns) <sym_offsets>: Change type of parameter.
250 (build_section_addr_info_from_objfile)
251 (relative_addr_info_to_section_offsets, addr_info_make_relative)
252 (default_symfile_offsets, symbol_file_add)
253 (symbol_file_add_from_bfd)
254 (build_section_addr_info_from_section_table): Update.
255 (alloc_section_addr_info, free_section_addr_info): Don't declare.
256 * symfile.c (alloc_section_addr_info): Remove.
257 (build_section_addr_info_from_section_table): Change return type.
258 Update.
259 (build_section_addr_info_from_bfd)
260 (build_section_addr_info_from_objfile): Likewise.
261 (free_section_addr_info): Remove.
262 (relative_addr_info_to_section_offsets): Change type of "addrs".
263 (addrs_section_compar): Now a std::sort comparator.
264 (addrs_section_sort): Change return type.
265 (addr_info_make_relative): Change type of "addrs". Update.
266 (default_symfile_offsets, syms_from_objfile_1)
267 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
268 (symbol_file_add_separate): Update.
269 (symbol_file_add): Change type of "addrs". Update.
270 (add_symbol_file_command): Update. Remove cleanups.
271 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
272 cleanups.
273 * symfile-debug.c (debug_sym_offsets): Change type of "info".
274 * solib.c (solib_read_symbols): Update.
275 * objfiles.c (objfile_relocate): Update. Remove cleanups.
276 * machoread.c (macho_symfile_offsets): Update.
277 * jit.c (jit_bfd_try_read_symtab): Update.
278
03afa6ef
SM
2792018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
280
281 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
282 unittests/utils-selftests.c.
283 * unittests/utils-selftests.c: New file.
284
3ae9ce5d
TT
2852018-03-14 Tom Tromey <tom@tromey.com>
286
287 PR cli/14977:
288 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
289 for NULL.
290
b8c2339b
TT
2912018-03-14 Tom Tromey <tom@tromey.com>
292
293 PR cli/19918:
294 * printcmd.c (printf_pointer): Allow "-" in format.
295
80ae639d
TT
2962018-03-14 Tom Tromey <tom@tromey.com>
297
298 * printcmd.c (_initialize_printcmd): Add usage to printf.
299
0d671d99
YQ
3002018-03-14 Yao Qi <qiyao@sourceware.org>
301
302 * MAINTAINERS: Update my email address.
303
b577b6af
TT
3042018-03-13 Tom Tromey <tom@tromey.com>
305
306 * machoread.c (macho_check_dsym): Change filenamep to a
307 std::string*.
308 (macho_symfile_read): Update.
309 * symfile.c (load_command): Use std::string.
310
89a3b63e
AB
3112018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
312
313 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
314 to error message string.
315 (riscv_register_name): Use xsnprintf instead of sprintf.
316 (riscv_insn::fetch_instruction): Use gdb_assert instead of
317 internal_error.
318 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
319 error.
320 (riscv_push_dummy_call): Likewise.
321
984c7238
TT
3222018-03-12 Tom Tromey <tom@tromey.com>
323
324 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
325 Use gdb::byte_vector.
326 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
327
933522d1
YQ
3282018-03-12 Yao Qi <yao.qi@linaro.org>
329
330 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
331 parameter type to readable_regcache.
332 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
333 the declaration.
334
be2daae6
TT
3352018-03-11 Tom Tromey <tom@tromey.com>
336
337 * dwarf2read.c (struct nextfield): Add initializers.
338 (struct nextfnfield): Remove.
339 (struct fnfieldlist): Add initializers. Remove "length" and
340 "head", use std::vector.
341 (struct decl_field_list): Remove.
342 (struct field_info): Add initializers.
343 <fields, baseclasses>: Now std::vector.
344 <nbaseclasses, nfnfields, typedef_field_list_count,
345 nested_types_list_count>: Remove.
346 (dwarf2_add_field, dwarf2_add_type_defn)
347 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
348 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
349 (process_structure_scope): Update.
350
484cf504
TT
3512018-03-11 Tom Tromey <tom@tromey.com>
352
353 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
354 for use by std::sort.
355 (build_type_psymtabs_1): Use std::vector.
356
9bd8e0b0
EZ
3572018-03-09 Eli Zaretskii <eliz@gnu.org>
358
359 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
360 and LIBMPFR in the printed configuration.
361
5dc1a704
TT
3622018-03-08 Tom Tromey <tom@tromey.com>
363
364 * source.c (get_filename_and_charpos): Use scoped_fd.
365 * nto-procfs.c (procfs_open_1): Use scoped_fd.
366 (procfs_pidlist): Likewise.
367 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
368 (iterate_over_mappings): Likewise.
369
fdf07f3a
TT
3702018-03-08 Tom Tromey <tom@tromey.com>
371
372 * infcall.c (struct call_return_meta_info)
373 <stack_temporaries_enabled>: Remove.
374 (get_call_return_value, call_function_by_hand_dummy): Update.
375 * thread.c (disable_thread_stack_temporaries): Remove.
376 (enable_thread_stack_temporaries): Remove.
377 (thread_stack_temporaries_enabled_p): Return bool.
378 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
379 (get_last_thread_stack_temporary): Update.
380 * eval.c (evaluate_subexp): Update.
381 * gdbthread.h (class enable_thread_stack_temporaries): Now a
382 class, not a function.
383 (value_ptr, value_vec): Remove typedefs.
384 (class thread_info) <stack_temporaries_enabled>: Now bool.
385 <stack_temporaries>: Now a std::vector.
386 (thread_stack_temporaries_enabled_p)
387 (value_in_thread_stack_temporaries): Return bool.
388
567a3e54
SM
3892018-03-08 Simon Marchi <simon.marchi@ericsson.com>
390
391 * remote.c (putpkt_binary): Fix omitted bytes reporting.
392 (getpkt_or_notif_sane_1): Likewise.
393
00b40057
SM
3942018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
395
396 * build-id.c (build_id_to_debug_bfd): Use std::string.
397
a8dbfd58
SM
3982018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
399
400 * build-id.c (find_separate_debug_file_by_buildid): Return
401 std::string.
402 * build-id.h (find_separate_debug_file_by_buildid): Return
403 std::string.
404 * coffread.c (coff_symfile_read): Adjust to std::string.
405 * elfread.c (elf_symfile_read): Adjust to std::string.
406 * symfile.c (separate_debug_file_exists): Change parameter to
407 std::string.
408 (find_separate_debug_file): Return std::string.
409 (find_separate_debug_file_by_debuglink): Return std::string.
410 * symfile.h (find_separate_debug_file_by_debuglink): Return
411 std::string.
412
e6a58aa8
SM
4132018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
414
415 * common/xml-utils.c (xml_escape_text): Move code to...
416 (xml_escape_text_append): ... this new function.
417 * common/xml-utils.h (xml_escape_text_append): New declaration.
418 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
419 New function.
420 (_initialize_xml_utils): register test_xml_escape_text_append as
421 a selftest.
422
4ef0bef6
AH
4232018-03-07 Alan Hayward <alan.hayward@arm.com>
424
425 * defs.h: Remove MAX_REGISTER_SIZE.
426 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
427 asserts.
428 * python/py-unwind.c (pyuw_sniffer): Likewise.
429
e0d3522b
TT
4302018-03-07 Tom Tromey <tom@tromey.com>
431
432 * linux-tdep.c (linux_info_proc): Update.
433 * target.h (struct target_ops) <to_fileio_readlink>: Return
434 optional<string>.
435 (target_fileio_readlink): Return optional<string>.
436 * remote.c (remote_hostio_readlink): Return optional<string>.
437 * inf-child.c (inf_child_fileio_readlink): Return
438 optional<string>.
439 * target.c (target_fileio_readlink): Return optional<string>.
440
ea005f31
AB
4412018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
442
443 * regcache.c (cooked_read_test): Add riscv to the list of
444 architectures that have a save_reggroup.
445
e95a97d4
AA
4462018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
447
448 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
449 value is not a dynamic class object.
450
d8344f3d
TT
4512018-03-06 Tom Tromey <tom@tromey.com>
452
453 * rust-exp.y: Formatting fixes.
454
9add17f2
AB
4552018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
456
457 * riscv-tdep.c (riscv_register_name): Remove target description
458 support.
459 (riscv_gdbarch_init): Remove target description check.
460
c9486dfe
AB
4612018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
462
463 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
464 comment.
465 * riscv-tdep.h: Likewise.
466
d74aff3d
AB
4672018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
468
469 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
470 (riscv_pseudo_register_write): Delete.
471 (riscv_gdbarch_init): Remove all use of pseudo registers.
472
7ea78b59
SM
4732018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
474
475 * record-btrace.c (btrace_print_lines): Replace cleanup
476 parameter with RAII equivalents.
477 (btrace_insn_history): Replace cleanup with RAII equivalents.
478 * ui-out.h (make_cleanup_ui_out_list_begin_end,
479 make_cleanup_ui_out_tuple_begin_end): Remove.
480 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
481 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
482 make_cleanup_ui_out_list_begin_end): Remove.
483
53127008
SM
4842018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
485
486 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
487 parameter types to std::vector. Use bool.
488 (record_btrace_wait): Replace VEC(tp_t) with
489 std::vector<thread_info *>.
490 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
491
228f1508
SM
4922018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
493
494 * record-btrace.c (record_btrace_disable_callback): Remove.
495 (struct scoped_btrace_disable): New.
496 (record_btrace_open): Use scoped_btrace_disable.
497
b2970c23
AB
4982018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
499
500 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
501 reading values from registers.
502
fb294655
AB
5032018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
504
505 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
506 where appropriate.
507
cab5bb9d
AB
5082018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
509
510 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
511 change parameter type. Use GDB's print functions, and use
512 core_addr_to_string where appropriate.
513 (riscv_push_dummy_call): Use core_addr_to_string where
514 appropriate, update call to riscv_print_arg_location, and reindent
515 a few lines.
516 (riscv_return_value): Update call to riscv_print_arg_location.
517
dbbb1059
AB
5182018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
519 Tim Newsome <tim@sifive.com>
520 Albert Ou <a0u@eecs.berkeley.edu>
521 Darius Rad <darius@bluespec.com>
522
523 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
524 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
525 (ALLDEPFILES): Add riscv-tdep.c
526 * configure.tgt: Add riscv support.
527 * riscv-tdep.c: New file.
528 * riscv-tdep.h: New file.
529 * NEWS: Mention new target.
530 * MAINTAINERS: Add entry for riscv.
531
5dc43913
AB
5322018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
533
534 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
535 fields within aggregates.
536
3dea1ef7
SM
5372018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
538
539 * record-btrace.c (btrace_print_lines): Change type of flags to
540 gdb_disassembly_flags.
541
7efba073
JB
5422018-03-04 John Baldwin <jhb@FreeBSD.org>
543
544 * fbsd-nat.c: Include "inf-ptrace.h".
545 (USE_SIGTRAP_SIGINFO): Conditionally define.
546 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
547 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
548 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
549 function.
550 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
551 Likewise.
552 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
553 Likewise.
554 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
555 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
556 "supports_stopped_by_hw_breakpoint" target methods.
557
386a8676
JB
5582018-03-04 John Baldwin <jhb@FreeBSD.org>
559
560 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
561 * fbsd-nat.c (debug_fbsd_nat): New variable.
562 (show_fbsd_nat_debug): New function.
563 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
564 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
565
12279366
JB
5662018-03-04 John Baldwin <jhb@FreeBSD.org>
567
568 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
569 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
570 prototype.
571 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
572 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
573 method.
574
54693cf5
SM
5752018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
576
577 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
578 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
579
ccb2231c
SM
5802018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
581
582 * charset.c (struct charset_vector): New.
583 (charsets): Change type to charset_vector.
584 (find_charset_names): Adjust.
585 (add_one): Adjust.
586 (_initialize_charset): Adjust.
587
6fb16ce6
SM
5882018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
589
590 * progspace.h (struct program_space) <deleted_solibs>: Change
591 type to std::vector<std::string>.
592 * progspace.c (clear_program_space_solib_cache): Adjust.
593 * breakpoint.c (print_solib_event): Adjust.
594 (check_status_catch_solib): Adjust.
595 * solib.c (update_solib_list): Adjust.
596 * ui-out.h (class ui_out) <field_string>: New overload.
597 * ui-out.c (ui_out::field_string): New overload.
598
564b1e3f
SM
5992018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
600
601 * progspace.h (struct program_space): Add constructor and
602 destructor, initialize fields.
603 (add_program_space): Remove.
604 * progspace.c (add_program_space): Rename to...
605 (program_space::program_space): ... this.
606 (release_program_space): Rename to...
607 (program_space::~program_space): ... this.
608 (delete_program_space): Use delete to delete program_space.
609 (initialize_progspace): Use new to allocate program_space.
610 * inferior.c (add_inferior_with_spaces): Likewise.
611 (clone_inferior_command): Likewise.
612 * infrun.c (follow_fork_inferior): Likewise.
613 (handle_vfork_child_exec_or_exit): Likewise.
614
e80aaf61
SM
6152018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
616
617 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
618 (delim_string_to_char_ptr_vec): Return std::vector of
619 gdb::unique_xmalloc_ptr.
620 (dirnames_to_char_ptr_vec_append): Take std::vector of
621 gdb::unique_xmalloc_ptr.
622 (dirnames_to_char_ptr_vec): Return std::vector of
623 gdb::unique_xmalloc_ptr.
624 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
625 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
626 (delim_string_to_char_ptr_vec): Return an std::vector of
627 gdb::unique_xmalloc_ptr, adjust the code.
628 (dirnames_to_char_ptr_vec_append): Take an std::vector of
629 gdb::unique_xmalloc_ptr, adjust the code.
630 (dirnames_to_char_ptr_vec): Return an std::vector of
631 gdb::unique_xmalloc_ptr, adjust the code.
632 * auto-load.c (auto_load_safe_path_vec): Change type to
633 std::vector of gdb::unique_xmalloc_ptr.
634 (auto_load_expand_dir_vars): Return an std::vector of
635 gdb::unique_xmalloc_ptr, adjust the code.
636 (auto_load_safe_path_vec_update): Adjust.
637 (filename_is_in_auto_load_safe_path_vec): Adjust.
638 (auto_load_objfile_script_1): Adjust.
639 * build-id.c (build_id_to_debug_bfd): Adjust.
640 * linux-thread-db.c (thread_db_load_search): Adjust.
641 * source.c (add_path): Adjust.
642 (openp): Adjust.
643 * symfile.c (find_separate_debug_file): Adjust.
644 * utils.c (do_free_char_ptr_vec): Remove.
645 (make_cleanup_free_char_ptr_vec): Remove.
646
ab818ade
SDJ
6472018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
648
649 PR gdb/22907
650 * common/pathstuff.c: Conditionally include "<windows.h>".
651
e1e6f073
GS
6522018-03-01 Georg Sauthoff <mail@georg.so>
653
654 PR gdb/22888
655 * gcore.in: Quote variables and switch interpreter to bash.
656
c7b15a66
TT
6572018-03-01 Tom Tromey <tom@tromey.com>
658
659 * dwarf2read.c (alloc_discriminant_info): Fix default_index
660 assertion. Add assertion for discriminant_index.
661 (quirk_rust_enum): Use correct base type name in univariant case.
662
0cb7c7b0
SM
6632018-03-01 Simon Marchi <simon.marchi@ericsson.com>
664
665 * record.c (get_call_history_modifiers): Return a
666 record_print_flags.
667 (cmd_record_call_history): Adjust.
668 * record-btrace.c (record_btrace_call_history): Adjust.
669 (record_btrace_call_history_range): Adjust.
670 (record_btrace_call_history_from): Adjust.
671 * target-debug.h (target_debug_print_record_print_flags): New.
672 * target-delegates.c: Re-generate.
673 * target.c (target_call_history): Change flags type.
674 (target_call_history_from): Likewise.
675 (target_call_history_range): Likewise.
676 * target.h (struct target_ops) <target_call_history>: Likewise.
677 (target_call_history_from): Likewise.
678 (target_call_history_range): Likewise.
679
25e3c82c
SDJ
6802018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
681 Simon Marchi <simon.marchi@polymtl.ca>
682
683 * common/common-utils.c: Include "sys/stat.h".
684 (is_regular_file): Move here from "source.c"; change return
685 type to "bool".
686 * common/common-utils.h (is_regular_file): New prototype.
687 * common/pathstuff.c (contains_dir_separator): New function.
688 * common/pathstuff.h (contains_dir_separator): New prototype.
689 * source.c: Don't include "sys/stat.h".
690 (is_regular_file): Move to "common/common-utils.c".
691
b4987c95
SDJ
6922018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
693
694 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
695 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
696 * auto-load.c: Include "common/pathstuff.h".
697 * common/common-def.h (current_directory): Move here.
698 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
699 function.
700 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
701 prototype.
702 * common/pathstuff.c: New file.
703 * common/pathstuff.h: New file.
704 * compile/compile.c: Include "common/pathstuff.h".
705 * defs.h (current_directory): Move to "common/common-defs.h".
706 * dwarf2read.c: Include "common/pathstuff.h".
707 * exec.c: Likewise.
708 * guile/scm-safe-call.c: Likewise.
709 * linux-thread-db.c: Likewise.
710 * main.c: Likewise.
711 * nto-tdep.c: Likewise.
712 * objfiles.c: Likewise.
713 * source.c: Likewise.
714 * symtab.c: Likewise.
715 * utils.c: Include "common/pathstuff.h".
716 (gdb_realpath): Move to "common/pathstuff.c".
717 (gdb_realpath_keepfile): Likewise.
718 (gdb_abspath): Likewise.
719 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
720 (gdb_realpath_keepfile): Likewise.
721 (gdb_abspath): Likewise.
722
f169cfdc
JB
7232018-02-28 John Baldwin <jhb@FreeBSD.org>
724
725 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
726 wildcard process pid for super_resume for kernels with a
727 specific bug.
728
e05cac70
PM
7292018-02-27 Phil Muldoon <pmuldoon@redhat.com>
730
731 * compile/compile.c (get_args): Add additional comments
732 explaining function.
733
55089490
TT
7342018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
735 Tom Tromey <tom@tromey.com>
736
737 * target.h (memory_write_request_s): Remove typedef. Don't define
738 VEC.
739 (target_write_memory_blocks): Change argument to std::vector.
740 (struct memory_write_request): Add constructor.
741 * target-memory.c (compare_block_starting_address): Return bool.
742 Change argument types.
743 (claim_memory): Change arguments to use std::vector.
744 (split_regular_and_flash_blocks, blocks_to_erase)
745 (compute_garbled_blocks): Likewise.
746 (cleanup_request_data, cleanup_write_requests_vector): Remove.
747 (target_write_memory_blocks): Change argument to std::vector.
748 * symfile.c (struct load_section_data): Add constructor and
749 destructor. Use std::vector for "requests".
750 (struct load_progress_data): Add initializers.
751 (load_section_callback): Update. Use "new".
752 (clear_memory_write_data): Remove.
753 (generic_load): Update.
754
0c305b61
AH
7552018-02-27 Alan Hayward <alan.hayward@arm.com>
756
757 * arch/aarch64.h: Use common/tdesc.h.
758
c5196c92
MR
7592018-02-26 Maciej W. Rozycki <macro@mips.com>
760
761 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
762 architecture with a 64-bit ABI.
763
37c33887
MR
7642018-02-26 Maciej W. Rozycki <macro@mips.com>
765
766 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
767 ahead of target description loading.
768
d4dd3282
TT
7692018-02-26 Tom Tromey <tom@tromey.com>
770
771 * stack.c (backtrace_command_1): Update.
772 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
773 of "flags".
774 * python/py-framefilter.c (py_print_frame)
775 (gdbpy_apply_frame_filter): Change type of "flags".
776 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
777 of "flags".
778 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
779 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
780 * extension.h (enum frame_filter_flag): Rename from
781 frame_filter_flags.
782 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
783 (apply_ext_lang_frame_filter): Change type of "flags".
784 * extension.c (apply_ext_lang_frame_filter): Change type of
785 "flags".
786 * extension-priv.h (struct extension_language_ops)
787 <apply_frame_filter>: Change type of "flags".
788
6893c19a
TT
7892018-02-26 Tom Tromey <tom@tromey.com>
790
791 PR python/16497:
792 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
793 off-by-one in py_end computation.
794 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
795 PRINT_MORE_FRAMES.
796 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
797 constant.
798
2ddeaf8a
TT
7992018-02-26 Tom Tromey <tom@tromey.com>
800
801 * dwarf2read.c (struct variant_field): New.
802 (struct nextfield) <variant>: New field.
803 (dwarf2_add_field): Handle DW_TAG_variant_part.
804 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
805 discriminated union.
806 (read_structure_type): Handle DW_TAG_variant_part.
807 (handle_struct_member_die): New function, extracted from
808 process_structure_scope. Handle DW_TAG_variant.
809 (process_structure_scope): Handle discriminated unions. Call
810 handle_struct_member_die.
811
c9317f21
TT
8122018-02-26 Tom Tromey <tom@tromey.com>
813
814 * rust-lang.h (rust_last_path_segment): Declare.
815 * rust-lang.c (rust_last_path_segment): Now public. Change
816 contract.
817 (struct disr_info): Remove.
818 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
819 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
820 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
821 (rust_enum_p, rust_enum_variant): New function.
822 (rust_underscore_fields): Remove "offset" parameter.
823 (rust_print_enum): New function.
824 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
825 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
826 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
827 enums.
828 (rust_internal_print_type): New function, from rust_print_type.
829 Remove enum code.
830 (rust_print_type): Call rust_internal_print_type.
831 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
832 Update enum handling.
833 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
834 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
835 (rust_union_quirks): New functions.
836 (process_full_comp_unit, process_full_type_unit): Call
837 rust_union_quirks.
838 (process_structure_scope): Update rust_unions if necessary.
839
7c22600a
TT
8402018-02-26 Tom Tromey <tom@tromey.com>
841
842 * value.h (value_union_variant): Declare.
843 * valops.c (value_union_variant): New function.
844 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
845 (struct discriminant_info): New.
846 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
847 enumerator.
848 (struct main_type) <flag_discriminated_union>: New field.
849
15ce8941
TT
8502018-02-26 Tom Tromey <tom@tromey.com>
851
852 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
853 unittests/unpack-selftests.c.
854 * unittests/unpack-selftests.c: New file.
855 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
856
48fbe735
YQ
8572018-02-26 Yao Qi <yao.qi@linaro.org>
858
859 * dwarf2read.c (struct partial_die_info) <read>: New method.
860 (read_partial_die): Remove the declaration.
861 (load_partial_dies): Update.
862 (partial_die_info::partial_die_info):
863 (read_partial_die): Change it to partial_die_info::read.
864
52356b79
YQ
8652018-02-26 Yao Qi <yao.qi@linaro.org>
866
867 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
868 (fixup_partial_die): Remove declaration.
869 (scan_partial_symbols): Update.
870 (partial_die_parent_scope): Likewise.
871 (partial_die_full_name): Likewise.
872 (fixup_partial_die): Change it to partial_die_info::fixup.
873
35cc7ed7
YQ
8742018-02-26 Yao Qi <yao.qi@linaro.org>
875
876 * dwarf2read.c (read_partial_die): Update the declaration.
877 (load_partial_dies): Caller update.
878 (read_partial_die): Remove one argument abbrev_len.
879
6f06d47b
YQ
8802018-02-26 Yao Qi <yao.qi@linaro.org>
881
882 * dwarf2read.c (struct partial_die_info): Add ctor, delete
883 assignment operator.
884 (load_partial_dies): Use ctor and copy ctor.
885 (read_partial_die): Update.
886 (dwarf2_cu::find_partial_die): Use ctor.
887
d590ff25
YQ
8882018-02-26 Yao Qi <yao.qi@linaro.org>
889
890 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
891 (find_partial_die_in_comp_unit): Change it to
892 dwarf2_cu::find_partial_die.
893 (find_partial_die): Update.
894
fd0a254f
YQ
8952018-02-26 Yao Qi <yao.qi@linaro.org>
896
897 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
898 is NULL.
899
cd9983dd
YQ
9002018-02-26 Yao Qi <yao.qi@linaro.org>
901
902 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
903
f46cd62a
AH
9042018-02-26 Alan Hayward <alan.hayward@arm.com>
905
906 * arch/amd64.h: Use common/tdesc.h.
907 * arch/i386.c: Likewise.
908 * arch/i386.h: Likewise.
909 * arch/tic6x.c: Likewise.
910 * arch/tdesc.h: Move file from here...
911 * common/tdesc.h: ...to here.
912 * features/aarch64-core.c: Regenerate.
913 * features/aarch64-fpu.c: Regenerate.
914 * features/i386/32bit-avx.c: Regenerate.
915 * features/i386/32bit-avx512.c: Regenerate.
916 * features/i386/32bit-core.c: Regenerate.
917 * features/i386/32bit-linux.c: Regenerate.
918 * features/i386/32bit-mpx.c: Regenerate.
919 * features/i386/32bit-pkeys.c: Regenerate.
920 * features/i386/32bit-sse.c: Regenerate.
921 * features/i386/64bit-avx.c: Regenerate.
922 * features/i386/64bit-avx512.c: Regenerate.
923 * features/i386/64bit-core.c: Regenerate.
924 * features/i386/64bit-linux.c: Regenerate.
925 * features/i386/64bit-mpx.c: Regenerate.
926 * features/i386/64bit-pkeys.c: Regenerate.
927 * features/i386/64bit-segments.c: Regenerate.
928 * features/i386/64bit-sse.c: Regenerate.
929 * features/i386/x32-core.c: Regenerate.
930 * features/tic6x-c6xp.c: Regenerate.
931 * features/tic6x-core.c: Regenerate.
932 * features/tic6x-gp.c: Regenerate.
933 * target-descriptions.c: Use common/tdesc.h.
934 * target-descriptions.h: Likewise.
935
9b292f68
TT
9362018-02-24 Tom Tromey <tom@tromey.com>
937
938 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
939 (try_thread_db_load_from_dir, thread_db_load_search): Use
940 std::string.
941 (info_auto_load_libthread_db_compare): Return bool. Change
942 argument types.
943 (info_auto_load_libthread_db): Use std::vector, std::string.
944 Remove cleanups.
945
281d762b
TT
9462018-02-24 Tom Tromey <tom@tromey.com>
947
948 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
949 std::string.
950 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
951 std::string*.
952 * gdbarch.c: Rebuild.
953 * gdbarch.h: Rebuild.
954 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
955 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
956 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
957 std::string*.
958
9d8780f0
SM
9592018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
960
961 * gdbtypes.h (sect_offset): Change type to uint64_t.
962 (sect_offset_str): New function.
963 * dwarf2read.c (create_addrmap_from_aranges): Use
964 sect_offset_str.
965 (error_check_comp_unit_head): Likewise.
966 (create_debug_type_hash_table): Likewise.
967 (read_cutu_die_from_dwo): Likewise.
968 (init_cutu_and_read_dies): Likewise.
969 (init_cutu_and_read_dies_no_follow): Likewise.
970 (process_psymtab_comp_unit_reader): Likewise.
971 (partial_die_parent_scope): Likewise.
972 (peek_die_abbrev): Likewise.
973 (process_queue): Likewise.
974 (dwarf2_physname): Likewise.
975 (read_namespace_alias): Likewise.
976 (read_import_statement): Likewise.
977 (create_dwo_cu_reader): Likewise.
978 (create_cus_hash_table): Likewise.
979 (lookup_dwo_cutu): Likewise.
980 (inherit_abstract_dies): Likewise.
981 (read_func_scope): Likewise.
982 (read_call_site_scope): Likewise.
983 (dwarf2_add_member_fn): Likewise.
984 (read_common_block): Likewise.
985 (read_module_type): Likewise.
986 (read_typedef): Likewise.
987 (read_subrange_type): Likewise.
988 (load_partial_dies): Likewise.
989 (read_partial_die): Likewise.
990 (find_partial_die): Likewise.
991 (read_str_index): Likewise.
992 (dwarf2_string_attr): Likewise.
993 (build_error_marker_type): Likewise.
994 (lookup_die_type): Likewise.
995 (dump_die_shallow): Likewise.
996 (follow_die_ref): Likewise.
997 (dwarf2_fetch_die_loc_sect_off): Likewise.
998 (dwarf2_fetch_constant_bytes): Likewise.
999 (follow_die_sig): Likewise.
1000 (get_signatured_type): Likewise.
1001 (get_DW_AT_signature_type): Likewise.
1002 (dwarf2_find_containing_comp_unit): Likewise.
1003 (set_die_type): Likewise.
1004
8ec57239
JB
10052018-02-21 John Baldwin <jhb@FreeBSD.org>
1006
1007 * arch/aarch64.c: Include "common-defs.h".
1008 * arch/amd64.c: Likewise.
1009 * arch/i386.c: Likewise.
1010
3eac2b65
TT
10112018-02-21 Tom Tromey <tom@tromey.com>
1012
1013 * value.h: (extract_field_op): Update.
1014 * eval.c (extract_field_op): Return a const char *.
1015 * expression.h (parse_expression_for_completion): Update.
1016 * completer.c (complete_expression): Update.
1017 (add_struct_fields): Make fieldname const.
1018 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
1019 (mark_completion_tag, parse_exp_in_context_1): Update.
1020 (parse_expression_for_completion): Change "name" to
1021 unique_xmalloc_ptr*.
1022
6ccb583f
TT
10232018-02-21 Tom Tromey <tom@tromey.com>
1024
1025 * infcall.c (call_function_by_hand_dummy): Use std::vector.
1026
c113ed0c
YQ
10272018-02-21 Yao Qi <yao.qi@linaro.org>
1028
1029 * avr-tdep.c (avr_read_pc): Change parameter type to
1030 readable_regcache.
1031 * gdbarch.sh (read_pc): Likewise.
1032 * gdbarch.c: Re-generated.
1033 * gdbarch.h: Re-generated.
1034 * hppa-tdep.c (hppa_read_pc): Change parameter type to
1035 readable_regcache.
1036 * ia64-tdep.c (ia64_read_pc): Likewise.
1037 * mips-tdep.c (mips_read_pc): Likewise.
1038 * spu-tdep.c (spu_read_pc): Likewise.
1039
4c74fe6b
YQ
10402018-02-21 Yao Qi <yao.qi@linaro.org>
1041
1042 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
1043 * regcache-dump.c: New file.
1044 * regcache.c: Move register_dump to regcache-dump.c.
1045 (maintenance_print_registers): Likewise.
1046 (maintenance_print_raw_registers): Likewise.
1047 (maintenance_print_cooked_registers): Likewise.
1048 (maintenance_print_register_groups): Likewise.
1049 (maintenance_print_remote_registers): Likewise.
1050 (_initialize_regcache): Likewise.
1051 * regcache.h (register_dump): Moved from regcache.c.
1052
796bb026
YQ
10532018-02-21 Yao Qi <yao.qi@linaro.org>
1054
1055 * regcache.c (regcache::regcache): Update.
1056 (regcache::invalidate): Move it to detached_regcache::invalidate.
1057 (get_thread_arch_aspace_regcache): Update.
1058 (regcache::raw_update): Update.
1059 (regcache::cooked_read): Remove some code.
1060 (regcache::cooked_read_value): Likewise.
1061 (regcache::raw_write): Remove assert on m_readonly_p.
1062 (regcache::raw_supply_integer): Move it to
1063 detached_regcache::raw_supply_integer.
1064 (regcache::raw_supply_zeroed): Likewise.
1065 * regcache.h (detached_regcache) <raw_supply_integer>: New
1066 declaration.
1067 <raw_supply_zeroed, invalidate>: Likewise.
1068 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
1069 <invalidate>: Likewise.
1070 <m_readonly_p>: Removed.
1071
215c69dc
YQ
10722018-02-21 Yao Qi <yao.qi@linaro.org>
1073
1074 * infcmd.c (get_return_value): Let stop_regs point to
1075 get_current_regcache.
1076 * regcache.c (regcache::regcache): Remove.
1077 (register_dump_reg_buffer): New class.
1078 (regcache_print): Adjust.
1079 * regcache.h (regcache): Remove constructors.
1080
f3384e66
YQ
10812018-02-21 Yao Qi <yao.qi@linaro.org>
1082
1083 * regcache.c (class register_dump): New class.
1084 (register_dump_regcache, register_dump_none): New class.
1085 (register_dump_remote, register_dump_groups): New class.
1086 (regcache_print): Update.
1087 * regcache.h (regcache_dump_what): Move it to regcache.c.
1088 (regcache) <dump>: Remove.
1089
c8ec2f33
YQ
10902018-02-21 Yao Qi <yao.qi@linaro.org>
1091
1092 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
1093 reg_buffer_rw *.
1094 (jit_unwind_reg_set_impl): Call raw_supply.
1095 (jit_frame_sniffer): Use reg_buffer_rw.
1096 * record-full.c (record_full_core_regbuf): Change its type.
1097 (record_full_core_open_1): Use reg_buffer_rw.
1098 (record_full_close): Likewise.
1099 (record_full_core_fetch_registers): Use regcache->raw_supply.
1100 (record_full_core_store_registers): Likewise.
1101 * regcache.c (regcache::get_register_status): Move it to
1102 reg_buffer.
1103 (regcache_raw_set_cached_value): Remove.
1104 (regcache::raw_set_cached_value): Remove.
1105 (regcache::raw_write): Call raw_supply.
1106 (regcache::raw_supply): Move it to reg_buffer_rw.
1107 * regcache.h (regcache_raw_set_cached_value): Remove.
1108 (reg_buffer_rw): New class.
1109
daf6667d
YQ
11102018-02-21 Yao Qi <yao.qi@linaro.org>
1111
1112 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
1113 readonly_detached_regcache.
1114 (dummy_frame_prev_register): Use regcache->cooked_read.
1115 * frame.c (frame_save_as_regcache): Change return type.
1116 (frame_pop): Update.
1117 * frame.h (frame_save_as_regcache): Update declaration.
1118 * inferior.h (get_infcall_suspend_state_regcache): Update
1119 declaration.
1120 * infrun.c (infcall_suspend_state) <registers>: use
1121 readonly_detached_regcache.
1122 (save_infcall_suspend_state): Don't use regcache_dup.
1123 (get_infcall_suspend_state_regcache): Change return type.
1124 * linux-fork.c (struct fork_info) <savedregs>: Change to
1125 readonly_detached_regcache.
1126 <pc>: New field.
1127 (fork_save_infrun_state): Don't use regcache_dup.
1128 (info_checkpoints_command): Adjust.
1129 * mi/mi-main.c (register_changed_p): Update declaration.
1130 (mi_cmd_data_list_changed_registers): Use
1131 readonly_detached_regcache.
1132 (register_changed_p): Change parameter type to
1133 readonly_detached_regcache.
1134 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
1135 readonly_detached_regcache.
1136 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
1137 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
1138 New.
1139 (regcache::save): Move it to reg_buffer.
1140 (regcache::restore): Change parameter type.
1141 (regcache_dup): Remove.
1142 * regcache.h (reg_buffer) <save>: New method.
1143 (readonly_detached_regcache): New class.
1144 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
1145 readonly_detached_regcache.
1146 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
1147
fc5b8736
YQ
11482018-02-21 Yao Qi <yao.qi@linaro.org>
1149
1150 * frame.c (frame_save_as_regcache): Use regcache method save.
1151 (frame_pop): Use regcache method restore.
1152 * infrun.c (restore_infcall_suspend_state): Likewise.
1153 * linux-fork.c (fork_load_infrun_state): Likewise.
1154 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
1155 save.
1156 * regcache.c (regcache_save): Remove.
1157 (regcache::restore): More asserts.
1158 (regcache_cpy): Remove.
1159 * regcache.h (regcache_save): Remove the declaration.
1160 (regcache::restore): Move from private to public.
1161 Remove the friend declaration of regcache_cpy.
1162 (regcache_cpy): Remove declaration.
1163
849d0ba8
YQ
11642018-02-21 Yao Qi <yao.qi@linaro.org>
1165
1166 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
1167 parameter type to 'readable_regcache *'.
1168 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
1169 * arm-tdep.c (arm_neon_quad_read): Likewise.
1170 (arm_pseudo_read): Likewise.
1171 * avr-tdep.c (avr_pseudo_register_read): Likewise.
1172 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
1173 * frv-tdep.c (frv_pseudo_register_read): Likewise.
1174 * gdbarch.c: Re-generated.
1175 * gdbarch.h: Re-generated.
1176 * gdbarch.sh (pseudo_register_read): Change parameter type to
1177 'readable_regcache *'.
1178 (pseudo_register_read_value): Likewise.
1179 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
1180 (h8300_pseudo_register_read): Likewise.
1181 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
1182 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
1183 (i386_pseudo_register_read_into_value): Likewise.
1184 (i386_pseudo_register_read_value): Likewise.
1185 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
1186 declaration.
1187 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
1188 * m32c-tdep.c (m32c_raw_read): Likewise.
1189 (m32c_read_flg): Likewise.
1190 (m32c_banked_register): Likewise.
1191 (m32c_banked_read): Likewise.
1192 (m32c_sb_read): Likewise.
1193 (m32c_part_read): Likewise.
1194 (m32c_cat_read): Likewise.
1195 (m32c_r3r2r1r0_read): Likewise.
1196 (m32c_pseudo_register_read): Likewise.
1197 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
1198 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
1199 (mep_pseudo_cr64_read): Likewise.
1200 (mep_pseudo_register_read): Likewise.
1201 * mips-tdep.c (mips_pseudo_register_read): Likewise.
1202 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
1203 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
1204 * regcache.c (regcache::raw_read): Move it to readable_regcache.
1205 (regcache::cooked_read): Likewise.
1206 (regcache::cooked_read_value): Likewise.
1207 (regcache_cooked_read_signed):
1208 (regcache::cooked_read): Likewise.
1209 * regcache.h (readable_regcache): New class.
1210 (regcache): Inherit readable_regcache. Move some methods to
1211 readable_regcache.
1212 * rl78-tdep.c (rl78_pseudo_register_read): Change
1213 parameter type to 'readable_regcache *'.
1214 * rs6000-tdep.c (do_regcache_raw_read): Remove.
1215 (e500_pseudo_register_read): Change parameter type to
1216 'readable_regcache *'.
1217 (dfp_pseudo_register_read): Likewise.
1218 (vsx_pseudo_register_read): Likewise.
1219 (efpr_pseudo_register_read): Likewise.
1220 * s390-tdep.c (s390_pseudo_register_read): Likewise.
1221 * sh-tdep.c (sh_pseudo_register_read): Likewise.
1222 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
1223 (sh64_pseudo_register_read): Likewise.
1224 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
1225 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
1226 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
1227 (spu_pseudo_register_read): Likewise.
1228 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
1229 (xtensa_pseudo_register_read): Likewise.
1230
31716595
YQ
12312018-02-21 Yao Qi <yao.qi@linaro.org>
1232
1233 * regcache.c (regcache::regcache): Call reg_buffer ctor.
1234 (regcache::arch): Move it to reg_buffer::arch.
1235 (regcache::register_buffer): Likewise.
1236 (regcache::assert_regnum): Likewise.
1237 (regcache::num_raw_registers): Likewise.
1238 * regcache.h (reg_buffer): New class.
1239 (regcache): Inherit reg_buffer.
1240
7104e59b
SM
12412018-02-20 Simon Marchi <simon.marchi@ericsson.com>
1242
1243 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
1244 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
1245
2d8adcbd
MM
12462018-02-20 Markus Metzger <markus.t.metzger@intel.com>
1247
1248 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
1249
b5884fa7
AH
12502018-02-19 Alan Hayward <alan.hayward@arm.com>
1251
1252 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
1253 (SFILES): Remove common/*.c files.
1254 (COMMON_OBS): Remove some *.o files built from common/*.c files.
1255 * common/common.host: Add common reference.
1256 * configure.ac: Likewise.
1257 * configure: Regenerate.
1258
fd90ace4
YQ
12592018-02-16 Yao Qi <yao.qi@linaro.org>
1260
1261 * block.c (block_namespace_info): Inherit allocate_on_obstack.
1262 (block_initialize_namespace): Use new.
1263 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
1264 (dwarf2_free_objfile): Use delete.
1265 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
1266 (copy_type_recursive): Use new.
1267 * gdb_obstack.h (allocate_on_obstack): New.
1268
85046ae2
YQ
12692018-02-15 Yao Qi <yao.qi@linaro.org>
1270
1271 PR gdb/22849
1272 * inferior.c (exit_inferior_1): Reset inf->control.
1273
355c559b
JB
12742018-02-15 Joel Brobecker <brobecker@adacore.com>
1275
1276 * ada-lang.c (ada_to_fixed_value_create): Delete advance
1277 declaration.
1278
980548fd
PA
12792018-02-14 Pedro Alves <palves@redhat.com>
1280
1281 * frame-unwind.c (frame_unwind_try_unwinder): Always call
1282 frame_cleanup_after_sniffer on exception.
1283
692d6f97
TT
12842018-02-14 Tom Tromey <tom@tromey.com>
1285
1286 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
1287 const.
1288 (solib_bfd_open): Make pathname const.
1289 * solib.c (solib_bfd_open): Make pathname const.
1290 * solib-spu.c (spu_bfd_fopen): Make name const.
1291 (spu_bfd_open): Make pathname const.
1292 * solib-darwin.c (darwin_bfd_open): Make pathname const.
1293 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
1294
e0cc99a6
TT
12952018-02-14 Tom Tromey <tom@tromey.com>
1296
1297 * symfile.c (symfile_bfd_open): Update.
1298 * source.h (openp, source_full_path_of, find_and_open_source):
1299 Change argument type to unique_xmalloc_ptr.
1300 * source.c (openp): Take a unique_xmalloc_ptr.
1301 (source_full_path_of, find_and_open_source): Likewise.
1302 (open_source_file, symtab_to_fullname): Update.
1303 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
1304 unique_xmalloc_ptr.
1305 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
1306 (exec_file_find): Update.
1307 * psymtab.c (psymtab_to_fullname): Update.
1308 * nto-tdep.h (nto_find_and_open_solib): Update.
1309 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
1310 unique_xmalloc_ptr.
1311 * exec.c (exec_file_attach): Update.
1312 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
1313 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
1314
b46a8d7c
TT
13152018-02-14 Tom Tromey <tom@tromey.com>
1316
1317 * solib.c: Include source.h.
1318 * nto-tdep.c: Include source.h.
1319 * mi/mi-cmd-env.c: Include source.h.
1320 * infcmd.c: Include source.h.
1321 * exec.c: Include source.h.
1322 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
1323 (add_path, directory_switch, source_path, init_source_path): Move
1324 declarations...
1325 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
1326 (add_path, directory_switch, source_path, init_source_path):
1327 ...here.
1328
797bc1cb
TT
13292018-02-14 Tom Tromey <tom@tromey.com>
1330
1331 * solist.h (exec_file_find, solib_find): Return
1332 unique_xmalloc_ptr.
1333 (solib_bfd_fopen): Take a const char *.
1334 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
1335 (exec_file_find, solib_find): Likewise.
1336 (solib_bfd_fopen): Do not take ownership of "pathname".
1337 (solib_bfd_open): Use unique_xmalloc_ptr.
1338 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
1339 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
1340 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
1341 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
1342
f98b2e33
JB
13432018-02-14 Joel Brobecker <brobecker@adacore.com>
1344
1345 * ada-lang.c (name_match_type_from_name): Remove reference to
1346 ada_name_for_lookup in function's documentation.
1347 * ada-lang.h (ada_name_for_lookup): Delete declaration.
1348
24b9144d
SM
13492018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
1350
1351 * defs.h (enum openp_flags): New enum.
1352 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
1353 Move to enum openp_flags.
1354 (openp_flags): New enum flags.
1355 (openp): Change parameter type to openp_flags.
1356 * source.c (openp): Change parameter type to openp_flags.
1357 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
1358 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
1359
387cd15b
SM
13602018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
1361
1362 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
1363 per-command.
1364
b303c6f6
AB
13652018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
1366
1367 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
1368 into...
1369 (class dwarf2_queue_guard): ...the destructor of this new class.
1370 (dw2_do_instantiate_symtab): Create instance of the new class
1371 dwarf2_queue_guard, remove cleanup.
1372
9c3630e9
TT
13732018-02-09 Tom Tromey <tom@tromey.com>
1374
1375 * source.c (find_source_lines): Don't reference past the end of
1376 the vector.
1377
c4e12631
MM
13782018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1379
1380 * remote.c (remote_btrace_maybe_reopen): Change error message.
1381 * btrace.c (btrace_enable): Likewise.
1382 (parse_xml_btrace): Likewise.
1383 (parse_xml_btrace_conf): Likewise.
1384
88711fbf
MM
13852018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1386
1387 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
1388 (linux_enable_pt, linux_enable_bts): Call
1389 diagnose_perf_event_open_fail.
1390
17ad2a4f
MM
13912018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1392
1393 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
1394 Remove parameter and change return type. Update callers. Move it.
1395 (linux_enable_bts, linux_enable_pt): Improve error message.
1396 (linux_enable_pt): Remove zero buffer size check.
1397 (linux_enable_btrace): Improve error messages. Remove NULL return
1398 check.
1399
de6242d3
MM
14002018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1401
1402 * btrace.c (btrace_enable): Remove target_supports_btrace call.
1403 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
1404 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
1405 (linux_supports_pt, linux_supports_btrace): Remove.
1406 (linux_enable_bts): Call cpu_supports_bts.
1407 * nat/linux-btrace.h (linux_supports_btrace): Remove.
1408 * remote.c (remote_supports_btrace): Remove.
1409 (init_remote_ops): Remove remote_supports_btrace.
1410 * target-delegates.c: Regenerated.
1411 * target.c (target_supports_btrace): Remove.
1412 * target.h (target_ops) <to_supports_btrace>: Remove
1413 (target_supports_btrace): Remove.
1414 * x86-linux-nat.c (x86_linux_create_target): Remove
1415 linux_supports_btrace.
1416
9ee23a85
MM
14172018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1418
1419 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
1420 btrace failed.
1421 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
1422 exception and use message in own exception.
1423
5c3284c1
MM
14242018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1425
1426 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
1427 (perf_event_pt_event_type): Use gdb_file_up.
1428 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
1429 scoped_fd, and scoped_mmap.
1430
84696f37
MM
14312018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1432
1433 * common/scoped_mmap.h: New.
1434 * unittests/scoped_mmap-selftest.c: New.
1435 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1436 unittests/scoped_mmap-selftest.c.
1437
ea4a0888
MM
14382018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1439
1440 * common/scoped_fd.h: New.
1441 * unittests/scoped_fd-selftest.c: New.
1442 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1443 unittests/scoped_fd-selftest.c.
1444
869e8290
TT
14452018-02-09 Tom Tromey <tom@tromey.com>
1446
1447 * auto-load.c (auto_load_section_scripts): Use
1448 gdb::unique_xmalloc_ptr.
1449
a37a2ae7
TT
14502018-02-09 Tom Tromey <tom@tromey.com>
1451
1452 * auto-load.c (execute_script_contents): Use std::string.
1453
4e725347
JB
14542018-02-09 Joel Brobecker <brobecker@adacore.com>
1455
1456 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
1457 Python function, rather than a new command.
1458
9a897d43
TT
14592018-02-08 Tom Tromey <tom@tromey.com>
1460
1461 * solib.c (solib_find_1): Use std::string.
1462 (solib_bfd_fopen): Use unique_xmalloc_ptr.
1463
58ef3771
TT
14642018-02-08 Tom Tromey <tom@tromey.com>
1465
1466 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
1467
a9abc434
TT
14682018-02-08 Tom Tromey <tom@tromey.com>
1469
1470 * source.c (find_source_lines): Use gdb::def_vector.
1471
84f27c6f
TT
14722018-02-08 Tom Tromey <tom@tromey.com>
1473
1474 * macrocmd.c (struct temporary_macro_definition): New.
1475 (macro_define_command): Use temporary_macro_definition. Remove
1476 cleanups.
1477 (free_macro_definition_ptr): Remove.
1478
0354904b
TT
14792018-02-08 Tom Tromey <tom@tromey.com>
1480
1481 * macroexp.c (maybe_expand): Use std::string.
1482
1739cf24
TT
14832018-02-08 Tom Tromey <tom@tromey.com>
1484
1485 * macroexp.c (struct macro_buffer): Add initializers for some
1486 members.
1487 (init_buffer, init_shared_buffer, free_buffer)
1488 (free_buffer_return_text): Remove.
1489 (macro_buffer): New constructors.
1490 (~macro_buffer): New destructor.
1491 (macro_buffer::set_shared): New method.
1492 (macro_buffer::resize_buffer, macro_buffer::appendc)
1493 (macro_buffer::appendmem): Now methods, not free functions.
1494 (set_token, append_tokens_without_splicing, stringify)
1495 (macro_stringify): Update.
1496 (gather_arguments): Change return type. Remove argc_p argument,
1497 add args_ptr argument. Use std::vector.
1498 (substitute_args): Remove argc argument. Accept std::vector.
1499 (expand): Update. Use std::vector.
1500 (scan, macro_expand, macro_expand_next): Update.
1501
f6c2623e
TT
15022018-02-08 Tom Tromey <tom@tromey.com>
1503
1504 * symtab.c (default_collect_symbol_completion_matches_break_on):
1505 Use unique_xmalloc_ptr.
1506 * macroscope.h: (sal_macro_scope, user_macro_scope)
1507 (default_macro_scope): Return unique_xmalloc_ptr.
1508 * macroscope.c (sal_macro_scope, user_macro_scope)
1509 (default_macro_scope): Return unique_xmalloc_ptr.
1510 * macroexp.h (macro_expand, macro_expand_once): Return
1511 unique_xmalloc_ptr.
1512 * macroexp.c (macro_expand, macro_expand_once): Return
1513 unique_xmalloc_ptr.
1514 * macrocmd.c (macro_expand_command, macro_expand_once_command)
1515 (info_macro_command, info_macros_command): Use
1516 unique_xmalloc_ptr.
1517 * compile/compile-c-support.c (write_macro_definitions): Use
1518 unique_xmalloc_ptr.
1519 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
1520
c2e0e465
SM
15212018-02-07 Simon Marchi <simon.marchi@ericsson.com>
1522
1523 * value.c (value_static_field): Assign field type instead of
1524 containing type when returning an optimized out value.
1525
3f8c94b4
YQ
15262018-02-06 Yao Qi <yao.qi@linaro.org>
1527
1528 * ft32-tdep.c (ft32_read_pc): Remove.
1529 (ft32_write_pc): Remove.
1530 (ft32_gdbarch_init): Update.
1531 * m32r-tdep.c (m32r_read_pc): Remove.
1532 (m32r_gdbarch_init): Update.
1533 * mep-tdep.c (mep_read_pc): Remove.
1534 (mep_gdbarch_init): Update.
1535 * microblaze-tdep.c (microblaze_write_pc): Remove.
1536 (microblaze_gdbarch_init): Update.
1537 * mn10300-tdep.c (mn10300_read_pc): Remove.
1538 (mn10300_write_pc): Remove.
1539 (mn10300_gdbarch_init): Update.
1540 * moxie-tdep.c (moxie_read_pc): Remove.
1541 (moxie_write_pc): Remove.
1542 (moxie_gdbarch_init): Update.
1543
bca65a23
YQ
15442018-02-06 Yao Qi <yao.qi@linaro.org>
1545
1546 * expprint.c (print_subexp_standard): Handle
1547 OP_F77_UNDETERMINED_ARGLIST.
1548 (dump_subexp_body_standard): Likewise.
1549
583e3f90 15502018-02-05 Alan Hayward <alan.hayward@arm.com>
b8df6ca7 1551
583e3f90
YQ
1552 * target-descriptions.c (tdesc_element_visitor) Add empty
1553 implementations.
b8df6ca7
AH
1554 (tdesc_type): Move make_gdb_type from here.
1555 (tdesc_type_builtin): Likewise.
1556 (tdesc_type_vector): Likewise.
1557 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
1558 (make_gdb_type_struct): Move from tdesc_type_with_fields.
1559 (make_gdb_type_union): Likewise.
1560 (make_gdb_type_flags): Likewise.
1561 (make_gdb_type_enum): Likewise.
1562 (make_gdb_type): New function.
1563 (tdesc_register_type): Use static make_gdb_type.
1564
e813d34a
RK
15652018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
1566
1567 * infcmd.c (default_print_one_register_info): Align natural-format
1568 column values consistently one under another.
1569 (pad_to_column): New function.
1570
0eb876f5
JB
15712018-02-05 Joel Brobecker <brobecker@adacore.com>
1572
1573 * dwarf2read.c (dwarf2_physname): Move commment.
1574
0625771b
LS
15752018-02-01 Leszek Swirski <leszeks@google.com>
1576
1577 * varobj.c (varobj_formatted_print_options): Allow recursive
1578 pretty printing if pretty printing is enabled.
1579
59498c30
LS
15802018-02-01 Leszek Swirski <leszeks@google.com>
1581
1582 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
1583 names after a structop as a filename.
1584
2d9e6acb
YQ
15852018-02-01 Yao Qi <yao.qi@linaro.org>
1586
1587 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
1588 (arm_record_coproc_data_proc): Likewise.
1589
df95a9cf
YQ
15902018-02-01 Yao Qi <yao.qi@linaro.org>
1591
1592 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
1593
07e5f5cf
NP
15942018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
1595
1596 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
1597 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
1598
3045b475
PA
15992018-01-31 Pedro Alves <palves@redhat.com>
1600
1601 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
1602 * inflow.c (child_terminal_save_inferior): Wrap reference to
1603 tcgetpgrp in HAVE_TERMIOS_H.
1604 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
1605 _WIN32.
1606 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
1607 always iterate over all inferiors.
1608 (gdbsim_cntrl_c): Adjust.
1609 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
1610
929b5ad4
JB
16112018-01-31 Joel Brobecker <brobecker@adacore.com>
1612
1613 * gdbtypes.c (lookup_array_range_type): Make sure the array's
1614 index type is objfile-owned if the element type is as well.
1615
29236ca2
JB
16162018-01-31 Joel Brobecker <brobecker@adacore.com>
1617
1618 GDB 8.1 released.
1619
c81e8879
PR
16202018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
1621
1622 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
1623 "features/s390x-linux64.c".
1624 (_initialize_s390_linux_tdep): Remove initialization of tdescs
1625 s390_linux32 and s390x_linux64.
1626 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
1627 default tdesc.
1628 * s390-tdep.c: Include "features/s390-linux32.c" and
1629 "features/s390x-linux64.c".
1630 (s390_tdesc_valid): Add check for tdesc_has_registers.
1631 (s390_gdbarch_init): Make sure there is always a valid tdesc.
1632 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
1633 tdesc_s390x_linux64.
1634 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
1635 tdesc_s390x_linux64 to...
1636 * s390-tdep.h: ...here.
1637
e671cd59
PA
16382018-01-30 Pedro Alves <palves@redhat.com>
1639
1640 PR gdb/13211
1641 * config.in, configure: Regenerate.
1642 * configure.ac: Check for getpgid.
1643 * go32-nat.c (go32_pass_ctrlc): New.
1644 (go32_target): Install it.
1645 * inf-child.c (inf_child_target): Install
1646 child_terminal_save_inferior, child_pass_ctrlc and
1647 child_interrupt.
1648 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
1649 (inf_ptrace_target): No longer install it.
1650 * infcmd.c (interrupt_target_1): Adjust.
1651 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
1652 (child_interrupt): Declare.
1653 (inferior::terminal_state): New.
1654 * inflow.c (struct terminal_info): Update comments.
1655 (inferior_process_group): Delete.
1656 (terminal_is_ours): Delete.
1657 (gdb_tty_state): New.
1658 (child_terminal_init): Adjust.
1659 (is_gdb_terminal, sharing_input_terminal_1)
1660 (sharing_input_terminal): New functions.
1661 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
1662 Set the process's actual process group in the foreground if
1663 possible. Handle is_ours_for_output/is_ours distinction. Don't
1664 mark terminal as the inferior's if not sharing GDB's terminal.
1665 Don't check attach_flag.
1666 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
1667 pass down a target_terminal_state.
1668 (child_terminal_save_inferior): New, factored out from ...
1669 (child_terminal_ours_1): ... this. Handle
1670 target_terminal_state::is_ours_for_output.
1671 (child_interrupt, child_pass_ctrlc): New.
1672 (inflow_inferior_exit): Clear the inferior's terminal_state.
1673 (copy_terminal_info): Copy the inferior's terminal state.
1674 (_initialize_inflow): Remove reference to terminal_is_ours.
1675 * inflow.h (inferior_process_group): Delete.
1676 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
1677 * procfs.c (procfs_target): Don't install procfs_interrupt.
1678 (procfs_interrupt): Delete.
1679 * remote.c (remote_serial_quit_handler): Adjust.
1680 (remote_interrupt): Remove ptid parameter. Adjust.
1681 * target-delegates.c: Regenerate.
1682 * target.c: Include "terminal.h".
1683 (target_terminal::terminal_state): Rename to ...
1684 (target_terminal::m_terminal_state): ... this.
1685 (target_terminal::init): Adjust.
1686 (target_terminal::inferior): Adjust to per-inferior
1687 terminal_state.
1688 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
1689 (target_terminal::ours, target_terminal::ours_for_output): Use
1690 target_terminal_is_ours_kind.
1691 (target_interrupt): Remove ptid parameter. Adjust.
1692 (default_target_pass_ctrlc): Adjust.
1693 * target.h (target_ops::to_terminal_save_inferior): New field.
1694 (target_ops::to_interrupt): Remove ptid_t parameter.
1695 (target_interrupt): Remove ptid_t parameter. Update comment.
1696 (target_pass_ctrlc): Update comment.
1697 * target/target.h (target_terminal_state): New scoped enum,
1698 factored out of ...
1699 (target_terminal::terminal_state): ... here.
1700 (target_terminal::inferior): Update comments.
1701 (target_terminal::restore_inferior): New.
1702 (target_terminal::is_inferior, target_terminal::is_ours)
1703 (target_terminal::is_ours_for_output): Adjust.
1704 (target_terminal::scoped_restore_terminal_state): Adjust to
1705 rename, and call restore_inferior() instead of inferior().
1706 (target_terminal::scoped_restore_terminal_state::m_state): Change
1707 type.
1708 (target_terminal::terminal_state): Rename to ...
1709 (target_terminal::m_terminal_state): ... this and change type.
1710
9c3a5d93
PA
17112018-01-30 Pedro Alves <palves@redhat.com>
1712
1713 * linux-nat.c (wait_for_signal): New function.
1714 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
1715 directly.
1716 (async_terminal_is_ours)
1717 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
1718 (linux_nat_add_target): Don't override
1719 to_terminal_inferior/to_terminal_ours.
1720
69ab5edb
SDJ
17212018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
1722
1723 * remote.c (remote_follow_fork): Don't call "detach_inferior".
1724
fc8e7e75
SM
17252018-01-28 Simon Marchi <simon.marchi@ericsson.com>
1726
1727 * dwarf2read.c (free_dwo_files): Add forward-declaration.
1728 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
1729 dwarf2_per_objfile_free here.
1730 (dwarf2_per_objfile_free): Remove.
1731 (_initialize_dwarf2_read): Don't register
1732 dwarf2_per_objfile_free as a registry cleanup.
1733
b2a426e2
EZ
17342018-01-27 Eli Zaretskii <eliz@gnu.org>
1735
1736 Avoid compilation errors in MinGW native builds
1737
1738 The error is triggered by including python-internal.h, and the
1739 error message is:
1740
1741 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
1742 from build-gnulib/import/math.h:27,
1743 from d:/usr/Python26/include/pyport.h:235,
1744 from d:/usr/Python26/include/Python.h:58,
1745 from python/python-internal.h:94,
1746 from python/py-arch.c:24:
1747 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
1748 using ::hypot;
1749 ^~~~~
1750
1751 This happens because Python headers define 'hypot' to expand t
1752 '_hypot' in the Windows builds.
1753 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
1754 'hypoth'. This avoids a compilation error.
1755
0bdd8eac
AH
17562018-01-26 Alan Hayward <alan.hayward@arm.com>
1757
1758 * MAINTAINERS (Write After Approval): Fix ordering.
1759
56ae9dc3
AH
17602018-01-26 Alan Hayward <alan.hayward@arm.com>
1761
1762 * MAINTAINERS (Write After Approval): Add Alan Hayward.
1763
7433498b
AM
17642018-01-26 Alan Modra <amodra@gmail.com>
1765
1766 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
1767 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
1768 Remove nop. Make const. Comment.
1769 (powerpc32_plt_stub_so_2): New.
1770 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
1771 Correct count. Update uses.
1772 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
1773 Move common code reading PLT entry word. Correct
1774 powerpc32_plt_stub PLT address calculation.
1775 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
1776 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
1777 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
1778 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
1779 (ppc64_standard_linkage8): Likewise.
1780 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
1781 Correct insns description.
1782 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
1783
0f59d5fc
PA
17842018-01-24 Pedro Alves <palves@redhat.com>
1785
1786 GCC PR libstdc++/83906
1787 * gdbtypes.c (operator==(const dynamic_prop &,
1788 const dynamic_prop &)): New.
1789 (operator==(const range_bounds &, const range_bounds &)): New.
1790 (check_types_equal): Use them instead of memcmp.
1791 * gdbtypes.h (operator==(const dynamic_prop &,
1792 const dynamic_prop &)): Declare.
1793 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
1794 (operator==(const range_bounds &, const range_bounds &)): Declare.
1795 (operator!=(const range_bounds &, const range_bounds &)): Declare.
1796
ef8914a4
PR
17972018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1798
1799 * s390-linux-tdep.c (s390_record_address_mask)
1800 (s390_record_calc_disp_common, s390_record_calc_disp)
1801 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
1802 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
1803 (s390_process_record): Move to s390-tdep.c.
1804 (s390_linux_init_abi_any): Adjust.
1805 * s390-tdep.c (s390_record_address_mask)
1806 (s390_record_calc_disp_common, s390_record_calc_disp)
1807 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
1808 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
1809 (s390_process_record): Moved from s390-linux-tdep.c
1810 (s390_gdbarch_init): Adjust.
1811
d6e58945
PR
18122018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1813
1814 * s390-linux-nat.c (s390-tdep.h): New include.
1815 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
1816 (HFILES_NO_SRCDIR): Add s390-tdep.h.
1817 (ALLDEPFILES): Add s390-tdep.c.
1818 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
1819 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
1820 * s390-tdep.h: ...this. New file.
1821 * s390-linux-tdep.c (s390-tdep.h): New include.
1822 (_initialize_s390_tdep): Rename to...
1823 (_initialize_s390_linux_tdep): ...this and adjust.
1824 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
1825 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
1826 s390-tdep.h.
1827 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
1828 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
1829 (s390_is_partial_instruction, s390_software_single_step)
1830 (is_non_branch_ril, s390_displaced_step_copy_insn)
1831 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
1832 (s390_prologue_data, s390_addr, s390_store, s390_load)
1833 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
1834 (s390_register_call_saved, s390_guess_tracepoint_registers)
1835 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
1836 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
1837 (s390_pseudo_register_name, s390_pseudo_register_type)
1838 (s390_pseudo_register_read, s390_pseudo_register_write)
1839 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
1840 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
1841 (s390_addr_bits_remove, s390_address_class_type_flags)
1842 (s390_address_class_type_flags_to_name)
1843 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
1844 (s390_function_arg_float, s390_function_arg_vector)
1845 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
1846 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
1847 (s390_frame_align, s390_register_return_value, s390_return_value)
1848 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
1849 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
1850 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
1851 (s390_trad_frame_prev_register, s390_unwind_cache)
1852 (s390_prologue_frame_unwind_cache)
1853 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
1854 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
1855 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
1856 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
1857 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
1858 (s390_frame_base_address, s390_local_base_address)
1859 (s390_frame_base, s390_gcc_target_options)
1860 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
1861 (s390_validate_reg_range, s390_tdesc_valid)
1862 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
1863 * s390-tdep.c: ...this. New file.
1864
9c0b896e
PR
18652018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1866
1867 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
1868 (s390_process_record, s390_gdbarch_tdep_alloc)
1869 (s390_linux_init_abi_any): Use/set new hook.
1870
7042632b
PR
18712018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1872
1873 * s390-linux-tdep.c (osabi.h): New include.
1874 (s390_linux_init_abi_31, s390_linux_init_abi_64)
1875 (s390_linux_init_abi_any): New functions.
1876 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
1877
650f5e13
PR
18782018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1879
1880 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
1881 tdesc_has_registers check
1882
47c9317e
PR
18832018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1884
1885 * s390-linux-tdep.c (s390_tdesc_valid): New function.
1886 (s390_validate_reg_range): New macro.
1887 (s390_gdbarch_init): Adjust.
1888
095085d8
PR
18892018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1890
1891 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
1892 (s390_gdbarch_tdep_alloc): Adjust.
1893 (s390_gdbarch_init): Adjust.
1894
ab9bcc67
PR
18952018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1896
1897 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
1898 <have_tdb>: Change type to bool.
1899 (s390_gdbarch_tdep_alloc): Adjust.
1900 (s390_gdbarch_init): Adjust.
1901
21f6f5ff
PR
19022018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1903
1904 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
1905 (gdbarch_tdep) <have_upper, have_vx>: New fields.
1906 (s390_gdbarch_tdep_alloc): New function.
1907 (s390_gdbarch_init): Allocate tdep at start and use its fields
1908 instead of separate variables.
1909
0eb97953
PR
19102018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1911
1912 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
1913 when looking for cached gdbarch and add comment for remaining.
1914
5c319bb2
PA
19152018-01-22 Pedro Alves <palves@redhat.com>
1916 Sergio Durigan Junior <sergiodj@redhat.com>
1917
1918 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
1919 case.
1920
d65ce302
MR
19212018-01-22 Maciej W. Rozycki <macro@mips.com>
1922
1923 * MAINTAINERS: Update my company e-mail address.
1924
ec7a5fcb
YQ
19252018-01-22 Yao Qi <yao.qi@linaro.org>
1926
1927 * regcache.c (cooked_write_test): New function.
1928 (_initialize_regcache): Register the test.
1929
11f57cb6
YQ
19302018-01-22 Yao Qi <yao.qi@linaro.org>
1931
1932 * ia64-tdep.c (ia64_pseudo_register_read): Call
1933 regcache->cooked_read instead of regcache_cooked_read_unsigned.
1934 * m32c-tdep.c (m32c_cat_read): Likewise.
1935 (m32c_r3r2r1r0_read): Likewise.
1936 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
1937 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
1938
03f50fc8
YQ
19392018-01-22 Yao Qi <yao.qi@linaro.org>
1940
1941 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
1942 method raw_read instead of regcache_raw_read.
1943 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
1944 * arm-tdep.c (arm_neon_quad_read): Likewise.
1945 * avr-tdep.c (avr_pseudo_register_read): Likewise.
1946 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
1947 * frv-tdep.c (frv_pseudo_register_read): Likewise.
1948 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
1949 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
1950 (i386_pseudo_register_read_into_value): Likewise.
1951 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
1952 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
1953 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
1954 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
1955 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
1956 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
1957 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
1958 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
1959 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
1960
dc711524
YQ
19612018-01-22 Yao Qi <yao.qi@linaro.org>
1962
1963 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
1964 * configure.tgt: Remove target mt.
1965 * mt-tdep.c: Remove.
1966 * regcache.c (cooked_read_test): Remove the check for mt.
1967
3f5a868b
YQ
19682018-01-22 Yao Qi <yao.qi@linaro.org>
1969
1970 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
1971 instead of gdbarch_pseudo_register_read_value.
1972
de4cb04a
JB
19732018-01-22 Joel Brobecker <brobecker@adacore.com>
1974
1975 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
1976 language is Ada.
1977
a9e40818
JB
19782018-01-22 Joel Brobecker <brobecker@adacore.com>
1979
1980 * linespec.c (create_sals_line_offset): Remove code that preserved
1981 the symtab_and_line's line number.
1982
e707fc44
AB
19832018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
1984
1985 * varobj.c (varobj_create): Don't set valid_block when creating a
1986 floating varobj.
1987
03d0bf7b
AB
19882018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
1989
1990 * varobj.c (varobj_create): Remove out of date comment.
1991
ae451627
AB
19922018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
1993
1994 PR mi/20395
1995 * ada-exp.y (write_var_from_sym): Pass extra parameter when
1996 updating innermost block.
1997 * parse.c (innermost_block_tracker::update): Take extra type
1998 parameter, and check types match before updating innermost block.
1999 (write_dollar_variable): Update innermost block for registers.
2000 * parser-defs.h (enum innermost_block_tracker_type): New enum.
2001 (innermost_block_tracker::innermost_block_tracker): Initialise
2002 m_types member.
2003 (innermost_block_tracker::reset): Take type parameter.
2004 (innermost_block_tracker::update): Take type parameter, and pass
2005 type through as needed.
2006 (innermost_block_tracker::m_types): New member.
2007 * varobj.c (varobj_create): Pass type when reseting innermost
2008 block.
2009
aee1fcdf
AB
20102018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
2011
2012 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
2013 * ada-lang.c (resolve_subexp): Likewise.
2014 * breakpoint.c (set_breakpoint_condition) Likewise.
2015 (watch_command_1) Likewise.
2016 * c-exp.y (variable): Likewise.
2017 * d-exp.y (PrimaryExpression): Likewise.
2018 * f-exp.y (variable): Likewise.
2019 * go-exp.y (variable): Likewise.
2020 * m2-exp.y (variable): Likewise.
2021 * objfiles.c (objfile::~objfile): Likewise.
2022 * p-exp.y (variable): Likewise.
2023 * parse.c (innermost_block): Change type.
2024 * parser-defs.h (class innermost_block_tracker): New.
2025 (innermost_block): Change to innermost_block_tracker.
2026 * printcmd.c (display_command): Switch to innermost_block API.
2027 (do_one_display): Likewise.
2028 * rust-exp.y (do_one_display): Likewise.
2029 * symfile.c (clear_symtab_users): Likewise.
2030 * varobj.c (varobj_create): Switch to innermost_block API, replace
2031 use of innermost_block with block stored on varobj object.
2032
396af9a1
AB
20332018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
2034
2035 * expression.h (innermost_block): Remove declaration.
2036 * varobj.c: Add 'parser-defs.h' include.
2037
fcfcc376
TT
20382018-01-19 Tom Tromey <tom@tromey.com>
2039
2040 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
2041 symbols in the static and global blocks.
2042
5a6c3296
JC
20432018-01-19 James Clarke <jrtc27@jrtc27.com>
2044
2045 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
2046 gdb_ptrace.h, and move including gdb_wait.h ...
2047 * nat/linux-ptrace.h: ... to here.
2048
bc09b0c1
SM
20492018-01-19 Simon Marchi <simon.marchi@ericsson.com>
2050
2051 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
2052 inf_ptrace_detach_success.
2053 (inf_ptrace_detach_success): Add inferior parameter, use it
2054 instead of inferior_ptid, pass it to detach_inferior.
2055 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
2056 parameter.
2057 * inferior.c (detach_inferior): Add overload that takes an
2058 inferior object.
2059 * inferior.h (detach_inferior): Likewise.
2060 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
2061 use inferior_ptid, adjust call to inf_ptrace_detach_success.
2062 * linux-thread-db.c (thread_db_detach): Use inf parameter.
2063
6e1e1966
SM
20642018-01-19 Simon Marchi <simon.marchi@ericsson.com>
2065
2066 * target.h (struct target_ops) <to_detach>: Add inferior
2067 parameter.
2068 (target_detach): Likewise.
2069 * target.c (dispose_inferior): Pass inferior down.
2070 (target_detach): Pass inferior down. Assert that it is equal to
2071 the current inferior.
2072 * aix-thread.c (aix_thread_detach): Pass inferior down.
2073 * corefile.c (core_file_command): Pass current_inferior() down.
2074 * corelow.c (core_detach): Add inferior parameter.
2075 * darwin-nat.c (darwin_detach): Likewise.
2076 * gnu-nat.c (gnu_detach): Likewise.
2077 * inf-ptrace.c (inf_ptrace_detach): Likewise.
2078 * infcmd.c (detach_command): Pass current_inferior() down to
2079 target_detach.
2080 * infrun.c (follow_fork_inferior): Pass parent_inf to
2081 target_detach.
2082 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
2083 target_detach.
2084 * linux-nat.c (linux_nat_detach): Add inferior parameter.
2085 * linux-thread-db.c (thread_db_detach): Likewise.
2086 * nto-procfs.c (procfs_detach): Likewise.
2087 * procfs.c (procfs_detach): Likewise.
2088 * record.c (record_detach): Likewise.
2089 * record.h (struct inferior): Forward-declare.
2090 (record_detach): Add inferior parameter.
2091 * remote-sim.c (gdbsim_detach): Likewise.
2092 * remote.c (remote_detach_1): Likewise.
2093 (remote_detach): Likewise.
2094 (extended_remote_detach): Likewise.
2095 * sol-thread.c (sol_thread_detach): Likewise.
2096 * target-debug.h (target_debug_print_inferior_p): New macro.
2097 * target-delegates.c: Re-generate.
2098 * top.c (kill_or_detach): Pass inferior down to target_detach.
2099 * windows-nat.c (windows_detach): Add inferior parameter.
2100
6bd6f3b6
SM
21012018-01-19 Simon Marchi <simon.marchi@ericsson.com>
2102
2103 * target.h (struct target_ops) <to_detach>: Remove args
2104 parameter.
2105 (target_detach): Likewise.
2106 * target.c (dispose_inferior): Adjust.
2107 (target_detach): Remove args parameter, adjust.
2108 * aix-thread.c (aix_thread_detach): Adjust.
2109 * corefile.c (core_file_command): Adjust.
2110 * corelow.c (core_detach): Adjust.
2111 * darwin-nat.c (darwin_detach): Adjust.
2112 * gnu-nat.c (gnu_detach): Adjust.
2113 * inf-ptrace.c (inf_ptrace_detach): Adjust.
2114 * infcmd.c (detach_command): Adjust
2115 * infrun.c (follow_fork_inferior): Adjust.
2116 (handle_vfork_child_exec_or_exit): Adjust.
2117 * linux-fork.c (linux_fork_detach): Remove args parameter.
2118 * linux-fork.h (linux_fork_detach): Likewise.
2119 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
2120 * linux-thread-db.c (thread_db_detach): Likewise.
2121 * nto-procfs.c (procfs_detach): Likewise.
2122 * procfs.c (procfs_detach): Likewise.
2123 (do_detach): Remove signo parameter.
2124 * record.c (record_detach): Remove args parameter.
2125 * record.h (record_detach): Likewise.
2126 * remote-sim.c (gdbsim_detach): Likewise.
2127 * remote.c (remote_detach_1): Likewise.
2128 (remote_detach): Likewise.
2129 (extended_remote_detach): Likewise.
2130 * sol-thread.c (sol_thread_detach): Likewise.
2131 * target-delegates.c: Re-generate.
2132 * top.c (struct qt_args) <args>: Remove field.
2133 (kill_or_detach): Don't pass args.
2134 (quit_force): Don't set args.
2135 * windows-nat.c (windows_detach): Remove args parameter.
2136
88af8ea8
YQ
21372018-01-19 Yao Qi <yao.qi@linaro.org>
2138
2139 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
2140 (arm_linux_init_abi): Install it.
2141
dea445b9
YQ
21422018-01-19 Yao Qi <yao.qi@linaro.org>
2143
2144 * osabi.c (gdb_osabi_names): Extend the regexp for
2145 arm-linux-gnueabihf.
2146
4a17f768
YQ
21472018-01-18 Yao Qi <yao.qi@linaro.org>
2148
2149 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
2150 m_abbrevs.
2151 (abbrev_table::add_abbrev): Update.
2152 (abbrev_table::lookup_abbrev): Update.
2153
d679c21a
YQ
21542018-01-18 Yao Qi <yao.qi@linaro.org>
2155
2156 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
2157
7d937cad
SDJ
21582018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
2159
2160 * compile/compile.c (compile_to_object): Convert "triplet_rx"
2161 to "std::string".
2162
9e14690d
TT
21632018-01-17 Tom Tromey <tom@tromey.com>
2164
2165 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
2166
50a82047
TT
21672018-01-17 Tom Tromey <tom@tromey.com>
2168
2169 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
2170 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
2171 (create_array_type_with_stride): Update.
2172 * dwarf2read.c (set_die_type): Update.
2173
c89b44cd
TT
21742018-01-17 Tom Tromey <tom@tromey.com>
2175
2176 * dwarf2read.c (delayed_method_info): Remove typedef.
2177 (dwarf2_cu::method_info): Now a std::vector.
2178 (add_to_method_list): Update.
2179 (free_delayed_list): Remove.
2180 (compute_delayed_physnames): Update.
2181 (process_full_comp_unit, process_full_type_unit): Clear the method
2182 list. Remove cleanups.
2183 (psymtab_include_file_name): Add name_holder parameter. Use
2184 unique_xmalloc_ptr.
2185 (dwarf_decode_lines): Update.
2186
fcd3b13d
SM
21872018-01-17 Tom Tromey <tom@tromey.com>
2188 Simon Marchi <simon.marchi@ericsson.com>
2189
2190 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
2191 (dwarf2_per_objfile::free_cached_comp_units)
2192 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
2193 (init_cutu_and_read_dies_no_follow): Update.
2194 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
2195 (dwarf2_cu::~dwarf2_cu): New.
2196 (free_heap_comp_unit, free_stack_comp_unit): Remove.
2197 (age_cached_comp_units, free_one_cached_comp_unit): Update.
2198
685af9cd
TT
21992018-01-17 Tom Tromey <tom@tromey.com>
2200 Simon Marchi <simon.marchi@ericsson.com>
2201
2202 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
2203 (struct die_reader_specs) <abbrev_table>: New member.
2204 (struct abbrev_table): Add constructor.
2205 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
2206 <abbrev_obstack>: Now an auto_obstack.
2207 (abbrev_table_up): New typedef.
2208 (init_cu_die_reader): Add abbrev_table parameter.
2209 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
2210 Add result_dwo_abbrev_table.
2211 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
2212 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
2213 Update.
2214 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
2215 parameter.
2216 (skip_children): Update.
2217 (abbrev_table::alloc_abbrev): Rename from
2218 abbrev_table_alloc_abbrev.
2219 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
2220 (abbrev_table::lookup_abbrev): Rename from
2221 abbrev_table_lookup_abbrev.
2222 (abbrev_table_read_table): Return abbrev_table_up.
2223 (abbrev_table_free, abbrev_table_free_cleanup)
2224 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
2225 (load_partial_dies): Update.
2226
5e2db402
TT
22272018-01-17 Tom Tromey <tom@tromey.com>
2228
2229 * dwarf2read.c (dwarf2_compute_name): Update comment.
2230 (read_func_scope, read_variable): Update.
2231 (new_symbol): Remove.
2232 (new_symbol_full): Rename to new_symbol.
2233
ee7f689e 22342018-01-17 Mike Gulick <mgulick@mathworks.com>
41667530
MG
2235
2236 PR gdb/16577
2237 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
2238 a warning instead of throwing an error, set section size to 0 and return
2239 NULL.
2240 * gdb_bfd.h (gdb_bfd_map_section): Update description.
2241
4d9b86e1
SM
22422018-01-17 Simon Marchi <simon.marchi@ericsson.com>
2243
2244 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
2245 std::string.
2246 (linux_ptrace_attach_fail_reason_string): Likewise.
2247 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
2248 Likewise.
2249 (linux_ptrace_attach_fail_reason_string): Likewise.
2250 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
2251
a7b2d0fb
SM
22522018-01-17 Simon Marchi <simon.marchi@ericsson.com>
2253
2254 * linux-nat.c (linux_nat_attach): Remove xstrdup.
2255
f517c180
EA
22562018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
2257
2258 PR gdb/21559
2259 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
2260 checking for fs_base/gs_base fields in struct user_regs_struct.
2261 * configure: Regenerate.
2262
7045b1ca
YQ
22632018-01-17 Yao Qi <yao.qi@linaro.org>
2264
2265 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
2266 function.
2267 (aarch64_linux_init_abi): Install it to gdbarch hook
2268 gcc_target_options.
2269
db422fb2
PA
22702018-01-15 Pedro Alves <palves@redhat.com>
2271
2272 * common/signals-state-save-restore.c
2273 (save_original_signals_state): Fix typos.
2274
ba643918
SDJ
22752017-01-12 Tom Tromey <tom@tromey.com>
2276 Sergio Durigan Junior <sergiodj@redhat.com>
2277
2278 * Makefile.in (install-only): Install gdb-add-index.
2279
906b4aac
JB
22802018-01-12 John Baldwin <jhb@FreeBSD.org>
2281
2282 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
2283
bdf2a94a
AA
22842018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2285
2286 * infrun.c (keep_going_pass_signal): Clear step-over info when
2287 insert_breakpoints fails.
2288
71d378ae
PA
22892018-01-11 Pedro Alves <palves@redhat.com>
2290
2291 PR gdb/22583
2292 * infrun.c (resume): Rename to ...
2293 (resume_1): ... this.
2294 (resume): Reimplement as wrapper around resume_1.
2295
3cada740
PA
22962018-01-11 Pedro Alves <palves@redhat.com>
2297
2298 PR remote/22597
2299 * remote.c (remote_parse_stop_reply): Default to the last-set
2300 general thread instead of to 'magic_null_ptid'.
2301
618daa93
PA
23022018-01-10 Pedro Alves <palves@redhat.com>
2303
2304 * language.h (language_get_symbol_name_matcher): Rename ...
2305 (get_symbol_name_matcher): ... this.
2306 * language.c (language_get_symbol_name_matcher): Ditto.
2307 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
2308 callers adjusted.
2309
c63d3e8d
PA
23102018-01-10 Pedro Alves <palves@redhat.com>
2311
2312 PR gdb/22670
2313 * dwarf2read.c
2314 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
2315 Adjust to use language_get_symbol_name_matcher instead of
2316 language_defn::la_get_symbol_name_matcher.
2317 * language.c (language_get_symbol_name_matcher): If in Ada mode
2318 and the lookup name is a verbatim match, return Ada's matcher.
2319 * language.h (language_get_symbol_name_matcher): Adjust comment.
2320 (ada_lookup_name_info::verbatim_p):: New method.
2321
d4c2a405
PA
23222018-01-10 Pedro Alves <palves@redhat.com>
2323
2324 PR gdb/22670
2325 * ada-lang.c (ada_collect_symbol_completion_matches): If the
2326 minsym's language is language_auto or language_cplus, pass down
2327 language_ada instead.
2328 * symtab.c (compare_symbol_name): Don't frob symbol language here.
2329
8825213e
PA
23302018-01-10 Pedro Alves <palves@redhat.com>
2331
2332 PR gdb/22670
2333 * minsyms.c (linkage_name_str): New function.
2334 (iterate_over_minimal_symbols): Use it.
2335
2d97a5d9
JB
23362018-01-09 John Baldwin <jhb@FreeBSD.org>
2337
2338 * NEWS: Document that 'info proc' now works on FreeBSD.
2339
92fce24d
JB
23402018-01-09 John Baldwin <jhb@FreeBSD.org>
2341
2342 * configure.ac: Check for kinfo_getfile in libutil.
2343 * configure: Regenerate.
2344 * config.in: Regenerate.
2345 * fbsd-nat.c: Include "fbsd-tdep.h".
2346 (fbsd_fetch_cmdline): New.
2347 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
2348 rather than calling error.
2349 (fbsd_info_proc): New.
2350 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
2351 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
2352 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
2353
262f62f5
JB
23542018-01-09 John Baldwin <jhb@FreeBSD.org>
2355
2356 * fbsd-nat.c (struct free_deleter): Remove.
2357 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
2358
b999e203
JB
23592018-01-09 John Baldwin <jhb@FreeBSD.org>
2360
2361 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
2362 NULL for an empty pathname.
2363
d2176225
JB
23642018-01-09 John Baldwin <jhb@FreeBSD.org>
2365
2366 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
2367 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
2368 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
2369 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
2370 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
2371 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
2372 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
2373 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
2374 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
2375 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
2376 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
2377 (fbsd_core_fetch_timeval, fbsd_print_sigset)
2378 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
2379 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
2380 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
2381
9c4ac400
ST
23822018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
2383
2384 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
2385 (gnu_xfer_auxv): New function.
2386 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
2387 TARGET_OBJECT_AUXV.
2388
1e5ded6c
YQ
23892018-01-08 Yao Qi <yao.qi@linaro.org>
2390 Simon Marchi <simon.marchi@ericsson.com>
2391
2392 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
2393 common/selftest.c.
2394 (COMMON_OBS): Remove selftest.o.
2395 * configure.ac: Append selftest-arch.c and common/selftest.c to
2396 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
2397 * configure: Re-generated.
2398 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
2399 GDB_SELF_TEST.
2400 (maintenance_info_selftests): Likewise.
2401
04bafb1e
XR
24022018-01-08 Xavier Roirand <roirand@adacore.com>
2403
2404 * ada-valprint.c (val_print_packed_array_elements): Use
2405 proper number of elements when printing an array indexed
2406 by an enumeration type.
2407
518817b3
SM
24082018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
2409
2410 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
2411 (dw2_get_file_names_reader): Adjust.
2412 (lookup_dwo_signatured_type): Adjust.
2413 (lookup_dwp_signatured_type): Adjust.
2414 (lookup_signatured_type): Adjust.
2415 (create_type_unit_group): Adjust.
2416 (get_type_unit_group): Adjust.
2417 (process_psymtab_comp_unit_reader): Adjust.
2418 (build_type_psymtabs_reader): Adjust.
2419 (scan_partial_symbols): Adjust.
2420 (add_partial_symbol): Adjust.
2421 (add_partial_subprogram): Adjust.
2422 (peek_die_abbrev): Adjust.
2423 (fixup_go_packaging): Adjust.
2424 (process_imported_unit_die): Adjust.
2425 (dwarf2_compute_name): Adjust.
2426 (dwarf2_physname): Adjust.
2427 (read_import_statement): Adjust.
2428 (handle_DW_AT_stmt_list): Adjust.
2429 (read_file_scope): Adjust.
2430 (read_func_scope): Adjust.
2431 (read_lexical_block_scope): Adjust.
2432 (read_call_site_scope): Adjust.
2433 (read_variable): Adjust.
2434 (dwarf2_rnglists_process): Adjust.
2435 (dwarf2_ranges_process): Adjust.
2436 (dwarf2_ranges_read): Adjust.
2437 (dwarf2_get_pc_bounds): Adjust.
2438 (dwarf2_record_block_ranges): Adjust.
2439 (dwarf2_add_field): Adjust.
2440 (dwarf2_add_member_fn): Adjust.
2441 (read_structure_type): Adjust.
2442 (process_structure_scope): Adjust.
2443 (read_enumeration_type): Adjust.
2444 (read_array_type): Adjust.
2445 (mark_common_block_symbol_computed): Adjust.
2446 (read_common_block): Adjust.
2447 (read_namespace_type): Adjust.
2448 (read_namespace): Adjust.
2449 (read_module_type): Adjust.
2450 (read_tag_pointer_type): Adjust.
2451 (read_tag_ptr_to_member_type): Adjust.
2452 (read_tag_string_type): Adjust.
2453 (read_subroutine_type): Adjust.
2454 (read_typedef): Adjust.
2455 (read_base_type): Adjust.
2456 (attr_to_dynamic_prop): Adjust.
2457 (read_subrange_type): Adjust.
2458 (read_unspecified_type): Adjust.
2459 (dwarf2_read_abbrevs): Adjust.
2460 (load_partial_dies): Adjust.
2461 (read_partial_die): Adjust.
2462 (find_partial_die): Adjust.
2463 (guess_partial_die_structure_name): Adjust.
2464 (fixup_partial_die): Adjust.
2465 (read_attribute_value): Adjust.
2466 (read_addr_index): Adjust.
2467 (read_addr_index_from_leb128): Adjust.
2468 (read_str_index): Adjust.
2469 (dwarf2_string_attr): Adjust.
2470 (get_debug_line_section): Adjust.
2471 (dwarf_decode_line_header): Adjust.
2472 (lnp_state_machine::check_line_address): Adjust.
2473 (dwarf_decode_lines_1): Adjust.
2474 (dwarf_decode_lines): Adjust.
2475 (dwarf2_start_symtab): Adjust.
2476 (var_decode_location): Adjust.
2477 (new_symbol_full): Adjust.
2478 (dwarf2_const_value_data): Adjust.
2479 (dwarf2_const_value_attr): Adjust.
2480 (dwarf2_const_value): Adjust.
2481 (die_type): Adjust.
2482 (die_containing_type): Adjust.
2483 (build_error_marker_type): Adjust.
2484 (lookup_die_type): Adjust.
2485 (guess_full_die_structure_name): Adjust.
2486 (anonymous_struct_prefix): Adjust.
2487 (determine_prefix): Adjust.
2488 (dwarf2_name): Adjust.
2489 (follow_die_ref_or_sig): Adjust.
2490 (follow_die_offset): Adjust.
2491 (follow_die_ref): Adjust.
2492 (follow_die_sig_1): Adjust.
2493 (follow_die_sig): Adjust.
2494 (get_signatured_type): Adjust.
2495 (get_DW_AT_signature_type): Adjust.
2496 (decode_locdesc): Adjust.
2497 (dwarf_decode_macros): Adjust.
2498 (cu_debug_loc_section): Adjust.
2499 (fill_in_loclist_baton): Adjust.
2500 (dwarf2_symbol_mark_computed): Adjust.
2501 (init_one_comp_unit): Don't assign
2502 dwarf2_cu::dwarf2_per_objfile.
2503 (set_die_type): Adjust.
2504
ed2dc618
SM
25052018-01-07 Simon Marchi <simon.marchi@ericsson.com>
2506
2507 * dwarf2read.c (struct mapped_debug_names): Add constructor.
2508 <dwarf2_per_objfile>: New field.
2509 (dwarf2_per_objfile): Remove global.
2510 (get_dwarf2_per_objfile): New function.
2511 (set_dwarf2_per_objfile): New function.
2512 (dwarf2_build_psymtabs_hard): Change objfile parameter to
2513 dwarf2_per_objfile.
2514 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
2515 (read_abbrev_offset): Likewise.
2516 (read_indirect_string): Likewise.
2517 (read_indirect_line_string): Likewise.
2518 (read_indirect_string_at_offset): Likewise.
2519 (read_indirect_string_from_dwz): Likewise.
2520 (dwarf2_find_containing_comp_unit): Change objfile parameter to
2521 dwarf2_per_objfile.
2522 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
2523 (create_all_comp_units): Change objfile parameter to
2524 dwarf2_per_objfile.
2525 (create_all_type_units): Likewise.
2526 (process_queue): Add dwarf2_per_objfile parameter.
2527 (read_and_check_comp_unit_head): Likewise.
2528 (lookup_dwo_unit_in_dwp): Likewise.
2529 (get_dwp_file): Likewise.
2530 (process_cu_includes): Likewise.
2531 (struct free_dwo_file_cleanup_data): New struct.
2532 (dwarf2_has_info): Use get_dwarf2_per_objfile and
2533 set_dwarf2_per_objfile.
2534 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
2535 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
2536 context, adjust calls.
2537 (dw2_instantiate_symtab): Likewise.
2538 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
2539 (dw2_get_cu): Likewise.
2540 (create_cu_from_index_list): Change objfile parameter to
2541 dwarf2_per_objfile.
2542 (create_cus_from_index_list): Get dwarf2_per_objfile from
2543 context, adjust calls.
2544 (create_cus_from_index): Likewise.
2545 (create_signatured_type_table_from_index): Change objfile
2546 parameter to dwarf2_per_objfile.
2547 (create_signatured_type_table_from_debug_names): Change objfile
2548 parameter to dwarf2_per_objfile.
2549 (create_addrmap_from_index): Likewise.
2550 (create_addrmap_from_aranges): Likewise.
2551 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
2552 (dw2_setup): Remove.
2553 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
2554 context.
2555 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
2556 get_dwarf2_per_objfile.
2557 (dw2_forget_cached_source_info): Likewise.
2558 (dw2_map_symtabs_matching_filename): Likewise.
2559 (struct dw2_symtab_iterator) <index>: Remove.
2560 <dwarf2_per_objfile>: New field.
2561 (dw2_symtab_iter_init): Replace index parameter with
2562 dwarf2_per_objfile.
2563 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
2564 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
2565 (dw2_print_stats): Likewise.
2566 (dw2_dump): Likewise.
2567 (dw2_expand_symtabs_for_function): Likewise.
2568 (dw2_expand_all_symtabs): Likewise.
2569 (dw2_expand_symtabs_with_fullname): Likewise.
2570 (dw2_expand_marked_cus): Replace index and objfile parameters
2571 with dwarf2_per_objfile.
2572 (dw_expand_symtabs_matching_file_matcher): Add
2573 dwarf2_per_objfile parameter and adjust calls.
2574 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
2575 adjust calls.
2576 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
2577 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
2578 adjust calls.
2579 (create_cus_from_debug_names_list): Replace objfile parameter
2580 with dwarf2_per_objfile and adjust calls.
2581 (create_cus_from_debug_names): Likewise.
2582 (dwarf2_read_debug_names): Likewise.
2583 (mapped_debug_names::namei_to_name): Adjust call.
2584 (dw2_debug_names_iterator::next): Likewise.
2585 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
2586 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
2587 (dw2_debug_names_dump): Likewise.
2588 (dw2_debug_names_expand_symtabs_for_function): Likewise.
2589 (dw2_debug_names_expand_symtabs_matching): Likewise.
2590 (dwarf2_initialize_objfile): Likewise.
2591 (dwarf2_build_psymtabs): Likewise.
2592 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
2593 this_cu.
2594 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
2595 (read_and_check_comp_unit_head): Likewise.
2596 (read_abbrev_offset): Likewise.
2597 (create_debug_type_hash_table): Likewise.
2598 (create_debug_types_hash_table): Likewise.
2599 (create_all_type_units): Replace objfile parameter with
2600 dwarf2_per_objfile.
2601 (add_type_unit): Add dwarf2_per_objfile parameter.
2602 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
2603 with dwarf2_per_objfile.
2604 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
2605 (lookup_dwp_signatured_type): Likewise.
2606 (lookup_signatured_type): Likewise.
2607 (read_cutu_die_from_dwo): Likewise.
2608 (init_tu_and_read_dwo_dies): Likewise.
2609 (init_cutu_and_read_dies): Likewise.
2610 (init_cutu_and_read_dies_no_follow): Likewise.
2611 (allocate_type_unit_groups_table): Add objfile parameter.
2612 (create_type_unit_group): Use dwarf2_per_objfile from cu.
2613 (get_type_unit_group): Likewise.
2614 (process_psymtab_comp_unit): Update call.
2615 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
2616 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
2617 (print_tu_stats): Likewise.
2618 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
2619 in void* parameter.
2620 (build_type_psymtabs): Change objfile parameter to
2621 dwarf2_per_objfile.
2622 (process_skeletonless_type_unit): Use dwarf2_per_objfile
2623 passed in void* parameter.
2624 (process_skeletonless_type_units): Change objfile parameter to
2625 dwarf2_per_objfile.
2626 (set_partial_user): Likewise.
2627 (dwarf2_build_psymtabs_hard): Likewise.
2628 (read_comp_units_from_section): Likewise.
2629 (create_all_comp_units): Likewise.
2630 (scan_partial_symbols): Update calls.
2631 (add_partial_symbol): Likewise.
2632 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
2633 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
2634 (process_queue): Add dwarf2_per_objfile parameter.
2635 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
2636 (compute_compunit_symtab_includes): Likewise.
2637 (process_cu_includes): Add dwarf2_per_objfile parameter.
2638 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
2639 (process_full_type_unit): Likewise.
2640 (process_imported_unit_die): Update call.
2641 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
2642 (read_file_scope): Likewise.
2643 (allocate_dwo_file_hash_table): Add objfile parameter.
2644 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
2645 (create_cus_hash_table): Likewise.
2646 (create_dwp_hash_table): Likewise.
2647 (create_dwo_unit_in_dwp_v1): Likewise.
2648 (create_dwp_v2_section): Likewise.
2649 (create_dwo_unit_in_dwp_v2): Likewise.
2650 (lookup_dwo_unit_in_dwp): Likewise.
2651 (try_open_dwop_file): Likewise.
2652 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
2653 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
2654 cleanup to include a reference to dwarf2_per_objfile.
2655 (open_dwp_file): Add dwarf2_per_objfile parameter.
2656 (open_and_init_dwp_file): Likewise.
2657 (get_dwp_file): Likewise.
2658 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
2659 (queue_and_load_all_dwo_tus): Update call.
2660 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
2661 data.
2662 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
2663 (dwarf2_ranges_process): Likewise.
2664 (dwarf2_get_pc_bounds): Likewise.
2665 (mark_common_block_symbol_computed): Likewise.
2666 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
2667 (dwarf2_read_abbrevs): Update call.
2668 (read_partial_die): Use dwarf2_per_objfile from cu.
2669 (find_partial_die): Likewise.
2670 (fixup_partial_die): Likewise.
2671 (read_attribute_value): Likewise.
2672 (read_indirect_string_at_offset_from): Add objfile parameter.
2673 (read_indirect_string_at_offset): Add dwarf2_per_objfile
2674 parameter.
2675 (read_indirect_string_from_dwz): Add objfile parameter.
2676 (read_indirect_string): Add objfile parameter.
2677 (read_addr_index_1): Add dwarf2_per_objfile parameter.
2678 (read_addr_index): Use dwarf2_per_objfile from cu.
2679 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
2680 call dw2_setup.
2681 (read_str_index): Use dwarf2_per_objfile from cu.
2682 (get_debug_line_section): Likewise.
2683 (read_formatted_entries): Add dwarf2_per_objfile parameter.
2684 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
2685 (new_symbol_full): Use dwarf2_per_objfile from cu.
2686 (build_error_marker_type): Likewise.
2687 (lookup_die_type): Likewise.
2688 (determine_prefix): Likewise.
2689 (follow_die_offset): Likewise.
2690 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
2691 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
2692 (dwarf2_fetch_die_type_sect_off): Likewise.
2693 (dwarf2_get_die_type): Likewise.
2694 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
2695 (get_signatured_type): Likewise.
2696 (get_DW_AT_signature_type): Likewise.
2697 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
2698 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
2699 (cu_debug_loc_section): Likewise.
2700 (fill_in_loclist_baton): Likewise.
2701 (dwarf2_symbol_mark_computed): Likewise.
2702 (dwarf2_find_containing_comp_unit): Change objfile parameter to
2703 dwarf2_per_objfile.
2704 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
2705 parameter.
2706 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
2707 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
2708 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
2709 (set_die_type): Use dwarf2_free_objfile from cu.
2710 (get_die_type_at_offset): Likewise.
2711 (dwarf2_per_objfile_free): Don't assign global variable.
2712 (debug_names) <constructor>: Add dwarf2_per_objfile
2713 parameter, update m_debugstrlookup construction.
2714 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
2715 parameter.
2716 <m_dwarf2_per_objfile>: New field.
2717 <lookup>: Use m_dwarf2_per_objfile.
2718 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
2719 (psyms_seen_size): Likewise.
2720 (write_gdbindex): Replace objfile parameter with
2721 dwarf2_per_objfile.
2722 (write_debug_names): Likewise.
2723 (write_psymtabs_to_index): Likewise.
2724 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
2725 calls.
2726
e3b94546
SM
27272018-01-07 Simon Marchi <simon.marchi@ericsson.com>
2728
2729 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
2730 <dwarf2_per_objfile>: New field.
2731 (struct dwarf2_per_cu_data) <objfile>: Remove.
2732 <dwarf2_per_objfile>: New field.
2733 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
2734 of objfile.
2735 (create_signatured_type_table_from_index): Likewise.
2736 (create_debug_type_hash_table): Likewise.
2737 (fill_in_sig_entry_from_dwo_entry): Likewise.
2738 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
2739 (create_type_unit_group): Assign dwarf2_per_objfile instead of
2740 objfile.
2741 (create_partial_symtab): Access objfile through
2742 dwarf2_per_objfile.
2743 (process_psymtab_comp_unit_reader): Likewise.
2744 (read_comp_units_from_section): Likewise.
2745 (scan_partial_symbols): Likewise.
2746 (add_partial_symbol): Likewise.
2747 (add_partial_subprogram): Likewise.
2748 (peek_die_abbrev): Likewise.
2749 (fixup_go_packaging): Likewise.
2750 (process_full_comp_unit): Likewise.
2751 (process_full_type_unit): Likewise.
2752 (process_imported_unit_die): Likewise.
2753 (dwarf2_compute_name): Likewise.
2754 (dwarf2_physname): Likewise.
2755 (read_import_statement): Likewise.
2756 (create_cus_hash_table): Assign dwarf2_physname instead of
2757 objfile.
2758 (read_func_scope): Access objfile through dwarf2_per_objfile.
2759 (read_lexical_block_scope): Likewise.
2760 (read_call_site_scope): Likewise.
2761 (read_variable): Likewise.
2762 (dwarf2_rnglists_process): Likewise.
2763 (dwarf2_ranges_process): Likewise.
2764 (dwarf2_ranges_read): Likewise.
2765 (dwarf2_record_block_ranges): Likewise.
2766 (dwarf2_add_field): Likewise.
2767 (dwarf2_add_member_fn): Likewise.
2768 (read_structure_type): Likewise.
2769 (process_structure_scope): Likewise.
2770 (read_enumeration_type): Likewise.
2771 (read_array_type): Likewise.
2772 (read_common_block): Likewise.
2773 (read_namespace_type): Likewise.
2774 (read_namespace): Likewise.
2775 (read_module_type): Likewise.
2776 (read_tag_pointer_type): Likewise.
2777 (read_tag_ptr_to_member_type): Likewise.
2778 (read_tag_string_type): Likewise.
2779 (read_subroutine_type): Likewise.
2780 (read_typedef): Likewise.
2781 (read_base_type): Likewise.
2782 (attr_to_dynamic_prop): Likewise.
2783 (read_subrange_type): Likewise.
2784 (read_unspecified_type): Likewise.
2785 (load_partial_dies): Likewise.
2786 (read_partial_die): Likewise.
2787 (find_partial_die): Likewise.
2788 (guess_partial_die_structure_name): Likewise.
2789 (fixup_partial_die): Likewise.
2790 (read_attribute_value): Likewise.
2791 (read_addr_index_from_leb128): Likewise.
2792 (dwarf2_read_addr_index): Likewise.
2793 (dwarf2_string_attr): Likewise.
2794 (lnp_state_machine::check_line_address): Likewise.
2795 (dwarf_decode_lines_1): Likewise.
2796 (dwarf_decode_lines): Likewise.
2797 (dwarf2_start_symtab): Likewise.
2798 (var_decode_location): Likewise.
2799 (new_symbol_full): Likewise.
2800 (dwarf2_const_value_data): Likewise.
2801 (dwarf2_const_value_attr): Likewise.
2802 (dwarf2_const_value): Likewise.
2803 (die_type): Likewise.
2804 (die_containing_type): Likewise.
2805 (lookup_die_type): Likewise.
2806 (guess_full_die_structure_name): Likewise.
2807 (anonymous_struct_prefix): Likewise.
2808 (dwarf2_name): Likewise.
2809 (follow_die_ref_or_sig): Likewise.
2810 (follow_die_offset): Likewise.
2811 (follow_die_ref): Likewise.
2812 (dwarf2_fetch_die_loc_sect_off): Likewise.
2813 (dwarf2_fetch_constant_bytes): Likewise.
2814 (dwarf2_fetch_die_type_sect_off): Likewise.
2815 (dwarf2_get_die_type): Likewise.
2816 (follow_die_sig): Likewise.
2817 (decode_locdesc): Likewise.
2818 (dwarf2_per_cu_objfile): Likewise.
2819 (dwarf2_per_cu_text_offset): Likewise.
2820 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
2821 objfile.
2822 (set_die_type): Access objfile through
2823 dwarf2_per_objfile.
2824
b01ba14d
SM
28252018-01-07 Simon Marchi <simon.marchi@ericsson.com>
2826
2827 * valprint.c (converted_character_d): Remove typedef.
2828 (DEF_VEC_O (converted_character_d)): Remove.
2829 (count_next_character): Use std::vector.
2830 (print_converted_chars_to_obstack): Likewise.
2831 (generic_printstr): Likewise.
2832
4d0fdd9b
SM
28332018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
2834
2835 * xml-support.h (struct gdb_xml_value): Add constructor.
2836 <value>: Change type to unique_xmalloc_ptr.
2837 (gdb_xml_value_s): Remove typedef.
2838 (DEF_VEC_O (gdb_xml_value_s)): Remove.
2839 (gdb_xml_element_start_handler): Change parameter type to
2840 std::vector.
2841 (xml_find_attribute): Likewise.
2842 * xml-support.c (xml_find_attribute): Change parameter type to
2843 std::vector and adjust.
2844 (gdb_xml_values_cleanup): Remove.
2845 (gdb_xml_parser::start_element): Adjust to std::vector.
2846 (xinclude_start_include): Change paraeter type to std::vector
2847 and adjust.
2848 * btrace.c (check_xml_btrace_version): Likewise.
2849 (parse_xml_btrace_block): Likewise.
2850 (parse_xml_btrace_pt_config_cpu): Likewise.
2851 (parse_xml_btrace_pt): Likewise.
2852 (parse_xml_btrace_conf_bts): Likewise.
2853 (parse_xml_btrace_conf_pt): Likewise.
2854 * memory-map.c (memory_map_start_memory): Likewise.
2855 (memory_map_start_property): Likewise.
2856 * osdata.c (osdata_start_osdata): Likewise.
2857 (osdata_start_item): Likewise.
2858 (osdata_start_column): Likewise.
2859 * remote.c (start_thread): Likewise.
2860 * solib-aix.c (library_list_start_library): Likewise.
2861 (library_list_start_list): Likewise.
2862 * solib-svr4.c (library_list_start_library): Likewise.
2863 (svr4_library_list_start_list): Likewise.
2864 * solib-target.c (library_list_start_segment): Likewise.
2865 (library_list_start_section): Likewise.
2866 (library_list_start_library): Likewise.
2867 (library_list_start_list): Likewise.
2868 * tracepoint.c (traceframe_info_start_memory): Likewise.
2869 (traceframe_info_start_tvar): Likewise.
2870 * xml-syscall.c (syscall_start_syscall): Likewise.
2871 * xml-tdesc.c (tdesc_start_target): Likewise.
2872 (tdesc_start_feature): Likewise.
2873 (tdesc_start_reg): Likewise.
2874 (tdesc_start_union): Likewise.
2875 (tdesc_start_struct): Likewise.
2876 (tdesc_start_flags): Likewise.
2877 (tdesc_start_enum): Likewise.
2878 (tdesc_start_field): Likewise.
2879 (tdesc_start_enum_value): Likewise.
2880 (tdesc_start_vector): Likewise.
2881
f979c73f
SM
28822018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
2883
2884 * extension.h (struct xmethod_worker) <clone>: Remove.
2885 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
2886 Remove.
2887 (python_xmethod_worker::clone): Remove.
2888 * valops.c (find_overload_match): Use std::move instead of
2889 clone.
2890
ba18742c
SM
28912018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
2892
2893 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
2894 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
2895 <free_xmethod_worker_data>: Remove.
2896 <get_matching_xmethod_workers>: Chance VEC to std::vector.
2897 <get_xmethod_arg_types>: Remove.
2898 <get_xmethod_result_type>: Remove.
2899 <invoke_xmethod>: Remove.
2900 * extension.c (new_xmethod_worker): Remove.
2901 (clone_xmethod_worker): Remove.
2902 (get_matching_xmethod_workers): Return void, pass std::vector by
2903 pointer.
2904 (get_xmethod_arg_types): Rename to...
2905 (xmethod_worker::get_arg_types): ... this, and adjust.
2906 (get_xmethod_result_type): Rename to...
2907 (xmethod_worker::get_result_type): ... this, and adjust.
2908 (invoke_xmethod): Remove.
2909 (free_xmethod_worker): Remove.
2910 (free_xmethod_worker_vec): Remove.
2911 * extension.h (enum ext_lang_rc): Move here from
2912 extension-priv.h.
2913 (struct xmethod_worker): Add constructor and destructor.
2914 <data>: Remove.
2915 <value>: Remove.
2916 <invoke, clone, do_get_result_type, do_get_arg_types>: New
2917 virtual pure methods.
2918 <get_arg_types, get_result_type>: New methods.
2919 (xmethod_worker_ptr): Remove typedef.
2920 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
2921 (xmethod_worker_vec): Remove typedef.
2922 (xmethod_worker_up): New typedef.
2923 (invoke_xmethod): Remove.
2924 (clone_xmethod_worker): Remove.
2925 (free_xmethod_worker): Remove.
2926 (free_xmethod_worker_vec): Remove.
2927 (get_xmethod_arg_types): Remove.
2928 (get_xmethod_result_type): Remove.
2929 * valops.c (find_method_list): Use std::vector, don't use
2930 intermediate vector.
2931 (value_find_oload_method_list): Use std::vector.
2932 (find_overload_match): Use std::vector.
2933 (find_oload_champ): Use std::vector.
2934 * value.c (value_free): Use operator delete.
2935 (value_of_xmethod): Rename to...
2936 (value_from_xmethod): ... this. Don't assign
2937 xmethod_worker::value, take rvalue-reference.
2938 (result_type_of_xmethod): Adjust.
2939 (call_xmethod): Adjust.
2940 * value.h: Include extension.h.
2941 (struct xmethod_worker): Don't forward-declare.
2942 (value_of_xmethod): Rename to...
2943 (value_from_xmethod): ... this, take rvalue-reference.
2944 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
2945 (struct python_xmethod_worker): ... this, add constructor and
2946 destructor.
2947 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
2948 (gdbpy_free_xmethod_worker_data): Rename to...
2949 (python_xmethod_worker::~python_xmethod_worker): ... this and
2950 adjust.
2951 (gdbpy_clone_xmethod_worker_data): Rename to...
2952 (python_xmethod_worker::clone): ... this and adjust.
2953 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
2954 temporary vector.
2955 (gdbpy_get_xmethod_arg_types): Rename to...
2956 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
2957 (gdbpy_get_xmethod_result_type): Rename to...
2958 (python_xmethod_worker::do_get_result_type): ... this and
2959 adjust.
2960 (gdbpy_invoke_xmethod): Rename to...
2961 (python_xmethod_worker::invoke): ... this and adjust.
2962 (new_python_xmethod_worker): Rename to...
2963 (python_xmethod_worker::python_xmethod_worker): ... this and
2964 adjust.
2965 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
2966 Remove.
2967 (gdbpy_free_xmethod_worker_data): Remove.
2968 (gdbpy_get_matching_xmethod_workers): Use std::vector.
2969 (gdbpy_get_xmethod_arg_types): Remove.
2970 (gdbpy_get_xmethod_result_type): Remove.
2971 (gdbpy_invoke_xmethod): Remove.
2972 * python/python.c (python_extension_ops): Remove obsolete
2973 callbacks.
2974
e379cee6
PA
29752018-01-05 Pedro Alves <palves@redhat.com>
2976
2977 PR gdb/18653
2978 * common/signals-state-save-restore.c
2979 (save_original_signals_state): New parameter 'quiet'. Warn if we
2980 find a custom handler preinstalled, instead of internal erroring.
2981 But only warn if !quiet.
2982 * common/signals-state-save-restore.h
2983 (save_original_signals_state): New parameter 'quiet'.
2984 * main.c (captured_main_1): Move save_original_signals_state call
2985 after option handling, and pass QUIET.
2986
a655456c
PA
29872018-01-05 Pedro Alves <palves@redhat.com>
2988
2989 * spu-tdep.c (spu_catch_start): Pass
2990 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
2991
de63c46b
PA
29922018-01-05 Pedro Alves <palves@redhat.com>
2993
2994 PR gdb/22670
2995 * ada-lang.c (literal_symbol_name_matcher): New function.
2996 (ada_get_symbol_name_matcher): Use it for
2997 symbol_name_match_type::SEARCH_NAME.
2998 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
2999 it down instead of assuming symbol_name_match_type::FULL.
3000 * block.h (block_lookup_symbol): New parameter 'match_type'.
3001 * c-valprint.c (print_unpacked_pointer): Use
3002 lookup_symbol_search_name instead of lookup_symbol.
3003 * compile/compile-object-load.c (get_out_value_type): Pass down
3004 symbol_name_match_type::SEARCH_NAME.
3005 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
3006 symbol_name_match_type::FULL.
3007 * cp-support.c (cp_get_symbol_name_matcher): Handle
3008 symbol_name_match_type::SEARCH_NAME.
3009 * infrun.c (insert_exception_resume_breakpoint): Use
3010 lookup_symbol_search_name.
3011 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
3012 * psymtab.c (maintenance_check_psymtabs): Use
3013 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
3014 * stack.c (print_frame_args): Use lookup_symbol_search_name and
3015 SYMBOL_SEARCH_NAME.
3016 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
3017 if symbol_name_match_type::SEARCH_NAME.
3018 (lookup_symbol_in_language): Pass down
3019 symbol_name_match_type::FULL.
3020 (lookup_symbol_search_name): New.
3021 (lookup_language_this): Pass down
3022 symbol_name_match_type::SEARCH_NAME.
3023 (lookup_symbol_aux, lookup_local_symbol): New parameter
3024 'match_type'. Pass it down.
3025 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
3026 (lookup_symbol_search_name): New declaration.
3027 (lookup_symbol_in_block): New 'match_type' parameter.
3028
f98fc17b
PA
30292018-01-05 Pedro Alves <palves@redhat.com>
3030
3031 PR gdb/22670
3032 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
3033 ada_lookup_symbol.
3034 (ada_lookup_symbol): Reimplement in terms of
3035 ada_lookup_symbol_list, bits factored out from
3036 ada_lookup_encoded_symbol.
3037
342f8240
JB
30382018-01-05 Joel Brobecker <brobecker@adacore.com>
3039
3040 * ada-exp.y (write_object_renaming): When subscripting an array
3041 using a symbol as the index, pass the block in call to
3042 ada_lookup_encoded_symbol when looking that symbol up.
3043
7150d33c
JG
30442018-01-05 Jerome Guitton <guitton@adacore.com>
3045
3046 * ada-lang.c (ada_array_length): Use ada_index_type instead of
3047 TYPE_INDEX_TYPE.
3048
cc0e770c
JB
30492018-01-05 Joel Brobecker <brobecker@adacore.com>
3050
3051 * ada-lang.c (ada_to_fixed_value_create): Add handling of
3052 the case where VALUE_LVAL (val0) is not lval_memory.
3053
f79da888 30542018-01-05 Xavier Roirand <roirand@adacore.com>
e3861a03
XR
3055
3056 * ada-valprint.c (print_optional_low_bound): Handle
3057 character-indexed array printing like boolean-indexed array
3058 printing.
3059
cd385f94
JB
30602018-01-05 Joel Brobecker <brobecker@adacore.com>
3061
3062 * NEWS: Create a new section for the next release branch.
3063 Rename the section of the current branch, now that it has
3064 been cut.
3065
09aca949
JB
30662018-01-05 Joel Brobecker <brobecker@adacore.com>
3067
3068 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
3069 * version.in: Bump version to 8.1.50.DATE-git.
3070
9f757bf7
XR
30712018-01-03 Xavier Roirand <roirand@adacore.com>
3072
3073 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
3074 Add field.
3075 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
3076 Add field.
3077 (default_exception_support_info) <catch_handlers_sym>: Add field.
3078 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
3079 (ada_exception_name_addr_1): Add "catch handlers" handling.
3080 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
3081 Update all callers.
3082 (create_excep_cond_exprs) <ex>: Add parameter.
3083 (re_set_exception): Update create_excep_cond_exprs call.
3084 (print_it_exception, print_one_exception, print_mention_exception)
3085 (print_recreate_exception): Add "catch handler" handling.
3086 (allocate_location_catch_handlers, re_set_catch_handlers)
3087 (check_status_catch_handlers, print_it_catch_handlers)
3088 (print_one_catch_handlers, print_mention_catch_handlers)
3089 (print_recreate_catch_handlers): New function.
3090 (catch_handlers_breakpoint_ops): New variable.
3091 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
3092 Add parameter. Add "catch handler" handling.
3093 (ada_exception_sym_name, ada_exception_breakpoint_ops):
3094 Add "catch handler" handling.
3095 (ada_exception_catchpoint_cond_string): Add "catch handler"
3096 handling.
3097 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
3098 call.
3099 (catch_ada_handlers_command): New function.
3100 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
3101 operations structure.
3102 (_initialize_ada_language): Add "catch handlers" command entry.
3103 * NEWS: Document "catch handlers" feature.
3104
9fe561ab
JB
31052018-01-02 Joel Brobecker <brobecker@adacore.com>
3106
3107 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
3108 account when creating the array type of the slice.
3109 (ada_value_slice): Likewise.
3110
a405673c
JB
31112018-01-02 Joel Brobecker <brobecker@adacore.com>
3112
3113 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
3114 New enum value.
3115 (create_array_type_with_stride): Add byte_stride_prop parameter.
3116 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
3117 New parameter. Update all callers in this file.
3118 (array_type_has_dynamic_stride): New function.
3119 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
3120 of arrays with dynamic byte strides.
3121 * dwarf2read.c (read_array_type): Add support for dynamic
3122 DW_AT_byte_stride attributes.
3123
74a2f8ff
JB
31242018-01-02 Joel Brobecker <brobecker@adacore.com>
3125
3126 * dwarf2read.c (read_unspecified_type): Treat
3127 DW_TAG_enumeration_type DIEs from Ada units as stubs.
3128
e2882c85
JB
31292018-01-01 Joel Brobecker <brobecker@adacore.com>
3130
3131 Update copyright year range in all GDB files.
3132
1690bb24
JB
31332018-01-01 Joel Brobecker <brobecker@adacore.com>
3134
3135 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
3136 and gdb/testsuite/gdb.base/step-line.c.
3137
0f0c98a8
JB
31382018-01-01 Joel Brobecker <brobecker@adacore.com>
3139
3140 * copyright.py (main): Dump the contents of
3141 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
3142 even if BY_HAND is empty.
3143
82e1e79a
JB
31442018-01-01 Joel Brobecker <brobecker@adacore.com>
3145
3146 * top.c (print_gdb_version): Update Copyright year in version
3147 message.
3148
053f54e5 31492018-01-01 Joel Brobecker <brobecker@adacore.com>
47fea877 3150
053f54e5 3151 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
47fea877 3152
053f54e5 3153For older changes see ChangeLog-2017.
c906108c
SS
3154\f
3155Local Variables:
3156mode: change-log
3157left-margin: 8
3158fill-column: 74
3159version-control: never
57da7796 3160coding: utf-8
c906108c 3161End:
This page took 2.71739 seconds and 4 git commands to generate.