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