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