1 2018-09-17 Simon Marchi <simon.marchi@polymtl.ca>
4 * breakpoint.c (commands_cmd_element): New.
5 (_initialize_breakpoint): Assign commands_cmd_element.
6 * breakpoint.h (commands_cmd_element): New.
7 * cli/cli-script.c (while_cmd_element, if_command,
8 define_cmd_element): New.
9 (command_name_equals): Remove.
10 (process_next_line): Compare commands by pointer, not by name.
11 (_initialize_cli_script): Assign the various cmd_list_element
13 * compile/compile.c (compile_cmd_element): New.
14 (_initialize_compile): Assign compile_cmd_element.
15 * compile/compile.h (compile_cmd_element): New.
16 * guile/guile.c (guile_cmd_element): New.
17 (install_gdb_commands): Assign guile_cmd_element.
18 * guile/guile.h (guile_cmd_element): New.
19 * python/python.c (python_cmd_element): New.
20 (_initialize_python): Assign python_cmd_element.
21 * python/python.h (python_cmd_element): New.
22 * tracepoint.c (while_stepping_cmd_element): New.
23 (_initialize_tracepoint): Assign while_stepping_cmd_element.
24 * tracepoint.h (while_stepping_cmd_element): New.
26 2018-09-15 Sergio Durigan Junior <sergiodj@redhat.com>
29 * common/common-utils.c: Don't include '<sys/stat.h>'.
30 (is_regular_file): Move to...
31 * common/filestuff.c (is_regular_file): ... here.
32 * common/common-utils.h (is_regular_file): Move to...
33 * common/filestuff.h (is_regular_file): ... here.
35 2018-09-13 Tom Tromey <tom@tromey.com>
38 * rust-lang.c (rust_evaluate_subexp): Use field name, not "foo".
40 2018-09-13 Tom Tromey <tom@tromey.com>
43 * rust-lang.c (rust_enum_variant): Now static.
44 (rust_empty_enum_p): New function.
45 (rust_print_enum, rust_evaluate_subexp, rust_print_struct_def):
48 2018-09-10 Eli Zaretskii <eliz@gnu.org>
50 * Makefile.in (transformed_name): Use INSTALL_SCRIPT instead of
51 INSTALL_PROGRAM to install gdb-add-index.sh. Don't append
52 $(EXEEXT) to the script, as it is not a program.
54 2018-09-05 Joel Brobecker <brobecker@adacore.com>
56 * version.in: Set GDB version number to 8.2.0.DATE-git.
59 2018-09-05 Joel Brobecker <brobecker@adacore.com>
63 2018-09-05 Joel Brobecker <brobecker@adacore.com>
65 * version.in: Set GDB version number to 8.2.
68 2018-09-04 Sergio Durigan Junior <sergiodj@redhat.com>
71 * gnulib/import/m4/getcwd-path-max.m4: Add handling of Hurd,
72 Linux and kFreeBSD platforms.
73 * gnulib/configure: Regenerate.
75 2018-08-31 Tom Tromey <tom@tromey.com>
77 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
80 2018-08-28 Alan Hayward <alan.hayward@arm.com>
82 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
83 (aarch64_linux_collect_sve_regset): Likewise.
84 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
85 * regcache.h (regcache_map_entry_size): New function.
87 2018-08-13 Alan Hayward <alan.hayward@arm.com>
89 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
90 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
91 (SVE_HEADER_VL_LENGTH): Likewise.
92 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
93 (SVE_HEADER_FLAGS_LENGTH): Likewise.
94 (SVE_HEADER_RESERVED_LENGTH): Likewise.
95 (SVE_HEADER_SIZE_OFFSET): Likewise.
96 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
97 (SVE_HEADER_VL_OFFSET): Likewise.
98 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
99 (SVE_HEADER_FLAGS_OFFSET): Likewise.
100 (SVE_HEADER_RESERVED_OFFSET): Likewise.
101 (SVE_HEADER_SIZE): Likewise.
102 (aarch64_linux_core_read_vq): Add function.
103 (aarch64_linux_core_read_description): Check for SVE section.
105 2018-08-13 Alan Hayward <alan.hayward@arm.com>
107 * aarch64-fbsd-tdep.c
108 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
110 * aarch64-linux-tdep.c
111 (aarch64_linux_iterate_over_regset_sections): Likewise.
113 (alpha_linux_iterate_over_regset_sections):
115 (alphanbsd_iterate_over_regset_sections): Likewise.
117 (amd64fbsd_iterate_over_regset_sections): Likewise.
119 (amd64_linux_iterate_over_regset_sections): Likewise.
121 (armbsd_iterate_over_regset_sections): Likewise.
123 (arm_fbsd_iterate_over_regset_sections): Likewise.
125 (arm_linux_iterate_over_regset_sections): Likewise.
126 * corelow.c (get_core_registers_cb): Likewise.
127 (core_target::fetch_registers): Likewise.
128 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
129 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
130 * gdbarch.h (void): Regenerate.
131 * gdbarch.sh: Add supply_size and collect_size.
132 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
133 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
134 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
135 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
136 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
137 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
138 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
139 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
140 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
141 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
142 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
143 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
144 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
145 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
146 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
147 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
148 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
149 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
150 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
151 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
152 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
153 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
154 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
155 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
156 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
157 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
158 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
159 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
160 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
162 2018-08-28 Alan Hayward <alan.hayward@arm.com>
164 * corelow.c (core_target::get_core_register_section): Rename
165 min_size to section_min_size.
167 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
169 * python/py-threadevent.c (py_get_event_thread): Initialize
172 2018-08-24 Kevin Buettner <kevinb@redhat.com>
175 * block.h (blockrange, blockranges): New struct declarations.
176 (struct block): Add new field named `ranges'.
177 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
178 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
179 macros for accessing ranges in struct block.
180 (make_blockranges): New declaration.
181 block.c (make_blockranges): New function.
182 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
184 * symtab.h (find_pc_partial_function): Add new parameter `block'.
185 * blockframe.c (cache_pc_function_block): New static global.
186 (clear_pc_function_cache): Clear cache_pc_function_block.
187 (find_pc_partial_function): Move comment to symtab.h. Add
188 support for non-contiguous blocks.
189 * cli/cli-cmds.c (block.h): Include.
190 (print_disassembly): Handle printing of non-contiguous blocks.
191 (disassemble_current_function): Likewise.
192 (disassemble_command): Likewise.
194 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
196 * blockframe.c (get_pc_function_start): Likewise.
197 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
198 (gcc_symbol_address): Likewise.
199 * compile/compile-object-run.c (compile_object_run): Likewise.
200 * compile/compile.c (get_expr_block_and_pc): Likewise.
201 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
202 (func_addr_to_tail_call_list): Likewise.
203 * findvar.c (default_read_var_value): Likewise.
204 * inline-frame.c (inline_frame_this_id): Likewise.
205 (skip-inline_frames): Likewise.
206 * infcmd.c (until_next_command): Likewise.
207 * linespec.c (convert_linespec_to_sals): Likewise.
208 * parse.c (parse_exp_in_context_1): Likewise.
209 * printcmd.c (build_address_symbolic): likewise.
210 (info_address_command): Likewise.
211 symtab.c (find_function_start_sal): Likewise.
212 (skip_prologue_sal): Likewise.
213 (find_function_alias_target): Likewise.
214 (find_gnu_ifunc): Likewise.
215 * stack.c (find_frame_funname): Likewise.
216 * symtab.c (fixup_symbol_section): Likewise.
217 (find_function_start_sal): Likewise.
218 (skip_prologue_sal): Likewsie.
219 (find_function_alias_target): Likewise.
220 (find_gnu_ifunc): Likewise.
221 * tracepoint.c (info_scope_command): Likewise.
222 * value.c (value_fn_field): Likewise.
224 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
225 in place of find_pc_partial_function.
226 * blockframe.c (find_function_entry_range_from_pc): New function.
227 * symtab.h (find_function_entry_range_from_pc): Declare and document.
228 * objfiles.c (objfile_relocate1): Relocate start and end addresses
229 for each range in a block.
231 2018-08-24 Pedro Alves <palves@redhat.com>
232 Simon Marchi <simon.marchi@ericsson.com>
235 * python/py-continueevent.c: Include "gdbthread.h".
236 (create_continue_event_object): Add intro comment. Add 'ptid'
237 parameter. Use it to find thread to pass to
238 create_thread_event_object.
239 (emit_continue_event): Pass PTID down to
240 create_continue_event_object.
241 * python/py-event.h (py_get_event_thread): Declare.
242 (create_thread_event_object): Remove default from 'thread'
244 * python/py-stopevent.c (create_stop_event_object): Use
246 * python/py-threadevent.c (get_event_thread): Rename to ...
247 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
248 and use it to find the thread.
249 (create_thread_event_object): Assert that THREAD isn't null.
250 Don't find the event thread here.
252 2018-08-23 Xavier Roirand <roirand@adacore.com>
254 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
257 2018-08-21 Alan Hayward <alan.hayward@arm.com>
259 * arch/aarch64.h (aarch64_regnum): Update comment.
261 2018-08-21 Alan Hayward <alan.hayward@arm.com>
263 * NEWS: Add SVE to 8.2 section.
265 2018-08-16 Tom Tromey <tom@tromey.com>
267 * top.c (read_command_file): Update.
268 (command_line_input): Remove "repeat" argument.
269 * ada-lang.c (get_selections): Update.
270 * linespec.c (decode_line_2): Update.
271 * defs.h (command_line_input): Remove argument.
272 * cli/cli-script.c (read_next_line): Update.
273 * python/py-gdb-readline.c: Update.
275 2018-08-17 Tom Tromey <tom@tromey.com>
277 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
280 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
282 * symfile.c (set_objfile_default_section_offset): Remove struct
285 2018-07-25 Alan Hayward <alan.hayward@arm.com>
287 * target-descriptions.c (tdesc_register_bitsize): Rename.
288 * target-descriptions.h (tdesc_register_bitsize): Likewise.
289 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
290 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
292 2018-07-24 Keith Seitz <keiths@redhat.comt
295 * dwarf2read.c (dw2_add_symbol_to_list): New function.
296 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
297 instead of add_symbol_to_list.
298 (read_file_scope): Call prepare_one_comp_unit before reading
301 2018-07-22 Tom Tromey <tom@tromey.com>
303 * symfile.c (reread_symbols): Notify iter, not objfile.
305 2018-07-22 Tom Tromey <tom@tromey.com>
307 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
309 (ravenscar_thread_target::prepare_to_store): Likewise.
311 2018-07-17 Tom Tromey <tom@tromey.com>
314 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
316 2018-07-11 Pedro Alves <palves@redhat.com>
319 * remote.c (remote_target::remote_detach_pid): Call
322 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
325 * c-typeprint.c (c_type_print_base_struct_union): Don't print
326 offsets/sizes for static members of a class/struct.
328 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
330 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
332 2018-07-04 Joel Brobecker <brobecker@adacore.com>
334 * version.in: Set GDB version number to 8.1.90.DATE-git.
335 * PROBLEMS: Likewise.
337 2018-07-04 Joel Brobecker <brobecker@adacore.com>
341 2018-07-04 Joel Brobecker <brobecker@adacore.com>
343 * version.in: Set GDB version number to 8.1.90.
344 * PROBLEMS: Likewise.
346 2018-07-04 Joel Brobecker <brobecker@adacore.com>
348 * NEWS: Change "Changes since GDB 8.1" into "Changes in GDB 8.2".
350 2018-07-04 Joel Brobecker <brobecker@adacore.com>
352 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
353 * version.in: Bump version to 8.1.90.DATE-git.
355 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
356 Pedro Alves <palves@redhat.com>
358 * linux-nat.c (linux_init_ptrace): Rename to ...
359 (linux_init_ptrace_procfs): ... this. Call
360 linux_proc_init_warnings.
361 (linux_nat_target::post_attach)
362 (linux_nat_target::post_startup_inferior): Adjust.
363 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
364 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
366 2018-07-04 Tom de Vries <tdevries@suse.de>
368 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
370 (read_comp_unit_head): ... here.
372 2018-07-03 Tom Tromey <tom@tromey.com>
374 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
375 (stop_tracing, tstatus_command)
376 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
377 (print_one_static_tracepoint_marker): Update.
378 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
380 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
382 (all_tracepoints, static_tracepoints_here): Return std::vector.
384 2018-07-03 Tom Tromey <tom@tromey.com>
386 * common/ptid.c (ptid_equal): Remove.
387 * common/ptid.h (ptid_equal): Don't declare.
388 * ada-tasks.c: Update.
389 * breakpoint.c: Update.
390 * common/agent.c: Update.
392 * darwin-nat-info.c: Update.
393 * darwin-nat.c: Update.
395 * dtrace-probe.c: Update.
396 * dummy-frame.c: Update.
397 * fbsd-nat.c: Update.
399 * gdbthread.h: Update.
401 * go32-nat.c: Update.
402 * inf-loop.c: Update.
403 * inf-ptrace.c: Update.
408 * linux-fork.c: Update.
409 * linux-nat.c: Update.
410 * linux-thread-db.c: Update.
411 * mi/mi-cmd-var.c: Update.
412 * mi/mi-interp.c: Update.
413 * mi/mi-main.c: Update.
414 * nto-procfs.c: Update.
415 * ppc-linux-tdep.c: Update.
417 * python/py-inferior.c: Update.
418 * python/py-record-btrace.c: Update.
419 * python/py-record.c: Update.
420 * ravenscar-thread.c: Update.
421 * regcache.c: Update.
422 * remote-sim.c: Update.
424 * sol-thread.c: Update.
427 * tui/tui-stack.c: Update.
429 * windows-nat.c: Update.
430 * windows-tdep.c: Update.
432 2018-07-03 Tom Tromey <tom@tromey.com>
434 * common/ptid.c (ptid_match): Remove.
435 * common/ptid.h (ptid_match): Don't declare.
436 * fbsd-nat.c: Update.
439 * linux-nat.c: Update.
440 * record-btrace.c: Update.
441 * regcache.c: Update.
444 2018-07-03 Tom Tromey <tom@tromey.com>
446 * common/ptid.c (ptid_tid_p): Remove.
447 * common/ptid.h (ptid_tid_p): Don't declare.
448 * sol-thread.c: Update.
450 2018-07-03 Tom Tromey <tom@tromey.com>
452 * common/ptid.c (ptid_lwp_p): Remove.
453 * common/ptid.h (ptid_lwp_p): Don't declare.
454 * fbsd-nat.c: Update.
455 * linux-nat.c: Update.
456 * nat/linux-procfs.c: Update.
457 * nat/x86-linux-dregs.c: Update.
458 * sol-thread.c: Update.
460 2018-07-03 Tom Tromey <tom@tromey.com>
462 * common/ptid.c (ptid_is_pid): Remove.
463 * common/ptid.h (ptid_is_pid): Don't declare.
465 * linux-nat.c: Update.
466 * mi/mi-interp.c: Update.
470 2018-07-03 Tom Tromey <tom@tromey.com>
472 * common/ptid.c (ptid_get_tid): Remove.
473 * common/ptid.h (ptid_get_tid): Don't declare.
474 * ada-tasks.c: Update.
475 * aix-thread.c: Update.
476 * bsd-uthread.c: Update.
477 * darwin-nat.c: Update.
478 * fbsd-nat.c: Update.
479 * i386-darwin-nat.c: Update.
481 * linux-tdep.c: Update.
482 * nto-procfs.c: Update.
483 * ppc-ravenscar-thread.c: Update.
484 * python/py-infthread.c: Update.
485 * ravenscar-thread.c: Update.
486 * sol-thread.c: Update.
487 * sparc-ravenscar-thread.c: Update.
488 * windows-nat.c: Update.
490 2018-07-03 Tom Tromey <tom@tromey.com>
492 * common/ptid.c (ptid_get_lwp): Remove.
493 * common/ptid.h (ptid_get_lwp): Don't declare.
494 * aarch64-linux-nat.c: Update.
495 * ada-tasks.c: Update.
496 * aix-thread.c: Update.
497 * amd64-linux-nat.c: Update.
498 * arm-linux-nat.c: Update.
500 * fbsd-nat.c: Update.
501 * fbsd-tdep.c: Update.
503 * i386-cygwin-tdep.c: Update.
504 * i386-gnu-nat.c: Update.
505 * i386-linux-nat.c: Update.
506 * ia64-linux-nat.c: Update.
507 * inf-ptrace.c: Update.
509 * linux-fork.c: Update.
510 * linux-nat.c: Update.
511 * linux-tdep.c: Update.
512 * linux-thread-db.c: Update.
513 * mips-linux-nat.c: Update.
514 * nat/aarch64-linux-hw-point.c: Update.
515 * nat/aarch64-linux.c: Update.
516 * nat/linux-btrace.c: Update.
517 * nat/linux-osdata.c: Update.
518 * nat/linux-procfs.c: Update.
519 * nat/x86-linux-dregs.c: Update.
520 * obsd-nat.c: Update.
521 * ppc-fbsd-nat.c: Update.
522 * ppc-linux-nat.c: Update.
524 * python/py-infthread.c: Update.
525 * ravenscar-thread.c: Update.
527 * s390-linux-nat.c: Update.
528 * sol-thread.c: Update.
529 * sol2-tdep.c: Update.
530 * spu-linux-nat.c: Update.
531 * x86-linux-nat.c: Update.
532 * xtensa-linux-nat.c: Update.
534 2018-07-03 Tom Tromey <tom@tromey.com>
536 * common/ptid.c (ptid_get_pid): Remove.
537 * common/ptid.h (ptid_get_pid): Don't declare.
538 * aarch64-linux-nat.c: Update.
539 * ada-lang.c: Update.
540 * aix-thread.c: Update.
541 * alpha-bsd-nat.c: Update.
542 * amd64-fbsd-nat.c: Update.
543 * amd64-linux-nat.c: Update.
544 * arm-linux-nat.c: Update.
545 * arm-nbsd-nat.c: Update.
547 * break-catch-syscall.c: Update.
548 * breakpoint.c: Update.
549 * bsd-uthread.c: Update.
552 * darwin-nat.c: Update.
553 * fbsd-nat.c: Update.
554 * fbsd-tdep.c: Update.
557 * hppa-nbsd-nat.c: Update.
558 * hppa-obsd-nat.c: Update.
559 * i386-fbsd-nat.c: Update.
560 * ia64-linux-nat.c: Update.
561 * inf-ptrace.c: Update.
563 * inferior.c: Update.
564 * inferior.h: Update.
567 * linux-fork.c: Update.
568 * linux-nat.c: Update.
569 * linux-tdep.c: Update.
570 * linux-thread-db.c: Update.
571 * m68k-bsd-nat.c: Update.
572 * mi/mi-interp.c: Update.
573 * mi/mi-main.c: Update.
574 * mips-linux-nat.c: Update.
575 * mips-nbsd-nat.c: Update.
576 * mips64-obsd-nat.c: Update.
577 * nat/aarch64-linux-hw-point.c: Update.
578 * nat/aarch64-linux.c: Update.
579 * nat/linux-btrace.c: Update.
580 * nat/linux-osdata.c: Update.
581 * nat/linux-procfs.c: Update.
582 * nat/x86-linux-dregs.c: Update.
583 * nto-procfs.c: Update.
584 * obsd-nat.c: Update.
585 * ppc-linux-nat.c: Update.
586 * ppc-nbsd-nat.c: Update.
587 * ppc-obsd-nat.c: Update.
588 * proc-service.c: Update.
590 * python/py-inferior.c: Update.
591 * python/py-infthread.c: Update.
592 * ravenscar-thread.c: Update.
594 * remote-sim.c: Update.
596 * rs6000-nat.c: Update.
597 * s390-linux-nat.c: Update.
598 * sh-nbsd-nat.c: Update.
599 * sol-thread.c: Update.
600 * sparc-nat.c: Update.
601 * sparc64-tdep.c: Update.
602 * spu-linux-nat.c: Update.
603 * spu-tdep.c: Update.
604 * target-debug.h: Update.
607 * tid-parse.c: Update.
608 * tracefile-tfile.c: Update.
609 * vax-bsd-nat.c: Update.
610 * windows-nat.c: Update.
611 * x86-linux-nat.c: Update.
614 2018-07-03 Tom Tromey <tom@tromey.com>
616 * common/ptid.c (pid_to_ptid): Remove.
617 * common/ptid.h (pid_to_ptid): Don't declare.
618 * aix-thread.c: Update.
619 * arm-linux-nat.c: Update.
620 * common/ptid.c: Update.
621 * common/ptid.h: Update.
624 * darwin-nat.c: Update.
625 * fbsd-nat.c: Update.
626 * fork-child.c: Update.
628 * go32-nat.c: Update.
629 * inf-ptrace.c: Update.
631 * inferior.c: Update.
633 * linux-fork.c: Update.
634 * linux-nat.c: Update.
635 * nat/aarch64-linux-hw-point.c: Update.
636 * nat/fork-inferior.c: Update.
637 * nat/x86-linux-dregs.c: Update.
638 * nto-procfs.c: Update.
639 * obsd-nat.c: Update.
641 * progspace.c: Update.
643 * rs6000-nat.c: Update.
644 * s390-linux-nat.c: Update.
645 * sol-thread.c: Update.
646 * spu-linux-nat.c: Update.
649 * tracefile-tfile.c: Update.
650 * windows-nat.c: Update.
652 2018-07-03 Tom Tromey <tom@tromey.com>
654 * common/ptid.h (ptid_build): Don't declare.
655 * common/ptid.c (ptid_build): Remove.
656 * aix-thread.c: Update.
658 * bsd-uthread.c: Update.
659 * common/agent.c: Update.
660 * common/ptid.c: Update.
661 * common/ptid.h: Update.
663 * darwin-nat.c: Update.
664 * fbsd-nat.c: Update.
666 * linux-fork.c: Update.
667 * linux-nat.c: Update.
668 * linux-thread-db.c: Update.
669 * nat/linux-osdata.c: Update.
670 * nat/linux-procfs.c: Update.
671 * nto-procfs.c: Update.
672 * obsd-nat.c: Update.
673 * proc-service.c: Update.
675 * ravenscar-thread.c: Update.
676 * remote-sim.c: Update.
678 * sol-thread.c: Update.
680 * windows-nat.c: Update.
682 2018-07-03 Tom Tromey <tom@tromey.com>
684 * infrun.c (follow_exec): Use exit_inferior_silent.
685 * inferior.c (exit_inferior_num_silent): Remove.
686 * inferior.h (exit_inferior_num_silent): Don't declare.
688 2018-07-03 Tom Tromey <tom@tromey.com>
691 * darwin-nat.c (darwin_attach_pid): Reset inferior and
692 inferior_ptid on error.
694 2018-07-02 Maciej W. Rozycki <macro@mips.com>
695 Simon Marchi <simon.marchi@polymtl.ca>
698 * disasm.h (gdb_disassembler): Add
699 `m_disassembler_options_holder'. member
700 * disasm.c (get_all_disassembler_options): New function.
701 (gdb_disassembler::gdb_disassembler): Use it.
702 (gdb_buffered_insn_length_init_dis): Likewise.
703 (gdb_buffered_insn_length): Adjust accordingly.
704 (set_disassembler_options): Handle options with arguments.
705 (show_disassembler_options_sfunc): Likewise. Add a leading new
706 line if showing options with descriptions.
707 (disassembler_options_completer): Adapt to using the
708 `disasm_options_and_args_t' structure.
709 * mips-tdep.c (mips_disassembler_options): New variable.
710 (mips_disassembler_options_o32): Likewise.
711 (mips_disassembler_options_n32): Likewise.
712 (mips_disassembler_options_n64): Likewise.
713 (gdb_print_insn_mips): Don't set `disassembler_options'.
714 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
716 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
717 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
718 `gdbarch_disassembler_options_implicit' and
719 `gdbarch_valid_disassembler_options'.
720 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
721 `disasm_options_and_args_t' structure.
722 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
724 (valid_disassembler_options): Switch from `disasm_options_t' to
725 the `disasm_options_and_args_t' structure.
726 * NEWS: Document `set disassembler-options' support for the MIPS
728 * gdbarch.h: Regenerate.
729 * gdbarch.c: Regenerate.
731 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
733 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
735 2018-06-29 Joel Brobecker <brobecker@adacore.com>
737 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
738 parameter in call to amd64_target_description.
739 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
740 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
741 (amd64fbsd_init_abi): Likewise.
742 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
743 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
744 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
745 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
747 2018-06-29 Pedro Alves <palves@redhat.com>
749 * gdb/amd64-tdep.h (amd64_create_target_description): Add
750 "segments" parameter.
751 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
752 (_initialize_amd64_tdep): Update call to
753 amd64_create_target_description.
754 (amd64_target_description): Add "segments" parameter. Adjust
755 the implementation to use it.
756 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
757 call to amd64_create_target_description.
758 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
759 * gdb/arch/amd64.h (amd64_create_target_description): Add
761 * gdb/arch/amd64.c (amd64_create_target_description): Add
762 "segments" parameter. Call create_feature_i386_64bit_segments
763 only if SEGMENTS is true.
764 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
765 call to amd64_create_target_description.
767 2018-06-29 Pedro Alves <palves@redhat.com>
769 * thread.c (thread_target_id_str): New, factored out from ...
770 (print_thread_info_1): ... here. Use it to compute the max
771 "Target Id" column width.
773 2018-06-29 Pedro Alves <palves@redhat.com>
775 * remote.c (remote_target::extra_thread_info): Delete
776 'display_buf' and 'n' locals. from the cache, regardless of
777 packet mechanims is in use. Use cache for qThreadExtra and qP
780 2018-06-29 Pedro Alves <palves@redhat.com>
782 * blockframe.c (find_pc_sect_containing_function): New function.
783 * breakpoint.c (print_breakpoint_location): Don't call
784 find_pc_sect_function.
785 * linespec.c (create_sals_line_offset): Record the location's
787 * linespec.c (convert_address_location_to_sals): Fill in sal's
788 symbol with find_pc_sect_containing_function.
789 * symtab.c (find_function_start_sal): Rename to ...
790 (find_function_start_sal_1): ... this.
791 (find_function_start_sal): Reimplement as wrapper around
792 find_function_start_sal_1, and use
793 find_pc_sect_containing_function to fill in the sal's symbol.
794 (find_function_start_sal(symbol*, bool)): Adjust.
795 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
797 (find_pc_sect_containing_function): Declare.
799 2018-06-29 Pedro Alves <palves@redhat.com>
801 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
802 true if the the location has no symbol.
804 2018-06-28 Tom Tromey <tom@tromey.com>
806 * NEWS: Mention --enable-codesign.
807 * silent-rules.mk (ECHO_SIGN): New variable.
808 * configure.ac: Add --enable-codesign.
809 * configure: Rebuild.
810 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
811 (gdb$(EXEEXT)): Optionally invoke codesign.
813 2018-06-28 Pedro Alves <palves@redhat.com>
815 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
817 (switch_to_thread_no_regs): Adjust comment.
818 * infcmd.c (stop_pc): Delete.
819 (post_create_inferior, info_program_command): Replace references
820 to stop_pc with references to thread_info->suspend.stop_pc.
821 * inferior.h (stop_pc): Delete declaration.
822 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
823 (handle_inferior_event_1, handle_signal_stop)
824 (process_event_stop_test, keep_going_stepped_thread)
825 (handle_step_into_function, handle_step_into_function_backward)
826 (print_stop_location): Replace references to stop_pc with
827 references to thread_info->suspend.stop_pc.
828 (struct infcall_suspend_state) <stop_pc>: Delete field.
829 (save_infcall_suspend_state, restore_infcall_suspend_state):
830 Remove references to inf_stat->stop_pc.
831 * linux-fork.c (fork_load_infrun_state): Likewise.
832 * record-btrace.c (record_btrace_set_replay): Likewise.
833 * record-full.c (record_full_goto_entry): Likewise.
834 * remote.c (print_one_stopped_thread): Likewise.
835 * target.c (target_resume): Extend comment.
836 * thread.c (set_executing_thread): New.
837 (set_executing): Use it.
838 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
839 Remove references to stop_pc.
841 2018-06-28 Pedro Alves <palves@redhat.com>
843 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
844 Moving fetching stop_pc until after ecs->event_thread is refreshed.
846 2018-06-28 Tom Tromey <tom@tromey.com>
848 * coffread.c (coff_symfile_finish): Update.
849 * xcoffread.c (xcoff_symfile_finish): Update.
850 * elfread.c (elf_symfile_finish): Update.
851 * symfile.h (dwarf2_free_objfile): Don't declare.
852 * dwarf2read.c (_initialize_dwarf2_read): Use
853 register_objfile_data_with_cleanup.
854 (dwarf2_free_objfile): Now static. Change signature.
856 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
858 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
859 option "-o" to add-symbol-file-load to add an offset to each
860 section's load address.
861 * symfile.c (set_objfile_default_section_offset): New function.
863 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
865 * symfile.c (add_symbol_file_command): Make sure that sections
866 with the same name are sorted in the same order.
868 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
870 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
871 require the second argument. If omitted, load sections at the
872 addresses specified in the file.
874 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
876 * symfile.c (symbol_file_command, symbol_file_add_main_1)
877 (_initialize_symfile): Add option "-o" to symbol-file to add an
878 offset to each section of the symbol file.
880 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
882 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
884 2018-06-27 Tom Tromey <tom@tromey.com>
886 * stack.c (_initialize_stack): Update "func" help text.
888 2018-06-27 Tom Tromey <tom@tromey.com>
890 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
892 (unwind_infopy_str, pyuw_create_unwind_info)
893 (unwind_infopy_add_saved_register, pyuw_sniffer)
894 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
896 (struct saved_reg): Add constructor.
897 <value>: Now a gdbpy_ref<>.
899 2018-06-27 Tom Tromey <tom@tromey.com>
901 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
903 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
905 * gdb-gdb.py.in: Format using autopep8.
907 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
909 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
910 (type_lookup_function): Recognize CORE_ADDR values.
912 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
914 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
917 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
919 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
922 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
924 * gdb-gdb.py: Move to...
925 * gdb-gdb.py.in: ... here.
926 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
927 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
929 (distclean): Remove gdb-gdb.py when cleaning.
930 (gdb-gdb.py, gdb-gdb.gdb): New rules.
931 * configure: Re-generate.
933 2018-06-27 Pedro Alves <palves@redhat.com>
935 * proc-service.c (get_ps_regcache): New.
936 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
937 (ps_lsetfpregs): Use it.
939 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
942 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
943 (dwarf_decode_lines_1): Adjust.
945 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
947 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
949 <info_proc>: Likewise.
951 2018-06-26 Joel Brobecker <brobecker@adacore.com>
953 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
954 to windows_fetch_one_register, and only handle the case of
955 fetching one register. Move the code that reloads the context
956 and iterates over all registers if R is negative to...
957 (windows_nat_target::fetch_registers): ... here.
958 (do_windows_store_inferior_registers): Rename to
959 windows_store_one_register, and only handle the case of storing
960 one register. Move the code that handles the case where r is
962 (windows_nat_target::store_registers) ... here.
964 2018-06-26 Tom Tromey <tom@tromey.com>
967 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
968 * rust-lang.c (rust_print_struct_def): Add podata parameter.
970 (rust_internal_print_type): Add podata parameter.
971 (rust_print_type): Update.
973 2018-06-26 Tom Tromey <tom@tromey.com>
975 * typeprint.h (struct print_offset_data) <update, finish,
976 maybe_print_hole>: New methods.
977 <indentation>: New constant.
978 * typeprint.c (print_offset_data::indentation): Define.
979 (print_offset_data::maybe_print_hole, print_offset_data::update)
980 (print_offset_data::finish): Move from c-typeprint.c and rename.
981 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
982 (print_spaces_filtered_with_print_options): Update.
983 (c_print_type_union_field_offset, maybe_print_hole)
984 (c_print_type_struct_field_offset): Move to typeprint.c and
986 (c_type_print_base_struct_union): Update.
988 2018-06-25 Pedro Alves <palves@redhat.com>
990 * gdbthread.h (thread_info_ref, delete_thread)
991 (delete_thread_silent, first_thread_of_inferior)
992 (any_thread_of_inferior, switch_to_thread)
993 (enable_thread_stack_temporaries)
994 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
995 (get_last_thread_stack_temporary)
996 (value_in_thread_stack_temporaries, can_access_registers_thread):
997 Spell out "struct thread_info" instead of just "thread_info".
998 * inferior.h (notice_new_inferior): Likewise.
1000 2018-06-25 Pedro Alves <palves@redhat.com>
1002 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
1003 pass thread_info pointer to delete_thread.
1004 (windows_nat_target::detach): Pass inferior pointer to
1006 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
1008 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
1009 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
1010 and pass a thread_info pointer to delete_thread.
1011 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
1012 pass thread_info pointer to delete_thread.
1013 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
1014 delete_thread_silent call.
1015 * procfs.c (procfs_target::detach): Pass inferior pointer to
1017 (procfs_target::wait): Pass thread_info pointer to delete_thread.
1018 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
1019 delete_thread_silent call.
1020 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
1021 pass thread_info pointer to delete_thread.
1022 (windows_nat_target::detach): Pass inferior pointer to
1025 2018-06-22 Alan Hayward <alan.hayward@arm.com>
1027 * regcache.c (readable_regcache::read_part): Fix asserts.
1028 (reg_buffer::raw_collect_part): New function.
1029 (regcache::write_part): Fix asserts.
1030 (reg_buffer::raw_supply_part): New function.
1031 (regcache::transfer_regset_register): New helper function.
1032 (regcache::transfer_regset): Call new functions.
1033 (regcache_supply_regset): Use gdb_byte*.
1034 (regcache::supply_regset): Likewise.
1035 (regcache_collect_regset): Likewise.
1036 (regcache::collect_regset): Likewise.
1037 * regcache.h (reg_buffer::raw_collect_part): New declaration.
1038 (reg_buffer::raw_supply_part): Likewise.
1039 (regcache::transfer_regset_register): Likewise.
1040 (regcache::transfer_regset): Use gdb_byte*.
1042 2018-06-22 Alan Hayward <alan.hayward@arm.com>
1044 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
1046 2018-06-21 Pedro Alves <palves@redhat.com>
1048 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
1049 instead of a ptid_t. All callers adjusted.
1050 * ada-tasks.c (ada_get_task_number): Likewise. All callers
1052 (print_ada_task_info, display_current_task_id, task_command_1):
1054 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
1056 (breakpoint_kind): Adjust.
1057 (remove_breakpoints_pid): Rename to ...
1058 (remove_breakpoints_inf): ... this. Adjust to take an inferior
1059 pointer. All callers adjusted.
1060 (bpstat_clear_actions): Use inferior_thread.
1061 (get_bpstat_thread): New.
1062 (bpstat_do_actions): Use it.
1063 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
1064 to take a thread_info pointer. All callers adjusted.
1065 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
1066 (breakpoint_re_set_thread): Use inferior_thread.
1067 * breakpoint.h (struct inferior): Forward declare.
1068 (bpstat_stop_status): Update.
1069 (remove_breakpoints_pid): Delete.
1070 (remove_breakpoints_inf): New.
1071 * bsd-uthread.c (bsd_uthread_target::wait)
1072 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
1073 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
1074 (maint_btrace_packet_history_cmd)
1075 (maint_btrace_clear_packet_history_cmd): Adjust.
1076 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
1078 * cli/cli-interp.c: Include "inferior.h".
1079 * common/refcounted-object.h (struct
1080 refcounted_object_ref_policy): New.
1081 * compile/compile-object-load.c: Include gdbthread.h.
1082 (store_regs): Use inferior_thread.
1083 * corelow.c (core_target::close): Use current_inferior.
1084 (core_target_open): Adjust to use first_thread_of_inferior and use
1085 the current inferior.
1086 * ctf.c (ctf_target::close): Adjust to use current_inferior.
1087 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
1088 <thread>: ... this new field. All references adjusted.
1089 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
1090 Take a thread_info pointer instead of a ptid_t.
1091 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
1092 (dummy_frame_discard, register_dummy_frame_dtor): Take a
1093 thread_info pointer instead of a ptid_t.
1094 * elfread.c: Include "inferior.h".
1095 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
1096 Use inferior_thread.
1097 * eval.c (evaluate_subexp): Likewise.
1098 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
1100 * gdb_proc_service.h (struct thread_info): Forward declare.
1101 (struct ps_prochandle) <ptid>: Delete, replaced by ...
1102 <thread>: ... this new field. All references adjusted.
1103 * gdbarch.h, gdbarch.c: Regenerate.
1104 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
1105 'thread' parameter. All implementations and callers adjusted.
1106 * gdbthread.h (thread_info) <set_running>: New method.
1107 (delete_thread, delete_thread_silent): Take a thread_info pointer
1109 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
1110 (first_thread_of_process): Delete, replaced by ...
1111 (first_thread_of_inferior): ... this new function. All callers
1113 (any_live_thread_of_process): Delete, replaced by ...
1114 (any_live_thread_of_inferior): ... this new function. All callers
1116 (switch_to_thread, switch_to_no_thread): Declare.
1117 (is_executing): Delete.
1118 (enable_thread_stack_temporaries): Update comment.
1119 <enable_thread_stack_temporaries>: Take a thread_info pointer
1120 instead of a ptid_t. Incref the thread.
1121 <~enable_thread_stack_temporaries>: Decref the thread.
1124 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1125 (get_last_thread_stack_temporary)
1126 (value_in_thread_stack_temporaries, can_access_registers_thread):
1127 Take a thread_info pointer instead of a ptid_t. All callers
1129 * infcall.c (get_call_return_value): Use inferior_thread.
1130 (run_inferior_call): Work with thread pointers instead of ptid_t.
1131 (call_function_by_hand_dummy): Work with thread pointers instead
1132 of ptid_t. Use thread_info_ref.
1133 * infcmd.c (proceed_thread_callback): Access thread's state
1135 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
1136 access thread's state directly.
1137 (continue_command): Use inferior_thread.
1138 (info_program_command): Use find_thread_ptid and access thread
1140 (proceed_after_attach_callback): Use thread state directly.
1141 (notice_new_inferior): Take a thread_info pointer instead of a
1142 ptid_t. All callers adjusted.
1143 (exit_inferior): Take an inferior pointer instead of a pid. All
1145 (exit_inferior_silent): New.
1146 (detach_inferior): Delete.
1147 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
1148 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
1149 (detach_inferior_command, kill_inferior_command): Use
1150 find_inferior_id instead of valid_gdb_inferior_id and
1151 gdb_inferior_id_to_pid.
1152 (inferior_command): Use inferior and thread pointers.
1153 * inferior.h (struct thread_info): Forward declare.
1154 (notice_new_inferior): Take a thread_info pointer instead of a
1155 ptid_t. All callers adjusted.
1156 (detach_inferior): Delete declaration.
1157 (exit_inferior, exit_inferior_silent): Take an inferior pointer
1158 instead of a pid. All callers adjusted.
1159 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
1160 (valid_gdb_inferior_id): Delete.
1161 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
1162 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
1163 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
1165 <inf>: ... this new field.
1166 <step_ptid>: Delete, replaced by ...
1167 <step_thread>: ... this new field.
1168 (get_displaced_stepping_state): Take an inferior pointer instead
1169 of a pid. All callers adjusted.
1170 (displaced_step_in_progress_any_inferior): Adjust.
1171 (displaced_step_in_progress_thread): Take a thread pointer instead
1172 of a ptid_t. All callers adjusted.
1173 (displaced_step_in_progress, add_displaced_stepping_state): Take
1174 an inferior pointer instead of a pid. All callers adjusted.
1175 (get_displaced_step_closure_by_addr): Adjust.
1176 (remove_displaced_stepping_state): Take an inferior pointer
1177 instead of a pid. All callers adjusted.
1178 (displaced_step_prepare_throw, displaced_step_prepare)
1179 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
1180 All callers adjusted.
1181 (start_step_over): Adjust.
1182 (infrun_thread_ptid_changed): Remove bit updating ptids in the
1183 displaced step queue.
1184 (do_target_resume): Adjust.
1185 (fetch_inferior_event): Use inferior_thread.
1186 (context_switch, get_inferior_stop_soon): Take an
1187 execution_control_state pointer instead of a ptid_t. All callers
1189 (switch_to_thread_cleanup): Delete.
1190 (stop_all_threads): Use scoped_restore_current_thread.
1191 * inline-frame.c: Include "gdbthread.h".
1192 (inline_state) <inline_state>: Take a thread pointer instead of a
1193 ptid_t. All callers adjusted.
1194 <ptid>: Delete, replaced by ...
1195 <thread>: ... this new field.
1196 (find_inline_frame_state): Take a thread pointer instead of a
1197 ptid_t. All callers adjusted.
1198 (skip_inline_frames, step_into_inline_frame)
1199 (inline_skipped_frames, inline_skipped_symbol): Take a thread
1200 pointer instead of a ptid_t. All callers adjusted.
1201 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
1202 (inline_skipped_frames, inline_skipped_symbol): Likewise.
1203 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
1205 * linux-nat.c (get_detach_signal): Likewise.
1206 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
1207 (thread_db_notice_clone): Adjust.
1208 (thread_db_find_new_threads_silently)
1209 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
1210 a thread pointer instead of a ptid_t. All callers adjusted.
1211 * mi/mi-cmd-var.c: Include "inferior.h".
1212 (mi_cmd_var_update_iter): Update to use thread pointers.
1213 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
1215 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
1217 (mi_output_running): ... this new function.
1218 (mi_on_resume_1): Adjust to use it.
1219 (mi_user_selected_context_changed): Adjust to use inferior_thread.
1220 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
1222 (interrupt_thread_callback): : Adjust to use thread and inferior
1224 * proc-service.c: Include "gdbthread.h".
1225 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
1226 * progspace-and-thread.c: Include "inferior.h".
1227 * progspace.c: Include "inferior.h".
1228 * python/py-exitedevent.c (create_exited_event_object): Adjust to
1229 hold a reference to an inferior_object.
1230 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
1232 * python/py-inferior.c (struct inferior_object): Give the type a
1233 tag name instead of a typedef.
1234 (python_on_normal_stop): No need to check if the current thread is
1236 (inferior_to_inferior_object): Change return type to
1237 inferior_object. All callers adjusted.
1238 (find_thread_object): Delete, bits factored out to ...
1239 (thread_to_thread_object): ... this new function.
1240 * python/py-infthread.c (create_thread_object): Use
1241 inferior_to_inferior_object.
1242 (thpy_is_stopped): Use thread pointer directly.
1243 (gdbpy_selected_thread): Use inferior_thread.
1244 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
1245 field, replaced with ...
1246 <thread>: ... this new field. All users adjusted.
1247 (btpy_insn_or_gap_new): Drop const.
1248 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
1250 * python/py-record.c: Include "gdbthread.h".
1251 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
1252 a ptid_t. All callers adjusted.
1253 (gdbpy_current_recording): Use inferior_thread.
1254 * python/py-record.h (recpy_record_object) <ptid>: Delete
1255 field, replaced with ...
1256 <thread>: ... this new field. All users adjusted.
1257 (recpy_element_object) <ptid>: Delete
1258 field, replaced with ...
1259 <thread>: ... this new field. All users adjusted.
1260 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
1261 a ptid_t. All callers adjusted.
1262 * python/py-threadevent.c: Include "gdbthread.h".
1263 (get_event_thread): Use thread_to_thread_object.
1264 * python/python-internal.h (struct inferior_object): Forward
1266 (find_thread_object, find_inferior_object): Delete declarations.
1267 (thread_to_thread_object, inferior_to_inferior_object): New
1269 * record-btrace.c: Include "inferior.h".
1270 (require_btrace_thread): Use inferior_thread.
1271 (record_btrace_frame_sniffer)
1272 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
1273 (get_thread_current_frame): Use scoped_restore_current_thread and
1275 (get_thread_current_frame): Use thread pointer directly.
1276 (record_btrace_replay_at_breakpoint): Use thread's inferior
1278 * record-full.c: Include "inferior.h".
1279 * regcache.c: Include "gdbthread.h".
1280 (get_thread_arch_regcache): Use the inferior's address space
1282 (get_thread_regcache, registers_changed_thread): New.
1283 * regcache.h (get_thread_regcache(thread_info *thread)): New
1285 (registers_changed_thread): New.
1286 (remote_target) <remote_detach_1>: Swap order of parameters.
1287 (remote_add_thread): <remote_add_thread>: Return the new thread.
1288 (get_remote_thread_info(ptid_t)): New overload.
1289 (remote_target::remote_notice_new_inferior): Use thread pointers
1291 (remote_target::process_initial_stop_replies): Use
1292 thread_info::set_running.
1293 (remote_target::remote_detach_1, remote_target::detach)
1294 (extended_remote_target::detach): Adjust.
1295 * stack.c (frame_show_address): Use inferior_thread.
1296 * target-debug.h (target_debug_print_thread_info_pp): New.
1297 * target-delegates.c: Regenerate.
1298 * target.c (default_thread_address_space): Delete.
1299 (memory_xfer_partial_1): Use current_inferior.
1300 (target_detach): Use current_inferior.
1301 (target_thread_address_space): Delete.
1302 (generic_mourn_inferior): Use current_inferior.
1303 * target.h (struct target_ops) <thread_address_space>: Delete.
1304 (target_thread_address_space): Delete.
1305 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
1307 (delete_thread_1, delete_thread, delete_thread_silent): Take a
1308 thread pointer instead of a ptid_t. Adjust all callers.
1309 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
1310 (first_thread_of_process): Delete, replaced by ...
1311 (first_thread_of_inferior): ... this new function. All callers
1313 (any_thread_of_process): Rename to ...
1314 (any_thread_of_inferior): ... this, and take an inferior pointer.
1315 (any_live_thread_of_process): Rename to ...
1316 (any_live_thread_of_inferior): ... this, and take an inferior
1318 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1319 (value_in_thread_stack_temporaries)
1320 (get_last_thread_stack_temporary): Take a thread pointer instead
1321 of a ptid_t. Adjust all callers.
1322 (thread_info::set_running): New.
1323 (validate_registers_access): Use inferior_thread.
1324 (can_access_registers_ptid): Rename to ...
1325 (can_access_registers_thread): ... this, and take a thread
1327 (print_thread_info_1): Adjust to compare thread pointers instead
1329 (switch_to_no_thread, switch_to_thread): Make extern.
1330 (scoped_restore_current_thread::~scoped_restore_current_thread):
1331 Use m_thread pointer directly.
1332 (scoped_restore_current_thread::scoped_restore_current_thread):
1333 Use inferior_thread.
1334 (thread_command): Use thread pointer directly.
1335 (thread_num_make_value_helper): Use inferior_thread.
1336 * top.c (execute_command): Use inferior_thread.
1337 * tui/tui-interp.c: Include "inferior.h".
1338 * varobj.c (varobj_create): Use inferior_thread.
1339 (value_of_root_1): Use find_thread_global_id instead of
1340 global_thread_id_to_ptid.
1342 2018-06-21 Alan Hayward <alan.hayward@arm.com>
1344 * regcache.c (readable_regcache::read_part): Avoid memcpy when
1346 (regcache::write_part): Likewise.
1347 (readable_regcache::cooked_read_part): Update comment.
1348 (readable_regcache::cooked_write_part): Likewise.
1349 * regcache.h: (readable_regcache::read_part): Likewise.
1350 (regcache::write_part): Likewise.
1352 2018-06-21 Richard Bunt <richard.bunt@arm.com>
1353 Dirk Schubert <dirk.schubert@arm.com>
1355 * aarch64-linux-nat.c (post_attach): New.
1356 (aarch64_linux_nat_target::post_attach): Override post_attach to
1357 record the number of hardware debug registers.
1359 2018-06-20 Tom Tromey <tom@tromey.com>
1361 * python/py-param.c (add_setshow_generic): Make parameters const.
1362 (parmpy_init): Update.
1364 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
1366 * regcache.h (regcache_cooked_read_ftype): Rename to...
1367 (register_read_ftype): ...this, change type to function_view.
1368 (class reg_buffer) <save>: Remove src parameter.
1369 (readonly_detached_regcache) <readonly_detached_regcache>: Make
1370 parameter non-const in first overload. Remove src parameter in
1372 * regcache.c (do_cooked_read): Remove.
1373 (readonly_detached_regcache::readonly_detached_regcache): Make
1374 parameter non-const, adjust call to other constructor.
1375 (reg_buffer::save): Remove src parameter.
1376 * frame.c (do_frame_register_read): Remove.
1377 (frame_save_as_regcache): Use lambda function.
1378 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
1379 parameter to ppu2spu_data *.
1380 (ppu2spu_sniffer): Use lambda function.
1382 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
1384 * record-full.c (record_full_target::insert_breakpoint): Remove
1385 "struct" keyword, add const.
1387 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1389 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
1390 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
1391 * configure.ac: Remove AC_PREREQ, add missing quoting.
1392 * gnulib/configure.ac: Modernize usage of
1393 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
1394 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
1395 (AUTOMAKE_VERSION): Bump to 1.15.1.
1396 * configure: Re-generate.
1397 * config.in: Re-generate.
1398 * aclocal.m4: Re-generate.
1399 * gnulib/aclocal.m4: Re-generate.
1400 * gnulib/config.in: Re-generate.
1401 * gnulib/configure: Re-generate.
1402 * gnulib/import/Makefile.in: Re-generate.
1404 2018-06-19 Pedro Alves <palves@redhat.com>
1406 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
1407 (lookup_minimal_symbol_by_pc_section): ... here with
1408 gdb_assert_not_reached added.
1410 2018-06-19 Pedro Alves <palves@redhat.com>
1412 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
1413 parameter with a block parameter. Compare location's block symbol
1414 with the frame's block instead of addresses.
1415 (skip_inline_frames): Pass the current block instead of the
1416 frame's address. Break out as soon as we determine the frame
1417 should not be skipped.
1419 2018-06-18 Tom Tromey <tom@tromey.com>
1421 * solib-aix.c (solib_aix_get_section_offsets): Return
1423 (solib_aix_solib_create_inferior_hook): Update.
1425 2018-06-18 Tom Tromey <tom@tromey.com>
1427 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
1429 2018-06-18 Tom Tromey <tom@tromey.com>
1431 * solib-frv.c (frv_relocate_main_executable): Use
1433 * solib-dsbt.c (dsbt_relocate_main_executable): Use
1436 2018-06-18 Tom Tromey <tom@tromey.com>
1438 * objfiles.h (inhibit_section_map_updates): Update.
1439 (resume_section_map_updates, resume_section_map_updates_cleanup):
1441 * solib-svr4.c (svr4_handle_solib_event): Update.
1442 * objfiles.c (inhibit_section_map_updates): Return
1443 scoped_restore_tmpl<int>.
1444 (resume_section_map_updates, resume_section_map_updates_cleanup):
1447 2018-06-18 Tom Tromey <tom@tromey.com>
1449 * valprint.h (read_string): Update.
1450 * valprint.c (read_string): Change type of "buffer".
1451 (val_print_string): Update.
1452 * python/py-value.c (valpy_string): Update.
1453 * language.h (struct language_defn) <la_get_string>: Change
1455 (default_get_string, c_get_string): Update.
1456 * language.c (default_get_string): Change type of "buffer".
1457 * guile/scm-value.c (gdbscm_value_to_string): Update.
1458 * c-lang.c (c_get_string): Change type of "buffer".
1460 2018-06-18 Tom Tromey <tom@tromey.com>
1462 * ser-mingw.c (struct pipe_state_destroyer): New.
1463 (pipe_state_up): New typedef.
1464 (cleanup_pipe_state): Remove.
1465 (pipe_windows_open): Use pipe_state_up. Don't release argv.
1467 2018-06-18 Tom Tromey <tom@tromey.com>
1469 * rust-lang.h (rust_yyerror): Don't declare.
1470 * rust-lang.c (rust_language_defn): Update.
1471 * rust-exp.y (yyerror): Now static.
1472 * parse.c (parse_exp_in_context_1): Update.
1473 * p-lang.h (p_yyerror): Don't declare.
1474 * p-lang.c (p_language_defn): Update.
1475 * p-exp.y (yyerror): Now static.
1476 * opencl-lang.c (opencl_language_defn): Update.
1477 * objc-lang.c (objc_language_defn): Update.
1478 * m2-lang.h (m2_yyerror): Don't declare.
1479 * m2-lang.c (m2_language_defn): Update.
1480 * m2-exp.y (yyerror): Now static.
1481 * language.h (struct language_defn) <la_error>: Remove.
1482 * language.c (unk_lang_error): Remove.
1483 (unknown_language_defn, auto_language_defn): Remove.
1484 * go-lang.h (go_yyerror): Don't declare.
1485 * go-lang.c (go_language_defn): Update.
1486 * go-exp.y (yyerror): Now static.
1487 * f-lang.h (f_yyerror): Don't declare.
1488 * f-lang.c (f_language_defn): Update.
1489 * f-exp.y (yyerror): Now static.
1490 * d-lang.h (d_yyerror): Don't declare.
1491 * d-lang.c (d_language_defn): Update.
1492 * d-exp.y (yyerror): Now static.
1493 * c-lang.h (c_yyerror): Don't declare.
1494 * c-lang.c (c_language_defn, cplus_language_defn)
1495 (asm_language_defn, minimal_language_defn): Update.
1496 * c-exp.y (yyerror): Now static.
1497 * ada-lang.h (ada_yyerror): Don't declare.
1498 * ada-lang.c (ada_language_defn): Update.
1499 * ada-exp.y (yyerror): Now static.
1501 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1503 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
1504 (store_sveregs_to_thread): Likewise.
1505 (aarch64_linux_fetch_inferior_registers): Check for SVE.
1506 (aarch64_linux_store_inferior_registers): Likewise.
1507 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
1509 (aarch64_sve_regs_copy_to_regcache): Likewise.
1510 (aarch64_sve_regs_copy_from_regcache): Likewise.
1511 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
1513 (aarch64_sve_regs_copy_to_regcache): Likewise.
1514 (aarch64_sve_regs_copy_from_regcache): Likewise.
1515 (sve_context): Structure from Linux headers.
1516 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
1517 (SVE_SIG_ZREG_SIZE): Likewise.
1518 (SVE_SIG_PREG_SIZE): Likewise.
1519 (SVE_SIG_FFR_SIZE): Likewise.
1520 (SVE_SIG_REGS_OFFSET): Likewise.
1521 (SVE_SIG_ZREGS_OFFSET): Likewise.
1522 (SVE_SIG_ZREG_OFFSET): Likewise.
1523 (SVE_SIG_ZREGS_SIZE): Likewise.
1524 (SVE_SIG_PREGS_OFFSET): Likewise.
1525 (SVE_SIG_PREG_OFFSET): Likewise.
1526 (SVE_SIG_PREGS_SIZE): Likewise.
1527 (SVE_SIG_FFR_OFFSET): Likewise.
1528 (SVE_SIG_REGS_SIZE): Likewise.
1529 (SVE_SIG_CONTEXT_SIZE): Likewise.
1530 (SVE_PT_REGS_MASK): Likewise.
1531 (SVE_PT_REGS_FPSIMD): Likewise.
1532 (SVE_PT_REGS_SVE): Likewise.
1533 (SVE_PT_VL_INHERIT): Likewise.
1534 (SVE_PT_VL_ONEXEC): Likewise.
1535 (SVE_PT_REGS_OFFSET): Likewise.
1536 (SVE_PT_FPSIMD_OFFSET): Likewise.
1537 (SVE_PT_FPSIMD_SIZE): Likewise.
1538 (SVE_PT_SVE_ZREG_SIZE): Likewise.
1539 (SVE_PT_SVE_PREG_SIZE): Likewise.
1540 (SVE_PT_SVE_FFR_SIZE): Likewise.
1541 (SVE_PT_SVE_FPSR_SIZE): Likewise.
1542 (SVE_PT_SVE_FPCR_SIZE): Likewise.
1543 (__SVE_SIG_TO_PT): Likewise.
1544 (SVE_PT_SVE_OFFSET): Likewise.
1545 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
1546 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
1547 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
1548 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
1549 (SVE_PT_SVE_PREG_OFFSET): Likewise.
1550 (SVE_PT_SVE_PREGS_SIZE): Likewise.
1551 (SVE_PT_SVE_FFR_OFFSET): Likewise.
1552 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
1553 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
1554 (SVE_PT_SVE_SIZE): Likewise.
1555 (SVE_PT_SIZE): Likewise.
1556 (HAS_SVE_STATE): New define.
1558 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1560 * nat/aarch64-sve-linux-sigcontext.h: New file.
1561 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
1563 (SVE_VQ_MIN): Likewise.
1564 (SVE_VQ_MAX): Likewise.
1565 (SVE_VL_MIN): Likewise.
1566 (SVE_VL_MAX): Likewise.
1567 (SVE_NUM_ZREGS): Likewise.
1568 (SVE_NUM_PREGS): Likewise.
1569 (sve_vl_valid): Likewise.
1570 (struct user_sve_header): Likewise.
1572 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
1573 Richard Bunt <Richard.Bunt@arm.com>
1575 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
1576 was requested by GDB.
1578 2018-06-15 Tom de Vries <tdevries@suse.de>
1580 * MAINTAINERS (Write After Approval): Add Tom de Vries.
1582 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
1584 * gnulib/update-gnulib.sh: Print expected versions of
1587 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
1589 * arch-utils.c (default_type_align): Use type_length_units.
1590 * gdbtypes.c (type_align): Use type_length_units.
1592 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1594 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
1595 of 'define' command.
1597 2018-06-14 Tom de Vries <tdevries@suse.de>
1600 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
1601 get_no_prettyformat_print_options.
1603 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
1605 * sparc-nat.h: Include target.h.
1606 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
1607 <fetch_registers>: Remove this argument in function call.
1608 <store_registers>: Remove this argument in function call, remove
1610 <low_forget_process>: Call sparc64_forget_process instead of
1611 sparc_forget_process.
1613 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1615 * procfs.c (_initialize_procfs): Use add_inf_child_target.
1616 (procfs_target::make_corefile_notes): Adjust to new
1617 target_read_alloc return type.
1619 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1620 Stephen Roberts <stephen.roberts@arm.com>
1623 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
1624 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
1625 Move should_notify_stop local into more inner scope.
1627 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1628 Stephen Roberts <stephen.roberts@arm.com>
1631 * infrun.c (resume_1): Add call to mark_async_event_handler.
1633 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1635 * infrun.c (do_target_wait): Change old version of $pc printed.
1637 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
1639 * dwarf2read.c (read_index_from_section): Rename to...
1640 (read_gdb_index_from_section): ... this, update all callers.
1641 (dwarf2_read_index): Rename to...
1642 (dwarf2_read_gdb_index): ... this, update all callers.
1644 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
1646 * gdb/hppa-linux-nat.c
1647 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
1648 hppa_linux_nat_target::fetch_registers.
1650 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1652 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
1653 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
1654 (AARCH64_DWARF_SVE_FFR): Likewise.
1655 (AARCH64_DWARF_SVE_P0): Likewise.
1656 (AARCH64_DWARF_SVE_Z0): Likewise.
1658 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1660 * common/common-regcache.h (raw_compare): New function.
1661 * regcache.c (regcache::raw_compare): Likewise.
1662 * regcache.h (regcache::raw_compare): New declaration.
1664 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1666 * common/common-regcache.h (reg_buffer_common): New structure.
1667 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
1668 (reg_buffer::raw_supply): Likewise.
1669 (reg_buffer::raw_supply_integer): Likewise.
1670 (reg_buffer::raw_supply_zeroed): Likewise.
1671 (reg_buffer::raw_collect): Likewise.
1672 (reg_buffer::raw_collect_integer): Likewise.
1673 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
1674 (reg_buffer::raw_supply): Likewise.
1675 (reg_buffer::raw_supply_integer): Likewise.
1676 (reg_buffer::raw_supply_zeroed): Likewise.
1677 (reg_buffer::raw_collect): Likewise.
1678 (reg_buffer::raw_collect_integer): Likewise.
1680 2018-06-10 Tom Tromey <tom@tromey.com>
1682 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
1683 (class remote_state) <stop_reply_queue>: Now std::vector.
1684 (remote_state::~remote_state)
1685 (remote_target::stop_reply_queue_length): Update.
1686 (struct queue_iter_param, remove_child_of_pending_fork)
1687 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
1688 (check_pending_event_prevents_wildcard_vcont_callback)
1689 (remove_stop_reply_for_inferior)
1690 (remove_stop_reply_of_remote_state)
1691 (remote_notif_remove_once_on_match)
1692 (stop_reply_match_ptid_and_ws)
1693 (remote_kill_child_of_pending_fork): Remove.
1694 (remote_target::remove_new_fork_children)
1695 (remote_target::check_pending_events_prevent_wildcard_vcont)
1696 (remote_target::discard_pending_stop_replies)
1697 (remote_target::discard_pending_stop_replies_in_queue)
1698 (remote_target::remote_notif_remove_queued_reply)
1699 (remote_target::queued_stop_reply)
1700 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
1701 (remote_target::wait, remote_target::kill_new_fork_children)
1702 (remote_target::async): Update.
1704 2018-06-10 Tom Tromey <tom@tromey.com>
1706 * record-full.c (record_full_arch_list_cleanups): Remove.
1707 (record_full_message): Use try/catch.
1708 (record_full_wait_cleanups): Remove.
1709 (record_full_wait_1): Use try/catch.
1710 (record_full_restore): Likewise.
1712 2018-06-10 Tom Tromey <tom@tromey.com>
1714 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
1715 declare VEC. Add constructor.
1716 <in_target_beneath>: Now bool.
1717 (record_full_breakpoints): Now a std::vector, static.
1718 (record_full_sync_record_breakpoints)
1719 (record_full_init_record_breakpoints)
1720 (record_full_target::insert_breakpoint)
1721 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
1723 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
1725 * dwarf2read.c (process_cu_includes): Remove struct keyword.
1726 * serial.c (serial_interface_lookup): Remove struct keyword.
1728 2018-06-10 Tom Tromey <tom@tromey.com>
1730 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
1732 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
1734 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
1736 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
1737 "beneath" as a method.
1738 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
1739 Use "beneath" as a method.
1741 2018-06-10 Tom Tromey <tom@tromey.com>
1743 * tracefile.c (struct trace_file_writer_deleter): New.
1744 <operator()>: Rename from trace_file_writer_xfree.
1745 (trace_file_writer_up): New typedef.
1746 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
1748 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
1750 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
1751 <m_registers, m_register_status>: Change type to
1753 * regcache.c (reg_buffer::reg_buffer): Use new instead of
1756 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
1758 * common/common-regcache.h (enum register_status): Add
1759 underlying type "signed char".
1760 * regcache.h (reg_buffer) <m_register_status>: Change type to
1762 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
1763 register_status instead of signed char.
1764 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
1765 (reg_buffer::get_register_status): Remove cast.
1766 (readable_regcache::raw_read): Remove cast.
1767 (readable_regcache::cooked_read): Remove cast.
1769 2018-06-09 Tom Tromey <tom@tromey.com>
1771 * source.c (reverse_search_command, forward_search_command): Use
1774 2018-06-09 Tom Tromey <tom@tromey.com>
1776 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
1777 (serial_ops_list): Now static, std::vector.
1778 (serial_interface_lookup, serial_add_interface): Update.
1780 2018-06-09 Tom Tromey <tom@tromey.com>
1782 * dwarf2read.c (process_cu_includes): Update.
1783 (process_full_comp_unit): Update.
1784 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
1787 2018-06-08 Paul Koning <paul_koning@dell.com>
1791 * python/python.c (do_start_initialization):
1792 Avoid call to internal Python API.
1793 (init__gdb_module): New function.
1795 2018-06-08 Gary Benson <gbenson@redhat.com>
1797 * linux-thread-db.c (valprint.h): New include.
1798 (struct check_thread_db_info): New structure.
1799 (check_thread_db_on_load, tdb_testinfo): New static globals.
1800 (check_thread_db, check_thread_db_callback): New functions.
1801 (try_thread_db_load_1): Run integrity checks if requested.
1802 (maintenance_check_libthread_db): New function.
1803 (_initialize_thread_db): Register "maint check libthread-db"
1804 and "maint set/show check-libthread-db".
1805 * NEWS: Mention the above new commands.
1807 2018-06-08 Tom Tromey <tom@tromey.com>
1809 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
1812 2018-06-08 Tom Tromey <tom@tromey.com>
1814 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
1816 2018-06-08 Tom Tromey <tom@tromey.com>
1818 * common/btrace-common.h (struct btrace_data): Add constructor,
1819 destructor, move assignment operator.
1820 <empty, clear, fini>: New methods.
1821 <format>: Initialize.
1822 (btrace_data_init, btrace_data_fini, btrace_data_clear)
1823 (btrace_data_empty): Don't declare.
1824 * common/btrace-common.c (btrace_data_init): Remove.
1825 (btrace_data::fini): Rename from btrace_data_fini.
1826 (btrace_data::empty): Rename from btrace_data_empty.
1827 (btrace_data::clear): Rename from btrace_data_clear. Return
1829 * btrace.h (make_cleanup_btrace_data): Don't declare.
1830 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
1831 (parse_xml_btrace): Update.
1832 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
1833 (maint_btrace_clear_packet_history_cmd): Update.
1835 2018-06-07 Pedro Alves <palves@redhat.com>
1837 * target.h (target_ops) <beneath>: Now a method. All references
1839 (class target_stack): New.
1840 * target.c (g_target_stack): New.
1841 (g_current_top_target): Delete.
1842 (current_top_target): Get the top target out of g_target_stack.
1843 (target_stack::push, target_stack::unpush): New.
1844 (push_target, unpush_target): Reimplement.
1845 (target_is_pushed): Reimplement in terms of g_target_stack.
1846 (target_ops::beneath, target_stack::find_beneath): New.
1848 2018-06-07 Pedro Alves <palves@redhat.com>
1850 * target.h (find_target_beneath): Delete declaration.
1851 * target.c (find_target_beneath): Delete definition.
1852 * aix-thread.c: All callers of find_target_beneath adjusted to
1853 call target_ops::beneath instead.
1854 * bsd-uthread.c: Likewise.
1855 * linux-thread-db.c: Likewise.
1856 * ravenscar-thread.c: Likewise.
1857 * sol-thread.c: Likewise.
1858 * spu-multiarch.c: Likewise.
1860 2018-06-07 Pedro Alves <palves@redhat.com>
1862 * target.h (target_ops) <beneath>: Now a method. All references
1864 (target_ops) <m_beneath>: New.
1865 * target.c (target_ops::beneath): New.
1866 * corelow.c: Adjust all references to target_ops::beneath.
1867 * linux-thread-db.c: Likewise.
1868 * make-target-delegates: Likewise.
1869 * record-btrace.c: Likewise.
1870 * record-full.c: Likewise.
1871 * remote.c: Likewise.
1872 * target.c: Likewise.
1873 * target-delegates.c: Regenerate.
1875 2018-06-07 Pedro Alves <palves@redhat.com>
1877 * target.h (target_stack): Delete.
1878 (current_top_target): Declare function.
1879 * target.c (target_stack): Delete.
1880 (g_current_top_target): New.
1881 (current_top_target): New function.
1882 * auxv.c: Use current_top_target instead of target_stack
1884 * avr-tdep.c: Likewise.
1885 * breakpoint.c: Likewise.
1886 * corefile.c: Likewise.
1887 * elfread.c: Likewise.
1889 * exceptions.c: Likewise.
1890 * frame.c: Likewise.
1891 * gdbarch-selftests.c: Likewise.
1892 * gnu-v3-abi.c: Likewise.
1893 * ia64-tdep.c: Likewise.
1894 * ia64-vms-tdep.c: Likewise.
1895 * infcall.c: Likewise.
1896 * infcmd.c: Likewise.
1897 * infrun.c: Likewise.
1898 * linespec.c: Likewise.
1899 * linux-tdep.c: Likewise.
1900 * minsyms.c: Likewise.
1901 * ppc-linux-nat.c: Likewise.
1902 * ppc-linux-tdep.c: Likewise.
1903 * procfs.c: Likewise.
1904 * regcache.c: Likewise.
1905 * remote.c: Likewise.
1906 * rs6000-tdep.c: Likewise.
1907 * s390-linux-nat.c: Likewise.
1908 * s390-tdep.c: Likewise.
1909 * solib-aix.c: Likewise.
1910 * solib-darwin.c: Likewise.
1911 * solib-dsbt.c: Likewise.
1912 * solib-spu.c: Likewise.
1913 * solib-svr4.c: Likewise.
1914 * solib-target.c: Likewise.
1915 * sparc-tdep.c: Likewise.
1916 * sparc64-tdep.c: Likewise.
1917 * spu-tdep.c: Likewise.
1918 * symfile.c: Likewise.
1919 * symtab.c: Likewise.
1920 * target-descriptions.c: Likewise.
1921 * target-memory.c: Likewise.
1922 * target.c: Likewise.
1923 * target.h: Likewise.
1924 * tracefile-tfile.c: Likewise.
1925 * tracepoint.c: Likewise.
1926 * valops.c: Likewise.
1927 * valprint.c: Likewise.
1928 * value.c: Likewise.
1929 * windows-tdep.c: Likewise.
1930 * mi/mi-main.c: Likewise.
1932 2018-06-07 Tom Tromey <tom@tromey.com>
1934 * valprint.h (build_address_symbolic): Declare.
1935 * printcmd.c (print_address_symbolic): Update.
1936 (build_address_symbolic): Change "name" and "filename" to
1938 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
1940 * defs.h (build_address_symbolic): Remove declaration.
1942 2018-06-07 Alan Hayward <alan.hayward@arm.com>
1944 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
1945 (aarch64_vnv_type): Add function.
1946 (aarch64_pseudo_register_name): Add V regs for SVE.
1947 (aarch64_pseudo_register_type): Likewise.
1948 (aarch64_pseudo_register_reggroup_p): Likewise.
1949 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
1950 (aarch64_pseudo_read_value): Add V regs for SVE.
1951 (aarch64_pseudo_write_2): Use V0 offset for SVE
1952 (aarch64_pseudo_write): Add V regs for SVE.
1953 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
1955 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
1957 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
1958 (sve_vl_from_vq): Likewise.
1960 2018-06-05 Tom Tromey <tom@tromey.com>
1962 * cli/cli-cmds.c (show_version): Update.
1963 * top.c (print_gdb_version): Add "interactive" parameter.
1965 * main.c (captured_main_1): Update.
1966 * top.h (print_gdb_version): Add "interactive" parameter and a
1969 2018-06-05 David Malcolm <dmalcolm@redhat.com>
1971 * common/enum-flags.h: Add trailing semicolon to example in
1974 2018-06-05 Tom Tromey <tom@tromey.com>
1977 * NEWS: Add entry about pager.
1978 * utils.c (pagination_disabled_for_command): New global.
1979 (prompt_for_continue): Allow "c" response to prompt.
1980 (reinitialize_more_filter): Clear
1981 pagination_disabled_for_command.
1982 (fputs_maybe_filtered): Check pagination_disabled_for_command.
1984 2018-06-04 Tom Tromey <tom@tromey.com>
1986 * ada-lang.h (ada_lookup_symbol_list): Update.
1987 * ada-lang.c (resolve_subexp): Update.
1988 (symbols_are_identical_enums): Change type of syms. Remove nsyms
1990 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
1991 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
1992 results parameter to std::vector.
1993 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
1995 * ada-exp.y (block_lookup): Update.
1996 (select_possible_type_sym): Change type of syms. Remove nsyms
1998 (write_var_or_type, write_name_assoc): Update.
2000 2018-06-04 Joel Brobecker <brobecker@adacore.com>
2002 * windows-nat.c (windows_nat_target::xfer_partial): Return
2003 TARGET_XFER_E_IO if we need to delegate to the target beneath
2004 but BENEATH is NULL.
2006 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
2008 * Makefile.in (config.status): Add configure.nat as a
2011 2018-06-04 Tom Tromey <tom@tromey.com>
2013 * cp-name-parser.y (cpname_state): Add method declarations.
2014 (HANDLE_QUAL): Update.
2015 (cpname_state::d_grab, cpname_state::fill_comp)
2016 (cpname_state::make_operator, cpname_state::make_dtor)
2017 (cpname_state::make_builtin_type, cpname_state::make_name)
2018 (cpname_state::d_qualify, cpname_state::d_int_type)
2019 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
2020 (%union): Move earlier.
2022 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2024 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
2026 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2028 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
2029 (aarch64_pseudo_write_1): Likewise.
2030 (aarch64_pseudo_read_value): Use helper.
2031 (aarch64_pseudo_write): Likewise.
2033 2018-06-04 Pedro Alves <palves@redhat.com>
2035 * darwin-nat.c (darwin_ops): Delete.
2036 (darwin_attach_pid): Use get_native_target.
2038 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2040 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
2041 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
2043 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2045 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
2046 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
2047 (aarch64_gdbarch_init): Check for SVE.
2048 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
2050 2018-06-04 Alan Hayward <alan.hayward@arm.com>
2052 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
2053 * aarch64-tdep.h (aarch64_read_description): Likewise.
2054 * arch/aarch64.c (aarch64_create_target_description): Likewise.
2055 * arch/aarch64.h (aarch64_create_target_description): Likewise.
2056 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
2057 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
2058 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
2060 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
2062 * value.c (value_fetch_lazy_bitfield): New.
2063 (value_fetch_lazy_memory): New.
2064 (value_fetch_lazy_register): New.
2065 (value_fetch_lazy): Factor out to smaller functions.
2067 2018-06-01 Tom Tromey <tom@tromey.com>
2069 * cp-name-parser.y (backslashable, represented): Now const.
2071 2018-06-01 Tom Tromey <tom@tromey.com>
2073 * cp-name-parser.y: Include parser-defs.h.
2074 (parser_fprintf): Remove declaration.
2076 2018-06-01 Tom Tromey <tom@tromey.com>
2078 * cp-name-parser.y: Use %pure-parser, %lex-param, and
2080 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
2081 (global_result): Remove globals.
2082 (struct cpname_state): New.
2083 (yyparse): Don't declare.
2084 (yylex, yyerror): Move declarations after %union.
2085 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
2086 (make_name): Add state parameter.
2088 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
2090 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
2092 (yylex): Add lvalp, state parameters.
2093 (yyerror): Add state parameter.
2094 (cp_demangled_name_to_comp): Update.
2096 2018-06-01 Tom Tromey <tom@tromey.com>
2098 * cp-name-parser.y (parser_fprintf): Declare.
2099 (GDB_YY_REMAP_PREFIX): Define.
2100 Include yy-remap.h. Don't redefine yy* identifiers.
2102 2018-06-01 Tom Tromey <tom@tromey.com>
2104 * python/py-type.c (typy_legacy_template_argument): Update.
2105 * cp-support.h (cp_demangled_name_to_comp): Update.
2106 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
2107 parameter to be a "std::string *".
2110 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
2112 * ada-lex.l: Include "diagnostics.h" instead of
2113 "common/diagnostics.h".
2114 * unittests/environ-selftests.c: Likewise.
2115 * common/diagnostics.h: Moved to ../include.
2117 2018-06-01 Joel Brobecker <brobecker@adacore.com>
2119 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
2120 to language_mode_manual while calling breakpoint_re_set_one.
2122 2018-06-01 Tom Tromey <tom@tromey.com>
2124 * valops.c (value_cast_structs, destructor_name_p): Update.
2125 * symtab.c (gdb_mangle_name): Update.
2126 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
2128 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
2129 (pascal_object_print_value_fields, pascal_object_print_value):
2131 * p-typeprint.c (pascal_type_print_derivation_info): Update.
2132 * linespec.c (find_methods): Update.
2133 * gdbtypes.h (type_name_no_tag): Remove.
2134 (type_name_or_error): Rename from type_name_no_tag_or_error.
2135 * gdbtypes.c (type_name_no_tag): Remove.
2136 (type_name_or_error): Rename from type_name_no_tag_or_error.
2137 (lookup_struct_elt_type, check_typedef): Update.
2138 * expprint.c (print_subexp_standard): Update.
2139 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
2140 * d-namespace.c (d_lookup_nested_symbol): Update.
2141 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
2142 (cp_print_class_member): Update.
2143 * cp-namespace.c (cp_lookup_nested_symbol): Update.
2144 * completer.c (add_struct_fields): Update.
2145 * c-typeprint.c (cp_type_print_derivation_info)
2146 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
2148 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
2149 (ada_prefer_type, ada_is_exception_sym): Update.
2151 2018-06-01 Tom Tromey <tom@tromey.com>
2153 * valops.c (enum_constant_from_type, value_namespace_elt)
2154 (value_maybe_namespace_elt): Update.
2155 * valarith.c (find_size_for_pointer_math): Update.
2156 * target-descriptions.c (make_gdb_type): Update.
2157 * symmisc.c (print_symbol): Update.
2158 * stabsread.c (define_symbol, read_type)
2159 (complain_about_struct_wipeout, add_undefined_type)
2160 (cleanup_undefined_types_1): Update.
2161 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
2162 (rust_range_type_p, val_print_struct, rust_print_struct_def)
2163 (rust_internal_print_type, rust_composite_type)
2164 (rust_evaluate_funcall, rust_evaluate_subexp)
2165 (rust_inclusive_range_type_p): Update.
2166 * python/py-type.c (typy_get_tag): Update.
2167 * p-typeprint.c (pascal_type_print_base): Update.
2168 * mdebugread.c (parse_symbol, parse_type): Update.
2169 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
2171 * guile/scm-type.c (gdbscm_type_tag): Update.
2172 * go-lang.c (sixg_string_p): Update.
2173 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
2175 * gdbtypes.h (struct main_type) <tag_name>: Remove.
2176 (TYPE_TAG_NAME): Remove.
2177 * gdbtypes.c (type_name_no_tag): Simplify.
2178 (check_typedef, check_types_equal, recursive_dump_type)
2179 (copy_type_recursive, arch_composite_type): Update.
2180 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
2181 in summary mode when needed.
2182 * eval.c (evaluate_funcall): Update.
2183 * dwarf2read.c (fixup_go_packaging, read_structure_type)
2184 (process_structure_scope, read_enumeration_type)
2185 (read_namespace_type, read_module_type, determine_prefix): Update.
2186 * cp-support.c (inspect_type): Update.
2187 * coffread.c (process_coff_symbol, decode_base_type): Update.
2188 * c-varobj.c (c_is_path_expr_parent): Update.
2189 * c-typeprint.c (c_type_print_base_struct_union): Update.
2190 (c_type_print_base_1): Update. Print struct/class/union/enum in
2191 summary when using C language.
2192 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
2193 (gen_maybe_namespace_elt): Update.
2194 * ada-lang.c (ada_type_name): Simplify.
2195 (empty_record, ada_template_to_fixed_record_type_1)
2196 (template_to_static_fixed_type)
2197 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
2199 2018-06-01 Tom Tromey <tom@tromey.com>
2201 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
2203 * c-typeprint.c (c_print_type_1): Add "language" parameter.
2204 (c_print_type): Update.
2205 (c_print_type): New overload.
2206 (c_type_print_varspec_prefix, c_type_print_args)
2207 (c_type_print_varspec_suffix, c_print_type_no_offsets)
2208 (c_type_print_base_struct_union, c_type_print_base_1)
2209 (cp_type_print_method_args): Add "language" parameter.
2210 (c_type_print_base): Update.
2211 * c-lang.h (c_print_type): Add new overload.
2213 2018-06-01 Tom Tromey <tom@tromey.com>
2215 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
2216 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
2218 2018-06-01 Alan Hayward <alan.hayward@arm.com>
2220 * aarch64-tdep.c (aarch64_sve_register_names): New const
2222 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
2223 (AARCH64_SVE_Z_REGS_NUM): New define.
2224 (AARCH64_SVE_P_REGS_NUM): Likewise.
2225 (AARCH64_SVE_NUM_REGS): Likewise.
2227 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
2229 * nat/linux-ptrace.h [__alpha__]
2230 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
2233 2018-05-31 Maciej W. Rozycki <macro@mips.com>
2235 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
2236 the endianness selected.
2237 * NEWS: Document `set endian auto' mode operation update.
2239 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2241 * Makefile.in: Add new header.
2242 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
2243 (sve_vl_from_vg): Likewise.
2244 (sve_vq_from_vl): Likewise.
2245 (sve_vl_from_vq): Likewise.
2246 (sve_vq_from_vg): Likewise.
2247 (sve_vg_from_vq): Likewise.
2248 * configure.nat: Add new c file.
2249 * nat/aarch64-sve-linux-ptrace.c: New file.
2250 * nat/aarch64-sve-linux-ptrace.h: New file.
2252 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2254 * aarch64-linux-nat.c (aarch64_linux_read_description):
2256 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
2258 * aarch64-tdep.c (tdesc_aarch64_list): Add.
2259 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
2260 (aarch64_gdbarch_init): Add parmeter zero.
2261 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
2262 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
2263 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
2265 * doc/gdb.texinfo: Describe SVE feature
2266 * features/aarch64-sve.c: New file.
2268 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
2271 * gdbarch.sh (significant_addr_bit): Default to zero when
2272 not set by target architecture.
2273 * gdbarch.c: Re-generated.
2274 * utils.c (address_significant): Update.
2276 2018-05-30 Joel Brobecker <brobecker@adacore.com>
2278 * stack.c (func_command): Remove trailing newline in call to error.
2280 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2282 * regcache.h (regcache_raw_collect): Remove, update callers to
2283 use regcache::raw_collect.
2284 * regcache.c (regcache_raw_collect): Remove.
2286 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2288 * regcache.h (regcache_raw_supply): Remove, update callers to
2289 use detached_regcache::raw_supply.
2290 * regcache.c (regcache_raw_supply): Remove.
2292 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2294 * regcache.h (regcache_cooked_write_part): Remove, update
2295 callers to use regcache::cooked_write_part.
2296 * regcache.c (regcache_cooked_write_part): Remove.
2298 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2300 * regcache.h (regcache_cooked_read_part): Remove, update callers
2301 to use readable_regcache::cooked_read_part.
2302 * regcache.c (regcache_cooked_read_part): Remove.
2304 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2306 * regcache.h (regcache_cooked_read_value): Remove, update
2307 callers to use readable_regcache::cooked_read_value.
2308 * regcache.c (regcache_cooked_read_value): Remove.
2310 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2312 * regcache.h (regcache_cooked_write): Remove, update callers to
2313 use regcache::cooked_write.
2314 * regcache.c (regcache_cooked_write): Remove.
2316 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2318 * regcache.h (regcache_invalidate): Remove, update callers to
2319 use detached_regcache::invalidate instead.
2320 * regcache.c (regcache_invalidate): Remove.
2322 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2324 * regcache.h (regcache_raw_write_part): Remove, update callers
2325 to use regcache::raw_write_part instead.
2326 * regcache.c (regcache_raw_write_part): Remove.
2328 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2330 * regcache.h (regcache_raw_read_part): Remove, update callers to
2331 use readable_regcache::raw_read_part instead.
2332 * regcache.c (regcache_raw_read_part): Remove.
2334 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2336 * regcache.h (regcache_cooked_read): Remove, update callers to
2337 use readable_regcache::cooked_read instead.
2338 * regcache.c (regcache_cooked_read): Remove.
2340 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2342 * regcache.h (regcache_raw_write): Remove, update callers to use
2343 regcache::raw_write instead.
2344 * regcache.c (regcache_raw_write): Remove.
2346 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2348 * regcache.h (regcache_raw_read): Remove, update callers to use
2349 readable_regcache::raw_read instead.
2350 * regcache.c (regcache_raw_read): Remove.
2352 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2354 * regcache.h (regcache_raw_update): Remove, update callers to
2355 use readable_regcache::raw_update instead.
2356 * regcache.c (regcache_raw_update): Remove.
2358 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2360 * regcache.h (regcache_register_status): Remove, update callers
2361 to use reg_buffer::get_register_status directly instead.
2362 * regcache.c (regcache_register_status): Remove.
2364 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2366 * regcache.h (regcache_get_ptid): Remove, update all callers to
2367 call regcache::ptid instead.
2368 * regcache.c (regcache_get_ptid): Remove.
2370 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2372 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
2374 2018-05-30 Pedro Alves <palves@redhat.com>
2376 * common/common-exceptions.h (exception_rethrow): Use
2379 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
2381 * breakpoint.c (print_solib_event, check_status_catch_solib):
2382 Remove struct keyword in range-based for loops.
2383 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
2384 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
2386 * linespec.c (find_superclass_methods, search_minsyms_for_name):
2388 * symfile.c (addr_info_make_relative): Likewise.
2389 * thread.c (value_in_thread_stack_temporaries): Likewise.
2391 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
2394 * valops.c (value_struct_elt_for_reference): Call check_typedef on
2395 aggregate type to get its real type before accessing it.
2397 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
2399 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
2400 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
2401 * coff-pe-read.c (add_pe_forwarded_sym): Replace
2402 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
2403 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
2404 * jit.c (jit_breakpoint_re_set_internal): Likewise.
2405 * printcmd.c (info_address_command): Likewise.
2407 2018-05-29 Tom Tromey <tom@tromey.com>
2409 * windows-nat.c (handle_exception): Update fall-through comment.
2411 2018-05-29 Tom Tromey <tom@tromey.com>
2413 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
2414 (struct program_space) <added_solibs>: Now a std::vector.
2415 * breakpoint.c (print_solib_event): Update.
2416 (check_status_catch_solib): Update.
2417 * progspace.c (clear_program_space_solib_cache): Update.
2418 * solib.c (update_solib_list): Update.
2420 2018-05-29 Tom Tromey <tom@tromey.com>
2422 * python/py-type.c (typy_richcompare): Update.
2423 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
2424 * gdbtypes.h (types_deeply_equal): Return bool.
2425 (types_equal): Likewise.
2426 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
2428 (check_types_equal): Change worklist to std::vector. Return
2430 (struct type_equality_entry): Add constructor.
2431 (compare_maybe_null_strings): Return bool.
2432 (check_types_worklist): Return bool. Change worklist to
2434 (types_deeply_equal): Use std::vector.
2435 (types_equal): Return bool.
2436 (compare_maybe_null_strings): Simplify.
2438 2018-05-29 Tom Tromey <tom@tromey.com>
2440 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
2442 2018-05-29 Tom Tromey <tom@tromey.com>
2444 * objc-lang.h: Don't include cp-support.h.
2445 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
2448 2018-05-27 Tom Tromey <tom@tromey.com>
2450 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
2452 2018-05-25 Tom Tromey <tom@tromey.com>
2454 * value.c (value::location): Initialize.
2456 2018-05-25 Tom Tromey <tom@tromey.com>
2458 * dbxread.c (init_bincl_list): Remove.
2459 (bincl_list): Now a std::vector.
2460 (bincls_allocated, next_bincl): Remove.
2461 (free_bincl_list, do_free_bincl_list_cleanup)
2462 (make_cleanup_free_bincl_list): Remove.
2463 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
2465 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
2466 (struct header_file_location): Add constructor.
2467 (add_bincl_to_list): Remove.
2469 2018-05-25 Tom Tromey <tom@tromey.com>
2471 * tui/tui.c (tui_enable): Update.
2472 * mi/mi-interp.c (mi_interp::init): Update.
2473 * interps.h (class interp) <name>: New method.
2474 <m_name>: Rename from name.
2475 (~scoped_restore_interp): Update.
2476 * interps.c (interp::interp): Update.
2477 (interp_add, interp_set, interp_lookup_existing)
2478 (current_interp_named_p): Update.
2480 2018-05-25 Tom Tromey <tom@tromey.com>
2482 * interps.c (interp_name): Remove.
2483 * mi/mi-interp.c (mi_interp::init): Update.
2484 * interps.h (interp_name): Remove.
2485 (~scoped_restore_interp): Update.
2486 * tui/tui.c (tui_enable): Update.
2488 2018-05-25 Tom Tromey <tom@tromey.com>
2490 * utils.c (fputs_maybe_filtered): Update.
2491 * linespec.c (decode_line_full): Update.
2492 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
2493 (mi_print_breakpoint_for_event, mi_solib_loaded)
2494 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
2495 (mi_user_selected_context_changed): Update.
2496 * mi/mi-main.c (mi_execute_command): Update.
2497 * cli/cli-script.c (execute_control_command): Update.
2498 * python/python.c (execute_gdb_command): Update.
2499 * solib.c (info_sharedlibrary_command): Update.
2500 * interps.c (interp_ui_out): Remove.
2501 * interps.h (interp_ui_out): Remove.
2503 2018-05-25 Tom Tromey <tom@tromey.com>
2505 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
2506 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
2507 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
2509 2018-05-25 Tom Tromey <tom@tromey.com>
2511 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
2512 * interps.c (interp_exec): Use scoped_restore.
2514 2018-05-25 Tom Tromey <tom@tromey.com>
2516 * remote.c (remote_target::remote_file_get): Use
2518 (remote_target::remote_file_put): Likewise.
2520 2018-05-25 Tom Tromey <tom@tromey.com>
2522 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
2524 (get_pe_section_index, add_pe_exported_sym): Update.
2525 (read_pe_exported_syms): Use gdb::def_vector.
2527 2018-05-25 Tom Tromey <tom@tromey.com>
2529 * frame.c (remove_prev_frame): Remove.
2530 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
2532 2018-05-25 Maciej W. Rozycki <macro@mips.com>
2534 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
2536 * mips-linux-nat.c (supply_fpregset): Always call
2537 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
2538 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
2539 `mips_fill_fpregset'.
2540 * mips-linux-tdep.c (mips_supply_fpregset)
2541 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
2542 (mips_fill_fpregset_wrapper): Remove functions.
2543 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
2544 (mips_linux_fpregset): Remove variable.
2545 (mips_linux_iterate_over_regset_sections): Use
2546 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
2547 (mips_linux_o32_sigframe_init): Remove comment.
2549 2018-05-25 Pedro Alves <palves@redhat.com>
2551 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
2552 (struct readahead_cache, struct packet_reg, struct
2553 remote_arch_state, class remote_state): Move higher up in the
2555 (remote_target::m_remote_state): Now an object instead of a pointer.
2556 (remote_target::get_remote_state): Adjust.
2558 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
2560 * stack.c (select_and_print_frame): Delete.
2561 (struct function_bounds): Move struct within function.
2562 (func_command): Most content moved into new function
2563 find_frame_for_function, use new function, print result, add
2565 (find_frame_for_function): New function, now returns a result.
2567 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2569 * stack.c (iterate_over_block_arg_vars): Fix comment.
2570 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
2572 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
2576 (scoped_restore_selected_frame::scoped_restore_selected_frame):
2578 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
2580 * frame.h (class scoped_restore_selected_frame): New class.
2581 * stack.c (print_frame_local_vars): Remove catching and rethrowing
2582 of any exception, use scoped_restore_selected_frame to restore the
2585 2018-05-24 Pedro Alves <palves@redhat.com>
2587 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
2590 2018-05-23 Tom Tromey <tom@tromey.com>
2592 * complaints.c (struct complaints): Remove.
2593 (symfile_complaint_book): Remove.
2594 (series): New global.
2595 (complaint_internal): Update.
2596 (clear_complaints): Update.
2598 2018-05-23 Tom Tromey <tom@tromey.com>
2600 * complaints.c (counters): New global.
2601 (struct complain): Remove.
2602 (struct complaints) <root>: Remove.
2603 (complaint_sentinel): Remove.
2604 (symfile_complaint_book): Update.
2605 (find_complaint) Remove.
2606 (complaint_internal, clear_complaints): Update.
2608 2018-05-23 Tom Tromey <tom@tromey.com>
2610 * complaints.c (struct complain) <file, line>: Remove.
2611 (find_complaint): Remove file, line parameters.
2612 (complaint_internal): Update.
2614 2018-05-23 Tom Tromey <tom@tromey.com>
2616 * complaints.c (vcomplaint): Remove.
2617 (complaint_internal) Merge in contents of vcomplaint.
2619 2018-05-23 Tom Tromey <tom@tromey.com>
2621 * complaints.c (struct complaints) <explanation>: Remove.
2622 (symfile_explanations): Remove.
2623 (symfile_complaint_book): Update.
2624 (vcomplaint): Update.
2625 (struct explanation): Remove.
2627 2018-05-23 Tom Tromey <tom@tromey.com>
2629 * complaints.c (symfile_complaints): Remove.
2630 (complaint_internal): Remove "complaints" parameter.
2631 (clear_complaints, vcomplaint): Remove "c" parameter.
2632 (get_complaints): Remove.
2633 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
2634 (dwarf2_debug_line_missing_file_complaint)
2635 (dwarf2_debug_line_missing_end_sequence_complaint)
2636 (dwarf2_complex_location_expr_complaint)
2637 (dwarf2_const_value_length_mismatch_complaint)
2638 (dwarf2_section_buffer_overflow_complaint)
2639 (dwarf2_macro_malformed_definition_complaint)
2640 (dwarf2_invalid_attrib_class_complaint)
2641 (create_addrmap_from_index, dw2_symtab_iter_next)
2642 (dw2_expand_marked_cus)
2643 (dw2_debug_names_iterator::find_vec_in_debug_names)
2644 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
2645 (create_debug_type_hash_table, init_cutu_and_read_dies)
2646 (partial_die_parent_scope, add_partial_enumeration)
2647 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
2648 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
2649 (read_import_statement, read_file_scope, create_dwo_cu_reader)
2650 (create_cus_hash_table, create_dwp_hash_table)
2651 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
2652 (dwarf2_rnglists_process, dwarf2_ranges_process)
2653 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
2654 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
2655 (handle_struct_member_die, process_structure_scope)
2656 (read_array_type, read_common_block, read_module_type)
2657 (read_tag_pointer_type, read_typedef, read_base_type)
2658 (read_subrange_type, load_partial_dies, partial_die_info::read)
2659 (partial_die_info::read, partial_die_info::read)
2660 (partial_die_info::read, read_checked_initial_length_and_offset)
2661 (dwarf2_string_attr, read_formatted_entries)
2662 (dwarf_decode_line_header)
2663 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2664 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
2665 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
2666 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
2667 (get_signatured_type, get_DW_AT_signature_type)
2668 (decode_locdesc, file_file_name, consume_improper_spaces)
2669 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
2670 (dwarf_decode_macro_bytes, dwarf_decode_macros)
2671 (dwarf2_symbol_mark_computed, set_die_type)
2672 (read_attribute_value): Update.
2673 * stap-probe.c (handle_stap_probe, get_stap_base_address):
2675 * dbxread.c (unknown_symtype_complaint)
2676 (lbrac_mismatch_complaint, repeated_header_complaint)
2677 (set_namestring, function_outside_compilation_unit_complaint)
2678 (read_dbx_symtab, process_one_symbol): Update.
2679 * gdbtypes.c (stub_noname_complaint): Update.
2680 * windows-nat.c (handle_unload_dll): Update.
2681 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
2682 (decode_base_type): Update.
2683 * xcoffread.c (bf_notfound_complaint, ef_complaint)
2684 (eb_complaint, record_include_begin, record_include_end)
2685 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
2686 (process_xcoff_symbol, read_symbol)
2687 (function_outside_compilation_unit_complaint)
2688 (scan_xcoff_symtab): Update.
2689 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
2690 * buildsym.c (finish_block_internal, make_blockvector)
2691 (end_symtab_get_static_block, augment_type_symtab): Update.
2692 * dtrace-probe.c (dtrace_process_dof)
2693 (dtrace_static_probe_ops::get_probes): Update.
2694 * complaints.h (struct complaint): Don't declare.
2695 (symfile_complaints): Remove.
2696 (complaint_internal): Remove "complaints" parameter.
2697 (complaint): Likewise.
2698 (clear_complaints): Likewise.
2699 * symfile.c (syms_from_objfile_1, finish_new_objfile)
2700 (reread_symbols): Update.
2701 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
2702 (dwarf2_frame_cache, decode_frame_entry): Update.
2703 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
2704 * objc-lang.c (lookup_objc_class, lookup_child_selector)
2705 (info_selectors_command): Update.
2706 * macrotab.c (macro_include, check_for_redefinition)
2707 (macro_undef): Update.
2708 * objfiles.c (filter_overlapping_sections): Update.
2709 * stabsread.c (invalid_cpp_abbrev_complaint)
2710 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
2711 (define_symbol, error_type, read_type, rs6000_builtin_type)
2712 (stabs_method_name_from_physname, read_member_functions)
2713 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
2714 (attach_fields_to_type, complain_about_struct_wipeout)
2715 (read_range_type, read_args, common_block_start)
2716 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
2718 * mdebugread.c (index_complaint, unknown_ext_complaint)
2719 (basic_type_complaint, bad_tag_guess_complaint)
2720 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
2721 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
2722 (parse_procedure, parse_lines)
2723 (function_outside_compilation_unit_complaint)
2724 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
2725 (bad_tag_guess_complaint, reg_value_complaint): Update.
2726 * cp-support.c (demangled_name_complaint): Update.
2727 * macroscope.c (sal_macro_scope): Update.
2728 * dwarf-index-write.c (class debug_names): Update.
2730 2018-05-23 Tom Tromey <tom@tromey.com>
2732 * complaints.c (clear_complaints): Remove "noisy" parameter.
2733 * complaints.h (clear_complaints): Update.
2734 * symfile.c (syms_from_objfile_1, finish_new_objfile)
2735 (reread_symbols): Update.
2737 2018-05-23 Tom Tromey <tom@tromey.com>
2739 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
2741 (vcomplaint, clear_complaints): Update.
2742 (symfile_explanations): Remove some messages.
2744 2018-05-23 Tom Tromey <tom@tromey.com>
2746 * complaints.c (internal_complaint): Remove.
2747 * complaints.h (internal_complaint): Remove.
2749 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2751 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
2753 2018-05-22 Pedro Alves <palves@redhat.com>
2755 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
2756 (remote_fileio_badfd, remote_fileio_return_errno)
2757 (remote_fileio_return_success, remote_fileio_func_open)
2758 (remote_fileio_func_open, remote_fileio_func_close)
2759 (remote_fileio_func_read, remote_fileio_func_write)
2760 (remote_fileio_func_lseek, remote_fileio_func_rename)
2761 (remote_fileio_func_unlink, remote_fileio_func_stat)
2762 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
2763 (remote_fileio_func_isatty, remote_fileio_func_system): Add
2764 remote_target parameter.
2765 (remote_fio_func_map) <func>: Add remote_target parameter.
2766 (do_remote_fileio_request, remote_fileio_request):
2767 * remote-fileio.h (remote_fileio_request):
2768 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
2769 remote_target parameter.
2770 (remote_notif_process, handle_notification): Adjust to pass down
2772 (remote_notif_state_allocate): Add remote_target parameter. Save
2774 * remote-notif.h (struct remote_target): Forward declare.
2775 (struct notif_client) <parse, ack, can_get_pending_events>: Add
2776 remote_target parameter.
2777 (struct remote_notif_state) <remote>: New field.
2778 (remote_notif_ack, remote_notif_parse): Add remote_target
2780 (remote_notif_state_allocate, remote_notif_state_allocate): Add
2781 remote_target parameter.
2782 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
2783 (threads_listing_context, rmt_thread_action, protocol_feature)
2784 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
2785 (packet_result, struct threads_listing_context, remote_state):
2786 Move definitions and declarations higher up.
2787 (remote_target) <~remote_target>: Declare.
2788 (remote_download_command_source, remote_file_put, remote_file_get)
2789 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
2790 (remote_hostio_pread_vFile, remote_hostio_send_command)
2791 (remote_hostio_set_filesystem, remote_hostio_open)
2792 (remote_hostio_close, remote_hostio_unlink, remote_state)
2793 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
2794 (get_memory_write_packet_size, get_memory_read_packet_size)
2795 (append_pending_thread_resumptions, remote_detach_1)
2796 (append_resumption, remote_resume_with_vcont)
2797 (add_current_inferior_and_thread, wait_ns, wait_as)
2798 (process_stop_reply, remote_notice_new_inferior)
2799 (process_initial_stop_replies, remote_add_thread)
2800 (btrace_sync_conf, remote_btrace_maybe_reopen)
2801 (remove_new_fork_children, kill_new_fork_children)
2802 (discard_pending_stop_replies, stop_reply_queue_length)
2803 (check_pending_events_prevent_wildcard_vcont)
2804 (discard_pending_stop_replies_in_queue, stop_reply)
2805 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
2806 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
2807 (remote_interrupt_as, remote_interrupt_ns)
2808 (remote_get_noisy_reply, remote_query_attached)
2809 (remote_add_inferior, remote_current_thread, get_current_thread)
2810 (set_thread, set_general_thread, set_continue_thread)
2811 (set_general_process, write_ptid)
2812 (remote_unpack_thread_info_response, remote_get_threadinfo)
2813 (parse_threadlist_response, remote_get_threadlist)
2814 (remote_threadlist_iterator, remote_get_threads_with_ql)
2815 (remote_get_threads_with_qxfer)
2816 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
2817 (get_offsets, remote_check_symbols, remote_supported_packet)
2818 (remote_query_supported, remote_packet_size)
2819 (remote_serial_quit_handler, remote_detach_pid)
2820 (remote_vcont_probe, remote_resume_with_hc)
2821 (send_interrupt_sequence, interrupt_query)
2822 (remote_notif_get_pending_events, fetch_register_using_p)
2823 (send_g_packet, process_g_packet, fetch_registers_using_g)
2824 (store_register_using_P, store_registers_using_G)
2825 (set_remote_traceframe, check_binary_download)
2826 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
2827 (remote_xfer_live_readonly_partial, remote_read_bytes)
2828 (remote_send_printf, remote_flash_write, readchar)
2829 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
2830 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
2831 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
2832 (extended_remote_disable_randomization, extended_remote_run)
2833 (send_environment_packet, extended_remote_environment_support)
2834 (extended_remote_set_inferior_cwd, remote_write_qxfer)
2835 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
2836 (packet_command): Now methods of ...
2837 (remote_target): ... this class.
2838 (m_remote_state) <remote_target>: New field.
2839 (struct remote_state) <stop_reply_queue,
2840 remote_async_inferior_event_token, wait_forever_enabled_p>: New
2842 (remote_state::remote_state): Allocate stop_reply_queue.
2843 (remote_state): Delete global.
2844 (get_remote_state_raw): Delete.
2845 (remote_target::get_remote_state): Allocate m_remote_state on
2847 (get_current_remote_target): New.
2848 (remote_ops, extended_remote_ops): Delete.
2849 (wait_forever_enabled_p, remote_async_inferior_event_token):
2850 Delete, moved to struct remote_state.
2851 (remote_target::close): Delete self. Destruction bits split to
2853 (remote_target::~remote_target): ... this.
2854 (show_memory_packet_size): Adjust to use
2855 get_current_remote_target.
2856 (struct protocol_feature) <func>: Add remote_target parameter.
2857 All callers adjusted.
2858 (curr_quit_handler_target): New.
2859 (remote_serial_quit_handler): Reimplement.
2860 (remote_target::open_1): Adjust to use get_current_remote_target.
2861 Heap-allocate remote_target/extended_remote_target instances.
2862 (vcont_builder::vcont_builder): Add remote_target parameter, and
2863 save it in m_remote. All callers adjusted.
2864 (vcont_builder::m_remote): New field.
2865 (vcont_builder::restart, vcont_builder::flush)
2866 (vcont_builder::push_action): Use it.
2867 (remote_target::commit_resume): Use it.
2868 (struct queue_iter_param) <remote>: New field.
2869 (remote_target::remove_new_fork_children): Fill in 'remote' field.
2870 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
2871 (check_pending_event_prevents_wildcard_vcont_callback)
2872 (remote_target::check_pending_events_prevent_wildcard_vcont)
2873 (remote_target::discard_pending_stop_replies)
2874 (remote_target::discard_pending_stop_replies_in_queue)
2875 (remote_target::remote_notif_remove_queued_reply): Fill in
2877 (remote_notif_get_pending_events): New.
2878 (remote_target::readchar, remote_target::remote_serial_write):
2879 Save/restore curr_quit_handler_target.
2881 (kill_new_fork_children): Fill in 'remote' field.
2882 (packet_command): Use get_current_remote_target, defer to
2883 remote_target method of same name.
2884 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
2885 parameter, and save it in m_remote. All callers adjusted.
2886 (scoped_remote_fd::release): Use m_remote.
2887 (scoped_remote_fd::m_remote): New field.
2888 (remote_file_put, remote_file_get, remote_file_delete): Use
2889 get_current_remote_target, defer to remote_target method of same
2891 (remote_btrace_reset): Add remote_state paremeter. Update all
2893 (remote_async_inferior_event_handler). Pass down 'data'.
2894 (remote_new_objfile): Use get_current_remote_target.
2895 (remote_target::vcont_r_supported): New.
2896 (set_range_stepping): Use get_current_remote_target and
2897 remote_target::vcont_r_supported.
2898 (_initialize_remote): Don't allocate 'remote_state' and
2899 'stop_reply_queue' globals.
2900 * remote.h (struct remote_target): Forward declare.
2901 (getpkt, putpkt, remote_notif_get_pending_events): Add
2902 'remote_target' parameter.
2904 2018-05-22 Pedro Alves <palves@redhat.com>
2906 * remote.c (vcont_builder): Now a class. Make all data members
2908 (vcont_builder) <vcont_builder, restart, flush, push_action>:
2910 (vcont_builder_restart): Rename to ...
2911 (vcont_builder::restart): ... this.
2912 (vcont_builder_flush): Rename to ...
2913 (vcont_builder::flush): ... this.
2914 (vcont_builder_push_action): Rename to ...
2915 (vcont_builder::push_action): ... this.
2916 (remote_target::commit_resume): Adjust.
2918 2018-05-22 Pedro Alves <palves@redhat.com>
2920 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
2921 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
2922 (get_fixed_memory_packet_size): New.
2923 (get_memory_packet_size): Use it.
2924 (set_memory_packet_size): Don't override the config size with
2925 DEFAULT_MAX_MEMORY_PACKET_SIZE.
2926 (show_memory_packet_size): Use get_fixed_memory_packet_size.
2927 Don't refer to get_memory_packet_size if not connected to a remote
2928 target. Show "(default)" if configured size is 0.
2930 2018-05-22 Pedro Alves <palves@redhat.com>
2932 * remote.c (remote_target::mourn_inferior): Move
2933 discard_pending_stop_replies call here from ...
2934 (_initialize_remote): ... here.
2936 2018-05-22 Pedro Alves <palves@redhat.com>
2938 * remote.c (compare_section_command): Remove set_general_process
2941 2018-05-22 Pedro Alves <palves@redhat.com>
2943 * remote.c (struct packet_reg, struct remote_arch_state):
2944 Move higher up in the file.
2945 (remote_state) <m_arch_states>: Store remote_arch_state values
2946 instead of remote_arch_state pointers.
2947 (remote_state::get_remote_arch_state): Adjust.
2949 2018-05-22 Pedro Alves <palves@redhat.com>
2951 * remote.c: Include <unordered_map>.
2952 (remote_state): Now a class.
2953 (remote_state) <get_remote_arch_state>: Declare method.
2954 <get_remote_arch_state>: New field.
2955 (remote_arch_state) <remote_arch_state>: Declare ctor.
2956 <regs>: Now a unique_ptr.
2957 (remote_gdbarch_data_handle): Delete.
2958 (get_remote_arch_state): Delete.
2959 (remote_state::get_remote_arch_state): New.
2960 (get_remote_state): Adjust to call remote_state's
2961 get_remote_arch_state method.
2962 (init_remote_state): Delete, bits factored out to ...
2963 (remote_arch_state::remote_arch_state): ... this new method.
2964 (get_remote_packet_size, get_memory_packet_size)
2965 (process_g_packet, remote_target::fetch_registers)
2966 (remote_target::prepare_to_store, store_registers_using_G)
2967 (remote_target::store_registers, remote_target::get_trace_status):
2968 Adjust to call remote_state's method.
2969 (_initialize_remote): Remove reference to
2970 remote_gdbarch_data_handle.
2972 2018-05-22 Pedro Alves <palves@redhat.com>
2974 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
2975 pread>: New method declarations.
2976 (remote_target::open_1): Adjust.
2977 (readahead_cache_invalidate): Rename to ...
2978 (readahead_cache::invalidate): ... this, and adjust to be a class
2980 (readahead_cache_invalidate_fd): Rename to ...
2981 (readahead_cache::invalidate_fd): ... this, and adjust to be a
2983 (remote_hostio_pwrite): Adjust.
2984 (remote_hostio_pread_from_cache): Rename to ...
2985 (readahead_cache::pread): ... this, and adjust to be a class
2987 (remote_hostio_close): Adjust.
2989 2018-05-22 Pedro Alves <palves@redhat.com>
2991 * remote.c (remote_hostio_close_cleanup): Delete.
2992 (class scoped_remote_fd): New.
2993 (remote_file_put, remote_file_get): Use it.
2995 2018-05-22 Pedro Alves <palves@redhat.com>
2997 (struct vCont_action_support): Use bool and initialize all fields.
2998 (struct readahead_cache): Initialize all fields.
2999 (remote_state): Use bool and initialize all fields.
3000 (remote_state::remote_state, remote_state::~remote_state): New.
3001 (new_remote_state): Delete.
3002 (_initialize_remote): Use new to allocate remote_state.
3004 2018-05-22 Pedro Alves <palves@redhat.com>
3008 * c-exp.y: Include "c-support.h".
3009 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
3010 of tolower. Use c_ident_is_alpha to scan names.
3011 * c-lang.c: Include "c-support.h".
3012 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
3013 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
3014 * c-support.h: New file, with bits factored out from ...
3015 * cp-name-parser.y: ... this file.
3016 Include "c-support.h".
3017 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
3018 c-support.h and renamed.
3019 (symbol_end, yylex): Adjust.
3021 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3023 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
3024 parameter type to CORE_ADDR.
3025 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
3026 parameter type in declaration to CORE_ADDR.
3027 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
3028 target_auxv_search to get AT_HWCAP and use the result to get the
3030 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
3031 to CORE_ADDR. Remove the cast of the return value to unsigned
3032 long. Fix error predicate of target_auxv_search.
3033 (ppc_linux_nat_target::read_description): Change the type of the
3034 hwcap variable to CORE_ADDR.
3036 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3038 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
3039 if the size of fpscr is larger than 32 bits.
3041 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3043 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
3044 (ppc32_linux_vsxregmap): New global.
3045 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
3046 regcache_supply_regset, and regcache_collect_regset.
3047 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
3048 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
3049 (fetch_vsx_register, store_vsx_register): Remove.
3050 (fetch_vsx_registers): Add regno parameter. Get regset using
3051 ppc_linux_vsxregset. Use regset to supply registers.
3052 (store_vsx_registers): Add regno parameter. Get regset using
3053 ppc_linux_vsxregset. Use regset to collect registers.
3054 (fetch_register): Call fetch_vsx_registers instead of
3056 (store_register): Call store_vsx_registers instead of
3058 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
3059 new regno parameter.
3060 (store_ppc_registers): Call store_vsx_registers with -1 for the
3061 new regno parameter.
3062 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
3063 (ppc_collect_vsxregset): Remove.
3065 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3067 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
3069 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
3070 for vector register offset fields.
3071 (ppc64_fbsd_reg_offsets): Likewise.
3072 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
3073 to vector register offset fields.
3074 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
3075 to vector register offset fields.
3076 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
3077 vector register offset fields.
3078 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
3079 initializers for vector register offset fields.
3080 (rs6000_aix64_reg_offsets): Likewise.
3081 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
3082 (ppc_supply_vrregset): Remove.
3083 (ppc_collect_vrregset): Remove.
3084 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
3085 (ppc_linux_vrregset) : New function.
3086 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
3087 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
3088 (ppc32_linux_vrregset): Remove.
3089 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
3090 and use result instead of ppc32_linux_vrregset.
3091 (ppc32_linux_reg_offsets): Remove initializers for vector register
3093 (ppc64_linux_reg_offsets): Likewise.
3094 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
3095 * ppc-linux-nat.c: Include regset.h.
3096 (gdb_vrregset_t): Adjust comment to account for little-endian
3098 (supply_vrregset, fill_vrregset): Remove.
3099 (fetch_altivec_register, store_altivec_register): Remove.
3100 (fetch_altivec_registers): Add regno parameter. Get regset using
3101 ppc_linux_vrregset. Use regset to supply registers.
3102 (store_altivec_registers): Add regno parameter. Get regset using
3103 ppc_linux_vrregset. Use regset to collect registers.
3104 (fetch_register): Call fetch_altivec_registers instead of
3105 fetch_altivec_register.
3106 (store_register): Call store_altivec_registers instead of
3107 store_altivec_register.
3108 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
3109 the new regno parameter.
3110 (store_ppc_registers): Call store_altivec_registers with -1 for
3111 the new regno parameter.
3113 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3115 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
3116 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
3117 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
3118 (gdb_vrregset_t): Change array type size to
3119 PPC_LINUX_SIZEOF_VRREGSET.
3120 (gdb_vsxregset_t): Change array type size to
3121 PPC_LINUX_SIZEOF_VSXREGSET.
3122 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
3123 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
3124 PPC_LINUX_SIZEOF_VSXREGSET.
3126 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3128 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
3129 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
3131 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
3132 ppc_linux_target_wordsize with tid.
3133 (ppc_linux_nat_target::read_description): Call ppc_linux_target
3135 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
3136 (ppc64_64bit_inferior_p): Add static and inline specifiers.
3137 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
3138 tid parameter. Remove static specifier.
3139 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
3140 (ppc_linux_target_wordsize): New declaration.
3142 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3144 * arch/ppc-linux-common.c: New file.
3145 * arch/ppc-linux-common.h: New file.
3146 * arch/ppc-linux-tdesc.h: New file.
3147 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
3148 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
3149 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
3150 arch/ppc-linux-tdesc.h.
3151 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
3152 arch/ppc-linux-tdesc.h.
3153 (ppc_linux_nat_target::read_description): Remove target
3154 description matching code. Fill a ppc_linux_features struct and
3155 call ppc_linux_match_description with it. Move comment about ISA
3156 2.05 to ppc-linux-common.c.
3157 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
3158 arch/ppc-linux-tdesc.h.
3159 (ppc_linux_core_read_description): Remove target description
3160 matching code. Fill a ppc_linux_features struct and call
3161 ppc_linux_match_description with it.
3162 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
3163 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
3164 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
3165 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
3166 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
3167 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
3168 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
3169 (tdesc_powerpc_e500l): Remove.
3171 2018-05-22 Joel Brobecker <brobecker@adacore.com>
3173 * ada-lang.c (catch_assert_command): Pass empty string instead
3174 of NULL for excep_string argument.
3176 2018-05-22 Maciej W. Rozycki <macro@mips.com>
3178 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
3179 the width of the requested register exceeds the width of the
3182 2018-05-21 Tom Tromey <tom@tromey.com>
3184 * printcmd.c (output_command): Remove.
3185 (output_command_const): Rename to output_command.
3186 * valprint.h (output_command): Rename from output_command_const.
3187 * tracepoint.c (trace_dump_actions): Call output_command.
3189 2018-05-21 Tom Tromey <tom@tromey.com>
3191 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
3192 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
3193 * ada-lang.h (create_ada_exception_catchpoint): Update.
3194 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
3196 (create_excep_cond_exprs, ~ada_catchpoint)
3197 (should_stop_exception, print_one_exception)
3198 (print_mention_exception, print_recreate_exception): Update.
3199 (ada_get_next_arg): Remove.
3200 (catch_ada_exception_command_split): Use std::string. Change type
3201 of "excep_string", "cond_string".
3202 (catch_ada_exception_command): Update.
3203 (create_ada_exception_catchpoint): Change type of excep_string.
3204 (ada_exception_sal): Remove excep_string parameter.
3205 (~ada_catchpoint): Remove.
3207 2018-05-21 Tom Tromey <tom@tromey.com>
3209 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
3212 2018-05-21 Tom Tromey <tom@tromey.com>
3214 * ada-lang.c (ada_exception_message_1, ada_exception_message):
3215 Return unique_xmalloc_ptr.
3216 (print_it_exception): Update.
3218 2018-05-21 Tom Tromey <tom@tromey.com>
3220 * tracepoint.c (trace_dump_actions): Use std::string.
3222 2018-05-21 Tom Tromey <tom@tromey.com>
3224 * symfile.c (reread_symbols): Use std::string for original_name.
3226 2018-05-21 Tom Tromey <tom@tromey.com>
3228 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
3229 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
3232 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
3234 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
3236 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
3237 * objfiles.c (get_objfile_bfd_data): Allocate
3238 objfile_per_bfd_storage with obstack_new when allocating on
3241 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
3243 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
3245 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
3246 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
3247 * mdebugread.c (mdebug_build_psymtabs): Likewise.
3248 (add_pending): Likewise.
3249 (parse_symbol): Likewise.
3250 (parse_partial_symbols): Likewise.
3251 (psymtab_to_symtab_1): Likewise.
3252 (new_psymtab): Likewise.
3253 (elfmdebug_build_psymtabs): Likewise.
3254 * minsyms.c (terminate_minimal_symbol_table): Likewise.
3255 * objfiles.c (get_objfile_bfd_data): Likewise.
3256 (objfile_register_static_link): Likewise.
3257 * psymtab.c (allocate_psymtab): Likewise.
3258 * stabsread.c (read_member_functions): Likewise.
3259 * xcoffread.c (xcoff_end_psymtab): Likewise.
3261 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
3263 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
3264 compiler supports std::is_trivially_constructible.
3265 * common/poison.h: Include obstack.h.
3266 (IsMallocable): Define to is_trivially_constructible if the
3267 compiler supports it, define to true_type otherwise.
3271 (XOBNEWVEC): Redefine.
3272 * gdb_obstack.h (obstack_zalloc): New.
3273 (OBSTACK_ZALLOC): Redefine.
3274 (obstack_calloc): New.
3275 (OBSTACK_CALLOC): Redefine.
3277 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
3278 (gdbarch_obstack): New declaration in gdbarch.h, definition in
3280 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
3281 obstack_calloc/obstack_zalloc.
3282 (gdbarch_obstack_zalloc): Remove.
3283 * target-descriptions.c (tdesc_data_init): Use obstack_new.
3285 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3287 * stack.c (backtrace_command_1): Remove useless variable int i.
3289 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3291 * stack.c (print_frame_info): Fix comment.
3293 2018-05-18 Tom Tromey <tom@tromey.com>
3295 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
3296 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
3297 (~dwarf2_per_objfile): Update
3298 (dwarf2_get_dwz_file): Use new.
3299 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
3302 2018-05-18 Tom Tromey <tom@tromey.com>
3304 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
3306 * dwarf2read.c (struct dwp_file): Add constructor and
3308 (open_and_init_dwp_file): Return a unique_ptr.
3309 (dwarf2_per_objfile, create_dwp_hash_table)
3310 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
3311 (lookup_dwo_unit_in_dwp): Update.
3312 (open_and_init_dwp_file, get_dwp_file): Update.
3314 2018-05-18 Tom Tromey <tom@tromey.com>
3316 * dwarf2read.c (dwarf2_per_objfile): Update.
3317 (struct mapped_index): Add initializers.
3318 (dwarf2_read_index): Use new.
3319 (dw2_symtab_iter_init): Update.
3320 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
3323 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
3325 * dwarf2read.c (mapped_index) <total_size>: Remove.
3327 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
3329 * unittests/format_pieces-selftests.c (test_format_specifier):
3332 2018-05-18 Tom Tromey <tom@tromey.com>
3334 * c-typeprint.c (maybe_print_hole): New function.
3335 (c_print_type_struct_field_offset): Update.
3336 (c_type_print_base_struct_union): Call maybe_print_hole.
3338 2018-05-17 Keith Seitz <keiths@redhat.com>
3340 * breakpoint.c (build_bpstat_chain): New function, moved from
3342 (bpstat_stop_status): Add optional parameter, `stop_chain'.
3343 If no stop chain is passed, call build_bpstat_chain to build it.
3344 * breakpoint.h (build_bpstat_chain): Declare.
3345 (bpstat_stop_status): Move documentation here from breakpoint.c.
3346 * infrun.c (handle_signal_stop): Before eliding inlined frames,
3347 build the stop chain and pass it to skip_inline_frames.
3348 Pass this stop chain to bpstat_stop_status.
3349 * inline-frame.c: Include breakpoint.h.
3350 (stopped_by_user_bp_inline_frame): New function.
3351 (skip_inline_frames): Add parameter `stop_chain'.
3352 Move documention to inline-frame.h.
3353 If non-NULL, use stopped_by_user_bp_inline_frame to determine
3354 whether the frame should be elided.
3355 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
3356 Add moved documentation and update for new parameter.
3358 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
3361 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3362 unittests/format_pieces-selftests.c.
3363 * common/format.h (format_piece) <operator==>: New.
3364 (format_pieces) <operator[]>: Remove.
3365 * common/format.c (format_pieces::format_pieces): Handle \e.
3366 * unittests/format_pieces-selftests.c: New.
3368 2018-05-17 Tom Tromey <tom@tromey.com>
3371 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
3372 (dw2_instantiate_symtab): Add skip_partial parameter.
3373 (dw2_find_last_source_symtab, dw2_map_expand_apply)
3374 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
3375 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
3376 (dw2_expand_symtabs_matching_one)
3377 (dw2_find_pc_sect_compunit_symtab)
3378 (dw2_debug_names_lookup_symbol)
3379 (dw2_debug_names_expand_symtabs_for_function): Update.
3380 (init_cutu_and_read_dies): Add skip_partial parameter.
3381 (process_psymtab_comp_unit, build_type_psymtabs_1)
3382 (process_skeletonless_type_unit, load_partial_comp_unit)
3383 (psymtab_to_symtab_1): Update.
3384 (load_full_comp_unit): Add skip_partial parameter.
3385 (process_imported_unit_die, dwarf2_read_addr_index)
3386 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
3387 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
3388 (read_signatured_type): Update.
3390 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
3392 * value.c (release_value): Remove unused variable.
3393 (record_latest_value): Likewise.
3394 (access_value_history): Likewise.
3395 (preserve_values): Likewise.
3397 2018-05-17 Tom Tromey <tom@tromey.com>
3399 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
3402 2018-05-16 Maciej W. Rozycki <macro@mips.com>
3405 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
3406 Also handle registers whose width is not a multiple of
3408 (linux_nat_trad_target::store_register): Likewise.
3410 2018-05-16 Tom Tromey <tom@tromey.com>
3412 * gdbcore.h (core_bfd): Redefine.
3413 * corelow.c (core_target::close): Update.
3414 (core_target_open): Update.
3415 * progspace.h (struct program_space) <cbfd>: Now a
3418 2018-05-16 Tom Tromey <tom@tromey.com>
3421 * symfile-add-flags.h (enum symfile_add_flags)
3422 <SYMFILE_NOT_FILENAME>: New constant.
3423 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
3424 objfile name from BFD.
3425 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
3426 * minidebug.c (find_separate_debug_file_in_section): Put
3427 ".gnu_debugdata" into BFD's file name.
3429 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
3431 * regcache.c (regcache_read_ftype, regcache_write_ftype):
3434 2018-05-15 Tamar Christina <tamar.christina@arm.com>
3437 * aarch64-tdep.c (aarch64_analyze_prologue,
3438 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
3439 Indicate not interested in errors.
3441 2018-05-15 Maciej W. Rozycki <macro@mips.com>
3443 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
3444 Supply the MIPS_ZERO_REGNUM register.
3446 2018-05-15 Maciej W. Rozycki <macro@mips.com>
3448 * mips-tdep.c (mask_address_var): Make variable static.
3450 2018-05-14 Tom Tromey <tom@tromey.com>
3452 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
3454 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
3456 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
3457 FXSAVE_ADDR for the mxcsr register.
3459 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
3461 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
3463 2018-05-11 Pedro Alves <palves@redhat.com>
3465 * corelow.c (core_target) <core_target>: No longer inline.
3466 Initialize m_core_gdbarch, m_core_vec and build the section table
3468 <~core_target>: New.
3469 <core_gdbarch, get_core_register_section>: New methods.
3470 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
3471 factored out from ...
3472 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
3474 (sniff_core_bfd): Add gdbarch parameter.
3475 (core_close): Delete, merged into ...
3476 (core_target::close): ... here. Delete self.
3477 (core_close_cleanup): Delete.
3478 (core_target_open): Allocate a core_target on the heap. Use a
3479 unique_ptr instead of a cleanup. Bits moved into the core_target
3480 ctor. Adjust to use core_target methods instead of globals.
3481 (get_core_register_section): Rename to ...
3482 (core_target::get_core_register_section): ... this and adjust.
3483 (struct get_core_registers_cb_data): New.
3484 (get_core_registers_cb): Use it. Use bool.
3485 (core_target::fetch_registers, core_target::files_info)
3486 (core_target::xfer_partial, core_target::read_description)
3487 (core_target::pid_to, core_target::thread_name): Adjust to
3488 reference class fields instead of globals.
3489 * target.h (struct target_ops_deleter, target_ops_up): New.
3491 2018-05-11 Pedro Alves <palves@redhat.com>
3493 * corefile.c (core_file_command): Move to corelow.c.
3494 * corelow.c (the_core_target): Delete.
3495 (core_file_command): Moved from corefile.c. Check exec_bfd
3496 instead of the_core_target. Use target_detach instead of calling
3497 into the_core_target directly.
3498 (maybe_say_no_core_file_now): New.
3499 (core_target::detach): Use it.
3500 (_initialize_corelow): Remove references to the_core_target.
3501 * gdbcore.h (the_core_target): Delete.
3503 2018-05-11 Tom Tromey <tromey@redhat.com>
3504 Pedro Alves <palves@redhat.com>
3506 * corefile.c (core_bfd): Remove.
3507 * gdbcore.h (core_bfd): Now a macro.
3508 * progspace.h (struct program_space) <cbfd>: New field.
3510 2018-05-11 Tom Tromey <tom@tromey.com>
3512 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
3515 2018-05-10 Tom Tromey <tom@tromey.com>
3517 * configure: Rebuild.
3518 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
3520 2018-05-10 Joel Brobecker <brobecker@adacore.com>
3523 * regformats/regdat.sh: Adjust script, following the addition
3524 of the new expedite_regs parameter to init_target_desc.
3526 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
3529 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
3530 set_gdbarch_significant_addr_bit.
3531 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
3532 set_gdbarch_significant_addr_bit.
3533 * utils.c (address_significant): Update to sign extend addr.
3535 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
3537 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
3538 (xtensa_linux_init_abi): Limit tdep->num_regs by
3539 tdep->num_nopriv_regs.
3540 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
3541 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
3544 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
3546 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
3548 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
3550 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
3551 (I387_MXCSR_INIT_VAL): New constant.
3552 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
3553 buffer if it was supplied by the inferior.
3554 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
3555 (i387_xsave_get_clear_bv): New function.
3556 (i387_supply_xsave): Only read x87 control registers from the
3557 xsave buffer if the feature is enabled, and the state will have
3558 been written, otherwise, provide a suitable default.
3559 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
3560 including x87 control registers. Update control registers if they
3561 have changed from the default value, and mark features as enabled
3563 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
3565 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
3567 * spu-tdep.c (info_spu_event_command): Fix output formatting.
3569 2018-05-07 Tom Tromey <tom@tromey.com>
3571 * configure: Rebuild.
3572 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
3574 2018-05-07 Tom Tromey <tom@tromey.com>
3577 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
3578 bit. Use correct value for VDIV.
3580 2018-05-04 Tom Tromey <tom@tromey.com>
3582 * configure: Rebuild.
3583 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
3585 2018-05-04 Tom Tromey <tom@tromey.com>
3587 * linux-record.c (record_linux_system_call) <case
3588 RECORD_SYS_RECVFROM>: Add "break".
3590 2018-05-04 Tom Tromey <tom@tromey.com>
3592 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
3593 Add missing "break".
3594 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
3595 Add missing "break".
3597 2018-05-04 Tom Tromey <tom@tromey.com>
3599 * rs6000-tdep.c (ppc_process_record_op4)
3600 (ppc_process_record_op63): Add fall-through comment.
3602 2018-05-04 Tom Tromey <tom@tromey.com>
3604 * i386-tdep.c (i386_process_record): Add fall-through comment.
3606 2018-05-04 Tom Tromey <tom@tromey.com>
3608 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
3611 2018-05-04 Tom Tromey <tom@tromey.com>
3613 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
3614 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
3615 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
3617 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
3619 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
3622 2018-05-04 Tom Tromey <tom@tromey.com>
3624 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
3626 2018-05-04 Tom Tromey <tom@tromey.com>
3628 * s390-tdep.c (s390_process_record): Fix fall-through comments.
3629 * xcoffread.c (scan_xcoff_symtab): Move comment later.
3630 * symfile.c (section_is_mapped): Fix fall-through comment.
3631 * stabsread.c (define_symbol, read_member_functions): Fix
3632 fall-through comment.
3633 * s390-linux-tdep.c (s390_process_record): Fix fall-through
3635 * remote.c (remote_wait_as): Fix fall-through comment.
3636 * p-exp.y (yylex): Fix fall-through comment.
3637 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
3639 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
3640 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
3641 * jv-exp.y (yylex): Fix fall-through comment.
3642 * go-exp.y (lex_one_token): Fix fall-through comment.
3643 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
3644 fall-through comment.
3645 * f-exp.y (yylex): Fix fall-through comment.
3646 * dwarf2read.c (process_die): Fix fall-through comments.
3647 * dbxread.c (process_one_symbol): Fix fall-through comment.
3648 * d-exp.y (lex_one_token): Fix fall-through comment.
3649 * cp-name-parser.y (yylex): Fix fall-through comment.
3650 * coffread.c (coff_symtab_read): Fix fall-through comment.
3651 * c-exp.y (lex_one_token): Fix fall-through comment.
3652 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
3654 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
3657 2018-05-04 Tom Tromey <tom@tromey.com>
3660 * NEWS: Mention gdb.execute change.
3661 * gdbcmd.h (execute_control_command): Don't declare.
3662 * python/python.c (execute_gdb_command): Use read_command_lines_1,
3663 execute_control_commands, execute_control_commands_to_string.
3664 * cli/cli-script.h (execute_control_commands)
3665 (execute_control_commands_to_string): Declare.
3666 (execute_control_command): Add from_tty parameter.
3667 * cli/cli-script.c (execute_control_commands)
3668 (execute_control_commands_to_string): New functions.
3669 (execute_user_command): Use execute_control_commands.
3670 (execute_control_command_1): Add "from_tty" parameter. Update.
3671 (execute_control_command): Likewise.
3673 2018-05-04 Tom Tromey <tom@tromey.com>
3676 * NEWS: Mention that breakpoint commands are writable.
3677 * python/py-breakpoint.c (bppy_set_commands): New function.
3678 (breakpoint_object_getset) <"commands">: Use it.
3680 2018-05-04 Tom Tromey <tom@tromey.com>
3682 * tracepoint.c (actions_command): Update.
3683 * mi/mi-cmd-break.c (mi_command_line_array)
3684 (mi_command_line_array_cnt, mi_command_line_array_ptr)
3685 (mi_read_next_line): Remove.
3686 (mi_cmd_break_commands): Update.
3687 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
3689 * cli/cli-script.c (get_command_line): Update.
3690 (process_next_line): Use function_view. Constify.
3691 (recurse_read_control_structure, read_command_lines)
3692 (read_command_lines_1): Change argument types to function_view.
3693 (do_define_command, document_command): Update.
3694 * breakpoint.h (check_tracepoint_command): Don't declare.
3695 * breakpoint.c (check_tracepoint_command): Remove.
3696 (commands_command_1, create_tracepoint_from_upload): Update.
3698 2018-05-04 Tom Tromey <tom@tromey.com>
3701 * cli/cli-script.h (enum command_control_type) <define_control>:
3703 * cli/cli-script.c (multi_line_command_p): Handle define_control.
3704 (build_command_line, execute_control_command_1)
3705 (process_next_line): Likewise.
3706 (do_define_command): New function, extracted from define_command.
3707 (define_command): Use it.
3709 2018-05-04 Tom Tromey <tom@tromey.com>
3711 * tracepoint.c (actions_command): Update.
3712 * cli/cli-script.h (read_command_lines): Update.
3713 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
3714 (MAX_TMPBUF): Remove define.
3715 (define_command): Use string_printf.
3716 (document_command): Likewise.
3717 * breakpoint.c (commands_command_1): Update.
3719 2018-05-04 Tom Tromey <tom@tromey.com>
3721 * top.c (execute_command): Update.
3722 * cli/cli-script.h (print_command_lines): Now varargs.
3723 * cli/cli-script.c (print_command_lines): Now varargs.
3724 (execute_control_command_1) <case while_control, case if_control>:
3727 2018-05-04 Tom Tromey <tom@tromey.com>
3729 * tracepoint.c (all_tracepoint_actions): Rename from
3730 all_tracepoint_actions_and_cleanup. Change return type.
3731 (actions_command, encode_actions_1, encode_actions)
3732 (trace_dump_actions, tdump_command): Update.
3733 * remote.c (remote_download_command_source): Update.
3734 * python/python.c (gdbpy_eval_from_control_command)
3735 (python_command, python_interactive_command): Update.
3736 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
3737 * guile/guile.c (guile_command)
3738 (gdbscm_eval_from_control_command, guile_command): Update.
3739 * compile/compile.c (compile_code_command)
3740 (compile_print_command, compile_to_object): Update.
3741 * cli/cli-script.h (struct command_lines_deleter): New.
3742 (counted_command_line): New typedef.
3743 (struct command_line): Add constructor, destructor.
3744 <body_list>: Remove.
3745 <body_list_0, body_list_1>: New members.
3746 (command_line_up): Remove typedef.
3747 (read_command_lines, read_command_lines_1, get_command_line):
3749 (copy_command_lines): Don't declare.
3750 * cli/cli-script.c (build_command_line): Use "new".
3751 (get_command_line): Return counted_command_line.
3752 (print_command_lines, execute_user_command)
3753 (execute_control_command_1, while_command, if_command): Update.
3754 (realloc_body_list): Remove.
3755 (process_next_line, recurse_read_control_structure): Update.
3756 (read_command_lines, read_command_lines_1): Return counted_command_line.
3757 (free_command_lines): Use "delete".
3758 (copy_command_lines): Remove.
3759 (define_command, document_command, show_user_1): Update.
3760 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
3761 a counted_command_line.
3762 * breakpoint.h (counted_command_line): Remove typedef.
3763 (breakpoint_set_commands): Update.
3764 * breakpoint.c (check_no_tracepoint_commands)
3765 (validate_commands_for_breakpoint): Update.
3766 (breakpoint_set_commands): Change commands to be a
3767 counted_command_line.
3768 (commands_command_1, update_dprintf_command_list)
3769 (create_tracepoint_from_upload): Update.
3771 2018-05-04 Tom Tromey <tom@tromey.com>
3773 * cli/cli-decode.h (cmd_list_element): New constructor.
3774 (~cmd_list_element): New destructor.
3775 (struct cmd_list_element): Add initializers.
3776 * cli/cli-decode.c (do_add_cmd): Use "new".
3777 (delete_cmd): Use "delete".
3779 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
3780 Pedro Alves <palves@redhat.com>
3782 PR breakpoints/19806 and support for PR external/20207.
3783 * NEWS: Mention Aarch64 watchpoint improvements.
3784 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
3785 watchpoints and PR external/20207 watchpoints.
3786 * nat/aarch64-linux-hw-point.c
3787 (kernel_supports_any_contiguous_range): New.
3788 (aarch64_watchpoint_offset): New.
3789 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
3790 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
3791 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
3792 (aarch64_align_watchpoint): New parameters aligned_offset_p and
3793 next_addr_orig_p. Support PR external/20207 watchpoints.
3794 (aarch64_downgrade_regs): New.
3795 (aarch64_dr_state_insert_one_point): New parameters offset and
3797 (aarch64_dr_state_remove_one_point): Likewise.
3798 (aarch64_handle_breakpoint): Update caller.
3799 (aarch64_handle_aligned_watchpoint): Likewise.
3800 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
3802 (aarch64_linux_set_debug_regs): Remove const from state. Call
3803 aarch64_downgrade_regs.
3804 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
3805 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
3806 (DR_CONTROL_MASK): ... this.
3807 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
3808 (unsigned int aarch64_watchpoint_offset): New prototype.
3809 (aarch64_linux_set_debug_regs): Remove const from state.
3810 * utils.c (align_up, align_down): Move to ...
3811 * common/common-utils.c (align_up, align_down): ... here.
3812 * utils.h (align_up, align_down): Move to ...
3813 * common/common-utils.h (align_up, align_down): ... here.
3815 2018-05-04 Joel Brobecker <brobecker@adacore.com>
3817 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
3818 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
3819 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
3820 Re-implement to match the ABI as summarized in GCC's
3821 gcc/config/sparc/sparc.c. All callers updated.
3822 (sparc32_store_arguments): Remove assertion.
3824 2018-05-04 Tom Tromey <tom@tromey.com>
3826 * printcmd.c: Don't include tui.h.
3827 (decode_format): Use skip_spaces.
3829 2018-05-04 Tom Tromey <tom@tromey.com>
3832 * printcmd.c (last_count): New global.
3833 (x_command): Use saved count when repeating.
3835 2018-05-04 Tom Tromey <tom@tromey.com>
3837 * nto-procfs.c (do_closedir_cleanup): Remove.
3838 (procfs_pidlist): Use gdb_dir_up.
3839 * procfs.c (do_closedir_cleanup): Remove.
3840 (proc_update_threads): Use gdb_dir_up.
3841 * common/filestuff.h (struct gdb_dir_deleter): New.
3842 (gdb_dir_up): New typedef.
3844 2018-05-04 Tom Tromey <tom@tromey.com>
3846 * ada-lang.c (print_mention_exception): Use std::string.
3848 2018-05-04 Tom Tromey <tom@tromey.com>
3850 * ada-lang.c (create_excep_cond_exprs): Update.
3851 (ada_exception_catchpoint_cond_string): Use std::string.
3853 2018-05-04 Tom Tromey <tom@tromey.com>
3855 * ada-lang.c (xget_renaming_scope): Return std::string.
3856 (old_renaming_is_invisible): Update.
3858 2018-05-04 Tom Tromey <tom@tromey.com>
3860 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
3861 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
3863 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
3865 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
3867 2018-05-04 Tom Tromey <tom@tromey.com>
3869 * remote.c (remote_query_supported_append): Change type.
3870 (remote_check_symbols): Update.
3872 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
3875 * configure.ac: Prepend libpython.
3876 * python/python-config.py: Likewise.
3877 * configure: Regenerate.
3879 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
3881 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
3883 2018-05-03 Pedro Alves <palves@redhat.com>
3886 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
3887 override. Write 'true' instead of '1'.
3888 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
3891 2018-05-02 Pedro Alves <palves@redhat.com>
3893 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
3894 add_inf_child_target.
3895 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
3896 add_inf_child_target.
3897 * aix-thread.c (aix_thread_target_info): New.
3898 (aix_thread_target) <shortname, longname, doc>: Delete.
3900 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
3901 add_inf_child_target.
3902 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
3903 add_inf_child_target.
3904 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
3905 add_inf_child_target.
3906 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
3907 add_inf_child_target.
3908 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
3909 add_inf_child_target.
3910 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
3911 add_inf_child_target.
3912 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
3913 add_inf_child_target.
3914 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
3915 add_inf_child_target.
3916 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
3917 add_inf_child_target.
3918 * bfd-target.c (target_bfd_target_info): New.
3919 (target_bfd) <shortname, longname, doc>: Delete.
3921 * bsd-kvm.c (bsd_kvm_target_info): New.
3922 (bsd_kvm_target) <shortname, longname, doc>: Delete.
3924 (bsd_kvm_target::open): Rename to ...
3925 (bsd_kvm_target_open): ... this. Adjust.
3926 * bsd-uthread.c (bsd_uthread_target_info): New.
3927 (bsd_uthread_target) <shortname, longname, doc>: Delete.
3929 * corefile.c (core_file_command): Adjust.
3930 * corelow.c (core_target_info): New.
3931 (core_target) <shortname, longname, doc>: Delete.
3933 (core_target::open): Rename to ...
3934 (core_target_open): ... this. Adjust.
3935 * ctf.c (ctf_target_info): New.
3936 (ctf_target) <shortname, longname, doc>: Delete.
3938 (ctf_target::open): Rename to ...
3939 (ctf_target_open): ... this.
3940 (_initialize_ctf): Adjust.
3941 * exec.c (exec_target_info): New.
3942 (exec_target) <shortname, longname, doc>: Delete.
3944 (exec_target::open): Rename to ...
3945 (exec_target_open): ... this.
3946 * gdbcore.h (core_target_open): Declare.
3947 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
3948 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
3949 add_inf_child_target.
3950 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
3951 add_inf_child_target.
3952 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
3953 add_inf_child_target.
3954 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
3955 add_inf_child_target.
3956 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
3957 add_inf_child_target.
3958 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
3959 add_inf_child_target.
3960 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
3961 add_inf_child_target.
3962 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
3963 add_inf_child_target.
3964 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
3965 add_inf_child_target.
3966 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
3967 add_inf_child_target.
3968 * inf-child.c (inf_child_target_info): New.
3969 (inf_child_target::info): New.
3970 (inf_child_open_target): Remove 'target' parameter. Use
3971 get_native_target instead.
3972 (inf_child_target::open): Delete.
3973 (add_inf_child_target): New.
3974 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
3977 (add_inf_child_target): Declare.
3978 (inf_child_open_target): Declare.
3979 * linux-thread-db.c (thread_db_target_info): New.
3980 (thread_db_target) <shortname, longname, doc>: Delete.
3982 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
3983 add_inf_child_target.
3984 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
3985 add_inf_child_target.
3986 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
3987 add_inf_child_target.
3988 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
3989 add_inf_child_target.
3990 * make-target-delegates (print_class): Adjust.
3991 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
3992 add_inf_child_target.
3993 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
3994 add_inf_child_target.
3995 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
3996 add_inf_child_target.
3997 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
3998 add_inf_child_target.
3999 * nto-procfs.c (nto_native_target_info): New.
4000 (nto_procfs_target_native) <shortname, longname, doc>:
4003 (nto_procfs_target_info): New.
4004 (nto_procfs_target_procfs) <shortname, longname, doc>:
4007 (init_procfs_targets): Adjust.
4008 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
4009 add_inf_child_target.
4010 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
4011 add_inf_child_target.
4012 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
4013 add_inf_child_target.
4014 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
4015 add_inf_child_target.
4016 * ravenscar-thread.c (ravenscar_target_info): New.
4017 (ravenscar_thread_target) <shortname, longname, doc>:
4020 * record-btrace.c (record_btrace_target_info):
4021 (record_btrace_target) <shortname, longname, doc>: Delete.
4023 (record_btrace_target::open): Rename to ...
4024 (record_btrace_target_open): ... this. Adjust.
4025 * record-full.c (record_longname, record_doc): New.
4026 (record_full_base_target) <shortname, longname, doc>: Delete.
4028 (record_full_target_info): New.
4029 (record_full_target): <shortname>: Delete.
4031 (record_full_core_open_1, record_full_open_1): Update comments.
4032 (record_full_base_target::open): Rename to ...
4033 (record_full_open): ... this.
4034 (cmd_record_full_restore): Update.
4035 (_initialize_record_full): Update.
4036 * remote-sim.c (remote_sim_target_info): New.
4037 (gdbsim_target) <shortname, longname, doc>: Delete.
4039 (gdbsim_target::open): Rename to ...
4040 (gdbsim_target_open): ... this.
4041 (_initialize_remote_sim): Adjust.
4042 * remote.c (remote_doc): New.
4043 (remote_target_info): New.
4044 (remote_target) <shortname, longname, doc>: Delete.
4046 (extended_remote_target_info): New.
4047 (extended_remote_target) <shortname, longname, doc>: Delete.
4049 (remote_target::open_1): Make static. Adjust.
4050 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
4051 * s390-linux-nat.c (_initialize_s390_nat): Use
4052 add_inf_child_target.
4053 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
4054 add_inf_child_target.
4055 * sol-thread.c (thread_db_target_info): New.
4056 (sol_thread_target) <shortname, longname, doc>: Delete.
4058 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
4059 add_inf_child_target.
4060 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
4061 add_inf_child_target.
4062 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
4063 add_inf_child_target.
4064 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
4065 add_inf_child_target.
4066 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
4067 add_inf_child_target.
4068 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
4069 add_inf_child_target.
4070 * spu-linux-nat.c (_initialize_spu_nat): Use
4071 add_inf_child_target.
4072 * spu-multiarch.c (spu_multiarch_target_info): New.
4073 (spu_multiarch_target) <shortname, longname, doc>: Delete.
4075 * target-delegates.c: Regenerate.
4076 * target.c: Include <unordered_map>.
4077 (target_ops_p): Delete.
4078 (DEF_VEC_P(target_ops_p)): Delete.
4079 (target_factories): New.
4080 (test_target_info): New.
4081 (test_target_ops::info): New.
4082 (open_target): Adjust to use target_factories.
4083 (add_target_with_completer): Rename to ...
4084 (add_target): ... this. Change prototype. Register target_info
4085 and open callback in target_factories. Register target_info in
4086 command context instead of target_ops.
4087 (add_target): Delete old implementation.
4088 (add_deprecated_target_alias): Change prototype. Adjust.
4089 (the_native_target): New.
4090 (set_native_target, get_native_target): New.
4091 (find_default_run_target): Use the_native_target.
4092 (find_attach_target, find_run_target): Simplify.
4093 (target_ops::open): Delete.
4094 (dummy_target_info): New.
4095 (dummy_target::shortname, dummy_target::longname)
4096 (dummy_target::doc): Delete.
4097 (dummy_target::info): New.
4098 (debug_target::shortname, debug_target::longname)
4099 (debug_target::doc): Delete.
4100 (debug_target::info): New.
4101 * target.h (struct target_info): New.
4102 (target_ops::~target_ops): Add comment.
4103 (target_ops::info): New.
4104 (target_ops::shortname, target_ops::longname, target_ops::doc): No
4105 longer virtual. Implement in terms of target_info.
4106 (set_native_target, get_native_target): Declare.
4107 (target_open_ftype): New.
4108 (add_target, add_target_with_completer)
4109 (add_deprecated_target_alias): Change prototype.
4110 (test_target) <shortname, longname, doc>: Delete.
4112 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
4113 add_inf_child_target.
4114 * tracefile-tfile.c (tfile_target_info): New.
4115 (tfile_target) <shortname, longname, doc>: Delete.
4117 (tfile_target::open): Rename to ...
4118 (tfile_target_open): ... this.
4119 (_initialize_tracefile_tfile): Adjust.
4120 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
4121 add_inf_child_target.
4122 * windows-nat.c (_initialize_windows_nat): Use
4123 add_inf_child_target.
4124 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
4125 add_inf_child_target.
4127 2018-05-02 Pedro Alves <palves@redhat.com>
4129 * linux-nat.h (linux_nat_target) <low_new_thread,
4130 low_delete_thread, low_new_fork, low_forget_process,
4131 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
4132 New virtual methods.
4133 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
4134 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
4135 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
4136 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
4137 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
4139 * linux-fork.c (delete_fork): Adjust to call low method.
4140 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
4141 (linux_nat_new_fork, linux_nat_forget_process_hook)
4142 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
4143 (linux_nat_status_is_event):
4144 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
4145 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
4147 (sigtrap_is_event): Rename to ...
4148 (linux_nat_target::low_status_is_event): ... this.
4149 (linux_nat_set_status_is_event): Delete.
4150 (save_stop_reason, linux_nat_wait_1)
4151 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
4153 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
4154 (linux_nat_set_new_fork, linux_nat_set_forget_process)
4155 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
4156 (linux_nat_set_prepare_to_resume): Delete.
4157 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
4158 low virtual methods.
4159 * amd64-linux-nat.c: Likewise.
4160 * arm-linux-nat.c: Likewise.
4161 * i386-linux-nat.c: Likewise.
4162 * ia64-linux-nat.c: Likewise.
4163 * mips-linux-nat.c: Likewise.
4164 * ppc-linux-nat.c: Likewise.
4165 * s390-linux-nat.c: Likewise.
4166 * sparc64-linux-nat.c: Likewise.
4167 * x86-linux-nat.c: Likewise.
4168 * x86-linux-nat.h: Include "nat/x86-linux.h".
4169 (x86_linux_nat_target) <low_new_fork, low_forget_process,
4170 low_prepare_to_resume, low_new_thread, low_delete_thread>:
4173 2018-05-02 Pedro Alves <palves@redhat.com>
4175 * target.h (target_ops)
4176 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4177 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
4178 stopped_by_watchpoint, have_continuable_watchpoint,
4179 stopped_data_address, watchpoint_addr_within_range,
4180 can_accel_watchpoint_condition, can_run, thread_alive,
4181 has_all_memory, has_memory, has_stack, has_registers,
4182 has_execution, can_async_p, is_async_p, supports_non_stop,
4183 always_non_stop_p, can_execute_reverse, supports_multi_process,
4184 supports_enable_disable_tracepoint,
4185 supports_disable_randomization, supports_string_tracing,
4186 supports_evaluation_of_breakpoint_conditions,
4187 can_run_breakpoint_commands, filesystem_is_local,
4188 can_download_tracepoint, get_trace_state_variable_value,
4189 set_trace_notes, get_tib_address, use_agent, can_use_agent,
4190 record_is_replaying, record_will_replay,
4191 augmented_libraries_svr4_read>: Adjust to return bool.
4192 * aarch64-linux-nat.c: All implementations adjusted.
4193 * aix-thread.c: All implementations adjusted.
4194 * arm-linux-nat.c: All implementations adjusted.
4195 * breakpoint.c: All implementations adjusted.
4196 * bsd-kvm.c: All implementations adjusted.
4197 * bsd-uthread.c: All implementations adjusted.
4198 * corelow.c: All implementations adjusted.
4199 * ctf.c: All implementations adjusted.
4200 * darwin-nat.c: All implementations adjusted.
4201 * darwin-nat.h: All implementations adjusted.
4202 * exec.c: All implementations adjusted.
4203 * fbsd-nat.c: All implementations adjusted.
4204 * fbsd-nat.h: All implementations adjusted.
4205 * gnu-nat.c: All implementations adjusted.
4206 * gnu-nat.h: All implementations adjusted.
4207 * go32-nat.c: All implementations adjusted.
4208 * ia64-linux-nat.c: All implementations adjusted.
4209 * inf-child.c: All implementations adjusted.
4210 * inf-child.h: All implementations adjusted.
4211 * inf-ptrace.c: All implementations adjusted.
4212 * inf-ptrace.h: All implementations adjusted.
4213 * linux-nat.c: All implementations adjusted.
4214 * linux-nat.h: All implementations adjusted.
4215 * mips-linux-nat.c: All implementations adjusted.
4216 * nto-procfs.c: All implementations adjusted.
4217 * ppc-linux-nat.c: All implementations adjusted.
4218 * procfs.c: All implementations adjusted.
4219 * ravenscar-thread.c: All implementations adjusted.
4220 * record-btrace.c: All implementations adjusted.
4221 * record-full.c: All implementations adjusted.
4222 * remote-sim.c: All implementations adjusted.
4223 * remote.c: All implementations adjusted.
4224 * s390-linux-nat.c: All implementations adjusted.
4225 * sol-thread.c: All implementations adjusted.
4226 * spu-multiarch.c: All implementations adjusted.
4227 * target-delegates.c: All implementations adjusted.
4228 * target.c: All implementations adjusted.
4229 * target.h: All implementations adjusted.
4230 * tracefile-tfile.c: All implementations adjusted.
4231 * tracefile.c: All implementations adjusted.
4232 * tracefile.h: All implementations adjusted.
4233 * windows-nat.c: All implementations adjusted.
4234 * x86-linux-nat.h: All implementations adjusted.
4235 * x86-nat.h: All implementations adjusted.
4237 2018-05-02 Pedro Alves <palves@redhat.com>
4239 * make-target-delegates (scan_target_h): Don't trim lines here.
4240 Replace sequences of tabs and/or whitespace with a single
4242 (top level, parsing methods): Trim each line before processing it
4245 2018-05-02 Pedro Alves <palves@redhat.com>
4246 John Baldwin <jhb@freebsd.org>
4248 * target.h (enum strata) <debug_stratum>: New.
4249 (struct target_ops) <all delegation methods>: Replace by C++
4250 virtual methods, and drop "to_" prefix. All references updated
4252 <to_shortname, to_longname, to_doc, to_data,
4253 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
4254 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
4255 virtual methods. All references updated throughout.
4256 <can_attach, supports_terminal_ours, can_create_inferior,
4257 get_thread_control_capabilities, attach_no_wait>: New
4259 <insert_breakpoint, remove_breakpoint>: Now
4260 TARGET_DEFAULT_NORETURN methods.
4261 <info_proc>: Now returns bool.
4263 (OPS_MAGIC): Delete.
4264 (current_target): Delete. All references replaced by references
4266 (target_stack): ... this. New.
4267 (target_shortname, target_longname): Adjust.
4268 (target_can_run): Now a function declaration.
4269 (default_child_has_all_memory, default_child_has_memory)
4270 (default_child_has_stack, default_child_has_registers)
4271 (default_child_has_execution): Remove target_ops parameter.
4272 (complete_target_initialization): Delete.
4273 (memory_breakpoint_target): New template class.
4274 (test_target_ops): Refactor as a C++ class with virtual methods.
4275 * make-target-delegates (NAME_PART): Tighten.
4276 (POINTER_PART, CP_SYMBOL): New.
4277 (SIMPLE_RETURN_PART): Reimplement.
4278 (VEC_RETURN_PART): Expect less.
4279 (RETURN_PART, VIRTUAL_PART): New.
4280 (METHOD): Adjust to C++ virtual methods.
4281 (scan_target_h): Remove reference to C99.
4282 (dname): Output "target_ops::" prefix.
4283 (write_function_header): Adjust to output a C++ class method.
4284 (write_declaration): New.
4285 (write_delegator): Adjust to output a C++ class method.
4286 (tdname): Output "dummy_target::" prefix.
4287 (write_tdefault, write_debugmethod): Adjust to output a C++ class
4289 (tdefault_names, debug_names): Delete.
4290 (return_types, tdefaults, styles, argtypes_array): New.
4291 (top level): All methods are delegators.
4293 (top level): Print dummy_target and debug_target classes.
4294 * target-delegates.c: Regenerate.
4295 * target-debug.h (target_debug_print_enum_info_proc_what)
4296 (target_debug_print_thread_control_capabilities)
4297 (target_debug_print_thread_info_p): New.
4298 * target.c (dummy_target): Delete.
4299 (the_dummy_target, the_debug_target): New.
4300 (target_stack): Now extern.
4301 (set_targetdebug): Push/unpush debug target.
4302 (default_child_has_all_memory, default_child_has_memory)
4303 (default_child_has_stack, default_child_has_registers)
4304 (default_child_has_execution): Remove target_ops parameter.
4305 (complete_target_initialization): Delete.
4306 (add_target_with_completer): No longer call
4307 complete_target_initialization.
4308 (target_supports_terminal_ours): Use regular delegation.
4309 (update_current_target): Delete.
4310 (push_target): No longer check magic number. Don't call
4311 update_current_target.
4312 (unpush_target): Don't call update_current_target.
4313 (target_is_pushed): No longer check magic number.
4314 (target_require_runnable): Skip for all stratums over
4316 (target_ops::info_proc): New.
4317 (target_info_proc): Use find_target_at and
4318 find_default_run_target.
4319 (target_supports_disable_randomization): Use regular delegation.
4320 (target_get_osdata): Use find_target_at.
4321 (target_ops::open, target_ops::close, target_ops::can_attach)
4322 (target_ops::attach, target_ops::can_create_inferior)
4323 (target_ops::create_inferior, target_ops::can_run)
4324 (target_can_run): New.
4325 (default_fileio_target): Use regular delegation.
4326 (target_ops::fileio_open, target_ops::fileio_pwrite)
4327 (target_ops::fileio_pread, target_ops::fileio_fstat)
4328 (target_ops::fileio_close, target_ops::fileio_unlink)
4329 (target_ops::fileio_readlink): New.
4330 (target_fileio_open_1, target_fileio_unlink)
4331 (target_fileio_readlink): Always call the target method. Handle
4333 (return_zero, return_zero_has_execution): Delete.
4334 (init_dummy_target): Delete.
4335 (dummy_target::dummy_target, dummy_target::shortname)
4336 (dummy_target::longname, dummy_target::doc)
4337 (debug_target::debug_target, debug_target::shortname)
4338 (debug_target::longname, debug_target::doc): New.
4339 (target_supports_delete_record): Use regular delegation.
4340 (setup_target_debug): Delete.
4341 (maintenance_print_target_stack): Skip debug_stratum.
4342 (initialize_targets): Instantiate the_dummy_target and
4344 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
4346 (target_auxv_search, fprint_target_auxv): Adjust.
4347 (info_auxv_command): Adjust to use target_stack.
4348 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
4349 * exceptions.c (print_flush): Handle a NULL target_stack.
4350 * regcache.c (target_ops_no_register): Refactor as class with
4353 * exec.c (exec_target): New class.
4354 (exec_ops): Now an exec_target.
4355 (exec_open, exec_close_1, exec_get_section_table)
4356 (exec_xfer_partial, exec_files_info, exec_has_memory)
4357 (exec_make_note_section): Refactor as exec_target methods.
4358 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
4360 (exec_target::find_memory_regions): New.
4361 (_initialize_exec): Don't call init_exec_ops.
4362 * gdbcore.h (exec_file_clear): Delete.
4364 * corefile.c (core_target): Delete.
4365 (core_file_command): Adjust.
4366 * corelow.c (core_target): New class.
4367 (the_core_target): New.
4368 (core_close): Remove target_ops parameter.
4369 (core_close_cleanup): Adjust.
4370 (core_target::close): New.
4371 (core_open, core_detach, get_core_registers, core_files_info)
4372 (core_xfer_partial, core_thread_alive, core_read_description)
4373 (core_pid_to_str, core_thread_name, core_has_memory)
4374 (core_has_stack, core_has_registers, core_info_proc): Rework as
4375 core_target methods.
4376 (ignore, core_remove_breakpoint, init_core_ops): Delete.
4377 (_initialize_corelow): Initialize the_core_target.
4378 * gdbcore.h (core_target): Delete.
4379 (the_core_target): New.
4381 * ctf.c: (ctf_target): New class.
4382 (ctf_ops): Now a ctf_target.
4383 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
4384 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
4385 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
4387 (init_ctf_ops): Delete.
4388 (_initialize_ctf): Don't call it.
4389 * tracefile-tfile.c (tfile_target): New class.
4390 (tfile_ops): Now a tfile_target.
4391 (tfile_open, tfile_close, tfile_files_info)
4392 (tfile_get_tracepoint_status, tfile_trace_find)
4393 (tfile_fetch_registers, tfile_xfer_partial)
4394 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
4395 Refactor as tfile_target methods.
4396 (tfile_xfer_partial_features): Remove target_ops parameter.
4397 (init_tfile_ops): Delete.
4398 (_initialize_tracefile_tfile): Don't call it.
4399 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
4400 (tracefile_has_stack, tracefile_has_registers)
4401 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
4402 tracefile_target methods.
4403 (init_tracefile_ops): Delete.
4404 (tracefile_target::tracefile_target): New.
4405 * tracefile.h: Include "target.h".
4406 (tracefile_target): New class.
4407 (init_tracefile_ops): Delete.
4409 * spu-multiarch.c (spu_multiarch_target): New class.
4410 (spu_ops): Now a spu_multiarch_target.
4411 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
4412 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
4413 (spu_search_memory, spu_mourn_inferior): Refactor as
4414 spu_multiarch_target methods.
4415 (init_spu_ops): Delete.
4416 (_initialize_spu_multiarch): Remove references to init_spu_ops,
4417 complete_target_initialization.
4419 * ravenscar-thread.c (ravenscar_thread_target): New class.
4420 (ravenscar_ops): Now a ravenscar_thread_target.
4421 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
4422 (ravenscar_thread_alive, ravenscar_pid_to_str)
4423 (ravenscar_fetch_registers, ravenscar_store_registers)
4424 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
4425 (ravenscar_stopped_by_hw_breakpoint)
4426 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
4427 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
4428 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
4430 (init_ravenscar_thread_ops): Delete.
4431 (_initialize_ravenscar): Remove references to
4432 init_ravenscar_thread_ops and complete_target_initialization.
4434 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
4435 (bsd_uthread_target): New class.
4436 (bsd_uthread_ops): Now a bsd_uthread_target.
4437 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
4438 (bsd_uthread_close, bsd_uthread_mourn_inferior)
4439 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
4440 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
4441 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
4442 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
4443 (bsd_uthread_target): Delete function.
4444 (_initialize_bsd_uthread): Remove reference to
4445 complete_target_initialization.
4447 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
4448 (target_bfd): ... this new class.
4449 (target_bfd_xfer_partial, target_bfd_get_section_table)
4450 (target_bfd_close): Refactor as target_bfd methods.
4451 (target_bfd::~target_bfd): New.
4452 (target_bfd_reopen): Adjust.
4453 (target_bfd::close): New.
4455 * record-btrace.c (record_btrace_target): New class.
4456 (record_btrace_ops): Now a record_btrace_target.
4457 (record_btrace_open, record_btrace_stop_recording)
4458 (record_btrace_disconnect, record_btrace_close)
4459 (record_btrace_async, record_btrace_info)
4460 (record_btrace_insn_history, record_btrace_insn_history_range)
4461 (record_btrace_insn_history_from, record_btrace_call_history)
4462 (record_btrace_call_history_range)
4463 (record_btrace_call_history_from, record_btrace_record_method)
4464 (record_btrace_is_replaying, record_btrace_will_replay)
4465 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
4466 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
4467 (record_btrace_store_registers, record_btrace_prepare_to_store)
4468 (record_btrace_to_get_unwinder)
4469 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
4470 (record_btrace_commit_resume, record_btrace_wait)
4471 (record_btrace_stop, record_btrace_can_execute_reverse)
4472 (record_btrace_stopped_by_sw_breakpoint)
4473 (record_btrace_supports_stopped_by_sw_breakpoint)
4474 (record_btrace_stopped_by_hw_breakpoint)
4475 (record_btrace_supports_stopped_by_hw_breakpoint)
4476 (record_btrace_update_thread_list, record_btrace_thread_alive)
4477 (record_btrace_goto_begin, record_btrace_goto_end)
4478 (record_btrace_goto, record_btrace_stop_replaying_all)
4479 (record_btrace_execution_direction)
4480 (record_btrace_prepare_to_generate_core)
4481 (record_btrace_done_generating_core): Refactor as
4482 record_btrace_target methods.
4483 (init_record_btrace_ops): Delete.
4484 (_initialize_record_btrace): Remove reference to
4485 init_record_btrace_ops.
4486 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
4487 the execution_direction global.
4488 (record_full_base_target, record_full_target)
4489 (record_full_core_target): New classes.
4490 (record_full_ops): Now a record_full_target.
4491 (record_full_core_ops): Now a record_full_core_target.
4492 (record_full_target::detach, record_full_target::disconnect)
4493 (record_full_core_target::disconnect)
4494 (record_full_target::mourn_inferior, record_full_target::kill):
4496 (record_full_open, record_full_close, record_full_async): Refactor
4497 as methods of the record_full_base_target class.
4498 (record_full_resume, record_full_commit_resume): Refactor
4499 as methods of the record_full_target class.
4500 (record_full_wait, record_full_stopped_by_watchpoint)
4501 (record_full_stopped_data_address)
4502 (record_full_stopped_by_sw_breakpoint)
4503 (record_full_supports_stopped_by_sw_breakpoint)
4504 (record_full_stopped_by_hw_breakpoint)
4505 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
4506 methods of the record_full_base_target class.
4507 (record_full_store_registers, record_full_xfer_partial)
4508 (record_full_insert_breakpoint, record_full_remove_breakpoint):
4509 Refactor as methods of the record_full_target class.
4510 (record_full_can_execute_reverse, record_full_get_bookmark)
4511 (record_full_goto_bookmark, record_full_execution_direction)
4512 (record_full_record_method, record_full_info, record_full_delete)
4513 (record_full_is_replaying, record_full_will_replay)
4514 (record_full_goto_begin, record_full_goto_end, record_full_goto)
4515 (record_full_stop_replaying): Refactor as methods of the
4516 record_full_base_target class.
4517 (record_full_core_resume, record_full_core_kill)
4518 (record_full_core_fetch_registers)
4519 (record_full_core_prepare_to_store)
4520 (record_full_core_store_registers, record_full_core_xfer_partial)
4521 (record_full_core_insert_breakpoint)
4522 (record_full_core_remove_breakpoint)
4523 (record_full_core_has_execution): Refactor
4524 as methods of the record_full_core_target class.
4525 (record_full_base_target::supports_delete_record): New.
4526 (init_record_full_ops): Delete.
4527 (init_record_full_core_ops): Delete.
4528 (record_full_save): Refactor as method of the
4529 record_full_base_target class.
4530 (_initialize_record_full): Remove references to
4531 init_record_full_ops and init_record_full_core_ops.
4533 * remote.c (remote_target, extended_remote_target): New classes.
4534 (remote_ops): Now a remote_target.
4535 (extended_remote_ops): Now an extended_remote_target.
4536 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
4537 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
4538 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
4539 (remote_pass_signals, remote_set_syscall_catchpoint)
4540 (remote_program_signals, )
4541 (remote_thread_always_alive): Remove target_ops parameter.
4542 (remote_thread_alive, remote_thread_name)
4543 (remote_update_thread_list, remote_threads_extra_info)
4544 (remote_static_tracepoint_marker_at)
4545 (remote_static_tracepoint_markers_by_strid)
4546 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
4547 (remote_open): Refactor as methods of remote_target.
4548 (extended_remote_open, extended_remote_detach)
4549 (extended_remote_attach, extended_remote_post_attach):
4550 (extended_remote_supports_disable_randomization)
4551 (extended_remote_create_inferior): : Refactor as method of
4552 extended_remote_target.
4553 (remote_set_permissions, remote_open_1, remote_detach)
4554 (remote_follow_fork, remote_follow_exec, remote_disconnect)
4555 (remote_resume, remote_commit_resume, remote_stop)
4556 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
4557 (remote_terminal_ours, remote_wait, remote_fetch_registers)
4558 (remote_prepare_to_store, remote_store_registers)
4559 (remote_flash_erase, remote_flash_done, remote_files_info)
4560 (remote_kill, remote_mourn, remote_insert_breakpoint)
4561 (remote_remove_breakpoint, remote_insert_watchpoint)
4562 (remote_watchpoint_addr_within_range)
4563 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
4564 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
4565 (remote_supports_stopped_by_sw_breakpoint)
4566 (remote_stopped_by_hw_breakpoint)
4567 (remote_supports_stopped_by_hw_breakpoint)
4568 (remote_stopped_by_watchpoint, remote_stopped_data_address)
4569 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
4570 (remote_verify_memory): Refactor as methods of remote_target.
4571 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
4573 (remote_xfer_partial, remote_get_memory_xfer_limit)
4574 (remote_search_memory, remote_rcmd, remote_memory_map)
4575 (remote_pid_to_str, remote_get_thread_local_address)
4576 (remote_get_tib_address, remote_read_description): Refactor as
4577 methods of remote_target.
4578 (remote_target::fileio_open, remote_target::fileio_pwrite)
4579 (remote_target::fileio_pread, remote_target::fileio_close): New.
4580 (remote_hostio_readlink, remote_hostio_fstat)
4581 (remote_filesystem_is_local, remote_can_execute_reverse)
4582 (remote_supports_non_stop, remote_supports_disable_randomization)
4583 (remote_supports_multi_process, remote_supports_cond_breakpoints)
4584 (remote_supports_enable_disable_tracepoint)
4585 (remote_supports_string_tracing)
4586 (remote_can_run_breakpoint_commands, remote_trace_init)
4587 (remote_download_tracepoint, remote_can_download_tracepoint)
4588 (remote_download_trace_state_variable, remote_enable_tracepoint)
4589 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
4590 (remote_trace_start, remote_get_trace_status)
4591 (remote_get_tracepoint_status, remote_trace_stop)
4592 (remote_trace_find, remote_get_trace_state_variable_value)
4593 (remote_save_trace_data, remote_get_raw_trace_data)
4594 (remote_set_disconnected_tracing, remote_core_of_thread)
4595 (remote_set_circular_trace_buffer, remote_traceframe_info)
4596 (remote_get_min_fast_tracepoint_insn_len)
4597 (remote_set_trace_buffer_size, remote_set_trace_notes)
4598 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
4599 (remote_disable_btrace, remote_teardown_btrace)
4600 (remote_read_btrace, remote_btrace_conf)
4601 (remote_augmented_libraries_svr4_read, remote_load)
4602 (remote_pid_to_exec_file, remote_can_do_single_step)
4603 (remote_execution_direction, remote_thread_handle_to_thread_info):
4604 Refactor as methods of remote_target.
4605 (init_remote_ops, init_extended_remote_ops): Delete.
4606 (remote_can_async_p, remote_is_async_p, remote_async)
4607 (remote_thread_events, remote_upload_tracepoints)
4608 (remote_upload_trace_state_variables): Refactor as methods of
4610 (_initialize_remote): Remove references to init_remote_ops and
4611 init_extended_remote_ops.
4613 * remote-sim.c (gdbsim_target): New class.
4614 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
4615 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
4616 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
4617 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
4618 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
4619 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
4620 Refactor as methods of gdbsim_target.
4621 (gdbsim_ops): Now a gdbsim_target.
4622 (init_gdbsim_ops): Delete.
4623 (gdbsim_cntrl_c): Adjust.
4624 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
4626 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
4627 (the_amd64_linux_nat_target): New.
4628 (amd64_linux_fetch_inferior_registers)
4629 (amd64_linux_store_inferior_registers): Refactor as methods of
4630 amd64_linux_nat_target.
4631 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
4632 * i386-linux-nat.c: Don't include "linux-nat.h".
4633 (i386_linux_nat_target): New class.
4634 (the_i386_linux_nat_target): New.
4635 (i386_linux_fetch_inferior_registers)
4636 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
4637 as methods of i386_linux_nat_target.
4638 (_initialize_i386_linux_nat): Adjust. Set linux_target.
4639 * inf-child.c (inf_child_ops): Delete.
4640 (inf_child_fetch_inferior_registers)
4641 (inf_child_store_inferior_registers): Delete.
4642 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
4643 methods of inf_child_target.
4644 (inf_child_target::supports_terminal_ours)
4645 (inf_child_target::terminal_init)
4646 (inf_child_target::terminal_inferior)
4647 (inf_child_target::terminal_ours_for_output)
4648 (inf_child_target::terminal_ours, inf_child_target::interrupt)
4649 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
4651 (inf_child_open, inf_child_disconnect, inf_child_close)
4652 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
4653 (inf_child_post_startup_inferior, inf_child_can_run)
4654 (inf_child_pid_to_exec_file): Refactor as methods of
4656 (inf_child_follow_fork): Delete.
4657 (inf_child_target::can_create_inferior)
4658 (inf_child_target::can_attach): New.
4659 (inf_child_target::has_all_memory, inf_child_target::has_memory)
4660 (inf_child_target::has_stack, inf_child_target::has_registers)
4661 (inf_child_target::has_execution): New.
4662 (inf_child_fileio_open, inf_child_fileio_pwrite)
4663 (inf_child_fileio_pread, inf_child_fileio_fstat)
4664 (inf_child_fileio_close, inf_child_fileio_unlink)
4665 (inf_child_fileio_readlink, inf_child_use_agent)
4666 (inf_child_can_use_agent): Refactor as methods of
4668 (return_zero, inf_child_target): Delete.
4669 (inf_child_target::inf_child_target): New.
4670 * inf-child.h: Include "target.h".
4671 (inf_child_target): Delete function prototype.
4672 (inf_child_target): New class.
4673 (inf_child_open_target, inf_child_mourn_inferior)
4674 (inf_child_maybe_unpush_target): Delete.
4675 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
4676 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
4677 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
4678 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
4679 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
4680 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
4681 (inf_ptrace_wait, inf_ptrace_xfer_partial)
4682 (inf_ptrace_thread_alive, inf_ptrace_files_info)
4683 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
4684 methods of inf_ptrace_target.
4685 (inf_ptrace_target): Delete function.
4686 * inf-ptrace.h: Include "inf-child.h".
4687 (inf_ptrace_target): Delete function declaration.
4688 (inf_ptrace_target): New class.
4689 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
4690 * linux-nat.c (linux_target): New.
4691 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
4692 (linux_nat_target::~linux_nat_target): New.
4693 (linux_child_post_attach, linux_child_post_startup_inferior)
4694 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
4695 (linux_child_remove_fork_catchpoint)
4696 (linux_child_insert_vfork_catchpoint)
4697 (linux_child_remove_vfork_catchpoint)
4698 (linux_child_insert_exec_catchpoint)
4699 (linux_child_remove_exec_catchpoint)
4700 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
4701 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
4702 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
4703 (linux_nat_stopped_data_address)
4704 (linux_nat_stopped_by_sw_breakpoint)
4705 (linux_nat_supports_stopped_by_sw_breakpoint)
4706 (linux_nat_stopped_by_hw_breakpoint)
4707 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
4708 (linux_nat_kill, linux_nat_mourn_inferior)
4709 (linux_nat_xfer_partial, linux_nat_thread_alive)
4710 (linux_nat_update_thread_list, linux_nat_pid_to_str)
4711 (linux_nat_thread_name, linux_child_pid_to_exec_file)
4712 (linux_child_static_tracepoint_markers_by_strid)
4713 (linux_nat_is_async_p, linux_nat_can_async_p)
4714 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
4715 (linux_nat_supports_multi_process)
4716 (linux_nat_supports_disable_randomization, linux_nat_async)
4717 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
4718 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
4719 (linux_nat_fileio_open, linux_nat_fileio_readlink)
4720 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
4721 methods of linux_nat_target.
4722 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
4723 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
4725 (check_stopped_by_watchpoint): Adjust.
4726 (linux_xfer_partial): Delete.
4727 (linux_target_install_ops, linux_target, linux_nat_add_target):
4729 (linux_nat_target::linux_nat_target): New.
4730 * linux-nat.h: Include "inf-ptrace.h".
4731 (linux_nat_target): New.
4732 (linux_target, linux_target_install_ops, linux_nat_add_target):
4733 Delete function declarations.
4734 (linux_target): Declare global.
4735 * linux-thread-db.c (thread_db_target): New.
4736 (thread_db_target::thread_db_target): New.
4737 (thread_db_ops): Delete.
4738 (the_thread_db_target): New.
4739 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
4740 (thread_db_update_thread_list, thread_db_pid_to_str)
4741 (thread_db_extra_thread_info)
4742 (thread_db_thread_handle_to_thread_info)
4743 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
4744 (thread_db_resume): Refactor as methods of thread_db_target.
4745 (init_thread_db_ops): Delete.
4746 (_initialize_thread_db): Remove reference to init_thread_db_ops.
4747 * x86-linux-nat.c: Don't include "linux-nat.h".
4748 (super_post_startup_inferior): Delete.
4749 (x86_linux_nat_target::~x86_linux_nat_target): New.
4750 (x86_linux_child_post_startup_inferior)
4751 (x86_linux_read_description, x86_linux_enable_btrace)
4752 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
4753 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
4754 methods of x86_linux_nat_target.
4755 (x86_linux_create_target): Delete. Bits folded ...
4756 (x86_linux_add_target): ... here. Now takes a linux_nat_target
4758 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
4759 (x86_linux_nat_target): New class.
4760 (x86_linux_create_target): Delete.
4761 (x86_linux_add_target): Now takes a linux_nat_target pointer.
4762 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
4763 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
4764 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
4765 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
4766 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
4768 (x86_use_watchpoints): Delete.
4769 * x86-nat.h: Include "breakpoint.h" and "target.h".
4770 (x86_use_watchpoints): Delete.
4771 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
4772 (x86_stopped_by_watchpoint, x86_stopped_data_address)
4773 (x86_insert_watchpoint, x86_remove_watchpoint)
4774 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
4775 (x86_stopped_by_hw_breakpoint): New declarations.
4776 (x86_nat_target): New template class.
4778 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
4779 (the_ppc_linux_nat_target): New.
4780 (ppc_linux_fetch_inferior_registers)
4781 (ppc_linux_can_use_hw_breakpoint)
4782 (ppc_linux_region_ok_for_hw_watchpoint)
4783 (ppc_linux_ranged_break_num_registers)
4784 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
4785 (ppc_linux_insert_mask_watchpoint)
4786 (ppc_linux_remove_mask_watchpoint)
4787 (ppc_linux_can_accel_watchpoint_condition)
4788 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
4789 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
4790 (ppc_linux_watchpoint_addr_within_range)
4791 (ppc_linux_masked_watch_num_registers)
4792 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
4793 (ppc_linux_read_description): Refactor as methods of
4794 ppc_linux_nat_target.
4795 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
4797 * procfs.c (procfs_xfer_partial): Delete forward declaration.
4798 (procfs_target): New class.
4799 (the_procfs_target): New.
4800 (procfs_target): Delete function.
4801 (procfs_auxv_parse, procfs_attach, procfs_detach)
4802 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
4803 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
4804 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
4805 (procfs_create_inferior, procfs_update_thread_list)
4806 (procfs_thread_alive, procfs_pid_to_str)
4807 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
4808 (procfs_stopped_data_address, procfs_insert_watchpoint)
4809 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
4810 (proc_find_memory_regions, procfs_info_proc)
4811 (procfs_make_note_section): Refactor as methods of procfs_target.
4812 (_initialize_procfs): Adjust.
4813 * sol-thread.c (sol_thread_target): New class.
4814 (sol_thread_ops): Now a sol_thread_target.
4815 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
4816 (sol_thread_fetch_registers, sol_thread_store_registers)
4817 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
4818 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
4819 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
4820 (init_sol_thread_ops): Delete.
4821 (_initialize_sol_thread): Adjust. Remove references to
4822 init_sol_thread_ops and complete_target_initialization.
4824 * windows-nat.c (windows_nat_target): New class.
4825 (windows_fetch_inferior_registers)
4826 (windows_store_inferior_registers, windows_resume, windows_wait)
4827 (windows_attach, windows_detach, windows_pid_to_exec_file)
4828 (windows_files_info, windows_create_inferior)
4829 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
4830 (windows_close, windows_pid_to_str, windows_xfer_partial)
4831 (windows_get_tib_address, windows_get_ada_task_ptid)
4832 (windows_thread_name, windows_thread_alive): Refactor as
4833 windows_nat_target methods.
4834 (do_initial_windows_stuff): Adjust.
4835 (windows_target): Delete function.
4836 (_initialize_windows_nat): Adjust.
4838 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
4839 (darwin_mourn_inferior, darwin_kill_inferior)
4840 (darwin_create_inferior, darwin_attach, darwin_detach)
4841 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
4842 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
4843 (darwin_supports_multi_process): Refactor as darwin_nat_target
4845 (darwin_resume_to, darwin_files_info): Delete.
4846 (_initialize_darwin_inferior): Rename to ...
4847 (_initialize_darwin_nat): ... this. Adjust to C++ification.
4848 * darwin-nat.h: Include "inf-child.h".
4849 (darwin_nat_target): New class.
4850 (darwin_complete_target): Delete.
4851 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
4852 (darwin_target): New.
4853 (i386_darwin_fetch_inferior_registers)
4854 (i386_darwin_store_inferior_registers): Refactor as methods of
4856 (darwin_complete_target): Delete, with ...
4857 (_initialize_i386_darwin_nat): ... bits factored out here.
4859 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
4860 (the_alpha_linux_nat_target): New.
4861 (alpha_linux_register_u_offset): Refactor as
4862 alpha_linux_nat_target method.
4863 (_initialize_alpha_linux_nat): Adjust.
4864 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
4865 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
4866 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
4867 methods of linux_nat_trad_target.
4868 (linux_trad_target): Delete.
4869 * linux-nat-trad.h (linux_trad_target): Delete function.
4870 (linux_nat_trad_target): New class.
4871 * mips-linux-nat.c (mips_linux_nat_target): New class.
4872 (super_fetch_registers, super_store_registers, super_close):
4874 (the_mips_linux_nat_target): New.
4875 (mips64_linux_regsets_fetch_registers)
4876 (mips64_linux_regsets_store_registers)
4877 (mips64_linux_fetch_registers, mips64_linux_store_registers)
4878 (mips_linux_register_u_offset, mips_linux_read_description)
4879 (mips_linux_can_use_hw_breakpoint)
4880 (mips_linux_stopped_by_watchpoint)
4881 (mips_linux_stopped_data_address)
4882 (mips_linux_region_ok_for_hw_watchpoint)
4883 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
4884 (mips_linux_close): Refactor as methods of mips_linux_nat.
4885 (_initialize_mips_linux_nat): Adjust to C++ification.
4887 * aix-thread.c (aix_thread_target): New class.
4888 (aix_thread_ops): Now an aix_thread_target.
4889 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
4890 (aix_thread_fetch_registers, aix_thread_store_registers)
4891 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
4892 (aix_thread_thread_alive, aix_thread_pid_to_str)
4893 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
4894 Refactor as methods of aix_thread_target.
4895 (init_aix_thread_ops): Delete.
4896 (_initialize_aix_thread): Remove references to init_aix_thread_ops
4897 and complete_target_initialization.
4898 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
4899 (rs6000_nat_target): New class.
4900 (the_rs6000_nat_target): New.
4901 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
4902 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
4903 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
4904 (super_create_inferior): Delete.
4905 (_initialize_rs6000_nat): Adjust to C++ification.
4907 * arm-linux-nat.c (arm_linux_nat_target): New class.
4908 (the_arm_linux_nat_target): New.
4909 (arm_linux_fetch_inferior_registers)
4910 (arm_linux_store_inferior_registers, arm_linux_read_description)
4911 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
4912 (arm_linux_remove_hw_breakpoint)
4913 (arm_linux_region_ok_for_hw_watchpoint)
4914 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
4915 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
4916 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
4917 arm_linux_nat_target.
4918 (_initialize_arm_linux_nat): Adjust to C++ification.
4920 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
4921 (the_aarch64_linux_nat_target): New.
4922 (aarch64_linux_fetch_inferior_registers)
4923 (aarch64_linux_store_inferior_registers)
4924 (aarch64_linux_child_post_startup_inferior)
4925 (aarch64_linux_read_description)
4926 (aarch64_linux_can_use_hw_breakpoint)
4927 (aarch64_linux_insert_hw_breakpoint)
4928 (aarch64_linux_remove_hw_breakpoint)
4929 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
4930 (aarch64_linux_region_ok_for_hw_watchpoint)
4931 (aarch64_linux_stopped_data_address)
4932 (aarch64_linux_stopped_by_watchpoint)
4933 (aarch64_linux_watchpoint_addr_within_range)
4934 (aarch64_linux_can_do_single_step): Refactor as methods of
4935 aarch64_linux_nat_target.
4936 (super_post_startup_inferior): Delete.
4937 (_initialize_aarch64_linux_nat): Adjust to C++ification.
4939 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
4940 (the_hppa_linux_nat_target): New.
4941 (hppa_linux_fetch_inferior_registers)
4942 (hppa_linux_store_inferior_registers): Refactor as methods of
4943 hppa_linux_nat_target.
4944 (_initialize_hppa_linux_nat): Adjust to C++ification.
4946 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
4947 (the_ia64_linux_nat_target): New.
4948 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
4949 (ia64_linux_stopped_data_address)
4950 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
4951 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
4952 ia64_linux_nat_target methods.
4953 (super_xfer_partial): Delete.
4954 (_initialize_ia64_linux_nat): Adjust to C++ification.
4956 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
4957 (the_m32r_linux_nat_target): New.
4958 (m32r_linux_fetch_inferior_registers)
4959 (m32r_linux_store_inferior_registers): Refactor as
4960 m32r_linux_nat_target methods.
4961 (_initialize_m32r_linux_nat): Adjust to C++ification.
4963 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
4964 (the_m68k_linux_nat_target): New.
4965 (m68k_linux_fetch_inferior_registers)
4966 (m68k_linux_store_inferior_registers): Refactor as
4967 m68k_linux_nat_target methods.
4968 (_initialize_m68k_linux_nat): Adjust to C++ification.
4970 * s390-linux-nat.c (s390_linux_nat_target): New class.
4971 (the_s390_linux_nat_target): New.
4972 (s390_linux_fetch_inferior_registers)
4973 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
4974 (s390_insert_watchpoint, s390_remove_watchpoint)
4975 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
4976 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
4977 (s390_auxv_parse, s390_read_description): Refactor as methods of
4978 s390_linux_nat_target.
4979 (_initialize_s390_nat): Adjust to C++ification.
4981 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
4982 (the_sparc_linux_nat_target): New.
4983 (_initialize_sparc_linux_nat): Adjust to C++ification.
4984 * sparc-nat.c (sparc_fetch_inferior_registers)
4985 (sparc_store_inferior_registers): Remove target_ops parameter.
4986 * sparc-nat.h (sparc_fetch_inferior_registers)
4987 (sparc_store_inferior_registers): Remove target_ops parameter.
4988 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
4989 (the_sparc64_linux_nat_target): New.
4990 (_initialize_sparc64_linux_nat): Adjust to C++ification.
4992 * spu-linux-nat.c (spu_linux_nat_target): New class.
4993 (the_spu_linux_nat_target): New.
4994 (spu_child_post_startup_inferior, spu_child_post_attach)
4995 (spu_child_wait, spu_fetch_inferior_registers)
4996 (spu_store_inferior_registers, spu_xfer_partial)
4997 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
4999 (_initialize_spu_nat): Adjust to C++ification.
5001 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
5002 (the_tilegx_linux_nat_target): New.
5003 (fetch_inferior_registers, store_inferior_registers):
5004 Refactor as methods.
5005 (_initialize_tile_linux_nat): Adjust to C++ification.
5007 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
5008 (the_xtensa_linux_nat_target): New.
5009 (xtensa_linux_fetch_inferior_registers)
5010 (xtensa_linux_store_inferior_registers): Refactor as
5011 xtensa_linux_nat_target methods.
5012 (_initialize_xtensa_linux_nat): Adjust to C++ification.
5014 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
5015 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
5016 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
5017 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
5018 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
5019 (fbsd_stopped_by_sw_breakpoint)
5020 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
5021 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
5022 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
5023 (fbsd_post_startup_inferior, fbsd_post_attach)
5024 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
5025 (fbsd_set_syscall_catchpoint)
5026 (super_xfer_partial, super_resume, super_wait)
5027 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
5028 (fbsd_handle_debug_trap): Remove target_ops parameter.
5029 (fbsd_nat_add_target): Delete.
5030 * fbsd-nat.h: Include "inf-ptrace.h".
5031 (fbsd_nat_add_target): Delete.
5032 (USE_SIGTRAP_SIGINFO): Define.
5033 (fbsd_nat_target): New class.
5035 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
5036 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
5037 (amd64bsd_target): Delete.
5038 * amd64-bsd-nat.h: New file.
5039 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
5041 (amd64_fbsd_nat_target): New class.
5042 (the_amd64_fbsd_nat_target): New.
5043 (amd64fbsd_read_description): Refactor as method of
5044 amd64_fbsd_nat_target.
5045 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
5046 (_initialize_amd64fbsd_nat): Adjust to C++ification.
5047 * amd64-nat.h (amd64bsd_target): Delete function declaration.
5048 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
5049 (i386bsd_store_inferior_registers): Remove target_ops parameter.
5050 (i386bsd_target): Delete.
5051 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
5052 (i386bsd_fetch_inferior_registers)
5053 (i386bsd_store_inferior_registers): Declare.
5054 (i386_bsd_nat_target): New class.
5055 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
5056 (the_i386_fbsd_nat_target): New.
5057 (i386fbsd_resume, i386fbsd_read_description): Refactor as
5058 i386_fbsd_nat_target methods.
5059 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
5060 (_initialize_i386fbsd_nat): Adjust to C++ification.
5061 * x86-bsd-nat.c (super_mourn_inferior): Delete.
5062 (x86bsd_mourn_inferior, x86bsd_target): Delete.
5063 (_initialize_x86_bsd_nat): Adjust to C++ification.
5064 * x86-bsd-nat.h: Include "x86-nat.h".
5065 (x86bsd_target): Delete declaration.
5066 (x86bsd_nat_target): New class.
5068 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
5069 (the_aarch64_fbsd_nat_target): New.
5070 (aarch64_fbsd_fetch_inferior_registers)
5071 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
5072 aarch64_fbsd_nat_target.
5073 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
5074 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
5075 (the_alpha_bsd_nat_target): New.
5076 (alphabsd_fetch_inferior_registers)
5077 (alphabsd_store_inferior_registers): Refactor as
5078 alpha_bsd_nat_target methods.
5079 (_initialize_alphabsd_nat): Refactor as methods of
5080 alpha_bsd_nat_target.
5081 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
5082 (the_amd64_nbsd_nat_target): New.
5083 (_initialize_amd64nbsd_nat): Adjust to C++ification.
5084 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
5085 (the_amd64_obsd_nat_target): New.
5086 (_initialize_amd64obsd_nat): Adjust to C++ification.
5087 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
5088 (the_arm_fbsd_nat_target): New.
5089 (arm_fbsd_fetch_inferior_registers)
5090 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
5091 (_initialize_arm_fbsd_nat): Refactor as methods of
5092 arm_fbsd_nat_target.
5093 (_initialize_arm_fbsd_nat): Adjust to C++ification.
5094 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
5095 (the_arm_netbsd_nat_target): New.
5096 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
5097 arm_netbsd_nat_target.
5098 (_initialize_arm_netbsd_nat): Adjust to C++ification.
5099 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
5100 (the_hppa_nbsd_nat_target): New.
5101 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
5102 hppa_nbsd_nat_target methods.
5103 (_initialize_hppanbsd_nat): Adjust to C++ification.
5104 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
5105 (the_hppa_obsd_nat_target): New.
5106 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
5107 methods of hppa_obsd_nat_target.
5108 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
5110 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
5111 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
5113 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
5114 (_initialize_i386obsd_nat): Use add_target.
5115 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
5116 (the_m68k_bsd_nat_target): New.
5117 (m68kbsd_fetch_inferior_registers)
5118 (m68kbsd_store_inferior_registers): Refactor as methods of
5119 m68k_bsd_nat_target.
5120 (_initialize_m68kbsd_nat): Adjust to C++ification.
5121 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
5122 (the_mips_fbsd_nat_target): New.
5123 (mips_fbsd_fetch_inferior_registers)
5124 (mips_fbsd_store_inferior_registers): Refactor as methods of
5125 mips_fbsd_nat_target.
5126 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
5128 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
5129 (the_mips_nbsd_nat_target): New.
5130 (mipsnbsd_fetch_inferior_registers)
5131 (mipsnbsd_store_inferior_registers): Refactor as methods of
5132 mips_nbsd_nat_target.
5133 (_initialize_mipsnbsd_nat): Adjust to C++ification.
5134 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
5135 (the_mips64_obsd_nat_target): New.
5136 (mips64obsd_fetch_inferior_registers)
5137 (mips64obsd_store_inferior_registers): Refactor as methods of
5138 mips64_obsd_nat_target.
5139 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
5141 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
5143 * nbsd-nat.h: Include "inf-ptrace.h".
5144 (nbsd_nat_target): New class.
5145 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
5146 (obsd_wait): Refactor as methods of obsd_nat_target.
5147 (obsd_add_target): Delete.
5148 * obsd-nat.h: Include "inf-ptrace.h".
5149 (obsd_nat_target): New class.
5150 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
5151 (the_ppc_fbsd_nat_target): New.
5152 (ppcfbsd_fetch_inferior_registers)
5153 (ppcfbsd_store_inferior_registers): Refactor as methods of
5154 ppc_fbsd_nat_target.
5155 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
5157 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
5158 (the_ppc_nbsd_nat_target): New.
5159 (ppcnbsd_fetch_inferior_registers)
5160 (ppcnbsd_store_inferior_registers): Refactor as methods of
5161 ppc_nbsd_nat_target.
5162 (_initialize_ppcnbsd_nat): Adjust to C++ification.
5163 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
5164 (the_ppc_obsd_nat_target): New.
5165 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
5166 methods of ppc_obsd_nat_target.
5167 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
5169 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
5170 (the_sh_nbsd_nat_target): New.
5171 (shnbsd_fetch_inferior_registers)
5172 (shnbsd_store_inferior_registers): Refactor as methods of
5174 (_initialize_shnbsd_nat): Adjust to C++ification.
5175 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
5176 (inf_ptrace_xfer_partial): Delete.
5177 (sparc_xfer_partial, sparc_target): Delete.
5178 * sparc-nat.h (sparc_fetch_inferior_registers)
5179 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
5180 (sparc_target): Delete function declaration.
5181 (sparc_target): New template class.
5182 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
5183 (_initialize_sparcnbsd_nat): Adjust to C++ification.
5184 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
5185 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
5187 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
5188 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
5189 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
5190 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
5192 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
5193 (the_vax_bsd_nat_target): New.
5194 (vaxbsd_fetch_inferior_registers)
5195 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
5197 (_initialize_vaxbsd_nat): Adjust to C++ification.
5199 * bsd-kvm.c (bsd_kvm_target): New class.
5200 (bsd_kvm_ops): Now a bsd_kvm_target.
5201 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
5202 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
5203 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
5205 (bsd_kvm_return_one): Delete.
5206 (bsd_kvm_add_target): Adjust to C++ification.
5208 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
5209 (nto_procfs_target_procfs): New classes.
5210 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
5211 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
5212 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
5213 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
5214 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
5215 (procfs_remove_hw_breakpoint, procfs_resume)
5216 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
5217 (procfs_kill_inferior, procfs_store_registers)
5218 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
5219 as methods of nto_procfs_target.
5220 (nto_procfs_ops): Now an nto_procfs_target_procfs.
5221 (nto_native_ops): Delete.
5222 (procfs_open, procfs_native_open): Delete.
5223 (nto_native_ops): Now an nto_procfs_target_native.
5224 (init_procfs_targets): Adjust to C++ification.
5225 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
5226 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
5227 Refactor as methods of nto_procfs_target.
5229 * go32-nat.c (go32_nat_target): New class.
5230 (the_go32_nat_target): New.
5231 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
5232 (go32_store_registers, go32_xfer_partial, go32_files_info)
5233 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
5234 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
5235 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
5236 (go32_pid_to_str): Refactor as methods of go32_nat_target.
5237 (go32_target): Delete.
5238 (_initialize_go32_nat): Adjust to C++ification.
5240 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
5241 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
5242 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
5243 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
5245 (gnu_target): Delete.
5246 * gnu-nat.h (gnu_target): Delete.
5247 (gnu_nat_target): New class.
5248 * i386-gnu-nat.c (gnu_base_target): New.
5249 (i386_gnu_nat_target): New class.
5250 (the_i386_gnu_nat_target): New.
5251 (_initialize_i386gnu_nat): Adjust to C++ification.
5253 2018-05-02 Pedro Alves <palves@redhat.com>
5255 * bfd-target.c (target_bfd_xclose): Rename to ...
5256 (target_bfd_close): ... this.
5257 (target_bfd_reopen): Adjust.
5258 * target.c (target_close): Remove references to to_xclose.
5259 * target.h (target_ops::to_xclose): Delete.
5260 (target_ops::to_close): Update comments.
5262 2018-05-02 Pedro Alves <palves@redhat.com>
5264 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
5266 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
5267 * inf-ptrace.c (inf_ptrace_register_u_offset)
5268 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
5269 (inf_ptrace_store_register, inf_ptrace_store_registers)
5270 (inf_ptrace_trad_target): Move to ...
5271 * linux-nat-trad.c: ... this new file.
5272 * linux-nat-trad.h: New file.
5273 * linux-nat.c (linux_target_install_ops): Make extern.
5274 (linux_trad_target): Delete.
5275 * linux-nat.h (linux_trad_target): Delete declaration.
5276 (linux_target_install_ops): Declare.
5277 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
5280 2018-05-02 Pedro Alves <palves@redhat.com>
5282 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
5283 procfs_target/add_target here.
5284 * procfs.c (procfs_target): Make static.
5285 (_initialize_procfs): Call add_target here.
5286 * procfs.h (struct target_ops): Remove forward declaration.
5287 (procfs_target): Remove declaration.
5288 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
5290 2018-05-02 Pedro Alves <palves@redhat.com>
5292 * procfs.c (procfs_stopped_by_watchpoint)
5293 (procfs_insert_watchpoint, procfs_remove_watchpoint)
5294 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
5296 (procfs_use_watchpoints): Delete, move contents...
5297 (procfs_target): ... here.
5298 * procfs.h (procfs_use_watchpoints): Delete declaration.
5299 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
5300 procfs_use_watchpoints.
5301 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
5302 procfs_use_watchpoints.
5304 2018-05-02 Tom Tromey <tom@tromey.com>
5307 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
5308 and var_zuinteger_unlimited.
5309 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
5310 and PARAM_ZUINTEGER_UNLIMITED.
5311 (set_parameter_value): Handle var_zuinteger and
5312 var_zuinteger_unlimited.
5313 (add_setshow_generic): Likewise.
5314 (parmpy_init): Likewise.
5316 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
5319 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
5320 pointer is not null before dereferencing it.
5322 2018-04-30 Tom Tromey <tom@tromey.com>
5324 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
5327 2018-04-30 Tom Tromey <tom@tromey.com>
5329 * breakpoint.c (mention): Remove use of is_mi_like_p.
5330 (print_mention_ranged_breakpoint): Likewise.
5331 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
5334 2018-04-30 Tom Tromey <tom@tromey.com>
5336 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
5338 2018-04-30 Tom Tromey <tom@tromey.com>
5340 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
5341 (info_spu_event_command): Remove some uses of is_mi_like_p.
5343 2018-04-30 Tom Tromey <tom@tromey.com>
5345 * python/py-framefilter.c (py_print_single_arg)
5346 (enumerate_locals, py_print_args, py_print_frame): Remove some
5347 uses of is_mi_like_p.
5349 2018-04-30 Tom Tromey <tom@tromey.com>
5352 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
5353 * ui-out.h (ui_out::is_mi_like_p): Now const.
5354 (ui_out::do_is_mi_like_p): Now const.
5355 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
5357 2018-04-30 Tom Tromey <tom@tromey.com>
5359 * varobj.c (varobj_set_visualizer): Use new_reference.
5360 * python/python.c (gdbpy_decode_line): Use new_reference.
5361 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
5364 2018-04-30 Tom Tromey <tom@tromey.com>
5366 * varobj.c (install_new_value): Use new_reference.
5367 * value.h (value_incref): Return void. Swap intro comment with
5369 * value.c (set_value_parent): Use new_reference.
5370 (value_incref): Return void. Update intro comment.
5371 (release_value): Use new_reference.
5372 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
5374 2018-04-30 Tom Tromey <tom@tromey.com>
5376 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
5377 * gdb_bfd.h (new_bfd_ref): Remove.
5378 (gdb_bfd_open): Update comment.
5379 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
5380 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
5381 (gdb_bfd_fdopenr): Use new_reference.
5382 * exec.c (exec_file_attach): Use new_reference.
5384 2018-04-30 Tom Tromey <tom@tromey.com>
5386 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
5389 2018-04-30 Tom Tromey <tom@tromey.com>
5391 * jit.c (jit_read_code_entry): Use type_align.
5392 * i386-tdep.c (i386_gdbarch_init): Don't call
5393 set_gdbarch_long_long_align_bit.
5394 * gdbarch.sh: Remove long_long_align_bit.
5395 * gdbarch.c, gdbarch.h: Rebuild.
5396 * arc-tdep.c (arc_type_align): New function.
5397 (arc_gdbarch_init): Use arc_type_align. Don't call
5398 set_gdbarch_long_long_align_bit.
5400 2018-04-30 Tom Tromey <tom@tromey.com>
5402 * rust-lang.c (rust_type_alignment): Remove.
5403 (rust_composite_type): Use type_align.
5405 2018-04-30 Tom Tromey <tom@tromey.com>
5407 * NEWS: Mention Type.align.
5408 * python/py-type.c (typy_get_alignof): New function.
5409 (type_object_getset): Add "alignof".
5411 2018-04-30 Tom Tromey <tom@tromey.com>
5415 * std-operator.def (UNOP_ALIGNOF): New operator.
5416 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
5418 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
5419 * c-lang.c (c_op_print_tab): Add alignof.
5420 * c-exp.y (ALIGNOF): New token.
5421 (exp): Add "ALIGNOF" production.
5422 (ident_tokens): Add _Alignof and alignof.
5424 2018-04-30 Tom Tromey <tom@tromey.com>
5426 * i386-tdep.c (i386_type_align): New function.
5427 (i386_gdbarch_init): Update.
5428 * gdbarch.sh (type_align): New method.
5429 * gdbarch.c, gdbarch.h: Rebuild.
5430 * arch-utils.h (default_type_align): Declare.
5431 * arch-utils.c (default_type_align): New function.
5432 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
5433 (struct type) <align_log2>: New field.
5434 <instance_flags>: Now a bitfield.
5435 (TYPE_RAW_ALIGN): New macro.
5436 (type_align, type_raw_align, set_type_align): Declare.
5437 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
5439 * dwarf2read.c (quirk_rust_enum): Set type alignment.
5440 (get_alignment, maybe_set_alignment): New functions.
5441 (read_structure_type, read_enumeration_type, read_array_type)
5442 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
5443 (read_subrange_type, read_base_type): Set type alignment.
5445 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
5447 * dwarf2read.c (read_index_from_section): Use bool.
5449 2018-04-29 Fabian Groffen <grobian@gentoo.org>
5452 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
5455 2018-04-29 John Reiser <jreiser@BitWagon.com>
5458 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
5459 last step, and do it atomically.
5461 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
5463 * compile/compile-c-types.c (convert_int, convert_float):
5466 2018-04-27 Tom Tromey <tom@tromey.com>
5469 * rust-lang.c (rust_inclusive_range_type_p): New function.
5470 (rust_range): Handle inclusive ranges.
5471 (rust_compute_range): Likewise.
5472 * rust-exp.y (struct rust_op) <inclusive>: New field.
5473 (DOTDOTEQ): New constant.
5474 (range_expr): Add "..=" productions.
5475 (operator_tokens): Add "..=" token.
5476 (ast_range): Add "inclusive" parameter.
5477 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
5479 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
5481 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
5482 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
5484 * expprint.c (print_subexp_standard): Handle new bounds values.
5485 (dump_subexp_body_standard): Likewise.
5487 2018-04-27 Tom Tromey <tom@tromey.com>
5489 * configure: Rebuild.
5490 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
5491 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
5493 (class symbol_needs_eval_context): Likewise.
5494 * dwarf2read.c (mock_mapped_index::symbol_name_count)
5495 (mock_mapped_index::symbol_name_at): Use "override". Remove
5497 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
5499 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
5500 * aarch64-tdep.c (instruction_reader::read): Use "override".
5501 (instruction_reader_test::read): Likewise.
5502 * arm-tdep.c (instruction_reader::read): Use "override".
5503 (instruction_reader_thumb::read): Likewise.
5505 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
5508 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
5509 instead of remote_send.
5510 (remote_send): Remove.
5512 2018-04-26 Pedro Alves <palves@redhat.com>
5514 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
5515 find_function_start_sal instead of find_pc_line.
5517 2018-04-26 Pedro Alves <palves@redhat.com>
5519 * breakpoint.c (set_breakpoint_location_function): Handle
5521 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
5522 * elfread.c (elf_symtab_read): Give data symbols with
5523 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
5524 (elf_rel_plt_read): Update comment.
5525 * linespec.c (convert_linespec_to_sals): Handle
5527 (minsym_found): Handle mst_data_gnu_ifunc.
5528 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
5529 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
5530 * parse.c (find_minsym_type_and_address): Handle
5532 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
5533 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
5534 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
5536 <mst_data_gnu_ifunc>: New enumerator.
5538 2018-04-26 Pedro Alves <palves@redhat.com>
5540 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
5541 (lookup_minimal_symbol_by_pc_section): ... this. Replace
5542 'want_trampoline' parameter by a lookup_msym_prefer parameter.
5544 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
5545 (lookup_minimal_symbol_by_pc): Adjust.
5546 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
5547 (lookup_solib_trampoline_symbol_by_pc): Adjust.
5548 * minsyms.h (lookup_msym_prefer): New enum.
5549 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
5550 parameter by a lookup_msym_prefer parameter.
5552 2018-04-26 Pedro Alves <palves@redhat.com>
5554 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
5555 ends in "@plt" instead of looking at the symbol's section.
5557 2018-04-26 Pedro Alves <palves@redhat.com>
5559 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
5561 (find_pc_partial_function_gnu_ifunc): Rename to ...
5562 (find_pc_partial_function): ... this, and remove references to
5564 (find_pc_partial_function): Delete old implementation.
5565 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
5567 2018-04-26 Pedro Alves <palves@redhat.com>
5569 * linespec.c (struct bound_minimal_symbol_search_key): New.
5570 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
5571 skip first line if we found a GNU ifunc minimal symbol by name.
5572 (compare_msymbols): Change parameters to work with a destructured
5574 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
5577 2018-04-26 Pedro Alves <palves@redhat.com>
5579 * breakpoint.c (set_breakpoint_location_function): Don't resolve
5580 ifunc targets here. Instead, if we have an ifunc minsym, use its
5582 (add_location_to_breakpoint): Store the minsym and the objfile in
5583 the breakpoint location.
5584 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
5585 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
5586 Record the minsym in the sal.
5587 * symtab.h (symtab_and_line) <msymbol>: New field.
5589 2018-04-26 Pedro Alves <palves@redhat.com>
5591 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
5592 unless we actually resolved the ifunc.
5594 2018-04-26 Pedro Alves <palves@redhat.com>
5596 * c-exp.y (variable production): Prefer ifunc minsyms over
5597 regular function symbols.
5598 * symtab.c (find_gnu_ifunc): New function.
5599 * minsyms.h (lookup_msym_prefer): New enum.
5600 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
5601 parameter by a lookup_msym_prefer parameter.
5602 * symtab.h (find_gnu_ifunc): New declaration.
5604 2018-04-26 Pedro Alves <palves@redhat.com>
5606 * blockframe.c (find_gnu_ifunc_target_type): New function.
5607 (find_function_type): New.
5608 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
5609 return a value with a memory address.
5610 (eval_call): For calls to GNU ifunc functions, try to find the
5611 type of the target function from the type that the resolver
5613 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
5615 * infcall.c (find_function_return_type): Delete.
5616 (find_function_addr): Add 'function_type' parameter. For calls to
5617 GNU ifunc functions, try to find the type of the target function
5618 from the type that the resolver returns, and return it via
5620 (call_function_by_hand_dummy): Adjust to use the function type
5621 returned by find_function_addr.
5622 (find_function_addr): Add 'function_type' parameter and move
5624 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
5627 2018-04-26 Pedro Alves <palves@redhat.com>
5629 * c-exp.y (variable production): Skip finding an alias for ifunc
5632 2018-04-26 Pedro Alves <palves@redhat.com>
5634 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
5636 2018-04-25 Pedro Alves <palves@redhat.com>
5638 * infcmd.c (kill_command): Print the pid as string, not the whole
5639 thread's ptid. Add comment. s/has been killed/killed/ in output
5641 * remote.c (remote_detach_1): Print the pid as string, not the
5642 whole thread's ptid.
5644 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5645 Sergio Durigan Junior <sergiodj@redhat.com>
5646 Pedro Alves <palves@redhat.com>
5648 * infcmd.c (kill_command): Print message when inferior has
5650 * inferior.c (print_inferior_events): Remove 'static'. Set as
5652 (add_inferior): Improve message printed when
5653 'print_inferior_events' is on.
5654 (exit_inferior): Remove message printed when
5655 'print_inferior_events' is on.
5656 (detach_inferior): Improve message printed when
5657 'print_inferior_events' is on.
5658 (initialize_inferiors): Use 'add_inferior_silent' to set
5659 'current_inferior_'.
5660 * inferior.h (print_inferior_events): Declare here as
5662 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
5663 '[Detaching...]' messages when 'print_inferior_events' is on.
5664 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
5665 as prefix/suffix for messages. Remove periods. Fix erroneous
5666 'Detaching after fork from child...', replace it by '... from
5668 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
5669 prefix/suffix when printing 'Detaching...' messages. Print
5670 them when 'print_inferior_events' is on.
5671 * remote.c (remote_detach_1): Print message when detaching
5672 from inferior and '!is_fork_parent'.
5674 2018-04-24 Tom Tromey <tom@tromey.com>
5676 * cli-out.h: Reindent.
5678 2018-04-24 Tom Tromey <tom@tromey.com>
5680 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
5681 (cli_ui_out::do_field_string): Use fputs_filtered.
5682 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
5684 2018-04-23 Tom Tromey <tom@tromey.com>
5686 * guile/scm-frame.c (gdbscm_frame_read_var): Use
5687 gdb::unique_xmalloc_ptr.
5689 2018-04-23 Tom Tromey <tom@tromey.com>
5691 * configure: Rebuild.
5693 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
5696 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
5697 prepare_for_testing. Set normal_bp to r_debug_state if target
5700 2018-04-21 Pedro Alves <palves@redhat.com>
5701 Rajendra SY <rajendra.sy@gmail.com>
5703 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
5704 * remote.c (extended_remote_attach): In all-stop mode, mark the
5705 thread as executing.
5707 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5709 * thread.c (thread_apply_all_command): Fix comment.
5710 (thread_command): Fix comment.
5712 2018-04-10 Alan Hayward <alan.hayward@arm.com>
5714 * common/tdesc.h (tdesc_create_feature): Remove xml filename
5716 * features/aarch64-core.c (create_feature_aarch64_core):
5718 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
5720 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
5722 * features/i386/32bit-avx512.c
5723 (create_feature_i386_32bit_avx512): Likewise.
5724 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
5726 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
5728 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
5730 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
5732 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
5734 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
5736 * features/i386/64bit-avx512.c
5737 (create_feature_i386_64bit_avx512): Likewise.
5738 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
5740 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
5742 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
5744 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
5746 * features/i386/64bit-segments.c
5747 (create_feature_i386_64bit_segments): Likewise.
5748 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
5750 * features/i386/x32-core.c
5751 (create_feature_i386_x32_core): Likewise.
5752 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
5753 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
5754 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
5755 * target-descriptions.c: In generated code, don't pass xml
5758 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5760 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
5761 (print_xml_feature::visit_post): Likewise.
5762 (print_xml_feature::visit): Likewise.
5763 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
5764 (print_xml_feature): Add new class.
5765 * regformats/regdat.sh: Null xmltarget on feature targets.
5766 * target-descriptions.c (struct target_desc): Add xmltarget.
5767 (maintenance_check_tdesc_xml_convert): Add unittest function.
5768 (tdesc_get_features_xml): Add function to get xml.
5769 (maintenance_check_xml_descriptions): Test xml generation.
5770 * xml-tdesc.c (string_read_description_xml): Add function.
5771 * xml-tdesc.h (string_read_description_xml): Add declaration.
5773 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5775 * features/Makefile: Add feature marker to targets with new style
5776 target descriptions.
5777 * regformats/aarch64.dat: Regenerate.
5778 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
5779 * regformats/i386/amd64-avx-linux.dat: Likewise.
5780 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
5781 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
5782 * regformats/i386/amd64-linux.dat: Likewise.
5783 * regformats/i386/amd64-mpx-linux.dat: Likewise.
5784 * regformats/i386/amd64.dat: Likewise.
5785 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
5786 * regformats/i386/i386-avx-linux.dat: Likewise.
5787 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
5788 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
5789 * regformats/i386/i386-linux.dat: Likewise.
5790 * regformats/i386/i386-mmx-linux.dat: Likewise.
5791 * regformats/i386/i386-mpx-linux.dat: Likewise.
5792 * regformats/i386/i386.dat: Likewise.
5793 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
5794 * regformats/i386/x32-avx-linux.dat: Likewise.
5795 * regformats/i386/x32-linux.dat: Likewise.
5796 * regformats/tic6x-c62x-linux.dat: Likewise.
5797 * regformats/tic6x-c64x-linux.dat: Likewise.
5798 * regformats/tic6x-c64xp-linux.dat: Likewise.
5799 * regformats/regdat.sh: Parse feature marker.
5801 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5803 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
5804 (tdesc_osabi_name): Likewise.
5805 * target-descriptions.c (tdesc_architecture_name): Add new
5807 (tdesc_osabi_name): Likewise.
5809 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5811 * common/tdesc.c (tdesc_predefined_type): Move to here.
5812 (tdesc_named_type): Likewise.
5813 (tdesc_create_vector): Likewise.
5814 (tdesc_create_struct): Likewise.
5815 (tdesc_set_struct_size): Likewise.
5816 (tdesc_create_union): Likewise.
5817 (tdesc_create_flags): Likewise.
5818 (tdesc_create_enum): Likewise.
5819 (tdesc_add_field): Likewise.
5820 (tdesc_add_typed_bitfield): Likewise.
5821 (tdesc_add_bitfield): Likewise.
5822 (tdesc_add_flag): Likewise.
5823 (tdesc_add_enum_value): Likewise.
5824 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
5825 (struct tdesc_type_vector): Likewise.
5826 (struct tdesc_type_field): Likewise.
5827 (struct tdesc_type_with_fields): Likewise.
5828 (tdesc_create_enum): Add declaration.
5829 (tdesc_add_typed_bitfield): Likewise.
5830 (tdesc_add_enum_value): Likewise.
5831 * target-descriptions.c (tdesc_type_field): Move from here.
5832 (tdesc_type_builtin): Likewise.
5833 (tdesc_type_vector): Likewise.
5834 (tdesc_type_with_fields): Likewise.
5835 (tdesc_predefined_types): Likewise.
5836 (tdesc_named_type): Likewise.
5837 (tdesc_create_vector): Likewise.
5838 (tdesc_create_struct): Likewise.
5839 (tdesc_set_struct_size): Likewise.
5840 (tdesc_create_union): Likewise.
5841 (tdesc_create_flags): Likewise.
5842 (tdesc_create_enum): Likewise.
5843 (tdesc_add_field): Likewise.
5844 (tdesc_add_typed_bitfield): Likewise.
5845 (tdesc_add_bitfield): Likewise.
5846 (tdesc_add_flag): Likewise.
5847 (tdesc_add_enum_value): Likewise.
5848 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
5849 (tdesc_add_typed_bitfield): Likewise.
5850 (tdesc_add_enum_value): Likewise.
5852 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5854 * common/tdesc.c (tdesc_feature::accept): Move to here.
5855 (tdesc_feature::operator==): Likewise.
5856 (tdesc_create_reg): Likewise.
5857 * common/tdesc.h (tdesc_type_kind): Likewise.
5858 (struct tdesc_type): Likewise.
5859 (struct tdesc_feature): Likewise.
5860 * regformats/regdat.sh: Create a feature.
5861 * target-descriptions.c (tdesc_type_kind): Move from here.
5862 (tdesc_type): Likewise.
5863 (tdesc_type_up): Likewise.
5864 (tdesc_feature): Likewise.
5865 (tdesc_create_reg): Likewise.
5867 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5869 * Makefile.in: Add arch/tdesc.c
5870 * common/tdesc.c: New file.
5871 * common/tdesc.h (tdesc_element_visitor): Move to here.
5872 (tdesc_element): Likewise.
5873 (tdesc_reg): Likewise.
5874 (tdesc_reg_up): Likewise.
5875 * regformats/regdef.h (reg): Add offset to constructors.
5876 * target-descriptions.c (tdesc_element_visitor): Move from here.
5877 (tdesc_element): Likewise.
5878 (tdesc_reg): Likewise.
5879 (tdesc_reg_up): Likewise.
5881 2018-04-17 Tom Tromey <tom@tromey.com>
5883 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
5886 2018-04-17 Tom Tromey <tom@tromey.com>
5888 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
5890 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
5892 * symtab.c (print_symbol_info): Skip printing filename and line
5893 number when `last' is NULL.
5894 (symtab_symbol_info): Use empty string instead of NULL for first
5895 invocation of print_symbol_info.
5896 (rbreak_command): Pass NULL to `last' parameter of
5899 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
5901 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
5904 2018-04-16 Pedro Alves <palves@redhat.com>
5906 * MAINTAINERS (sh): Remove.
5907 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
5908 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
5909 (ALLDEPFILES): Remove sh64-tdep.c.
5910 * NEWS: Mentions that support for SH-5/SH64 is removed.
5911 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
5912 (sh*-*-openbsd*): Ditto.
5913 (sh64-*-elf*): Remove.
5915 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
5916 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
5917 * sh-tdep.c: No longer include "sh64-tdep.h".
5918 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
5919 * sh64-tdep.c, sh64-tdep.h: Remove files.
5921 2018-04-16 Pedro Alves <palves@redhat.com>
5923 * MAINTAINERS: Remove m88k.
5924 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
5925 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
5926 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
5927 * NEWS: Mention that support for m88k was removed.
5928 * configure.host (m88*-*-*): Remove support.
5929 * configure.nat (m88k-*-*): Remove support.
5930 * configure.tgt (m88*-*-openbsd*): Remove.
5931 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
5933 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
5935 * configure.tgt (x86_tobjs): New variable.
5936 (amd64_tobjs, i386_tobjs): Use it.
5938 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5940 * symtab.c (print_symbol_info): Precede the symbol definition by
5941 the line number when available.
5942 * NEWS: Advertise this enhancement.
5944 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5946 * NEWS (New options): announce set/show record btrace cpu.
5947 * btrace.c: Include record-btrace.h.
5948 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
5949 the vendor is unknown.
5950 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
5951 Maybe overwrite the btrace configuration's cpu.
5952 (btrace_compute_ftrace): Add cpu parameter. Update callers.
5953 (btrace_fetch): Add cpu parameter. Update callers.
5954 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
5955 Maybe overwrite the btrace configuration's cpu. Skip enabling
5956 errata workarounds if the vendor is unknown.
5957 * python/py-record-btrace.c: Include record-btrace.h.
5958 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
5959 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
5960 * record-btrace.c (record_btrace_cpu_state_kind): New.
5961 (record_btrace_cpu): New.
5962 (set_record_btrace_cpu_cmdlist): New.
5963 (record_btrace_get_cpu): New.
5964 (require_btrace_thread, record_btrace_info)
5965 (record_btrace_resume_thread): Call record_btrace_get_cpu.
5966 (cmd_set_record_btrace_cpu_none): New.
5967 (cmd_set_record_btrace_cpu_auto): New.
5968 (cmd_set_record_btrace_cpu): New.
5969 (cmd_show_record_btrace_cpu): New.
5970 (_initialize_record_btrace): Initialize set/show record btrace cpu
5972 * record-btrace.h (record_btrace_get_cpu): New.
5974 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5976 * record.c (set_record_command): Fix typo in message.
5978 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5980 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
5982 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5984 * infrun.c (process_event_stop_test): Call
5985 gdbarch_in_indirect_branch_thunk.
5986 * gdbarch.sh (in_indirect_branch_thunk): New.
5987 * gdbarch.c: Regenerated.
5988 * gdbarch.h: Regenerated.
5991 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
5992 (HFILES_NO_SRCDIR): Add x86-tdep.h.
5993 (ALLDEPFILES): Add x86-tdep.c.
5994 * arch-utils.h (default_in_indirect_branch_thunk): New.
5995 * arch-utils.c (default_in_indirect_branch_thunk): New.
5996 * i386-tdep: Include x86-tdep.h.
5997 (i386_in_indirect_branch_thunk): New.
5998 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
6000 * amd64-tdep: Include x86-tdep.h.
6001 (amd64_in_indirect_branch_thunk): New.
6002 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
6004 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
6007 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
6008 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
6009 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
6012 2018-04-12 Tom Tromey <tom@tromey.com>
6014 * rust-lang.c (rust_print_struct_def): Remove univariant code.
6015 (rust_evaluate_subexp): Likewise.
6017 2018-04-12 Pedro Alves <palves@redhat.com>
6019 * procfs.c (procfs_detach): Make forward declaration's prototype
6020 match definition's protototype.
6021 (proc_get_LDT_entry): Remove stale do_cleanups call.
6023 2018-04-12 Pedro Alves <palves@redhat.com>
6025 * target.h (target_ops::to_has_exited): Delete.
6026 (target_has_exited): Delete.
6027 * target-delegates.c: Regenerate.
6029 2018-04-11 Pedro Alves <palves@redhat.com>
6031 * target.c (fileio_fh_t::t): Add comment.
6032 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
6033 (target_fileio_close): Handle a NULL target.
6034 (invalidate_fileio_fh): New.
6035 (target_close): Call it.
6036 * remote.c (remote_hostio_send_command): No longer check whether
6037 remote_desc is open.
6039 2018-04-11 Pedro Alves <palves@redhat.com>
6041 * target.c (fileio_fh_t): Make it a named struct instead of a
6043 (fileio_fh_t::is_closed): New method.
6044 (DEF_VEC_O (fileio_fh_t)): Remove.
6045 (fileio_fhandles): Now a std::vector.
6046 (is_closed_fileio_fh): Delete.
6047 (acquire_fileio_fd): Adjust. Rename parameters.
6048 (release_fileio_fd): Adjust.
6049 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
6050 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
6051 (target_fileio_close): Adjust.
6053 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
6055 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
6058 2018-04-10 Pedro Alves <palves@redhat.com>
6060 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
6061 (scoped_finish_thread_state): New class.
6062 * infcmd.c (run_command_1): Use it instead of finish_thread_state
6064 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
6065 (fetch_inferior_event, normal_stop): Likewise.
6066 * thread.c (finish_thread_state_cleanup): Delete.
6068 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6069 Pedro Alves <palves@redhat.com>
6071 * value.c: Include "selftest.h" and "common/array-view.h".
6072 (struct range) <operator ==>: New.
6073 (test_ranges_contain): New.
6074 (check_ranges_vector): New.
6075 (test_insert_into_bit_range_vector): New.
6076 (_initialize_values): Register selftests.
6077 * common/array-view.h (operator==, operator!=): New.
6079 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6081 * common/gdb_vecs.h (unordered_remove): Add overload that takes
6083 * inline-frame.c: Include <algorithm>.
6084 (struct inline_state): Add constructor.
6085 (inline_state_s): Remove.
6086 (DEF_VEC_O(inline_state_s)): Remove.
6087 (inline_states): Change type to std::vector.
6088 (find_inline_frame_state): Adjust to std::vector.
6089 (allocate_inline_frame_state): Remove.
6090 (clear_inline_frame_state): Adjust to std::vector.
6091 (skip_inline_frames): Adjust to std::vector.
6093 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6095 * tracepoint.h (struct trace_state_variable): Add constructor.
6096 <name>: Change type to std::string.
6097 * tracepoint.c (tsv_s): Remove.
6098 (DEF_VEC_O(tsv_s)): Remove.
6099 (tvariables): Change to std::vector.
6100 (create_trace_state_variable): Adjust to std::vector.
6101 (find_trace_state_variable): Likewise.
6102 (find_trace_state_variable_by_number): Likewise.
6103 (delete_trace_state_variable): Likewise.
6104 (trace_variable_command): Adjust to std::string.
6105 (delete_trace_variable_command): Likewise.
6106 (tvariables_info_1): Adjust to std::vector.
6107 (save_trace_state_variables): Likewise.
6108 (start_tracing): Likewise.
6109 (merge_uploaded_trace_state_variables): Adjust to std::vector
6111 * target.h (struct target_ops)
6112 <to_download_trace_state_variable>: Pass reference to
6113 trace_state_variable.
6114 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
6115 * target-delegates.c: Re-generate.
6116 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
6117 (mi_tsv_deleted): Likewise.
6118 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
6119 * remote.c (remote_download_trace_state_variable): Change
6120 pointer to reference and adjust.
6121 * make-target-delegates (parse_argtypes): Handle references.
6122 (write_function_header): Likewise.
6123 (munge_type): Likewise.
6125 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6127 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6128 string_view-selftests.c.
6129 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
6131 * unittests/basic_string_view/cons/char/1.cc: Likewise.
6132 * unittests/basic_string_view/cons/char/2.cc: Likewise.
6133 * unittests/basic_string_view/cons/char/3.cc: Likewise.
6134 * unittests/basic_string_view/element_access/char/1.cc:
6136 * unittests/basic_string_view/element_access/char/empty.cc:
6138 * unittests/basic_string_view/element_access/char/front_back.cc:
6140 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
6141 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
6143 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
6145 * unittests/basic_string_view/modifiers/swap/char/1.cc:
6147 * unittests/basic_string_view/operations/compare/char/1.cc:
6149 * unittests/basic_string_view/operations/compare/char/13650.cc:
6151 * unittests/basic_string_view/operations/copy/char/1.cc:
6153 * unittests/basic_string_view/operations/data/char/1.cc:
6155 * unittests/basic_string_view/operations/find/char/1.cc:
6157 * unittests/basic_string_view/operations/find/char/2.cc:
6159 * unittests/basic_string_view/operations/find/char/3.cc:
6161 * unittests/basic_string_view/operations/find/char/4.cc:
6163 * unittests/basic_string_view/operations/rfind/char/1.cc:
6165 * unittests/basic_string_view/operations/rfind/char/2.cc:
6167 * unittests/basic_string_view/operations/rfind/char/3.cc:
6169 * unittests/basic_string_view/operations/substr/char/1.cc:
6171 * unittests/basic_string_view/operators/char/2.cc: Likewise.
6172 * unittests/string_view-selftests.c: New file.
6174 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6176 * unittests/basic_string_view/capacity/1.cc: New file.
6177 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
6178 * unittests/basic_string_view/cons/char/1.cc: New file.
6179 * unittests/basic_string_view/cons/char/2.cc: New file.
6180 * unittests/basic_string_view/cons/char/3.cc: New file.
6181 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
6182 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
6183 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
6184 * unittests/basic_string_view/element_access/char/1.cc: New file.
6185 * unittests/basic_string_view/element_access/char/2.cc: New file.
6186 * unittests/basic_string_view/element_access/char/empty.cc: New file.
6187 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
6188 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
6189 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
6190 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
6191 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
6192 * unittests/basic_string_view/include.cc: New file.
6193 * unittests/basic_string_view/inserters/char/1.cc: New file.
6194 * unittests/basic_string_view/inserters/char/2.cc: New file.
6195 * unittests/basic_string_view/inserters/char/3.cc: New file.
6196 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
6197 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
6198 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
6199 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
6200 * unittests/basic_string_view/literals/types.cc: New file.
6201 * unittests/basic_string_view/literals/values.cc: New file.
6202 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
6203 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
6204 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
6205 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
6206 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
6207 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
6208 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
6209 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
6210 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
6211 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
6212 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
6213 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
6214 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
6215 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
6216 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
6217 * unittests/basic_string_view/operations/data/char/1.cc: New file.
6218 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
6219 * unittests/basic_string_view/operations/find/char/1.cc: New file.
6220 * unittests/basic_string_view/operations/find/char/2.cc: New file.
6221 * unittests/basic_string_view/operations/find/char/3.cc: New file.
6222 * unittests/basic_string_view/operations/find/char/4.cc: New file.
6223 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
6224 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
6225 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
6226 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
6227 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
6228 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
6229 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
6230 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
6231 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
6232 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
6233 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
6234 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
6235 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
6236 * unittests/basic_string_view/operators/char/2.cc: New file.
6237 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
6238 * unittests/basic_string_view/range_access/char/1.cc: New file.
6239 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
6240 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
6241 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
6242 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
6243 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
6244 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
6245 * unittests/basic_string_view/requirements/typedefs.cc: New file.
6246 * unittests/basic_string_view/typedefs.cc: New file.
6247 * unittests/basic_string_view/types/1.cc: New file.
6249 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6251 * common/gdb_string_view.h: Remove libstdc++ implementation
6252 details, adjust to gdb reality.
6253 * common/gdb_string_view.tcc: Likewise.
6254 * cli/cli-script.c (struct string_view): Remove.
6255 (user_args) <m_args>: Change element type to gdb::string_view.
6256 (user_args::insert_args): Adjust.
6258 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6260 * common/gdb_string_view.h: New file.
6261 * common/gdb_string_view.tcc: New file.
6263 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6265 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
6266 * configure: Re-generate.
6268 2018-04-09 Pedro Alves <palves@redhat.com>
6270 * gdbarch.sh: Include "observable.h" instead of "observer.h".
6271 (set_target_gdbarch): Call
6272 gdb::observers::architecture_changed.notify instead of
6273 observer_notify_architecture_changed.
6275 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6277 * tracepoint.c (struct current_traceframe_cleanup): Remove.
6278 (do_restore_current_traceframe_cleanup): Remove.
6279 (restore_current_traceframe_cleanup_dtor): Remove.
6280 (make_cleanup_restore_current_traceframe): Remove.
6281 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
6283 * tracepoint.h (struct scoped_restore_current_traceframe): New.
6284 * infrun.c (fetch_inferior_event): Use
6285 scoped_restore_current_traceframe.
6287 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6289 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
6291 <n_allocated_type_units>: Remove.
6292 <all_type_units>: Change to std::vector.
6293 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
6294 to std::vector change.
6295 (dwarf2_per_objfile::get_cutu): Likewise.
6296 (dwarf2_per_objfile::get_tu): Likewise.
6297 (create_signatured_type_table_from_index): Likewise.
6298 (create_signatured_type_table_from_debug_names): Likewise.
6299 (dw2_symtab_iter_next): Likewise.
6300 (dw2_print_stats): Likewise.
6301 (dw2_expand_all_symtabs): Likewise.
6302 (dw2_expand_marked_cus): Likewise.
6303 (dw2_debug_names_iterator::next): Likewise.
6304 (dwarf2_initialize_objfile): Likewise.
6305 (add_signatured_type_cu_to_table): Likewise.
6306 (create_all_type_units): Likewise.
6307 (add_type_unit): Likewise.
6308 (struct tu_abbrev_offset): Add constructor.
6309 (build_type_psymtabs_1): Adjust to std::vector change.
6310 (print_tu_stats): Likewise.
6311 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
6312 (write_debug_names): Likewise.
6314 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6316 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
6317 Make an std::vector.
6318 <n_comp_units>: Remove.
6319 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
6320 to std::vector change.
6321 (dwarf2_per_objfile::get_cutu): Likewise.
6322 (dwarf2_per_objfile::get_cu): Likewise.
6323 (create_cus_from_index): Likewise.
6324 (create_addrmap_from_index): Likewise.
6325 (create_addrmap_from_aranges): Likewise.
6326 (dwarf2_read_index): Likewise.
6327 (dw2_find_last_source_symtab): Likewise.
6328 (dw2_map_symtabs_matching_filename): Likewise.
6329 (dw2_symtab_iter_next): Likewise.
6330 (dw2_print_stats): Likewise.
6331 (dw2_expand_all_symtabs): Likewise.
6332 (dw2_expand_symtabs_with_fullname): Likewise.
6333 (dw2_expand_marked_cus): Likewise.
6334 (dw2_map_symbol_filenames): Likewise.
6335 (create_cus_from_debug_names): Likewise.
6336 (dwarf2_read_debug_names): Likewise.
6337 (dw2_debug_names_iterator::next): Likewise.
6338 (dwarf2_initialize_objfile): Likewise.
6339 (set_partial_user): Likewise.
6340 (dwarf2_build_psymtabs_hard): Likewise.
6341 (read_comp_units_from_section): Remove arguments, adjust to
6343 (create_all_comp_units): Adjust to std::vector and
6344 read_comp_units_from_section changes.
6345 (dwarf2_find_containing_comp_unit): Adjust to std::vector
6347 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
6348 (psyms_seen_size): Likewise.
6349 (write_gdbindex): Likewise.
6350 (write_debug_names): Likewise.
6352 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6354 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
6355 with dwarf2_per_objfile.
6356 (create_cus_from_index): Likewise.
6357 (create_signatured_type_table_from_index): Likewise.
6358 (dwarf2_read_index): Likewise.
6359 (dwarf2_initialize_objfile): Likewise.
6360 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
6361 per_cu rather than get_dwarf2_per_objfile.
6363 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6365 * dwarf2read.h (struct signatured_type): Forward declare.
6366 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
6368 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
6369 (dw2_get_cutu): ...this.
6370 (dwarf2_per_objfile::get_cu): Rename from...
6371 (dw2_get_cu): ...this.
6372 (dwarf2_per_objfile::get_tu): New.
6373 (create_addrmap_from_index): Adjust.
6374 (create_addrmap_from_aranges): Adjust.
6375 (dw2_find_last_source_symtab): Adjust.
6376 (dw2_map_symtabs_matching_filename): Adjust.
6377 (dw2_symtab_iter_next): Adjust.
6378 (dw2_print_stats): Adjust.
6379 (dw2_expand_all_symtabs): Adjust.
6380 (dw2_expand_symtabs_with_fullname): Adjust.
6381 (dw2_expand_marked_cus): Adjust.
6382 (dw_expand_symtabs_matching_file_matcher): Adjust.
6383 (dw2_map_symbol_filenames): Adjust.
6384 (dw2_debug_names_iterator::next): Adjust.
6385 (dwarf2_initialize_objfile): Adjust.
6386 (set_partial_user): Adjust.
6387 (dwarf2_build_psymtabs_hard): Adjust.
6389 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6391 * dwarf2read.c (create_signatured_type_table_from_debug_names):
6392 Remove unused variables.
6393 (dw2_map_symtabs_matching_filename): Likewise.
6394 (dwarf2_record_block_ranges): Likewise.
6395 (dwarf2_read_addr_index): Likewise.
6396 (follow_die_offset): Likewise.
6398 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6400 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
6401 to symbol_file_add_main.
6403 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6406 * mi/mi-console.c (do_fputc_async_safe): New.
6407 (mi_console_file::write_async_safe): New.
6408 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
6409 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
6411 * ui-file.c (ui_file::putstrn): Adjust call to
6412 fputstrn_unfiltered.
6413 * utils.c (printchar): Replace do_fputs and do_fprintf
6414 parameters by do_fputc.
6415 (fputstr_filtered): Adjust call to printchar.
6416 (fputstr_unfiltered): Likewise.
6417 (fputstrn_filtered): Likewise.
6418 (fputstrn_unfiltered): Add do_fputc parameter, pass to
6420 * utils.h (do_fputc_ftype): New typedef.
6421 (fputstrn_unfiltered): Add do_fputc parameter.
6423 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6425 * regformats/i386/i386-avx.dat: Remove.
6427 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6430 * amd64-tdep.c (amd64_none_init_abi): New function.
6431 (amd64_x32_none_init_abi): New function.
6432 (_initialize_amd64_tdep): Register handlers for x86-64 and
6433 x64_32 with GDB_OSABI_NONE.
6434 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
6435 GDB_OSABI_NONE osabi.
6437 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6440 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
6442 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
6443 * osabi.c (gdb_osabi_names): Add "unknown" entry.
6445 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6447 * common/byte-vector.h (char_vector): New type.
6448 * target.h (target_read_alloc): Return
6449 gdb::optional<byte_vector>.
6450 (target_read_stralloc): Return gdb::optional<char_vector>.
6451 (target_get_osdata): Return gdb::optional<char_vector>.
6452 * target.c (target_read_alloc_1): Templatize. Replacement
6453 manual memory management with vector.
6454 (target_read_alloc): Change return type, adjust.
6455 (target_read_stralloc): Change return type, adjust.
6456 (target_get_osdata): Change return type, adjust.
6457 * auxv.c (struct auxv_info) <length>: Remove.
6458 <data>: Change type to gdb::optional<byte_vector>.
6459 (auxv_inferior_data_cleanup): Free auxv_info with delete.
6460 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
6461 (target_auxv_search): Adjust.
6462 (fprint_target_auxv): Adjust.
6463 * avr-tdep.c (avr_io_reg_read_command): Adjust.
6464 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
6465 (linux_make_corefile_notes): Adjust.
6466 * osdata.c (get_osdata): Adjust.
6467 * remote.c (remote_get_threads_with_qxfer): Adjust.
6468 (remote_memory_map): Adjust.
6469 (remote_traceframe_info): Adjust.
6470 (btrace_read_config): Adjust.
6471 (remote_read_btrace): Adjust.
6472 (remote_pid_to_exec_file): Adjust.
6473 * solib-aix.c (solib_aix_get_library_list): Adjust.
6474 * solib-dsbt.c (decode_loadmap): Don't free buf.
6475 (dsbt_get_initial_loadmaps): Adjust.
6476 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
6477 * solib-target.c (solib_target_current_sos): Adjust.
6478 * tracepoint.c (sdata_make_value): Adjust.
6479 * xml-support.c (xinclude_start_include): Adjust.
6480 (xml_fetch_content_from_file): Adjust.
6481 * xml-support.h (xml_fetch_another): Change return type.
6482 (xml_fetch_content_from_file): Change return type.
6483 * xml-syscall.c (xml_init_syscalls_info): Adjust.
6484 * xml-tdesc.c (file_read_description_xml): Adjust.
6485 (fetch_available_features_from_target): Change return type.
6486 (target_fetch_description_xml): Adjust.
6487 (target_read_description_xml): Adjust.
6489 2018-04-06 Tom Tromey <tom@tromey.com>
6491 * value.c (~value): Update.
6492 (struct value) <contents>: Now unique_xmalloc_ptr.
6493 (value_contents_bits_eq, allocate_value_contents)
6494 (value_contents_raw, value_contents_all_raw)
6495 (value_contents_for_printing, value_contents_for_printing_const)
6496 (set_value_enclosing_type): Update.
6498 2018-04-06 Tom Tromey <tom@tromey.com>
6500 * value.c (range_s): Remove typedef, VEC.
6501 (struct range): Add operator<.
6502 (range_lessthan): Remove.
6503 (ranges_contain): Change type.
6505 (struct value) <unavailable, optimized_out>: Now std::vector.
6506 (value_entirely_available)
6507 (value_entirely_covered_by_range_vector)
6508 (value_entirely_unavailable, value_entirely_optimized_out):
6510 (insert_into_bit_range_vector): Change argument type.
6511 (find_first_range_overlap): Likewise.
6512 (struct ranges_and_idx, value_contents_bits_eq)
6513 (require_not_optimized_out, require_available): Update.
6514 (ranges_copy_adjusted): Change argument types.
6515 (value_optimized_out, value_copy, value_fetch_lazy): Update.
6517 2018-04-06 Tom Tromey <tom@tromey.com>
6519 * value.c (~value): Update.
6520 (struct value) <parent>: Now a value_ref_ptr.
6521 (value_parent, set_value_parent, value_address, value_copy):
6524 2018-04-06 Tom Tromey <tom@tromey.com>
6526 * value.c (struct value): Add constructor, destructor, and member
6528 (allocate_value_lazy, value_decref): Update.
6530 2018-04-06 Tom Tromey <tom@tromey.com>
6532 * value.c (struct value) <released, next>: Remove.
6533 (all_values): Now a std::vector.
6534 (allocate_value_lazy): Update.
6535 (value_next): Remove.
6536 (value_mark, value_free_to_mark, release_value)
6537 (value_release_to_mark): Update.
6539 2018-04-06 Tom Tromey <tom@tromey.com>
6541 * value.h (fetch_subexp_value, value_release_to_mark): Update.
6542 (free_value_chain): Remove.
6543 * value.c (free_value_chain): Remove.
6544 (value_release_to_mark): Return a std::vector.
6545 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
6547 (check_condition): Update.
6548 * eval.c (fetch_subexp_value): Change "val_chain" to a
6550 * breakpoint.c (update_watchpoint): Update.
6551 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
6553 2018-04-06 Tom Tromey <tom@tromey.com>
6555 * value.h (free_all_values): Remove.
6556 * value.c (free_all_values): Remove.
6558 2018-04-06 Tom Tromey <tom@tromey.com>
6560 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
6561 (value_history_chain, value_history_count): Remove.
6562 (value_history): New global.
6563 (record_latest_value, access_value_history, show_values)
6564 (preserve_values): Update.
6566 2018-04-06 Tom Tromey <tom@tromey.com>
6568 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
6569 * varobj.c (varobj_set_display_format, varobj_set_value)
6570 (install_default_visualizer, construct_visualizer)
6571 (install_new_value, ~varobj, varobj_get_value_type)
6572 (my_value_of_variable, varobj_editable_p): Update.
6573 * c-varobj.c (c_describe_child, c_value_of_variable)
6574 (cplus_number_of_children, cplus_describe_child): Update.
6575 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
6576 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
6577 (ada_value_of_variable, ada_value_is_changeable_p): Update.
6579 2018-04-06 Tom Tromey <tom@tromey.com>
6581 * printcmd.c (last_examine_address): Change type to
6583 (do_examine, x_command): Update.
6585 2018-04-06 Tom Tromey <tom@tromey.com>
6587 * value.c (release_value): Update.
6588 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
6589 (struct bpstats) <val>: Now a value_ref_ptr.
6590 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
6591 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
6592 (~watchpoint, print_it_watchpoint, watch_command_1)
6593 (invalidate_bp_value_on_memory_change): Update.
6595 2018-04-06 Tom Tromey <tom@tromey.com>
6597 * varobj.c (varobj_clear_saved_item)
6598 (update_dynamic_varobj_children, install_new_value, ~varobj):
6600 * value.h (value_incref): Move declaration earlier.
6601 (value_decref): Rename from value_free.
6602 (struct value_ref_policy): New.
6603 (value_ref_ptr): New typedef.
6604 (struct value_deleter): Remove.
6605 (gdb_value_up): Remove typedef.
6606 (release_value): Change return type.
6607 (release_value_or_incref): Remove.
6608 * value.c (set_value_parent): Update.
6609 (value_incref): Change return type.
6610 (value_decref): Rename from value_free.
6611 (value_free_to_mark, free_all_values, free_value_chain): Update.
6612 (release_value): Return value_ref_ptr.
6613 (release_value_or_incref): Remove.
6614 (record_latest_value, set_internalvar, clear_internalvar):
6616 * stack.c (info_frame_command): Don't call value_free.
6617 * python/py-value.c (valpy_dealloc, valpy_new)
6618 (value_to_value_object): Update.
6619 * printcmd.c (do_examine): Update.
6620 * opencl-lang.c (lval_func_free_closure): Update.
6621 * mi/mi-main.c (register_changed_p): Don't call value_free.
6622 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
6623 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
6624 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
6626 * guile/scm-value.c (vlscm_free_value_smob)
6627 (vlscm_scm_from_value): Update.
6628 * frame.c (frame_register_unwind, frame_unwind_register_signed)
6629 (frame_unwind_register_unsigned, get_frame_register_bytes)
6630 (put_frame_register_bytes): Don't call value_free.
6631 * findvar.c (address_from_register): Don't call value_free.
6632 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
6633 * dwarf2loc.c (entry_data_value_free_closure)
6634 (value_of_dwarf_reg_entry, free_pieced_value_closure)
6635 (dwarf2_evaluate_loc_desc_full): Update.
6636 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
6637 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
6638 (~watchpoint, watch_command_1)
6639 (invalidate_bp_value_on_memory_change): Update.
6640 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
6642 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
6645 * warning.m4: Add -Wno-error=deprecated-register.
6646 * configure: Re-generate.
6648 2018-04-05 Tom Tromey <tom@tromey.com>
6650 * linespec.h: Remove include of "vec.h".
6652 2018-04-05 Tom Tromey <tom@tromey.com>
6654 * linespec.c (typep): Remove typedef.
6655 (find_methods, find_superclass_methods): Take a std::vector.
6656 (find_method): Use std::vector.
6658 2018-04-05 Tom Tromey <tom@tromey.com>
6660 * utils.c (compare_strings): Remove.
6661 * utils.h (compare_strings): Remove.
6662 * objc-lang.h (find_imps): Update.
6663 * objc-lang.c (find_methods): Take a std::vector.
6664 (uniquify_strings, find_imps): Likewise.
6665 * linespec.c (find_methods): Take a std::vector.
6666 (decode_objc): Use std::vector.
6667 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
6669 (find_method, find_function_symbols): Use std::vector.
6671 2018-04-05 Tom Tromey <tom@tromey.com>
6673 * completer.c (completion_tracker::completion_tracker): Remove
6675 (completion_tracker::discard_completions): Likewise.
6676 * breakpoint.c (ambiguous_names_p): Remove cast.
6677 * ada-lang.c (_initialize_ada_language): Remove cast.
6678 * utils.h (streq): Update.
6679 (streq_hash): Add new declaration.
6680 * utils.c (streq): Return bool.
6681 (streq_hash): New function.
6683 2018-04-05 Tom Tromey <tom@tromey.com>
6685 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
6686 Remove a string copy.
6688 2018-04-05 Tom Tromey <tom@tromey.com>
6690 * linespec.c (filter_results): Use std::vector.
6691 (decode_line_2, decode_line_full): Update.
6693 2018-04-05 Tom Tromey <tom@tromey.com>
6695 * linespec.c (canonical_to_fullform): Return std::string.
6696 (filter_results): Update.
6697 (struct decode_line_2_item): Add constructor.
6698 <fullform, displayform>: Now std::string.
6699 (decode_line_2_compare_items): Now a std::sort comparator.
6700 (decode_line_2): Update.
6702 2018-04-05 Tom Tromey <tom@tromey.com>
6704 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
6705 (unexpected_linespec_error): Update.
6706 (linespec_parse_basic, parse_linespec): Update.
6708 2018-04-05 Tom Tromey <tom@tromey.com>
6710 * linespec.c (linespec_parse_basic): Reindent.
6712 2018-04-05 Tom Tromey <tom@tromey.com>
6714 * minsyms.h (iterate_over_minimal_symbols): Update.
6715 * minsyms.c (iterate_over_minimal_symbols): Take a
6717 * linespec.c (struct collect_minsyms): Remove.
6718 (compare_msyms): Now a std::sort comparator.
6719 (add_minsym): Add parameters.
6720 (search_minsyms_for_name): Update. Use std::vector.
6722 2018-04-03 Tom Tromey <tom@tromey.com>
6724 * mipsread.c (read_alphacoff_dynamic_symtab): Use
6727 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
6729 * MAINTAINERS (Write After Approval): Add Weimin Pan.
6731 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
6734 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
6735 printing static type.
6737 2018-04-01 Tom Tromey <tom@tromey.com>
6739 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
6740 (rs6000_xfer_shared_libraries): Update.
6742 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
6744 * common/gdb_vecs.h (char_ptr): Remove.
6745 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
6747 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
6749 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
6751 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
6753 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
6755 * tracepoint.h (struct uploaded_tp): Initialize fields.
6756 <actions, step_actions, cmd_strings>: Change type to
6757 std::vector<char *>.
6758 * tracepoint.c (get_uploaded_tp): Allocate with new.
6759 (free_uploaded_tps): Free with delete.
6760 (parse_tracepoint_definition): Adjust to std::vector change.
6761 * breakpoint.c (read_uploaded_action): Likewise.
6762 (create_tracepoint_from_upload): Likewise.
6763 * ctf.c (ctf_write_uploaded_tp): Likewise.
6764 (SET_ARRAY_FIELD): Likewise.
6765 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
6767 2018-03-30 Tom Tromey <tom@tromey.com>
6769 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
6771 (svr4_keep_data_in_core): Update.
6772 (svr4_read_so_list): Update.
6774 2018-03-30 Tom Tromey <tom@tromey.com>
6776 * windows-nat.c (handle_output_debug_string, handle_exception):
6778 * target.h (target_read_string): Update.
6779 * target.c (target_read_string): Change "string" to
6781 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
6783 * solib-frv.c (frv_current_sos): Update.
6784 * solib-dsbt.c (dsbt_current_sos): Update.
6785 * solib-darwin.c (darwin_current_sos): Update.
6786 * linux-thread-db.c (inferior_has_bug): Update.
6787 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
6788 Update. Remove alloca.
6789 * ada-lang.c (ada_main_name): Update.
6791 2018-03-30 Tom Tromey <tom@tromey.com>
6793 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
6794 (struct dwo_file_deleter): New.
6795 (dwo_file_up): New typedef.
6796 (open_and_init_dwo_file): Use dwo_file_up.
6797 (free_dwo_file_cleanup): Remove.
6799 2018-03-30 Tom Tromey <tom@tromey.com>
6801 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
6802 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
6804 2018-03-30 Tom Tromey <tom@tromey.com>
6806 * dwarf2read.c (class free_cached_comp_units): New class.
6807 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
6808 (free_cached_comp_units): Remove function.
6810 2018-03-30 Tom Tromey <tom@tromey.com>
6812 * utils.h (make_cleanup_unpush_target): Remove.
6813 * inf-ptrace.c (struct target_unpusher): New.
6814 (target_unpush_up) New typedef.
6815 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
6817 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
6819 2018-03-27 Tom Tromey <tom@tromey.com>
6821 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
6823 2018-03-27 Pedro Alves <palves@redhat.com>
6824 Tom Tromey <tom@tromey.com>
6826 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
6827 destructor. Now a class.
6828 (gdb_readline_wrapper_cleanup): Remove function.
6829 (gdb_readline_wrapper): Remove cleanups.
6831 2018-03-27 Tom Tromey <tom@tromey.com>
6833 * typeprint.h (struct type_print_options) <local_typedefs,
6834 global_typedefs>: Remove "struct" keyword.
6835 (class typedef_hash_table): New class.
6836 (recursively_update_typedef_hash, add_template_parameters)
6837 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
6838 (find_typedef_in_hash): Don't declare.
6839 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
6840 (typedef_hash_table::recursively_update): Rename from
6841 recursively_update_typedef_hash. Now a member.
6842 (typedef_hash_table::add_template_parameters): Rename from
6843 add_template_parameters. Now a member.
6844 (typedef_hash_table::typedef_hash_table): Now a constructor;
6845 rename from create_typedef_hash.
6846 (typedef_hash_table::~typedef_hash_table): Now a destructor;
6847 rename from free_typedef_hash.
6848 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
6849 (do_free_global_table): Remove.
6850 (typedef_hash_table::typedef_hash_table): New constructor; renamed
6851 from copy_type_recursive.
6852 (create_global_typedef_table): Remove.
6853 (typedef_hash_table::find_global_typedef): Now a member of
6855 (typedef_hash_table::find_typedef): Rename from
6856 find_typedef_in_hash; now a member.
6857 (whatis_exp): Update.
6858 * extension.h (struct ext_lang_type_printers): Add constructor and
6860 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
6862 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
6863 Now a constructor; rename from start_ext_lang_type_printers.
6864 (ext_lang_type_printers): Now a destructor; rename from
6865 free_ext_lang_type_printers.
6866 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
6868 (c_type_print_base_struct_union): Update. Remove cleanups.
6870 2018-03-27 Tom Tromey <tom@tromey.com>
6872 * dwarf-index-write.c: Include <cmath>.
6874 2018-03-27 Joel Brobecker <brobecker@adacore.com>
6876 * NEWS: Add entry describing new "set|show varsize-limit" command.
6877 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
6879 * printcmd.c (_initialize_printcmd): Add "set var" alias of
6882 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
6884 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
6886 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
6887 * dwarf-index-common.c: New file.
6888 * dwarf-index-common.h: New file.
6889 * dwarf-index-write.c: New file.
6890 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
6891 (struct dwarf2_section_info): Move from here.
6892 (dwarf2_section_info_def): Likewise.
6893 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
6894 (offset_type): Likewise.
6895 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
6896 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
6897 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
6898 (byte_swap): Likewise.
6899 (MAYBE_SWAP): Likewise.
6900 (dwarf2_per_cu_ptr): Likewise.
6901 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
6902 (struct tu_stats): Likewise.
6903 (struct dwarf2_per_objfile): Likewise.
6904 (struct dwarf2_per_cu_data): Likewise.
6905 (struct signatured_type): Likewise.
6906 (sig_type_ptr): Likewise.
6907 (DEF_VEC_P (sig_type_ptr)): Likewise.
6908 (INDEX4_SUFFIX): Likewise.
6909 (INDEX5_SUFFIX): Likewise.
6910 (DEBUG_STR_SUFFIX): Likewise.
6911 (dwarf2_read_section): Make non-static.
6912 (mapped_index_string_hash): Move from here.
6913 (dwarf5_djb_hash): Likewise.
6914 (file_write): Likewise.
6915 (class data_buf): Likewise.
6916 (struct symtab_index_entry): Likewise.
6917 (struct mapped_symtab): Likewise.
6918 (find_slot): Likewise.
6919 (hash_expand): Likewise.
6920 (add_index_entry): Likewise.
6921 (uniquify_cu_indices): Likewise.
6922 (class c_str_view): Likewise.
6923 (class c_str_view_hasher): Likewise.
6924 (class vector_hasher): Likewise.
6925 (write_hash_table): Likewise.
6926 (psym_index_map): Likewise.
6927 (struct addrmap_index_data): Likewise.
6928 (add_address_entry): Likewise.
6929 (add_address_entry_worker): Likewise.
6930 (write_address_map): Likewise.
6931 (symbol_kind): Likewise.
6932 (write_psymbols): Likewise.
6933 (struct signatured_type_index_data): Likewise.
6934 (write_one_signatured_type): Likewise.
6935 (recursively_count_psymbols): Likewise.
6936 (recursively_write_psymbols): Likewise.
6937 (class debug_names): Likewise.
6938 (check_dwarf64_offsets): Likewise.
6939 (psyms_seen_size): Likewise.
6940 (write_gdbindex): Likewise.
6941 (write_debug_names): Likewise.
6942 (assert_file_size): Likewise.
6943 (write_psymtabs_to_index): Likewise.
6944 (save_gdb_index_command): Likewise.
6945 (_initialize_dwarf2_read): Don't register the "save gdb-index"
6947 * dwarf2read.h: New file.
6949 2018-03-27 Joel Brobecker <brobecker@adacore.com>
6952 * dwarf2read.c (dwarf2_physname): Do not return the demangled
6953 symbol name if the CU's language stores symbol names in linkage
6955 * language.h (struct language_defn)
6956 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
6957 all instances of this struct.
6959 2018-03-26 Tom Tromey <tom@tromey.com>
6961 * stack.c (backtrace_command_1): Remove verbose code.
6963 2018-03-26 Tom Tromey <tom@tromey.com>
6965 * python/py-framefilter.c (py_print_type): Don't catch
6966 exceptions. Return void.
6967 (py_print_value): Likewise.
6968 (py_print_single_arg): Likewise.
6969 (enumerate_args): Don't catch exceptions.
6970 (py_print_args): Likewise.
6971 (py_print_frame): Likewise.
6972 (gdbpy_apply_frame_filter): Catch exceptions here.
6974 2018-03-26 Tom Tromey <tom@tromey.com>
6976 * stack.c (_initialize_stack): Remove trailing newlines from help
6977 text. Add "Usage" line to "backtrace" help.
6979 2018-03-26 Tom Tromey <tom@tromey.com>
6982 * python/py-framefilter.c (py_print_args): Call wrap_hint.
6984 2018-03-26 Tom Tromey <tom@tromey.com>
6986 * python/py-framefilter.c (py_print_single_arg): Return
6987 EXT_LANG_BT_ERROR from catch.
6989 2018-03-26 Tom Tromey <tom@tromey.com>
6992 * stack.c (backtrace_command_1): Move some code into no-filters
6995 2018-03-26 Tom Tromey <tom@tromey.com>
6997 * python/py-framefilter.c (throw_quit_or_print_exception): New
6999 (gdbpy_apply_frame_filter): Use it.
7001 2018-03-26 Tom Tromey <tom@tromey.com>
7004 * python/py-framefilter.c (py_print_type, py_print_value)
7005 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
7008 2018-03-26 Tom Tromey <tom@tromey.com>
7010 * python/py-framefilter.c (enumerate_args): Use
7011 gdb::unique_xmalloc_ptr.
7013 2018-03-26 Tom Tromey <tom@tromey.com>
7015 * python/py-framefilter.c (py_print_frame): Return
7017 (gdbpy_apply_frame_filter): Update comment.
7018 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
7020 <EXT_LANG_BT_NO_FILTERS>: Change value.
7022 2018-03-26 Tom Tromey <tom@tromey.com>
7025 * stack.c (backtrace_command): Parse "hide" argument.
7026 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
7027 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
7030 2018-03-26 Tom Tromey <tom@tromey.com>
7032 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
7034 (backtrace_command): Remove "fulltrace", add "flags".
7036 2018-03-26 Tom Tromey <tom@tromey.com>
7038 * stack.c (backtrace_command): Rewrite command line parsing.
7040 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
7042 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
7044 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
7046 * filename-seen-cache.h: Add include guard.
7048 2018-03-26 Keith Seitz <keiths@redhat.com>
7050 * symfile.c (place_section): Remove "struct" from section_addr_info
7052 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
7053 "struct" keyword from section_addr_info.
7055 2018-03-26 Alan Hayward <alan.hayward@arm.com>
7057 * regformats/regdef.h (reg): Add constructors.
7059 2018-03-25 Pedro Alves <palves@redhat.com>
7061 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
7062 if then/else bodies in var_func_name extraction.
7064 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
7066 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
7067 lookup_minimal_symbol() to find symbol entry.
7068 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
7070 2018-03-23 Keith Seitz <keiths@redhat.com>
7073 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
7074 nested type definitions for C++, too.
7076 2018-03-23 Tom Tromey <tom@tromey.com>
7078 * machoread.c (struct oso_el): Add a constructor. Don't define as
7080 (macho_register_oso): Remove.
7081 (macho_symtab_read): Take a std::vector.
7082 (oso_el_compare_name): Now a std::sort comparator.
7083 (macho_symfile_read_all_oso): Take a std::vector.
7084 (macho_symfile_read): Use std::vector. Remove cleanups.
7086 2018-03-22 Tom Tromey <tom@tromey.com>
7088 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
7089 (record_full_goto_bookmark): Use std::string.
7091 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7094 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
7097 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7099 * rs6000-tdep.c (store_insn_p): New function.
7100 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
7101 and cr_reg to their unshifted values. Use store_insn_p to
7102 match LR saves using either R1 or fdata->alloca_reg. Use
7103 store_insn_p to match CR saves. Set alloca_reg_offset
7104 when alloca_reg and framep are set. Remove lr_reg shift
7105 when assigning to fdata->lr_register.
7107 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
7109 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
7110 command line args instead of emitting a warning.
7112 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
7114 * tracepoint.h (struct static_tracepoint_marker): Initialize
7115 fields, define default constructor, move constructor and move
7116 assignment, disable the rest.
7117 <str_id, extra>: Make std::string.
7118 (release_static_tracepoint_marker): Remove.
7119 (free_current_marker): Remove.
7120 * tracepoint.c (free_current_marker): Remove.
7121 (parse_static_tracepoint_marker_definition): Adjust to
7122 std::string, use new hex2str overload.
7123 (release_static_tracepoint_marker): Remove.
7124 (print_one_static_tracepoint_marker): Get marker by reference
7125 and adjust to std::string.
7126 (info_static_tracepoint_markers_command): Adjust to std::vector
7128 * target.h (static_tracepoint_marker_p): Remove typedef.
7129 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
7130 (struct target_ops) <to_static_tracepoint_marker_at>: Return
7132 <to_static_tracepoint_markers_by_strid>: Return std::vector.
7134 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
7135 (target_debug_print_std_vector_static_tracepoint_marker): New.
7136 (target_debug_print_struct_static_tracepoint_marker_p): Rename
7138 (target_debug_print_static_tracepoint_marker_p): ... this.
7139 * target-delegates.c: Re-generate.
7140 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
7142 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
7143 (decode_static_tracepoint_spec): Adjust to std::vector.
7144 (tracepoint_print_one_detail): Adjust to std::string.
7145 (strace_marker_decode_location): Adjust to std::string.
7146 (update_static_tracepoint): Adjust to std::string, remove call
7147 to release_static_tracepoint_marker.
7148 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
7149 Adjust to std::vector.
7150 * remote.c (remote_static_tracepoint_marker_at): Return bool.
7151 (remote_static_tracepoint_markers_by_strid): Adjust to
7153 * common/rsp-low.h (hex2str): New overload with explicit count
7155 * common/rsp-low.c (hex2str): New overload with explicit count
7157 * unittests/rsp-low-selftests.c (test_hex2str): New function.
7158 (_initialize_rsp_low_selftests): Add test_hex2str test.
7159 * unittests/tracepoint-selftests.c
7160 (test_parse_static_tracepoint_marker_definition): Adjust to
7163 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
7165 * tracepoint.c (parse_static_tracepoint_marker_definition):
7166 Consider case where the definition is followed by more
7168 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7169 tracepoint-selftests.c.
7170 * unittests/tracepoint-selftests.c: New.
7172 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7174 * MAINTAINERS (Write After Approval): Add Pedro Franco de
7177 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
7179 * symtab.c (find_pc_sect_line): fixed indentation.
7181 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
7183 * symtab.c (find_pc_sect_line): now uses binary search.
7185 2018-03-19 Tom Tromey <tom@tromey.com>
7187 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
7190 2018-03-19 Pedro Alves <palves@redhat.com>
7191 Tom Tromey <tom@tromey.com>
7193 * unittests/observable-selftests.c: New file.
7194 * common/observable.h: New file.
7195 * observable.h: New file.
7196 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
7197 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
7198 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
7199 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
7200 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
7201 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
7202 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
7203 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
7204 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
7205 python/py-breakpoint.c, python/py-finishbreakpoint.c,
7206 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
7207 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
7208 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
7209 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
7210 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
7211 tui/tui-interp.c, valops.c: Update all users.
7212 * tui/tui-hooks.c (tui_bp_created_observer)
7213 (tui_bp_deleted_observer, tui_bp_modified_observer)
7214 (tui_inferior_exit_observer, tui_before_prompt_observer)
7215 (tui_normal_stop_observer, tui_register_changed_observer):
7217 (tui_observers_token): New global.
7218 (attach_or_detach, tui_attach_detach_observers): New functions.
7219 (tui_install_hooks, tui_remove_hooks): Use
7220 tui_attach_detach_observers.
7221 * record-btrace.c (record_btrace_thread_observer): Remove.
7222 (record_btrace_thread_observer_token): New global.
7223 * observer.sh: Remove.
7224 * observer.c: Rename to observable.c.
7225 * observable.c (namespace gdb_observers): Define new objects.
7226 (observer_debug): Move into gdb_observers namespace.
7227 (struct observer, struct observer_list, xalloc_observer_list_node)
7228 (xfree_observer_list_node, generic_observer_attach)
7229 (generic_observer_detach, generic_observer_notify): Remove.
7230 (_initialize_observer): Update.
7231 Don't include observer.inc.
7232 * Makefile.in (generated_files): Remove observer.h, observer.inc.
7233 (clean mostlyclean): Likewise.
7234 (observer.h, observer.inc): Remove targets.
7235 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
7236 (COMMON_SFILES): Use observable.c, not observer.c.
7237 * .gitignore: Remove observer.h.
7239 2018-03-18 Tom Tromey <tom@tromey.com>
7241 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
7243 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
7245 2018-03-17 Tom Tromey <tom@tromey.com>
7247 * auto-load.c (auto_load_objfile_script_1): Use std::string.
7249 2018-03-17 Tom Tromey <tom@tromey.com>
7251 * target.c (class scoped_target_fd): New.
7252 (target_fileio_close_cleanup): Remove.
7253 (target_fileio_read_alloc_1): Use scoped_target_fd.
7255 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
7257 * silent-rules.mk: New.
7258 * Makefile.in: Include silent-rules.mk
7259 (srcdir, VPATH, top_srcdir): Move up.
7260 (COMPILE): Add ECHO_CXX.
7261 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
7262 (init.c): Add ECHO_INIT_C.
7263 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
7264 (version.c): Add ECHO_GEN.
7265 (printcmd.o): Add ECHO_CXX.
7266 (target-float.o): Add ECHO_CXX.
7267 (ada-exp.o): Add ECHO_CXX.
7268 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
7269 (insight$(EXEEXT)): Add ECHO_CXXLD.
7270 * gnulib/configure.ac: Add AM_SILENT_RULES.
7271 * gnulib/aclocal.m4: Re-generate.
7272 * gnulib/configure: Re-generate.
7273 * gnulib/import/Makefile.in: Re-generate.
7275 2018-03-16 Tom Tromey <tom@tromey.com>
7277 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
7278 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
7279 * utils.c (do_free_section_addr_info)
7280 (make_cleanup_free_section_addr_info): Remove.
7281 * symfile.h (struct other_sections): Add constructor.
7282 (struct section_addr_info): Remove.
7283 (section_addr_info): New typedef.
7284 (struct sym_fns) <sym_offsets>: Change type of parameter.
7285 (build_section_addr_info_from_objfile)
7286 (relative_addr_info_to_section_offsets, addr_info_make_relative)
7287 (default_symfile_offsets, symbol_file_add)
7288 (symbol_file_add_from_bfd)
7289 (build_section_addr_info_from_section_table): Update.
7290 (alloc_section_addr_info, free_section_addr_info): Don't declare.
7291 * symfile.c (alloc_section_addr_info): Remove.
7292 (build_section_addr_info_from_section_table): Change return type.
7294 (build_section_addr_info_from_bfd)
7295 (build_section_addr_info_from_objfile): Likewise.
7296 (free_section_addr_info): Remove.
7297 (relative_addr_info_to_section_offsets): Change type of "addrs".
7298 (addrs_section_compar): Now a std::sort comparator.
7299 (addrs_section_sort): Change return type.
7300 (addr_info_make_relative): Change type of "addrs". Update.
7301 (default_symfile_offsets, syms_from_objfile_1)
7302 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
7303 (symbol_file_add_separate): Update.
7304 (symbol_file_add): Change type of "addrs". Update.
7305 (add_symbol_file_command): Update. Remove cleanups.
7306 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
7308 * symfile-debug.c (debug_sym_offsets): Change type of "info".
7309 * solib.c (solib_read_symbols): Update.
7310 * objfiles.c (objfile_relocate): Update. Remove cleanups.
7311 * machoread.c (macho_symfile_offsets): Update.
7312 * jit.c (jit_bfd_try_read_symtab): Update.
7314 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
7316 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7317 unittests/utils-selftests.c.
7318 * unittests/utils-selftests.c: New file.
7320 2018-03-14 Tom Tromey <tom@tromey.com>
7323 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
7326 2018-03-14 Tom Tromey <tom@tromey.com>
7329 * printcmd.c (printf_pointer): Allow "-" in format.
7331 2018-03-14 Tom Tromey <tom@tromey.com>
7333 * printcmd.c (_initialize_printcmd): Add usage to printf.
7335 2018-03-14 Yao Qi <qiyao@sourceware.org>
7337 * MAINTAINERS: Update my email address.
7339 2018-03-13 Tom Tromey <tom@tromey.com>
7341 * machoread.c (macho_check_dsym): Change filenamep to a
7343 (macho_symfile_read): Update.
7344 * symfile.c (load_command): Use std::string.
7346 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
7348 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
7349 to error message string.
7350 (riscv_register_name): Use xsnprintf instead of sprintf.
7351 (riscv_insn::fetch_instruction): Use gdb_assert instead of
7353 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
7355 (riscv_push_dummy_call): Likewise.
7357 2018-03-12 Tom Tromey <tom@tromey.com>
7359 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
7360 Use gdb::byte_vector.
7361 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
7363 2018-03-12 Yao Qi <yao.qi@linaro.org>
7365 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
7366 parameter type to readable_regcache.
7367 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
7370 2018-03-11 Tom Tromey <tom@tromey.com>
7372 * dwarf2read.c (struct nextfield): Add initializers.
7373 (struct nextfnfield): Remove.
7374 (struct fnfieldlist): Add initializers. Remove "length" and
7375 "head", use std::vector.
7376 (struct decl_field_list): Remove.
7377 (struct field_info): Add initializers.
7378 <fields, baseclasses>: Now std::vector.
7379 <nbaseclasses, nfnfields, typedef_field_list_count,
7380 nested_types_list_count>: Remove.
7381 (dwarf2_add_field, dwarf2_add_type_defn)
7382 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
7383 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
7384 (process_structure_scope): Update.
7386 2018-03-11 Tom Tromey <tom@tromey.com>
7388 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
7389 for use by std::sort.
7390 (build_type_psymtabs_1): Use std::vector.
7392 2018-03-09 Eli Zaretskii <eliz@gnu.org>
7394 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
7395 and LIBMPFR in the printed configuration.
7397 2018-03-08 Tom Tromey <tom@tromey.com>
7399 * source.c (get_filename_and_charpos): Use scoped_fd.
7400 * nto-procfs.c (procfs_open_1): Use scoped_fd.
7401 (procfs_pidlist): Likewise.
7402 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
7403 (iterate_over_mappings): Likewise.
7405 2018-03-08 Tom Tromey <tom@tromey.com>
7407 * infcall.c (struct call_return_meta_info)
7408 <stack_temporaries_enabled>: Remove.
7409 (get_call_return_value, call_function_by_hand_dummy): Update.
7410 * thread.c (disable_thread_stack_temporaries): Remove.
7411 (enable_thread_stack_temporaries): Remove.
7412 (thread_stack_temporaries_enabled_p): Return bool.
7413 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
7414 (get_last_thread_stack_temporary): Update.
7415 * eval.c (evaluate_subexp): Update.
7416 * gdbthread.h (class enable_thread_stack_temporaries): Now a
7417 class, not a function.
7418 (value_ptr, value_vec): Remove typedefs.
7419 (class thread_info) <stack_temporaries_enabled>: Now bool.
7420 <stack_temporaries>: Now a std::vector.
7421 (thread_stack_temporaries_enabled_p)
7422 (value_in_thread_stack_temporaries): Return bool.
7424 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
7426 * remote.c (putpkt_binary): Fix omitted bytes reporting.
7427 (getpkt_or_notif_sane_1): Likewise.
7429 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7431 * build-id.c (build_id_to_debug_bfd): Use std::string.
7433 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7435 * build-id.c (find_separate_debug_file_by_buildid): Return
7437 * build-id.h (find_separate_debug_file_by_buildid): Return
7439 * coffread.c (coff_symfile_read): Adjust to std::string.
7440 * elfread.c (elf_symfile_read): Adjust to std::string.
7441 * symfile.c (separate_debug_file_exists): Change parameter to
7443 (find_separate_debug_file): Return std::string.
7444 (find_separate_debug_file_by_debuglink): Return std::string.
7445 * symfile.h (find_separate_debug_file_by_debuglink): Return
7448 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7450 * common/xml-utils.c (xml_escape_text): Move code to...
7451 (xml_escape_text_append): ... this new function.
7452 * common/xml-utils.h (xml_escape_text_append): New declaration.
7453 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
7455 (_initialize_xml_utils): register test_xml_escape_text_append as
7458 2018-03-07 Alan Hayward <alan.hayward@arm.com>
7460 * defs.h: Remove MAX_REGISTER_SIZE.
7461 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
7463 * python/py-unwind.c (pyuw_sniffer): Likewise.
7465 2018-03-07 Tom Tromey <tom@tromey.com>
7467 * linux-tdep.c (linux_info_proc): Update.
7468 * target.h (struct target_ops) <to_fileio_readlink>: Return
7470 (target_fileio_readlink): Return optional<string>.
7471 * remote.c (remote_hostio_readlink): Return optional<string>.
7472 * inf-child.c (inf_child_fileio_readlink): Return
7474 * target.c (target_fileio_readlink): Return optional<string>.
7476 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
7478 * regcache.c (cooked_read_test): Add riscv to the list of
7479 architectures that have a save_reggroup.
7481 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
7483 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
7484 value is not a dynamic class object.
7486 2018-03-06 Tom Tromey <tom@tromey.com>
7488 * rust-exp.y: Formatting fixes.
7490 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7492 * riscv-tdep.c (riscv_register_name): Remove target description
7494 (riscv_gdbarch_init): Remove target description check.
7496 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7498 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
7500 * riscv-tdep.h: Likewise.
7502 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7504 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
7505 (riscv_pseudo_register_write): Delete.
7506 (riscv_gdbarch_init): Remove all use of pseudo registers.
7508 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7510 * record-btrace.c (btrace_print_lines): Replace cleanup
7511 parameter with RAII equivalents.
7512 (btrace_insn_history): Replace cleanup with RAII equivalents.
7513 * ui-out.h (make_cleanup_ui_out_list_begin_end,
7514 make_cleanup_ui_out_tuple_begin_end): Remove.
7515 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
7516 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
7517 make_cleanup_ui_out_list_begin_end): Remove.
7519 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7521 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
7522 parameter types to std::vector. Use bool.
7523 (record_btrace_wait): Replace VEC(tp_t) with
7524 std::vector<thread_info *>.
7525 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
7527 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7529 * record-btrace.c (record_btrace_disable_callback): Remove.
7530 (struct scoped_btrace_disable): New.
7531 (record_btrace_open): Use scoped_btrace_disable.
7533 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7535 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
7536 reading values from registers.
7538 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7540 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
7543 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7545 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
7546 change parameter type. Use GDB's print functions, and use
7547 core_addr_to_string where appropriate.
7548 (riscv_push_dummy_call): Use core_addr_to_string where
7549 appropriate, update call to riscv_print_arg_location, and reindent
7551 (riscv_return_value): Update call to riscv_print_arg_location.
7553 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7554 Tim Newsome <tim@sifive.com>
7555 Albert Ou <a0u@eecs.berkeley.edu>
7556 Darius Rad <darius@bluespec.com>
7558 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
7559 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
7560 (ALLDEPFILES): Add riscv-tdep.c
7561 * configure.tgt: Add riscv support.
7562 * riscv-tdep.c: New file.
7563 * riscv-tdep.h: New file.
7564 * NEWS: Mention new target.
7565 * MAINTAINERS: Add entry for riscv.
7567 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7569 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
7570 fields within aggregates.
7572 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
7574 * record-btrace.c (btrace_print_lines): Change type of flags to
7575 gdb_disassembly_flags.
7577 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7579 * fbsd-nat.c: Include "inf-ptrace.h".
7580 (USE_SIGTRAP_SIGINFO): Conditionally define.
7581 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
7582 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
7583 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
7585 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
7587 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
7589 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
7590 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
7591 "supports_stopped_by_hw_breakpoint" target methods.
7593 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7595 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
7596 * fbsd-nat.c (debug_fbsd_nat): New variable.
7597 (show_fbsd_nat_debug): New function.
7598 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
7599 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
7601 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7603 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
7604 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
7606 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
7607 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
7610 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7612 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
7613 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
7615 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7617 * charset.c (struct charset_vector): New.
7618 (charsets): Change type to charset_vector.
7619 (find_charset_names): Adjust.
7621 (_initialize_charset): Adjust.
7623 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7625 * progspace.h (struct program_space) <deleted_solibs>: Change
7626 type to std::vector<std::string>.
7627 * progspace.c (clear_program_space_solib_cache): Adjust.
7628 * breakpoint.c (print_solib_event): Adjust.
7629 (check_status_catch_solib): Adjust.
7630 * solib.c (update_solib_list): Adjust.
7631 * ui-out.h (class ui_out) <field_string>: New overload.
7632 * ui-out.c (ui_out::field_string): New overload.
7634 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7636 * progspace.h (struct program_space): Add constructor and
7637 destructor, initialize fields.
7638 (add_program_space): Remove.
7639 * progspace.c (add_program_space): Rename to...
7640 (program_space::program_space): ... this.
7641 (release_program_space): Rename to...
7642 (program_space::~program_space): ... this.
7643 (delete_program_space): Use delete to delete program_space.
7644 (initialize_progspace): Use new to allocate program_space.
7645 * inferior.c (add_inferior_with_spaces): Likewise.
7646 (clone_inferior_command): Likewise.
7647 * infrun.c (follow_fork_inferior): Likewise.
7648 (handle_vfork_child_exec_or_exit): Likewise.
7650 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7652 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
7653 (delim_string_to_char_ptr_vec): Return std::vector of
7654 gdb::unique_xmalloc_ptr.
7655 (dirnames_to_char_ptr_vec_append): Take std::vector of
7656 gdb::unique_xmalloc_ptr.
7657 (dirnames_to_char_ptr_vec): Return std::vector of
7658 gdb::unique_xmalloc_ptr.
7659 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
7660 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
7661 (delim_string_to_char_ptr_vec): Return an std::vector of
7662 gdb::unique_xmalloc_ptr, adjust the code.
7663 (dirnames_to_char_ptr_vec_append): Take an std::vector of
7664 gdb::unique_xmalloc_ptr, adjust the code.
7665 (dirnames_to_char_ptr_vec): Return an std::vector of
7666 gdb::unique_xmalloc_ptr, adjust the code.
7667 * auto-load.c (auto_load_safe_path_vec): Change type to
7668 std::vector of gdb::unique_xmalloc_ptr.
7669 (auto_load_expand_dir_vars): Return an std::vector of
7670 gdb::unique_xmalloc_ptr, adjust the code.
7671 (auto_load_safe_path_vec_update): Adjust.
7672 (filename_is_in_auto_load_safe_path_vec): Adjust.
7673 (auto_load_objfile_script_1): Adjust.
7674 * build-id.c (build_id_to_debug_bfd): Adjust.
7675 * linux-thread-db.c (thread_db_load_search): Adjust.
7676 * source.c (add_path): Adjust.
7678 * symfile.c (find_separate_debug_file): Adjust.
7679 * utils.c (do_free_char_ptr_vec): Remove.
7680 (make_cleanup_free_char_ptr_vec): Remove.
7682 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
7685 * common/pathstuff.c: Conditionally include "<windows.h>".
7687 2018-03-01 Georg Sauthoff <mail@georg.so>
7690 * gcore.in: Quote variables and switch interpreter to bash.
7692 2018-03-01 Tom Tromey <tom@tromey.com>
7694 * dwarf2read.c (alloc_discriminant_info): Fix default_index
7695 assertion. Add assertion for discriminant_index.
7696 (quirk_rust_enum): Use correct base type name in univariant case.
7698 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
7700 * record.c (get_call_history_modifiers): Return a
7702 (cmd_record_call_history): Adjust.
7703 * record-btrace.c (record_btrace_call_history): Adjust.
7704 (record_btrace_call_history_range): Adjust.
7705 (record_btrace_call_history_from): Adjust.
7706 * target-debug.h (target_debug_print_record_print_flags): New.
7707 * target-delegates.c: Re-generate.
7708 * target.c (target_call_history): Change flags type.
7709 (target_call_history_from): Likewise.
7710 (target_call_history_range): Likewise.
7711 * target.h (struct target_ops) <target_call_history>: Likewise.
7712 (target_call_history_from): Likewise.
7713 (target_call_history_range): Likewise.
7715 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
7716 Simon Marchi <simon.marchi@polymtl.ca>
7718 * common/common-utils.c: Include "sys/stat.h".
7719 (is_regular_file): Move here from "source.c"; change return
7721 * common/common-utils.h (is_regular_file): New prototype.
7722 * common/pathstuff.c (contains_dir_separator): New function.
7723 * common/pathstuff.h (contains_dir_separator): New prototype.
7724 * source.c: Don't include "sys/stat.h".
7725 (is_regular_file): Move to "common/common-utils.c".
7727 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
7729 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
7730 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
7731 * auto-load.c: Include "common/pathstuff.h".
7732 * common/common-def.h (current_directory): Move here.
7733 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
7735 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
7737 * common/pathstuff.c: New file.
7738 * common/pathstuff.h: New file.
7739 * compile/compile.c: Include "common/pathstuff.h".
7740 * defs.h (current_directory): Move to "common/common-defs.h".
7741 * dwarf2read.c: Include "common/pathstuff.h".
7743 * guile/scm-safe-call.c: Likewise.
7744 * linux-thread-db.c: Likewise.
7746 * nto-tdep.c: Likewise.
7747 * objfiles.c: Likewise.
7748 * source.c: Likewise.
7749 * symtab.c: Likewise.
7750 * utils.c: Include "common/pathstuff.h".
7751 (gdb_realpath): Move to "common/pathstuff.c".
7752 (gdb_realpath_keepfile): Likewise.
7753 (gdb_abspath): Likewise.
7754 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
7755 (gdb_realpath_keepfile): Likewise.
7756 (gdb_abspath): Likewise.
7758 2018-02-28 John Baldwin <jhb@FreeBSD.org>
7760 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
7761 wildcard process pid for super_resume for kernels with a
7764 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
7766 * compile/compile.c (get_args): Add additional comments
7767 explaining function.
7769 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
7770 Tom Tromey <tom@tromey.com>
7772 * target.h (memory_write_request_s): Remove typedef. Don't define
7774 (target_write_memory_blocks): Change argument to std::vector.
7775 (struct memory_write_request): Add constructor.
7776 * target-memory.c (compare_block_starting_address): Return bool.
7777 Change argument types.
7778 (claim_memory): Change arguments to use std::vector.
7779 (split_regular_and_flash_blocks, blocks_to_erase)
7780 (compute_garbled_blocks): Likewise.
7781 (cleanup_request_data, cleanup_write_requests_vector): Remove.
7782 (target_write_memory_blocks): Change argument to std::vector.
7783 * symfile.c (struct load_section_data): Add constructor and
7784 destructor. Use std::vector for "requests".
7785 (struct load_progress_data): Add initializers.
7786 (load_section_callback): Update. Use "new".
7787 (clear_memory_write_data): Remove.
7788 (generic_load): Update.
7790 2018-02-27 Alan Hayward <alan.hayward@arm.com>
7792 * arch/aarch64.h: Use common/tdesc.h.
7794 2018-02-26 Maciej W. Rozycki <macro@mips.com>
7796 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
7797 architecture with a 64-bit ABI.
7799 2018-02-26 Maciej W. Rozycki <macro@mips.com>
7801 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
7802 ahead of target description loading.
7804 2018-02-26 Tom Tromey <tom@tromey.com>
7806 * stack.c (backtrace_command_1): Update.
7807 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
7809 * python/py-framefilter.c (py_print_frame)
7810 (gdbpy_apply_frame_filter): Change type of "flags".
7811 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
7813 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
7814 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
7815 * extension.h (enum frame_filter_flag): Rename from
7817 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
7818 (apply_ext_lang_frame_filter): Change type of "flags".
7819 * extension.c (apply_ext_lang_frame_filter): Change type of
7821 * extension-priv.h (struct extension_language_ops)
7822 <apply_frame_filter>: Change type of "flags".
7824 2018-02-26 Tom Tromey <tom@tromey.com>
7827 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
7828 off-by-one in py_end computation.
7829 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
7831 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
7834 2018-02-26 Tom Tromey <tom@tromey.com>
7836 * dwarf2read.c (struct variant_field): New.
7837 (struct nextfield) <variant>: New field.
7838 (dwarf2_add_field): Handle DW_TAG_variant_part.
7839 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
7840 discriminated union.
7841 (read_structure_type): Handle DW_TAG_variant_part.
7842 (handle_struct_member_die): New function, extracted from
7843 process_structure_scope. Handle DW_TAG_variant.
7844 (process_structure_scope): Handle discriminated unions. Call
7845 handle_struct_member_die.
7847 2018-02-26 Tom Tromey <tom@tromey.com>
7849 * rust-lang.h (rust_last_path_segment): Declare.
7850 * rust-lang.c (rust_last_path_segment): Now public. Change
7852 (struct disr_info): Remove.
7853 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
7854 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
7855 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
7856 (rust_enum_p, rust_enum_variant): New function.
7857 (rust_underscore_fields): Remove "offset" parameter.
7858 (rust_print_enum): New function.
7859 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
7860 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
7861 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
7863 (rust_internal_print_type): New function, from rust_print_type.
7865 (rust_print_type): Call rust_internal_print_type.
7866 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
7867 Update enum handling.
7868 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
7869 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
7870 (rust_union_quirks): New functions.
7871 (process_full_comp_unit, process_full_type_unit): Call
7873 (process_structure_scope): Update rust_unions if necessary.
7875 2018-02-26 Tom Tromey <tom@tromey.com>
7877 * value.h (value_union_variant): Declare.
7878 * valops.c (value_union_variant): New function.
7879 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
7880 (struct discriminant_info): New.
7881 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
7883 (struct main_type) <flag_discriminated_union>: New field.
7885 2018-02-26 Tom Tromey <tom@tromey.com>
7887 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7888 unittests/unpack-selftests.c.
7889 * unittests/unpack-selftests.c: New file.
7890 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
7892 2018-02-26 Yao Qi <yao.qi@linaro.org>
7894 * dwarf2read.c (struct partial_die_info) <read>: New method.
7895 (read_partial_die): Remove the declaration.
7896 (load_partial_dies): Update.
7897 (partial_die_info::partial_die_info):
7898 (read_partial_die): Change it to partial_die_info::read.
7900 2018-02-26 Yao Qi <yao.qi@linaro.org>
7902 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
7903 (fixup_partial_die): Remove declaration.
7904 (scan_partial_symbols): Update.
7905 (partial_die_parent_scope): Likewise.
7906 (partial_die_full_name): Likewise.
7907 (fixup_partial_die): Change it to partial_die_info::fixup.
7909 2018-02-26 Yao Qi <yao.qi@linaro.org>
7911 * dwarf2read.c (read_partial_die): Update the declaration.
7912 (load_partial_dies): Caller update.
7913 (read_partial_die): Remove one argument abbrev_len.
7915 2018-02-26 Yao Qi <yao.qi@linaro.org>
7917 * dwarf2read.c (struct partial_die_info): Add ctor, delete
7918 assignment operator.
7919 (load_partial_dies): Use ctor and copy ctor.
7920 (read_partial_die): Update.
7921 (dwarf2_cu::find_partial_die): Use ctor.
7923 2018-02-26 Yao Qi <yao.qi@linaro.org>
7925 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
7926 (find_partial_die_in_comp_unit): Change it to
7927 dwarf2_cu::find_partial_die.
7928 (find_partial_die): Update.
7930 2018-02-26 Yao Qi <yao.qi@linaro.org>
7932 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
7935 2018-02-26 Yao Qi <yao.qi@linaro.org>
7937 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
7939 2018-02-26 Alan Hayward <alan.hayward@arm.com>
7941 * arch/amd64.h: Use common/tdesc.h.
7942 * arch/i386.c: Likewise.
7943 * arch/i386.h: Likewise.
7944 * arch/tic6x.c: Likewise.
7945 * arch/tdesc.h: Move file from here...
7946 * common/tdesc.h: ...to here.
7947 * features/aarch64-core.c: Regenerate.
7948 * features/aarch64-fpu.c: Regenerate.
7949 * features/i386/32bit-avx.c: Regenerate.
7950 * features/i386/32bit-avx512.c: Regenerate.
7951 * features/i386/32bit-core.c: Regenerate.
7952 * features/i386/32bit-linux.c: Regenerate.
7953 * features/i386/32bit-mpx.c: Regenerate.
7954 * features/i386/32bit-pkeys.c: Regenerate.
7955 * features/i386/32bit-sse.c: Regenerate.
7956 * features/i386/64bit-avx.c: Regenerate.
7957 * features/i386/64bit-avx512.c: Regenerate.
7958 * features/i386/64bit-core.c: Regenerate.
7959 * features/i386/64bit-linux.c: Regenerate.
7960 * features/i386/64bit-mpx.c: Regenerate.
7961 * features/i386/64bit-pkeys.c: Regenerate.
7962 * features/i386/64bit-segments.c: Regenerate.
7963 * features/i386/64bit-sse.c: Regenerate.
7964 * features/i386/x32-core.c: Regenerate.
7965 * features/tic6x-c6xp.c: Regenerate.
7966 * features/tic6x-core.c: Regenerate.
7967 * features/tic6x-gp.c: Regenerate.
7968 * target-descriptions.c: Use common/tdesc.h.
7969 * target-descriptions.h: Likewise.
7971 2018-02-24 Tom Tromey <tom@tromey.com>
7973 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
7974 (try_thread_db_load_from_dir, thread_db_load_search): Use
7976 (info_auto_load_libthread_db_compare): Return bool. Change
7978 (info_auto_load_libthread_db): Use std::vector, std::string.
7981 2018-02-24 Tom Tromey <tom@tromey.com>
7983 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
7985 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
7987 * gdbarch.c: Rebuild.
7988 * gdbarch.h: Rebuild.
7989 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
7990 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
7991 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
7994 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
7996 * gdbtypes.h (sect_offset): Change type to uint64_t.
7997 (sect_offset_str): New function.
7998 * dwarf2read.c (create_addrmap_from_aranges): Use
8000 (error_check_comp_unit_head): Likewise.
8001 (create_debug_type_hash_table): Likewise.
8002 (read_cutu_die_from_dwo): Likewise.
8003 (init_cutu_and_read_dies): Likewise.
8004 (init_cutu_and_read_dies_no_follow): Likewise.
8005 (process_psymtab_comp_unit_reader): Likewise.
8006 (partial_die_parent_scope): Likewise.
8007 (peek_die_abbrev): Likewise.
8008 (process_queue): Likewise.
8009 (dwarf2_physname): Likewise.
8010 (read_namespace_alias): Likewise.
8011 (read_import_statement): Likewise.
8012 (create_dwo_cu_reader): Likewise.
8013 (create_cus_hash_table): Likewise.
8014 (lookup_dwo_cutu): Likewise.
8015 (inherit_abstract_dies): Likewise.
8016 (read_func_scope): Likewise.
8017 (read_call_site_scope): Likewise.
8018 (dwarf2_add_member_fn): Likewise.
8019 (read_common_block): Likewise.
8020 (read_module_type): Likewise.
8021 (read_typedef): Likewise.
8022 (read_subrange_type): Likewise.
8023 (load_partial_dies): Likewise.
8024 (read_partial_die): Likewise.
8025 (find_partial_die): Likewise.
8026 (read_str_index): Likewise.
8027 (dwarf2_string_attr): Likewise.
8028 (build_error_marker_type): Likewise.
8029 (lookup_die_type): Likewise.
8030 (dump_die_shallow): Likewise.
8031 (follow_die_ref): Likewise.
8032 (dwarf2_fetch_die_loc_sect_off): Likewise.
8033 (dwarf2_fetch_constant_bytes): Likewise.
8034 (follow_die_sig): Likewise.
8035 (get_signatured_type): Likewise.
8036 (get_DW_AT_signature_type): Likewise.
8037 (dwarf2_find_containing_comp_unit): Likewise.
8038 (set_die_type): Likewise.
8040 2018-02-21 John Baldwin <jhb@FreeBSD.org>
8042 * arch/aarch64.c: Include "common-defs.h".
8043 * arch/amd64.c: Likewise.
8044 * arch/i386.c: Likewise.
8046 2018-02-21 Tom Tromey <tom@tromey.com>
8048 * value.h: (extract_field_op): Update.
8049 * eval.c (extract_field_op): Return a const char *.
8050 * expression.h (parse_expression_for_completion): Update.
8051 * completer.c (complete_expression): Update.
8052 (add_struct_fields): Make fieldname const.
8053 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
8054 (mark_completion_tag, parse_exp_in_context_1): Update.
8055 (parse_expression_for_completion): Change "name" to
8056 unique_xmalloc_ptr*.
8058 2018-02-21 Tom Tromey <tom@tromey.com>
8060 * infcall.c (call_function_by_hand_dummy): Use std::vector.
8062 2018-02-21 Yao Qi <yao.qi@linaro.org>
8064 * avr-tdep.c (avr_read_pc): Change parameter type to
8066 * gdbarch.sh (read_pc): Likewise.
8067 * gdbarch.c: Re-generated.
8068 * gdbarch.h: Re-generated.
8069 * hppa-tdep.c (hppa_read_pc): Change parameter type to
8071 * ia64-tdep.c (ia64_read_pc): Likewise.
8072 * mips-tdep.c (mips_read_pc): Likewise.
8073 * spu-tdep.c (spu_read_pc): Likewise.
8075 2018-02-21 Yao Qi <yao.qi@linaro.org>
8077 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
8078 * regcache-dump.c: New file.
8079 * regcache.c: Move register_dump to regcache-dump.c.
8080 (maintenance_print_registers): Likewise.
8081 (maintenance_print_raw_registers): Likewise.
8082 (maintenance_print_cooked_registers): Likewise.
8083 (maintenance_print_register_groups): Likewise.
8084 (maintenance_print_remote_registers): Likewise.
8085 (_initialize_regcache): Likewise.
8086 * regcache.h (register_dump): Moved from regcache.c.
8088 2018-02-21 Yao Qi <yao.qi@linaro.org>
8090 * regcache.c (regcache::regcache): Update.
8091 (regcache::invalidate): Move it to detached_regcache::invalidate.
8092 (get_thread_arch_aspace_regcache): Update.
8093 (regcache::raw_update): Update.
8094 (regcache::cooked_read): Remove some code.
8095 (regcache::cooked_read_value): Likewise.
8096 (regcache::raw_write): Remove assert on m_readonly_p.
8097 (regcache::raw_supply_integer): Move it to
8098 detached_regcache::raw_supply_integer.
8099 (regcache::raw_supply_zeroed): Likewise.
8100 * regcache.h (detached_regcache) <raw_supply_integer>: New
8102 <raw_supply_zeroed, invalidate>: Likewise.
8103 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
8104 <invalidate>: Likewise.
8105 <m_readonly_p>: Removed.
8107 2018-02-21 Yao Qi <yao.qi@linaro.org>
8109 * infcmd.c (get_return_value): Let stop_regs point to
8110 get_current_regcache.
8111 * regcache.c (regcache::regcache): Remove.
8112 (register_dump_reg_buffer): New class.
8113 (regcache_print): Adjust.
8114 * regcache.h (regcache): Remove constructors.
8116 2018-02-21 Yao Qi <yao.qi@linaro.org>
8118 * regcache.c (class register_dump): New class.
8119 (register_dump_regcache, register_dump_none): New class.
8120 (register_dump_remote, register_dump_groups): New class.
8121 (regcache_print): Update.
8122 * regcache.h (regcache_dump_what): Move it to regcache.c.
8123 (regcache) <dump>: Remove.
8125 2018-02-21 Yao Qi <yao.qi@linaro.org>
8127 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
8129 (jit_unwind_reg_set_impl): Call raw_supply.
8130 (jit_frame_sniffer): Use reg_buffer_rw.
8131 * record-full.c (record_full_core_regbuf): Change its type.
8132 (record_full_core_open_1): Use reg_buffer_rw.
8133 (record_full_close): Likewise.
8134 (record_full_core_fetch_registers): Use regcache->raw_supply.
8135 (record_full_core_store_registers): Likewise.
8136 * regcache.c (regcache::get_register_status): Move it to
8138 (regcache_raw_set_cached_value): Remove.
8139 (regcache::raw_set_cached_value): Remove.
8140 (regcache::raw_write): Call raw_supply.
8141 (regcache::raw_supply): Move it to reg_buffer_rw.
8142 * regcache.h (regcache_raw_set_cached_value): Remove.
8143 (reg_buffer_rw): New class.
8145 2018-02-21 Yao Qi <yao.qi@linaro.org>
8147 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
8148 readonly_detached_regcache.
8149 (dummy_frame_prev_register): Use regcache->cooked_read.
8150 * frame.c (frame_save_as_regcache): Change return type.
8151 (frame_pop): Update.
8152 * frame.h (frame_save_as_regcache): Update declaration.
8153 * inferior.h (get_infcall_suspend_state_regcache): Update
8155 * infrun.c (infcall_suspend_state) <registers>: use
8156 readonly_detached_regcache.
8157 (save_infcall_suspend_state): Don't use regcache_dup.
8158 (get_infcall_suspend_state_regcache): Change return type.
8159 * linux-fork.c (struct fork_info) <savedregs>: Change to
8160 readonly_detached_regcache.
8162 (fork_save_infrun_state): Don't use regcache_dup.
8163 (info_checkpoints_command): Adjust.
8164 * mi/mi-main.c (register_changed_p): Update declaration.
8165 (mi_cmd_data_list_changed_registers): Use
8166 readonly_detached_regcache.
8167 (register_changed_p): Change parameter type to
8168 readonly_detached_regcache.
8169 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
8170 readonly_detached_regcache.
8171 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
8172 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
8174 (regcache::save): Move it to reg_buffer.
8175 (regcache::restore): Change parameter type.
8176 (regcache_dup): Remove.
8177 * regcache.h (reg_buffer) <save>: New method.
8178 (readonly_detached_regcache): New class.
8179 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
8180 readonly_detached_regcache.
8181 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
8183 2018-02-21 Yao Qi <yao.qi@linaro.org>
8185 * frame.c (frame_save_as_regcache): Use regcache method save.
8186 (frame_pop): Use regcache method restore.
8187 * infrun.c (restore_infcall_suspend_state): Likewise.
8188 * linux-fork.c (fork_load_infrun_state): Likewise.
8189 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
8191 * regcache.c (regcache_save): Remove.
8192 (regcache::restore): More asserts.
8193 (regcache_cpy): Remove.
8194 * regcache.h (regcache_save): Remove the declaration.
8195 (regcache::restore): Move from private to public.
8196 Remove the friend declaration of regcache_cpy.
8197 (regcache_cpy): Remove declaration.
8199 2018-02-21 Yao Qi <yao.qi@linaro.org>
8201 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
8202 parameter type to 'readable_regcache *'.
8203 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
8204 * arm-tdep.c (arm_neon_quad_read): Likewise.
8205 (arm_pseudo_read): Likewise.
8206 * avr-tdep.c (avr_pseudo_register_read): Likewise.
8207 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
8208 * frv-tdep.c (frv_pseudo_register_read): Likewise.
8209 * gdbarch.c: Re-generated.
8210 * gdbarch.h: Re-generated.
8211 * gdbarch.sh (pseudo_register_read): Change parameter type to
8212 'readable_regcache *'.
8213 (pseudo_register_read_value): Likewise.
8214 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
8215 (h8300_pseudo_register_read): Likewise.
8216 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
8217 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
8218 (i386_pseudo_register_read_into_value): Likewise.
8219 (i386_pseudo_register_read_value): Likewise.
8220 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
8222 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
8223 * m32c-tdep.c (m32c_raw_read): Likewise.
8224 (m32c_read_flg): Likewise.
8225 (m32c_banked_register): Likewise.
8226 (m32c_banked_read): Likewise.
8227 (m32c_sb_read): Likewise.
8228 (m32c_part_read): Likewise.
8229 (m32c_cat_read): Likewise.
8230 (m32c_r3r2r1r0_read): Likewise.
8231 (m32c_pseudo_register_read): Likewise.
8232 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
8233 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
8234 (mep_pseudo_cr64_read): Likewise.
8235 (mep_pseudo_register_read): Likewise.
8236 * mips-tdep.c (mips_pseudo_register_read): Likewise.
8237 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
8238 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
8239 * regcache.c (regcache::raw_read): Move it to readable_regcache.
8240 (regcache::cooked_read): Likewise.
8241 (regcache::cooked_read_value): Likewise.
8242 (regcache_cooked_read_signed):
8243 (regcache::cooked_read): Likewise.
8244 * regcache.h (readable_regcache): New class.
8245 (regcache): Inherit readable_regcache. Move some methods to
8247 * rl78-tdep.c (rl78_pseudo_register_read): Change
8248 parameter type to 'readable_regcache *'.
8249 * rs6000-tdep.c (do_regcache_raw_read): Remove.
8250 (e500_pseudo_register_read): Change parameter type to
8251 'readable_regcache *'.
8252 (dfp_pseudo_register_read): Likewise.
8253 (vsx_pseudo_register_read): Likewise.
8254 (efpr_pseudo_register_read): Likewise.
8255 * s390-tdep.c (s390_pseudo_register_read): Likewise.
8256 * sh-tdep.c (sh_pseudo_register_read): Likewise.
8257 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
8258 (sh64_pseudo_register_read): Likewise.
8259 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
8260 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
8261 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
8262 (spu_pseudo_register_read): Likewise.
8263 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
8264 (xtensa_pseudo_register_read): Likewise.
8266 2018-02-21 Yao Qi <yao.qi@linaro.org>
8268 * regcache.c (regcache::regcache): Call reg_buffer ctor.
8269 (regcache::arch): Move it to reg_buffer::arch.
8270 (regcache::register_buffer): Likewise.
8271 (regcache::assert_regnum): Likewise.
8272 (regcache::num_raw_registers): Likewise.
8273 * regcache.h (reg_buffer): New class.
8274 (regcache): Inherit reg_buffer.
8276 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
8278 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
8279 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
8281 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
8283 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
8285 2018-02-19 Alan Hayward <alan.hayward@arm.com>
8287 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
8288 (SFILES): Remove common/*.c files.
8289 (COMMON_OBS): Remove some *.o files built from common/*.c files.
8290 * common/common.host: Add common reference.
8291 * configure.ac: Likewise.
8292 * configure: Regenerate.
8294 2018-02-16 Yao Qi <yao.qi@linaro.org>
8296 * block.c (block_namespace_info): Inherit allocate_on_obstack.
8297 (block_initialize_namespace): Use new.
8298 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
8299 (dwarf2_free_objfile): Use delete.
8300 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
8301 (copy_type_recursive): Use new.
8302 * gdb_obstack.h (allocate_on_obstack): New.
8304 2018-02-15 Yao Qi <yao.qi@linaro.org>
8307 * inferior.c (exit_inferior_1): Reset inf->control.
8309 2018-02-15 Joel Brobecker <brobecker@adacore.com>
8311 * ada-lang.c (ada_to_fixed_value_create): Delete advance
8314 2018-02-14 Pedro Alves <palves@redhat.com>
8316 * frame-unwind.c (frame_unwind_try_unwinder): Always call
8317 frame_cleanup_after_sniffer on exception.
8319 2018-02-14 Tom Tromey <tom@tromey.com>
8321 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
8323 (solib_bfd_open): Make pathname const.
8324 * solib.c (solib_bfd_open): Make pathname const.
8325 * solib-spu.c (spu_bfd_fopen): Make name const.
8326 (spu_bfd_open): Make pathname const.
8327 * solib-darwin.c (darwin_bfd_open): Make pathname const.
8328 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
8330 2018-02-14 Tom Tromey <tom@tromey.com>
8332 * symfile.c (symfile_bfd_open): Update.
8333 * source.h (openp, source_full_path_of, find_and_open_source):
8334 Change argument type to unique_xmalloc_ptr.
8335 * source.c (openp): Take a unique_xmalloc_ptr.
8336 (source_full_path_of, find_and_open_source): Likewise.
8337 (open_source_file, symtab_to_fullname): Update.
8338 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
8340 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
8341 (exec_file_find): Update.
8342 * psymtab.c (psymtab_to_fullname): Update.
8343 * nto-tdep.h (nto_find_and_open_solib): Update.
8344 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
8346 * exec.c (exec_file_attach): Update.
8347 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
8348 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
8350 2018-02-14 Tom Tromey <tom@tromey.com>
8352 * solib.c: Include source.h.
8353 * nto-tdep.c: Include source.h.
8354 * mi/mi-cmd-env.c: Include source.h.
8355 * infcmd.c: Include source.h.
8356 * exec.c: Include source.h.
8357 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
8358 (add_path, directory_switch, source_path, init_source_path): Move
8360 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
8361 (add_path, directory_switch, source_path, init_source_path):
8364 2018-02-14 Tom Tromey <tom@tromey.com>
8366 * solist.h (exec_file_find, solib_find): Return
8368 (solib_bfd_fopen): Take a const char *.
8369 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
8370 (exec_file_find, solib_find): Likewise.
8371 (solib_bfd_fopen): Do not take ownership of "pathname".
8372 (solib_bfd_open): Use unique_xmalloc_ptr.
8373 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
8374 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
8375 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
8376 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
8378 2018-02-14 Joel Brobecker <brobecker@adacore.com>
8380 * ada-lang.c (name_match_type_from_name): Remove reference to
8381 ada_name_for_lookup in function's documentation.
8382 * ada-lang.h (ada_name_for_lookup): Delete declaration.
8384 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
8386 * defs.h (enum openp_flags): New enum.
8387 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
8388 Move to enum openp_flags.
8389 (openp_flags): New enum flags.
8390 (openp): Change parameter type to openp_flags.
8391 * source.c (openp): Change parameter type to openp_flags.
8392 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
8393 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
8395 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
8397 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
8400 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
8402 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
8404 (class dwarf2_queue_guard): ...the destructor of this new class.
8405 (dw2_do_instantiate_symtab): Create instance of the new class
8406 dwarf2_queue_guard, remove cleanup.
8408 2018-02-09 Tom Tromey <tom@tromey.com>
8410 * source.c (find_source_lines): Don't reference past the end of
8413 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8415 * remote.c (remote_btrace_maybe_reopen): Change error message.
8416 * btrace.c (btrace_enable): Likewise.
8417 (parse_xml_btrace): Likewise.
8418 (parse_xml_btrace_conf): Likewise.
8420 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8422 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
8423 (linux_enable_pt, linux_enable_bts): Call
8424 diagnose_perf_event_open_fail.
8426 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8428 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
8429 Remove parameter and change return type. Update callers. Move it.
8430 (linux_enable_bts, linux_enable_pt): Improve error message.
8431 (linux_enable_pt): Remove zero buffer size check.
8432 (linux_enable_btrace): Improve error messages. Remove NULL return
8435 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8437 * btrace.c (btrace_enable): Remove target_supports_btrace call.
8438 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
8439 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
8440 (linux_supports_pt, linux_supports_btrace): Remove.
8441 (linux_enable_bts): Call cpu_supports_bts.
8442 * nat/linux-btrace.h (linux_supports_btrace): Remove.
8443 * remote.c (remote_supports_btrace): Remove.
8444 (init_remote_ops): Remove remote_supports_btrace.
8445 * target-delegates.c: Regenerated.
8446 * target.c (target_supports_btrace): Remove.
8447 * target.h (target_ops) <to_supports_btrace>: Remove
8448 (target_supports_btrace): Remove.
8449 * x86-linux-nat.c (x86_linux_create_target): Remove
8450 linux_supports_btrace.
8452 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8454 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
8456 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
8457 exception and use message in own exception.
8459 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8461 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
8462 (perf_event_pt_event_type): Use gdb_file_up.
8463 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
8464 scoped_fd, and scoped_mmap.
8466 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8468 * common/scoped_mmap.h: New.
8469 * unittests/scoped_mmap-selftest.c: New.
8470 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8471 unittests/scoped_mmap-selftest.c.
8473 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8475 * common/scoped_fd.h: New.
8476 * unittests/scoped_fd-selftest.c: New.
8477 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8478 unittests/scoped_fd-selftest.c.
8480 2018-02-09 Tom Tromey <tom@tromey.com>
8482 * auto-load.c (auto_load_section_scripts): Use
8483 gdb::unique_xmalloc_ptr.
8485 2018-02-09 Tom Tromey <tom@tromey.com>
8487 * auto-load.c (execute_script_contents): Use std::string.
8489 2018-02-09 Joel Brobecker <brobecker@adacore.com>
8491 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
8492 Python function, rather than a new command.
8494 2018-02-08 Tom Tromey <tom@tromey.com>
8496 * solib.c (solib_find_1): Use std::string.
8497 (solib_bfd_fopen): Use unique_xmalloc_ptr.
8499 2018-02-08 Tom Tromey <tom@tromey.com>
8501 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
8503 2018-02-08 Tom Tromey <tom@tromey.com>
8505 * source.c (find_source_lines): Use gdb::def_vector.
8507 2018-02-08 Tom Tromey <tom@tromey.com>
8509 * macrocmd.c (struct temporary_macro_definition): New.
8510 (macro_define_command): Use temporary_macro_definition. Remove
8512 (free_macro_definition_ptr): Remove.
8514 2018-02-08 Tom Tromey <tom@tromey.com>
8516 * macroexp.c (maybe_expand): Use std::string.
8518 2018-02-08 Tom Tromey <tom@tromey.com>
8520 * macroexp.c (struct macro_buffer): Add initializers for some
8522 (init_buffer, init_shared_buffer, free_buffer)
8523 (free_buffer_return_text): Remove.
8524 (macro_buffer): New constructors.
8525 (~macro_buffer): New destructor.
8526 (macro_buffer::set_shared): New method.
8527 (macro_buffer::resize_buffer, macro_buffer::appendc)
8528 (macro_buffer::appendmem): Now methods, not free functions.
8529 (set_token, append_tokens_without_splicing, stringify)
8530 (macro_stringify): Update.
8531 (gather_arguments): Change return type. Remove argc_p argument,
8532 add args_ptr argument. Use std::vector.
8533 (substitute_args): Remove argc argument. Accept std::vector.
8534 (expand): Update. Use std::vector.
8535 (scan, macro_expand, macro_expand_next): Update.
8537 2018-02-08 Tom Tromey <tom@tromey.com>
8539 * symtab.c (default_collect_symbol_completion_matches_break_on):
8540 Use unique_xmalloc_ptr.
8541 * macroscope.h: (sal_macro_scope, user_macro_scope)
8542 (default_macro_scope): Return unique_xmalloc_ptr.
8543 * macroscope.c (sal_macro_scope, user_macro_scope)
8544 (default_macro_scope): Return unique_xmalloc_ptr.
8545 * macroexp.h (macro_expand, macro_expand_once): Return
8547 * macroexp.c (macro_expand, macro_expand_once): Return
8549 * macrocmd.c (macro_expand_command, macro_expand_once_command)
8550 (info_macro_command, info_macros_command): Use
8552 * compile/compile-c-support.c (write_macro_definitions): Use
8554 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
8556 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
8558 * value.c (value_static_field): Assign field type instead of
8559 containing type when returning an optimized out value.
8561 2018-02-06 Yao Qi <yao.qi@linaro.org>
8563 * ft32-tdep.c (ft32_read_pc): Remove.
8564 (ft32_write_pc): Remove.
8565 (ft32_gdbarch_init): Update.
8566 * m32r-tdep.c (m32r_read_pc): Remove.
8567 (m32r_gdbarch_init): Update.
8568 * mep-tdep.c (mep_read_pc): Remove.
8569 (mep_gdbarch_init): Update.
8570 * microblaze-tdep.c (microblaze_write_pc): Remove.
8571 (microblaze_gdbarch_init): Update.
8572 * mn10300-tdep.c (mn10300_read_pc): Remove.
8573 (mn10300_write_pc): Remove.
8574 (mn10300_gdbarch_init): Update.
8575 * moxie-tdep.c (moxie_read_pc): Remove.
8576 (moxie_write_pc): Remove.
8577 (moxie_gdbarch_init): Update.
8579 2018-02-06 Yao Qi <yao.qi@linaro.org>
8581 * expprint.c (print_subexp_standard): Handle
8582 OP_F77_UNDETERMINED_ARGLIST.
8583 (dump_subexp_body_standard): Likewise.
8585 2018-02-05 Alan Hayward <alan.hayward@arm.com>
8587 * target-descriptions.c (tdesc_element_visitor) Add empty
8589 (tdesc_type): Move make_gdb_type from here.
8590 (tdesc_type_builtin): Likewise.
8591 (tdesc_type_vector): Likewise.
8592 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
8593 (make_gdb_type_struct): Move from tdesc_type_with_fields.
8594 (make_gdb_type_union): Likewise.
8595 (make_gdb_type_flags): Likewise.
8596 (make_gdb_type_enum): Likewise.
8597 (make_gdb_type): New function.
8598 (tdesc_register_type): Use static make_gdb_type.
8600 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
8602 * infcmd.c (default_print_one_register_info): Align natural-format
8603 column values consistently one under another.
8604 (pad_to_column): New function.
8606 2018-02-05 Joel Brobecker <brobecker@adacore.com>
8608 * dwarf2read.c (dwarf2_physname): Move commment.
8610 2018-02-01 Leszek Swirski <leszeks@google.com>
8612 * varobj.c (varobj_formatted_print_options): Allow recursive
8613 pretty printing if pretty printing is enabled.
8615 2018-02-01 Leszek Swirski <leszeks@google.com>
8617 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
8618 names after a structop as a filename.
8620 2018-02-01 Yao Qi <yao.qi@linaro.org>
8622 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
8623 (arm_record_coproc_data_proc): Likewise.
8625 2018-02-01 Yao Qi <yao.qi@linaro.org>
8627 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
8629 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
8631 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
8632 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
8634 2018-01-31 Pedro Alves <palves@redhat.com>
8636 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
8637 * inflow.c (child_terminal_save_inferior): Wrap reference to
8638 tcgetpgrp in HAVE_TERMIOS_H.
8639 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
8641 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
8642 always iterate over all inferiors.
8643 (gdbsim_cntrl_c): Adjust.
8644 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
8646 2018-01-31 Joel Brobecker <brobecker@adacore.com>
8648 * gdbtypes.c (lookup_array_range_type): Make sure the array's
8649 index type is objfile-owned if the element type is as well.
8651 2018-01-31 Joel Brobecker <brobecker@adacore.com>
8655 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
8657 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
8658 "features/s390x-linux64.c".
8659 (_initialize_s390_linux_tdep): Remove initialization of tdescs
8660 s390_linux32 and s390x_linux64.
8661 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
8663 * s390-tdep.c: Include "features/s390-linux32.c" and
8664 "features/s390x-linux64.c".
8665 (s390_tdesc_valid): Add check for tdesc_has_registers.
8666 (s390_gdbarch_init): Make sure there is always a valid tdesc.
8667 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
8668 tdesc_s390x_linux64.
8669 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
8670 tdesc_s390x_linux64 to...
8671 * s390-tdep.h: ...here.
8673 2018-01-30 Pedro Alves <palves@redhat.com>
8676 * config.in, configure: Regenerate.
8677 * configure.ac: Check for getpgid.
8678 * go32-nat.c (go32_pass_ctrlc): New.
8679 (go32_target): Install it.
8680 * inf-child.c (inf_child_target): Install
8681 child_terminal_save_inferior, child_pass_ctrlc and
8683 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
8684 (inf_ptrace_target): No longer install it.
8685 * infcmd.c (interrupt_target_1): Adjust.
8686 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
8687 (child_interrupt): Declare.
8688 (inferior::terminal_state): New.
8689 * inflow.c (struct terminal_info): Update comments.
8690 (inferior_process_group): Delete.
8691 (terminal_is_ours): Delete.
8692 (gdb_tty_state): New.
8693 (child_terminal_init): Adjust.
8694 (is_gdb_terminal, sharing_input_terminal_1)
8695 (sharing_input_terminal): New functions.
8696 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
8697 Set the process's actual process group in the foreground if
8698 possible. Handle is_ours_for_output/is_ours distinction. Don't
8699 mark terminal as the inferior's if not sharing GDB's terminal.
8700 Don't check attach_flag.
8701 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
8702 pass down a target_terminal_state.
8703 (child_terminal_save_inferior): New, factored out from ...
8704 (child_terminal_ours_1): ... this. Handle
8705 target_terminal_state::is_ours_for_output.
8706 (child_interrupt, child_pass_ctrlc): New.
8707 (inflow_inferior_exit): Clear the inferior's terminal_state.
8708 (copy_terminal_info): Copy the inferior's terminal state.
8709 (_initialize_inflow): Remove reference to terminal_is_ours.
8710 * inflow.h (inferior_process_group): Delete.
8711 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
8712 * procfs.c (procfs_target): Don't install procfs_interrupt.
8713 (procfs_interrupt): Delete.
8714 * remote.c (remote_serial_quit_handler): Adjust.
8715 (remote_interrupt): Remove ptid parameter. Adjust.
8716 * target-delegates.c: Regenerate.
8717 * target.c: Include "terminal.h".
8718 (target_terminal::terminal_state): Rename to ...
8719 (target_terminal::m_terminal_state): ... this.
8720 (target_terminal::init): Adjust.
8721 (target_terminal::inferior): Adjust to per-inferior
8723 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
8724 (target_terminal::ours, target_terminal::ours_for_output): Use
8725 target_terminal_is_ours_kind.
8726 (target_interrupt): Remove ptid parameter. Adjust.
8727 (default_target_pass_ctrlc): Adjust.
8728 * target.h (target_ops::to_terminal_save_inferior): New field.
8729 (target_ops::to_interrupt): Remove ptid_t parameter.
8730 (target_interrupt): Remove ptid_t parameter. Update comment.
8731 (target_pass_ctrlc): Update comment.
8732 * target/target.h (target_terminal_state): New scoped enum,
8734 (target_terminal::terminal_state): ... here.
8735 (target_terminal::inferior): Update comments.
8736 (target_terminal::restore_inferior): New.
8737 (target_terminal::is_inferior, target_terminal::is_ours)
8738 (target_terminal::is_ours_for_output): Adjust.
8739 (target_terminal::scoped_restore_terminal_state): Adjust to
8740 rename, and call restore_inferior() instead of inferior().
8741 (target_terminal::scoped_restore_terminal_state::m_state): Change
8743 (target_terminal::terminal_state): Rename to ...
8744 (target_terminal::m_terminal_state): ... this and change type.
8746 2018-01-30 Pedro Alves <palves@redhat.com>
8748 * linux-nat.c (wait_for_signal): New function.
8749 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
8751 (async_terminal_is_ours)
8752 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
8753 (linux_nat_add_target): Don't override
8754 to_terminal_inferior/to_terminal_ours.
8756 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
8758 * remote.c (remote_follow_fork): Don't call "detach_inferior".
8760 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
8762 * dwarf2read.c (free_dwo_files): Add forward-declaration.
8763 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
8764 dwarf2_per_objfile_free here.
8765 (dwarf2_per_objfile_free): Remove.
8766 (_initialize_dwarf2_read): Don't register
8767 dwarf2_per_objfile_free as a registry cleanup.
8769 2018-01-27 Eli Zaretskii <eliz@gnu.org>
8771 Avoid compilation errors in MinGW native builds
8773 The error is triggered by including python-internal.h, and the
8776 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
8777 from build-gnulib/import/math.h:27,
8778 from d:/usr/Python26/include/pyport.h:235,
8779 from d:/usr/Python26/include/Python.h:58,
8780 from python/python-internal.h:94,
8781 from python/py-arch.c:24:
8782 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
8786 This happens because Python headers define 'hypot' to expand t
8787 '_hypot' in the Windows builds.
8788 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
8789 'hypoth'. This avoids a compilation error.
8791 2018-01-26 Alan Hayward <alan.hayward@arm.com>
8793 * MAINTAINERS (Write After Approval): Fix ordering.
8795 2018-01-26 Alan Hayward <alan.hayward@arm.com>
8797 * MAINTAINERS (Write After Approval): Add Alan Hayward.
8799 2018-01-26 Alan Modra <amodra@gmail.com>
8801 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
8802 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
8803 Remove nop. Make const. Comment.
8804 (powerpc32_plt_stub_so_2): New.
8805 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
8806 Correct count. Update uses.
8807 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
8808 Move common code reading PLT entry word. Correct
8809 powerpc32_plt_stub PLT address calculation.
8810 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
8811 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
8812 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
8813 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
8814 (ppc64_standard_linkage8): Likewise.
8815 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
8816 Correct insns description.
8817 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
8819 2018-01-24 Pedro Alves <palves@redhat.com>
8821 GCC PR libstdc++/83906
8822 * gdbtypes.c (operator==(const dynamic_prop &,
8823 const dynamic_prop &)): New.
8824 (operator==(const range_bounds &, const range_bounds &)): New.
8825 (check_types_equal): Use them instead of memcmp.
8826 * gdbtypes.h (operator==(const dynamic_prop &,
8827 const dynamic_prop &)): Declare.
8828 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
8829 (operator==(const range_bounds &, const range_bounds &)): Declare.
8830 (operator!=(const range_bounds &, const range_bounds &)): Declare.
8832 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8834 * s390-linux-tdep.c (s390_record_address_mask)
8835 (s390_record_calc_disp_common, s390_record_calc_disp)
8836 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
8837 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
8838 (s390_process_record): Move to s390-tdep.c.
8839 (s390_linux_init_abi_any): Adjust.
8840 * s390-tdep.c (s390_record_address_mask)
8841 (s390_record_calc_disp_common, s390_record_calc_disp)
8842 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
8843 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
8844 (s390_process_record): Moved from s390-linux-tdep.c
8845 (s390_gdbarch_init): Adjust.
8847 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8849 * s390-linux-nat.c (s390-tdep.h): New include.
8850 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
8851 (HFILES_NO_SRCDIR): Add s390-tdep.h.
8852 (ALLDEPFILES): Add s390-tdep.c.
8853 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
8854 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
8855 * s390-tdep.h: ...this. New file.
8856 * s390-linux-tdep.c (s390-tdep.h): New include.
8857 (_initialize_s390_tdep): Rename to...
8858 (_initialize_s390_linux_tdep): ...this and adjust.
8859 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
8860 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
8862 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
8863 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
8864 (s390_is_partial_instruction, s390_software_single_step)
8865 (is_non_branch_ril, s390_displaced_step_copy_insn)
8866 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
8867 (s390_prologue_data, s390_addr, s390_store, s390_load)
8868 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
8869 (s390_register_call_saved, s390_guess_tracepoint_registers)
8870 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
8871 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
8872 (s390_pseudo_register_name, s390_pseudo_register_type)
8873 (s390_pseudo_register_read, s390_pseudo_register_write)
8874 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
8875 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
8876 (s390_addr_bits_remove, s390_address_class_type_flags)
8877 (s390_address_class_type_flags_to_name)
8878 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
8879 (s390_function_arg_float, s390_function_arg_vector)
8880 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
8881 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
8882 (s390_frame_align, s390_register_return_value, s390_return_value)
8883 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
8884 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
8885 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
8886 (s390_trad_frame_prev_register, s390_unwind_cache)
8887 (s390_prologue_frame_unwind_cache)
8888 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
8889 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
8890 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
8891 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
8892 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
8893 (s390_frame_base_address, s390_local_base_address)
8894 (s390_frame_base, s390_gcc_target_options)
8895 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
8896 (s390_validate_reg_range, s390_tdesc_valid)
8897 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
8898 * s390-tdep.c: ...this. New file.
8900 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8902 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
8903 (s390_process_record, s390_gdbarch_tdep_alloc)
8904 (s390_linux_init_abi_any): Use/set new hook.
8906 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8908 * s390-linux-tdep.c (osabi.h): New include.
8909 (s390_linux_init_abi_31, s390_linux_init_abi_64)
8910 (s390_linux_init_abi_any): New functions.
8911 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
8913 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8915 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
8916 tdesc_has_registers check
8918 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8920 * s390-linux-tdep.c (s390_tdesc_valid): New function.
8921 (s390_validate_reg_range): New macro.
8922 (s390_gdbarch_init): Adjust.
8924 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8926 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
8927 (s390_gdbarch_tdep_alloc): Adjust.
8928 (s390_gdbarch_init): Adjust.
8930 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8932 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
8933 <have_tdb>: Change type to bool.
8934 (s390_gdbarch_tdep_alloc): Adjust.
8935 (s390_gdbarch_init): Adjust.
8937 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8939 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
8940 (gdbarch_tdep) <have_upper, have_vx>: New fields.
8941 (s390_gdbarch_tdep_alloc): New function.
8942 (s390_gdbarch_init): Allocate tdep at start and use its fields
8943 instead of separate variables.
8945 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8947 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
8948 when looking for cached gdbarch and add comment for remaining.
8950 2018-01-22 Pedro Alves <palves@redhat.com>
8951 Sergio Durigan Junior <sergiodj@redhat.com>
8953 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
8956 2018-01-22 Maciej W. Rozycki <macro@mips.com>
8958 * MAINTAINERS: Update my company e-mail address.
8960 2018-01-22 Yao Qi <yao.qi@linaro.org>
8962 * regcache.c (cooked_write_test): New function.
8963 (_initialize_regcache): Register the test.
8965 2018-01-22 Yao Qi <yao.qi@linaro.org>
8967 * ia64-tdep.c (ia64_pseudo_register_read): Call
8968 regcache->cooked_read instead of regcache_cooked_read_unsigned.
8969 * m32c-tdep.c (m32c_cat_read): Likewise.
8970 (m32c_r3r2r1r0_read): Likewise.
8971 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
8972 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
8974 2018-01-22 Yao Qi <yao.qi@linaro.org>
8976 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
8977 method raw_read instead of regcache_raw_read.
8978 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
8979 * arm-tdep.c (arm_neon_quad_read): Likewise.
8980 * avr-tdep.c (avr_pseudo_register_read): Likewise.
8981 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
8982 * frv-tdep.c (frv_pseudo_register_read): Likewise.
8983 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
8984 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
8985 (i386_pseudo_register_read_into_value): Likewise.
8986 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
8987 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
8988 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
8989 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
8990 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
8991 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
8992 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
8993 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
8994 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
8996 2018-01-22 Yao Qi <yao.qi@linaro.org>
8998 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
8999 * configure.tgt: Remove target mt.
9000 * mt-tdep.c: Remove.
9001 * regcache.c (cooked_read_test): Remove the check for mt.
9003 2018-01-22 Yao Qi <yao.qi@linaro.org>
9005 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
9006 instead of gdbarch_pseudo_register_read_value.
9008 2018-01-22 Joel Brobecker <brobecker@adacore.com>
9010 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
9013 2018-01-22 Joel Brobecker <brobecker@adacore.com>
9015 * linespec.c (create_sals_line_offset): Remove code that preserved
9016 the symtab_and_line's line number.
9018 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9020 * varobj.c (varobj_create): Don't set valid_block when creating a
9023 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9025 * varobj.c (varobj_create): Remove out of date comment.
9027 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9030 * ada-exp.y (write_var_from_sym): Pass extra parameter when
9031 updating innermost block.
9032 * parse.c (innermost_block_tracker::update): Take extra type
9033 parameter, and check types match before updating innermost block.
9034 (write_dollar_variable): Update innermost block for registers.
9035 * parser-defs.h (enum innermost_block_tracker_type): New enum.
9036 (innermost_block_tracker::innermost_block_tracker): Initialise
9038 (innermost_block_tracker::reset): Take type parameter.
9039 (innermost_block_tracker::update): Take type parameter, and pass
9040 type through as needed.
9041 (innermost_block_tracker::m_types): New member.
9042 * varobj.c (varobj_create): Pass type when reseting innermost
9045 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9047 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
9048 * ada-lang.c (resolve_subexp): Likewise.
9049 * breakpoint.c (set_breakpoint_condition) Likewise.
9050 (watch_command_1) Likewise.
9051 * c-exp.y (variable): Likewise.
9052 * d-exp.y (PrimaryExpression): Likewise.
9053 * f-exp.y (variable): Likewise.
9054 * go-exp.y (variable): Likewise.
9055 * m2-exp.y (variable): Likewise.
9056 * objfiles.c (objfile::~objfile): Likewise.
9057 * p-exp.y (variable): Likewise.
9058 * parse.c (innermost_block): Change type.
9059 * parser-defs.h (class innermost_block_tracker): New.
9060 (innermost_block): Change to innermost_block_tracker.
9061 * printcmd.c (display_command): Switch to innermost_block API.
9062 (do_one_display): Likewise.
9063 * rust-exp.y (do_one_display): Likewise.
9064 * symfile.c (clear_symtab_users): Likewise.
9065 * varobj.c (varobj_create): Switch to innermost_block API, replace
9066 use of innermost_block with block stored on varobj object.
9068 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9070 * expression.h (innermost_block): Remove declaration.
9071 * varobj.c: Add 'parser-defs.h' include.
9073 2018-01-19 Tom Tromey <tom@tromey.com>
9075 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
9076 symbols in the static and global blocks.
9078 2018-01-19 James Clarke <jrtc27@jrtc27.com>
9080 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
9081 gdb_ptrace.h, and move including gdb_wait.h ...
9082 * nat/linux-ptrace.h: ... to here.
9084 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9086 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
9087 inf_ptrace_detach_success.
9088 (inf_ptrace_detach_success): Add inferior parameter, use it
9089 instead of inferior_ptid, pass it to detach_inferior.
9090 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
9092 * inferior.c (detach_inferior): Add overload that takes an
9094 * inferior.h (detach_inferior): Likewise.
9095 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
9096 use inferior_ptid, adjust call to inf_ptrace_detach_success.
9097 * linux-thread-db.c (thread_db_detach): Use inf parameter.
9099 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9101 * target.h (struct target_ops) <to_detach>: Add inferior
9103 (target_detach): Likewise.
9104 * target.c (dispose_inferior): Pass inferior down.
9105 (target_detach): Pass inferior down. Assert that it is equal to
9106 the current inferior.
9107 * aix-thread.c (aix_thread_detach): Pass inferior down.
9108 * corefile.c (core_file_command): Pass current_inferior() down.
9109 * corelow.c (core_detach): Add inferior parameter.
9110 * darwin-nat.c (darwin_detach): Likewise.
9111 * gnu-nat.c (gnu_detach): Likewise.
9112 * inf-ptrace.c (inf_ptrace_detach): Likewise.
9113 * infcmd.c (detach_command): Pass current_inferior() down to
9115 * infrun.c (follow_fork_inferior): Pass parent_inf to
9117 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
9119 * linux-nat.c (linux_nat_detach): Add inferior parameter.
9120 * linux-thread-db.c (thread_db_detach): Likewise.
9121 * nto-procfs.c (procfs_detach): Likewise.
9122 * procfs.c (procfs_detach): Likewise.
9123 * record.c (record_detach): Likewise.
9124 * record.h (struct inferior): Forward-declare.
9125 (record_detach): Add inferior parameter.
9126 * remote-sim.c (gdbsim_detach): Likewise.
9127 * remote.c (remote_detach_1): Likewise.
9128 (remote_detach): Likewise.
9129 (extended_remote_detach): Likewise.
9130 * sol-thread.c (sol_thread_detach): Likewise.
9131 * target-debug.h (target_debug_print_inferior_p): New macro.
9132 * target-delegates.c: Re-generate.
9133 * top.c (kill_or_detach): Pass inferior down to target_detach.
9134 * windows-nat.c (windows_detach): Add inferior parameter.
9136 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9138 * target.h (struct target_ops) <to_detach>: Remove args
9140 (target_detach): Likewise.
9141 * target.c (dispose_inferior): Adjust.
9142 (target_detach): Remove args parameter, adjust.
9143 * aix-thread.c (aix_thread_detach): Adjust.
9144 * corefile.c (core_file_command): Adjust.
9145 * corelow.c (core_detach): Adjust.
9146 * darwin-nat.c (darwin_detach): Adjust.
9147 * gnu-nat.c (gnu_detach): Adjust.
9148 * inf-ptrace.c (inf_ptrace_detach): Adjust.
9149 * infcmd.c (detach_command): Adjust
9150 * infrun.c (follow_fork_inferior): Adjust.
9151 (handle_vfork_child_exec_or_exit): Adjust.
9152 * linux-fork.c (linux_fork_detach): Remove args parameter.
9153 * linux-fork.h (linux_fork_detach): Likewise.
9154 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
9155 * linux-thread-db.c (thread_db_detach): Likewise.
9156 * nto-procfs.c (procfs_detach): Likewise.
9157 * procfs.c (procfs_detach): Likewise.
9158 (do_detach): Remove signo parameter.
9159 * record.c (record_detach): Remove args parameter.
9160 * record.h (record_detach): Likewise.
9161 * remote-sim.c (gdbsim_detach): Likewise.
9162 * remote.c (remote_detach_1): Likewise.
9163 (remote_detach): Likewise.
9164 (extended_remote_detach): Likewise.
9165 * sol-thread.c (sol_thread_detach): Likewise.
9166 * target-delegates.c: Re-generate.
9167 * top.c (struct qt_args) <args>: Remove field.
9168 (kill_or_detach): Don't pass args.
9169 (quit_force): Don't set args.
9170 * windows-nat.c (windows_detach): Remove args parameter.
9172 2018-01-19 Yao Qi <yao.qi@linaro.org>
9174 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
9175 (arm_linux_init_abi): Install it.
9177 2018-01-19 Yao Qi <yao.qi@linaro.org>
9179 * osabi.c (gdb_osabi_names): Extend the regexp for
9180 arm-linux-gnueabihf.
9182 2018-01-18 Yao Qi <yao.qi@linaro.org>
9184 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
9186 (abbrev_table::add_abbrev): Update.
9187 (abbrev_table::lookup_abbrev): Update.
9189 2018-01-18 Yao Qi <yao.qi@linaro.org>
9191 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
9193 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
9195 * compile/compile.c (compile_to_object): Convert "triplet_rx"
9198 2018-01-17 Tom Tromey <tom@tromey.com>
9200 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
9202 2018-01-17 Tom Tromey <tom@tromey.com>
9204 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
9205 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
9206 (create_array_type_with_stride): Update.
9207 * dwarf2read.c (set_die_type): Update.
9209 2018-01-17 Tom Tromey <tom@tromey.com>
9211 * dwarf2read.c (delayed_method_info): Remove typedef.
9212 (dwarf2_cu::method_info): Now a std::vector.
9213 (add_to_method_list): Update.
9214 (free_delayed_list): Remove.
9215 (compute_delayed_physnames): Update.
9216 (process_full_comp_unit, process_full_type_unit): Clear the method
9217 list. Remove cleanups.
9218 (psymtab_include_file_name): Add name_holder parameter. Use
9220 (dwarf_decode_lines): Update.
9222 2018-01-17 Tom Tromey <tom@tromey.com>
9223 Simon Marchi <simon.marchi@ericsson.com>
9225 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
9226 (dwarf2_per_objfile::free_cached_comp_units)
9227 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
9228 (init_cutu_and_read_dies_no_follow): Update.
9229 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
9230 (dwarf2_cu::~dwarf2_cu): New.
9231 (free_heap_comp_unit, free_stack_comp_unit): Remove.
9232 (age_cached_comp_units, free_one_cached_comp_unit): Update.
9234 2018-01-17 Tom Tromey <tom@tromey.com>
9235 Simon Marchi <simon.marchi@ericsson.com>
9237 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
9238 (struct die_reader_specs) <abbrev_table>: New member.
9239 (struct abbrev_table): Add constructor.
9240 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
9241 <abbrev_obstack>: Now an auto_obstack.
9242 (abbrev_table_up): New typedef.
9243 (init_cu_die_reader): Add abbrev_table parameter.
9244 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
9245 Add result_dwo_abbrev_table.
9246 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
9247 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
9249 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
9251 (skip_children): Update.
9252 (abbrev_table::alloc_abbrev): Rename from
9253 abbrev_table_alloc_abbrev.
9254 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
9255 (abbrev_table::lookup_abbrev): Rename from
9256 abbrev_table_lookup_abbrev.
9257 (abbrev_table_read_table): Return abbrev_table_up.
9258 (abbrev_table_free, abbrev_table_free_cleanup)
9259 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
9260 (load_partial_dies): Update.
9262 2018-01-17 Tom Tromey <tom@tromey.com>
9264 * dwarf2read.c (dwarf2_compute_name): Update comment.
9265 (read_func_scope, read_variable): Update.
9266 (new_symbol): Remove.
9267 (new_symbol_full): Rename to new_symbol.
9269 2018-01-17 Mike Gulick <mgulick@mathworks.com>
9272 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
9273 a warning instead of throwing an error, set section size to 0 and return
9275 * gdb_bfd.h (gdb_bfd_map_section): Update description.
9277 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
9279 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
9281 (linux_ptrace_attach_fail_reason_string): Likewise.
9282 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
9284 (linux_ptrace_attach_fail_reason_string): Likewise.
9285 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
9287 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
9289 * linux-nat.c (linux_nat_attach): Remove xstrdup.
9291 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
9294 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
9295 checking for fs_base/gs_base fields in struct user_regs_struct.
9296 * configure: Regenerate.
9298 2018-01-17 Yao Qi <yao.qi@linaro.org>
9300 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
9302 (aarch64_linux_init_abi): Install it to gdbarch hook
9305 2018-01-15 Pedro Alves <palves@redhat.com>
9307 * common/signals-state-save-restore.c
9308 (save_original_signals_state): Fix typos.
9310 2017-01-12 Tom Tromey <tom@tromey.com>
9311 Sergio Durigan Junior <sergiodj@redhat.com>
9313 * Makefile.in (install-only): Install gdb-add-index.
9315 2018-01-12 John Baldwin <jhb@FreeBSD.org>
9317 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
9319 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9321 * infrun.c (keep_going_pass_signal): Clear step-over info when
9322 insert_breakpoints fails.
9324 2018-01-11 Pedro Alves <palves@redhat.com>
9327 * infrun.c (resume): Rename to ...
9328 (resume_1): ... this.
9329 (resume): Reimplement as wrapper around resume_1.
9331 2018-01-11 Pedro Alves <palves@redhat.com>
9334 * remote.c (remote_parse_stop_reply): Default to the last-set
9335 general thread instead of to 'magic_null_ptid'.
9337 2018-01-10 Pedro Alves <palves@redhat.com>
9339 * language.h (language_get_symbol_name_matcher): Rename ...
9340 (get_symbol_name_matcher): ... this.
9341 * language.c (language_get_symbol_name_matcher): Ditto.
9342 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
9345 2018-01-10 Pedro Alves <palves@redhat.com>
9349 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
9350 Adjust to use language_get_symbol_name_matcher instead of
9351 language_defn::la_get_symbol_name_matcher.
9352 * language.c (language_get_symbol_name_matcher): If in Ada mode
9353 and the lookup name is a verbatim match, return Ada's matcher.
9354 * language.h (language_get_symbol_name_matcher): Adjust comment.
9355 (ada_lookup_name_info::verbatim_p):: New method.
9357 2018-01-10 Pedro Alves <palves@redhat.com>
9360 * ada-lang.c (ada_collect_symbol_completion_matches): If the
9361 minsym's language is language_auto or language_cplus, pass down
9362 language_ada instead.
9363 * symtab.c (compare_symbol_name): Don't frob symbol language here.
9365 2018-01-10 Pedro Alves <palves@redhat.com>
9368 * minsyms.c (linkage_name_str): New function.
9369 (iterate_over_minimal_symbols): Use it.
9371 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9373 * NEWS: Document that 'info proc' now works on FreeBSD.
9375 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9377 * configure.ac: Check for kinfo_getfile in libutil.
9378 * configure: Regenerate.
9379 * config.in: Regenerate.
9380 * fbsd-nat.c: Include "fbsd-tdep.h".
9381 (fbsd_fetch_cmdline): New.
9382 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
9383 rather than calling error.
9384 (fbsd_info_proc): New.
9385 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
9386 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
9387 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
9389 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9391 * fbsd-nat.c (struct free_deleter): Remove.
9392 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
9394 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9396 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
9397 NULL for an empty pathname.
9399 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9401 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
9402 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
9403 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
9404 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
9405 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
9406 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
9407 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
9408 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
9409 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
9410 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
9411 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
9412 (fbsd_core_fetch_timeval, fbsd_print_sigset)
9413 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
9414 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
9415 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
9417 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
9419 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
9420 (gnu_xfer_auxv): New function.
9421 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
9424 2018-01-08 Yao Qi <yao.qi@linaro.org>
9425 Simon Marchi <simon.marchi@ericsson.com>
9427 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
9429 (COMMON_OBS): Remove selftest.o.
9430 * configure.ac: Append selftest-arch.c and common/selftest.c to
9431 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
9432 * configure: Re-generated.
9433 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
9435 (maintenance_info_selftests): Likewise.
9437 2018-01-08 Xavier Roirand <roirand@adacore.com>
9439 * ada-valprint.c (val_print_packed_array_elements): Use
9440 proper number of elements when printing an array indexed
9441 by an enumeration type.
9443 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9445 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
9446 (dw2_get_file_names_reader): Adjust.
9447 (lookup_dwo_signatured_type): Adjust.
9448 (lookup_dwp_signatured_type): Adjust.
9449 (lookup_signatured_type): Adjust.
9450 (create_type_unit_group): Adjust.
9451 (get_type_unit_group): Adjust.
9452 (process_psymtab_comp_unit_reader): Adjust.
9453 (build_type_psymtabs_reader): Adjust.
9454 (scan_partial_symbols): Adjust.
9455 (add_partial_symbol): Adjust.
9456 (add_partial_subprogram): Adjust.
9457 (peek_die_abbrev): Adjust.
9458 (fixup_go_packaging): Adjust.
9459 (process_imported_unit_die): Adjust.
9460 (dwarf2_compute_name): Adjust.
9461 (dwarf2_physname): Adjust.
9462 (read_import_statement): Adjust.
9463 (handle_DW_AT_stmt_list): Adjust.
9464 (read_file_scope): Adjust.
9465 (read_func_scope): Adjust.
9466 (read_lexical_block_scope): Adjust.
9467 (read_call_site_scope): Adjust.
9468 (read_variable): Adjust.
9469 (dwarf2_rnglists_process): Adjust.
9470 (dwarf2_ranges_process): Adjust.
9471 (dwarf2_ranges_read): Adjust.
9472 (dwarf2_get_pc_bounds): Adjust.
9473 (dwarf2_record_block_ranges): Adjust.
9474 (dwarf2_add_field): Adjust.
9475 (dwarf2_add_member_fn): Adjust.
9476 (read_structure_type): Adjust.
9477 (process_structure_scope): Adjust.
9478 (read_enumeration_type): Adjust.
9479 (read_array_type): Adjust.
9480 (mark_common_block_symbol_computed): Adjust.
9481 (read_common_block): Adjust.
9482 (read_namespace_type): Adjust.
9483 (read_namespace): Adjust.
9484 (read_module_type): Adjust.
9485 (read_tag_pointer_type): Adjust.
9486 (read_tag_ptr_to_member_type): Adjust.
9487 (read_tag_string_type): Adjust.
9488 (read_subroutine_type): Adjust.
9489 (read_typedef): Adjust.
9490 (read_base_type): Adjust.
9491 (attr_to_dynamic_prop): Adjust.
9492 (read_subrange_type): Adjust.
9493 (read_unspecified_type): Adjust.
9494 (dwarf2_read_abbrevs): Adjust.
9495 (load_partial_dies): Adjust.
9496 (read_partial_die): Adjust.
9497 (find_partial_die): Adjust.
9498 (guess_partial_die_structure_name): Adjust.
9499 (fixup_partial_die): Adjust.
9500 (read_attribute_value): Adjust.
9501 (read_addr_index): Adjust.
9502 (read_addr_index_from_leb128): Adjust.
9503 (read_str_index): Adjust.
9504 (dwarf2_string_attr): Adjust.
9505 (get_debug_line_section): Adjust.
9506 (dwarf_decode_line_header): Adjust.
9507 (lnp_state_machine::check_line_address): Adjust.
9508 (dwarf_decode_lines_1): Adjust.
9509 (dwarf_decode_lines): Adjust.
9510 (dwarf2_start_symtab): Adjust.
9511 (var_decode_location): Adjust.
9512 (new_symbol_full): Adjust.
9513 (dwarf2_const_value_data): Adjust.
9514 (dwarf2_const_value_attr): Adjust.
9515 (dwarf2_const_value): Adjust.
9517 (die_containing_type): Adjust.
9518 (build_error_marker_type): Adjust.
9519 (lookup_die_type): Adjust.
9520 (guess_full_die_structure_name): Adjust.
9521 (anonymous_struct_prefix): Adjust.
9522 (determine_prefix): Adjust.
9523 (dwarf2_name): Adjust.
9524 (follow_die_ref_or_sig): Adjust.
9525 (follow_die_offset): Adjust.
9526 (follow_die_ref): Adjust.
9527 (follow_die_sig_1): Adjust.
9528 (follow_die_sig): Adjust.
9529 (get_signatured_type): Adjust.
9530 (get_DW_AT_signature_type): Adjust.
9531 (decode_locdesc): Adjust.
9532 (dwarf_decode_macros): Adjust.
9533 (cu_debug_loc_section): Adjust.
9534 (fill_in_loclist_baton): Adjust.
9535 (dwarf2_symbol_mark_computed): Adjust.
9536 (init_one_comp_unit): Don't assign
9537 dwarf2_cu::dwarf2_per_objfile.
9538 (set_die_type): Adjust.
9540 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9542 * dwarf2read.c (struct mapped_debug_names): Add constructor.
9543 <dwarf2_per_objfile>: New field.
9544 (dwarf2_per_objfile): Remove global.
9545 (get_dwarf2_per_objfile): New function.
9546 (set_dwarf2_per_objfile): New function.
9547 (dwarf2_build_psymtabs_hard): Change objfile parameter to
9549 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
9550 (read_abbrev_offset): Likewise.
9551 (read_indirect_string): Likewise.
9552 (read_indirect_line_string): Likewise.
9553 (read_indirect_string_at_offset): Likewise.
9554 (read_indirect_string_from_dwz): Likewise.
9555 (dwarf2_find_containing_comp_unit): Change objfile parameter to
9557 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
9558 (create_all_comp_units): Change objfile parameter to
9560 (create_all_type_units): Likewise.
9561 (process_queue): Add dwarf2_per_objfile parameter.
9562 (read_and_check_comp_unit_head): Likewise.
9563 (lookup_dwo_unit_in_dwp): Likewise.
9564 (get_dwp_file): Likewise.
9565 (process_cu_includes): Likewise.
9566 (struct free_dwo_file_cleanup_data): New struct.
9567 (dwarf2_has_info): Use get_dwarf2_per_objfile and
9568 set_dwarf2_per_objfile.
9569 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
9570 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
9571 context, adjust calls.
9572 (dw2_instantiate_symtab): Likewise.
9573 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
9574 (dw2_get_cu): Likewise.
9575 (create_cu_from_index_list): Change objfile parameter to
9577 (create_cus_from_index_list): Get dwarf2_per_objfile from
9578 context, adjust calls.
9579 (create_cus_from_index): Likewise.
9580 (create_signatured_type_table_from_index): Change objfile
9581 parameter to dwarf2_per_objfile.
9582 (create_signatured_type_table_from_debug_names): Change objfile
9583 parameter to dwarf2_per_objfile.
9584 (create_addrmap_from_index): Likewise.
9585 (create_addrmap_from_aranges): Likewise.
9586 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
9587 (dw2_setup): Remove.
9588 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
9590 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
9591 get_dwarf2_per_objfile.
9592 (dw2_forget_cached_source_info): Likewise.
9593 (dw2_map_symtabs_matching_filename): Likewise.
9594 (struct dw2_symtab_iterator) <index>: Remove.
9595 <dwarf2_per_objfile>: New field.
9596 (dw2_symtab_iter_init): Replace index parameter with
9598 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
9599 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
9600 (dw2_print_stats): Likewise.
9601 (dw2_dump): Likewise.
9602 (dw2_expand_symtabs_for_function): Likewise.
9603 (dw2_expand_all_symtabs): Likewise.
9604 (dw2_expand_symtabs_with_fullname): Likewise.
9605 (dw2_expand_marked_cus): Replace index and objfile parameters
9606 with dwarf2_per_objfile.
9607 (dw_expand_symtabs_matching_file_matcher): Add
9608 dwarf2_per_objfile parameter and adjust calls.
9609 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
9611 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
9612 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
9614 (create_cus_from_debug_names_list): Replace objfile parameter
9615 with dwarf2_per_objfile and adjust calls.
9616 (create_cus_from_debug_names): Likewise.
9617 (dwarf2_read_debug_names): Likewise.
9618 (mapped_debug_names::namei_to_name): Adjust call.
9619 (dw2_debug_names_iterator::next): Likewise.
9620 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
9621 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
9622 (dw2_debug_names_dump): Likewise.
9623 (dw2_debug_names_expand_symtabs_for_function): Likewise.
9624 (dw2_debug_names_expand_symtabs_matching): Likewise.
9625 (dwarf2_initialize_objfile): Likewise.
9626 (dwarf2_build_psymtabs): Likewise.
9627 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
9629 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
9630 (read_and_check_comp_unit_head): Likewise.
9631 (read_abbrev_offset): Likewise.
9632 (create_debug_type_hash_table): Likewise.
9633 (create_debug_types_hash_table): Likewise.
9634 (create_all_type_units): Replace objfile parameter with
9636 (add_type_unit): Add dwarf2_per_objfile parameter.
9637 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
9638 with dwarf2_per_objfile.
9639 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
9640 (lookup_dwp_signatured_type): Likewise.
9641 (lookup_signatured_type): Likewise.
9642 (read_cutu_die_from_dwo): Likewise.
9643 (init_tu_and_read_dwo_dies): Likewise.
9644 (init_cutu_and_read_dies): Likewise.
9645 (init_cutu_and_read_dies_no_follow): Likewise.
9646 (allocate_type_unit_groups_table): Add objfile parameter.
9647 (create_type_unit_group): Use dwarf2_per_objfile from cu.
9648 (get_type_unit_group): Likewise.
9649 (process_psymtab_comp_unit): Update call.
9650 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
9651 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
9652 (print_tu_stats): Likewise.
9653 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
9655 (build_type_psymtabs): Change objfile parameter to
9657 (process_skeletonless_type_unit): Use dwarf2_per_objfile
9658 passed in void* parameter.
9659 (process_skeletonless_type_units): Change objfile parameter to
9661 (set_partial_user): Likewise.
9662 (dwarf2_build_psymtabs_hard): Likewise.
9663 (read_comp_units_from_section): Likewise.
9664 (create_all_comp_units): Likewise.
9665 (scan_partial_symbols): Update calls.
9666 (add_partial_symbol): Likewise.
9667 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
9668 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
9669 (process_queue): Add dwarf2_per_objfile parameter.
9670 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
9671 (compute_compunit_symtab_includes): Likewise.
9672 (process_cu_includes): Add dwarf2_per_objfile parameter.
9673 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
9674 (process_full_type_unit): Likewise.
9675 (process_imported_unit_die): Update call.
9676 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
9677 (read_file_scope): Likewise.
9678 (allocate_dwo_file_hash_table): Add objfile parameter.
9679 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
9680 (create_cus_hash_table): Likewise.
9681 (create_dwp_hash_table): Likewise.
9682 (create_dwo_unit_in_dwp_v1): Likewise.
9683 (create_dwp_v2_section): Likewise.
9684 (create_dwo_unit_in_dwp_v2): Likewise.
9685 (lookup_dwo_unit_in_dwp): Likewise.
9686 (try_open_dwop_file): Likewise.
9687 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
9688 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
9689 cleanup to include a reference to dwarf2_per_objfile.
9690 (open_dwp_file): Add dwarf2_per_objfile parameter.
9691 (open_and_init_dwp_file): Likewise.
9692 (get_dwp_file): Likewise.
9693 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
9694 (queue_and_load_all_dwo_tus): Update call.
9695 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
9697 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
9698 (dwarf2_ranges_process): Likewise.
9699 (dwarf2_get_pc_bounds): Likewise.
9700 (mark_common_block_symbol_computed): Likewise.
9701 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
9702 (dwarf2_read_abbrevs): Update call.
9703 (read_partial_die): Use dwarf2_per_objfile from cu.
9704 (find_partial_die): Likewise.
9705 (fixup_partial_die): Likewise.
9706 (read_attribute_value): Likewise.
9707 (read_indirect_string_at_offset_from): Add objfile parameter.
9708 (read_indirect_string_at_offset): Add dwarf2_per_objfile
9710 (read_indirect_string_from_dwz): Add objfile parameter.
9711 (read_indirect_string): Add objfile parameter.
9712 (read_addr_index_1): Add dwarf2_per_objfile parameter.
9713 (read_addr_index): Use dwarf2_per_objfile from cu.
9714 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
9716 (read_str_index): Use dwarf2_per_objfile from cu.
9717 (get_debug_line_section): Likewise.
9718 (read_formatted_entries): Add dwarf2_per_objfile parameter.
9719 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
9720 (new_symbol_full): Use dwarf2_per_objfile from cu.
9721 (build_error_marker_type): Likewise.
9722 (lookup_die_type): Likewise.
9723 (determine_prefix): Likewise.
9724 (follow_die_offset): Likewise.
9725 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
9726 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
9727 (dwarf2_fetch_die_type_sect_off): Likewise.
9728 (dwarf2_get_die_type): Likewise.
9729 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
9730 (get_signatured_type): Likewise.
9731 (get_DW_AT_signature_type): Likewise.
9732 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
9733 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
9734 (cu_debug_loc_section): Likewise.
9735 (fill_in_loclist_baton): Likewise.
9736 (dwarf2_symbol_mark_computed): Likewise.
9737 (dwarf2_find_containing_comp_unit): Change objfile parameter to
9739 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
9741 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
9742 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
9743 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
9744 (set_die_type): Use dwarf2_free_objfile from cu.
9745 (get_die_type_at_offset): Likewise.
9746 (dwarf2_per_objfile_free): Don't assign global variable.
9747 (debug_names) <constructor>: Add dwarf2_per_objfile
9748 parameter, update m_debugstrlookup construction.
9749 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
9751 <m_dwarf2_per_objfile>: New field.
9752 <lookup>: Use m_dwarf2_per_objfile.
9753 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
9754 (psyms_seen_size): Likewise.
9755 (write_gdbindex): Replace objfile parameter with
9757 (write_debug_names): Likewise.
9758 (write_psymtabs_to_index): Likewise.
9759 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
9762 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9764 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
9765 <dwarf2_per_objfile>: New field.
9766 (struct dwarf2_per_cu_data) <objfile>: Remove.
9767 <dwarf2_per_objfile>: New field.
9768 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
9770 (create_signatured_type_table_from_index): Likewise.
9771 (create_debug_type_hash_table): Likewise.
9772 (fill_in_sig_entry_from_dwo_entry): Likewise.
9773 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
9774 (create_type_unit_group): Assign dwarf2_per_objfile instead of
9776 (create_partial_symtab): Access objfile through
9778 (process_psymtab_comp_unit_reader): Likewise.
9779 (read_comp_units_from_section): Likewise.
9780 (scan_partial_symbols): Likewise.
9781 (add_partial_symbol): Likewise.
9782 (add_partial_subprogram): Likewise.
9783 (peek_die_abbrev): Likewise.
9784 (fixup_go_packaging): Likewise.
9785 (process_full_comp_unit): Likewise.
9786 (process_full_type_unit): Likewise.
9787 (process_imported_unit_die): Likewise.
9788 (dwarf2_compute_name): Likewise.
9789 (dwarf2_physname): Likewise.
9790 (read_import_statement): Likewise.
9791 (create_cus_hash_table): Assign dwarf2_physname instead of
9793 (read_func_scope): Access objfile through dwarf2_per_objfile.
9794 (read_lexical_block_scope): Likewise.
9795 (read_call_site_scope): Likewise.
9796 (read_variable): Likewise.
9797 (dwarf2_rnglists_process): Likewise.
9798 (dwarf2_ranges_process): Likewise.
9799 (dwarf2_ranges_read): Likewise.
9800 (dwarf2_record_block_ranges): Likewise.
9801 (dwarf2_add_field): Likewise.
9802 (dwarf2_add_member_fn): Likewise.
9803 (read_structure_type): Likewise.
9804 (process_structure_scope): Likewise.
9805 (read_enumeration_type): Likewise.
9806 (read_array_type): Likewise.
9807 (read_common_block): Likewise.
9808 (read_namespace_type): Likewise.
9809 (read_namespace): Likewise.
9810 (read_module_type): Likewise.
9811 (read_tag_pointer_type): Likewise.
9812 (read_tag_ptr_to_member_type): Likewise.
9813 (read_tag_string_type): Likewise.
9814 (read_subroutine_type): Likewise.
9815 (read_typedef): Likewise.
9816 (read_base_type): Likewise.
9817 (attr_to_dynamic_prop): Likewise.
9818 (read_subrange_type): Likewise.
9819 (read_unspecified_type): Likewise.
9820 (load_partial_dies): Likewise.
9821 (read_partial_die): Likewise.
9822 (find_partial_die): Likewise.
9823 (guess_partial_die_structure_name): Likewise.
9824 (fixup_partial_die): Likewise.
9825 (read_attribute_value): Likewise.
9826 (read_addr_index_from_leb128): Likewise.
9827 (dwarf2_read_addr_index): Likewise.
9828 (dwarf2_string_attr): Likewise.
9829 (lnp_state_machine::check_line_address): Likewise.
9830 (dwarf_decode_lines_1): Likewise.
9831 (dwarf_decode_lines): Likewise.
9832 (dwarf2_start_symtab): Likewise.
9833 (var_decode_location): Likewise.
9834 (new_symbol_full): Likewise.
9835 (dwarf2_const_value_data): Likewise.
9836 (dwarf2_const_value_attr): Likewise.
9837 (dwarf2_const_value): Likewise.
9838 (die_type): Likewise.
9839 (die_containing_type): Likewise.
9840 (lookup_die_type): Likewise.
9841 (guess_full_die_structure_name): Likewise.
9842 (anonymous_struct_prefix): Likewise.
9843 (dwarf2_name): Likewise.
9844 (follow_die_ref_or_sig): Likewise.
9845 (follow_die_offset): Likewise.
9846 (follow_die_ref): Likewise.
9847 (dwarf2_fetch_die_loc_sect_off): Likewise.
9848 (dwarf2_fetch_constant_bytes): Likewise.
9849 (dwarf2_fetch_die_type_sect_off): Likewise.
9850 (dwarf2_get_die_type): Likewise.
9851 (follow_die_sig): Likewise.
9852 (decode_locdesc): Likewise.
9853 (dwarf2_per_cu_objfile): Likewise.
9854 (dwarf2_per_cu_text_offset): Likewise.
9855 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
9857 (set_die_type): Access objfile through
9860 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9862 * valprint.c (converted_character_d): Remove typedef.
9863 (DEF_VEC_O (converted_character_d)): Remove.
9864 (count_next_character): Use std::vector.
9865 (print_converted_chars_to_obstack): Likewise.
9866 (generic_printstr): Likewise.
9868 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9870 * xml-support.h (struct gdb_xml_value): Add constructor.
9871 <value>: Change type to unique_xmalloc_ptr.
9872 (gdb_xml_value_s): Remove typedef.
9873 (DEF_VEC_O (gdb_xml_value_s)): Remove.
9874 (gdb_xml_element_start_handler): Change parameter type to
9876 (xml_find_attribute): Likewise.
9877 * xml-support.c (xml_find_attribute): Change parameter type to
9878 std::vector and adjust.
9879 (gdb_xml_values_cleanup): Remove.
9880 (gdb_xml_parser::start_element): Adjust to std::vector.
9881 (xinclude_start_include): Change paraeter type to std::vector
9883 * btrace.c (check_xml_btrace_version): Likewise.
9884 (parse_xml_btrace_block): Likewise.
9885 (parse_xml_btrace_pt_config_cpu): Likewise.
9886 (parse_xml_btrace_pt): Likewise.
9887 (parse_xml_btrace_conf_bts): Likewise.
9888 (parse_xml_btrace_conf_pt): Likewise.
9889 * memory-map.c (memory_map_start_memory): Likewise.
9890 (memory_map_start_property): Likewise.
9891 * osdata.c (osdata_start_osdata): Likewise.
9892 (osdata_start_item): Likewise.
9893 (osdata_start_column): Likewise.
9894 * remote.c (start_thread): Likewise.
9895 * solib-aix.c (library_list_start_library): Likewise.
9896 (library_list_start_list): Likewise.
9897 * solib-svr4.c (library_list_start_library): Likewise.
9898 (svr4_library_list_start_list): Likewise.
9899 * solib-target.c (library_list_start_segment): Likewise.
9900 (library_list_start_section): Likewise.
9901 (library_list_start_library): Likewise.
9902 (library_list_start_list): Likewise.
9903 * tracepoint.c (traceframe_info_start_memory): Likewise.
9904 (traceframe_info_start_tvar): Likewise.
9905 * xml-syscall.c (syscall_start_syscall): Likewise.
9906 * xml-tdesc.c (tdesc_start_target): Likewise.
9907 (tdesc_start_feature): Likewise.
9908 (tdesc_start_reg): Likewise.
9909 (tdesc_start_union): Likewise.
9910 (tdesc_start_struct): Likewise.
9911 (tdesc_start_flags): Likewise.
9912 (tdesc_start_enum): Likewise.
9913 (tdesc_start_field): Likewise.
9914 (tdesc_start_enum_value): Likewise.
9915 (tdesc_start_vector): Likewise.
9917 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9919 * extension.h (struct xmethod_worker) <clone>: Remove.
9920 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
9922 (python_xmethod_worker::clone): Remove.
9923 * valops.c (find_overload_match): Use std::move instead of
9926 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9928 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
9929 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
9930 <free_xmethod_worker_data>: Remove.
9931 <get_matching_xmethod_workers>: Chance VEC to std::vector.
9932 <get_xmethod_arg_types>: Remove.
9933 <get_xmethod_result_type>: Remove.
9934 <invoke_xmethod>: Remove.
9935 * extension.c (new_xmethod_worker): Remove.
9936 (clone_xmethod_worker): Remove.
9937 (get_matching_xmethod_workers): Return void, pass std::vector by
9939 (get_xmethod_arg_types): Rename to...
9940 (xmethod_worker::get_arg_types): ... this, and adjust.
9941 (get_xmethod_result_type): Rename to...
9942 (xmethod_worker::get_result_type): ... this, and adjust.
9943 (invoke_xmethod): Remove.
9944 (free_xmethod_worker): Remove.
9945 (free_xmethod_worker_vec): Remove.
9946 * extension.h (enum ext_lang_rc): Move here from
9948 (struct xmethod_worker): Add constructor and destructor.
9951 <invoke, clone, do_get_result_type, do_get_arg_types>: New
9952 virtual pure methods.
9953 <get_arg_types, get_result_type>: New methods.
9954 (xmethod_worker_ptr): Remove typedef.
9955 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
9956 (xmethod_worker_vec): Remove typedef.
9957 (xmethod_worker_up): New typedef.
9958 (invoke_xmethod): Remove.
9959 (clone_xmethod_worker): Remove.
9960 (free_xmethod_worker): Remove.
9961 (free_xmethod_worker_vec): Remove.
9962 (get_xmethod_arg_types): Remove.
9963 (get_xmethod_result_type): Remove.
9964 * valops.c (find_method_list): Use std::vector, don't use
9965 intermediate vector.
9966 (value_find_oload_method_list): Use std::vector.
9967 (find_overload_match): Use std::vector.
9968 (find_oload_champ): Use std::vector.
9969 * value.c (value_free): Use operator delete.
9970 (value_of_xmethod): Rename to...
9971 (value_from_xmethod): ... this. Don't assign
9972 xmethod_worker::value, take rvalue-reference.
9973 (result_type_of_xmethod): Adjust.
9974 (call_xmethod): Adjust.
9975 * value.h: Include extension.h.
9976 (struct xmethod_worker): Don't forward-declare.
9977 (value_of_xmethod): Rename to...
9978 (value_from_xmethod): ... this, take rvalue-reference.
9979 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
9980 (struct python_xmethod_worker): ... this, add constructor and
9982 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
9983 (gdbpy_free_xmethod_worker_data): Rename to...
9984 (python_xmethod_worker::~python_xmethod_worker): ... this and
9986 (gdbpy_clone_xmethod_worker_data): Rename to...
9987 (python_xmethod_worker::clone): ... this and adjust.
9988 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
9990 (gdbpy_get_xmethod_arg_types): Rename to...
9991 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
9992 (gdbpy_get_xmethod_result_type): Rename to...
9993 (python_xmethod_worker::do_get_result_type): ... this and
9995 (gdbpy_invoke_xmethod): Rename to...
9996 (python_xmethod_worker::invoke): ... this and adjust.
9997 (new_python_xmethod_worker): Rename to...
9998 (python_xmethod_worker::python_xmethod_worker): ... this and
10000 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
10002 (gdbpy_free_xmethod_worker_data): Remove.
10003 (gdbpy_get_matching_xmethod_workers): Use std::vector.
10004 (gdbpy_get_xmethod_arg_types): Remove.
10005 (gdbpy_get_xmethod_result_type): Remove.
10006 (gdbpy_invoke_xmethod): Remove.
10007 * python/python.c (python_extension_ops): Remove obsolete
10010 2018-01-05 Pedro Alves <palves@redhat.com>
10013 * common/signals-state-save-restore.c
10014 (save_original_signals_state): New parameter 'quiet'. Warn if we
10015 find a custom handler preinstalled, instead of internal erroring.
10016 But only warn if !quiet.
10017 * common/signals-state-save-restore.h
10018 (save_original_signals_state): New parameter 'quiet'.
10019 * main.c (captured_main_1): Move save_original_signals_state call
10020 after option handling, and pass QUIET.
10022 2018-01-05 Pedro Alves <palves@redhat.com>
10024 * spu-tdep.c (spu_catch_start): Pass
10025 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
10027 2018-01-05 Pedro Alves <palves@redhat.com>
10030 * ada-lang.c (literal_symbol_name_matcher): New function.
10031 (ada_get_symbol_name_matcher): Use it for
10032 symbol_name_match_type::SEARCH_NAME.
10033 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
10034 it down instead of assuming symbol_name_match_type::FULL.
10035 * block.h (block_lookup_symbol): New parameter 'match_type'.
10036 * c-valprint.c (print_unpacked_pointer): Use
10037 lookup_symbol_search_name instead of lookup_symbol.
10038 * compile/compile-object-load.c (get_out_value_type): Pass down
10039 symbol_name_match_type::SEARCH_NAME.
10040 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
10041 symbol_name_match_type::FULL.
10042 * cp-support.c (cp_get_symbol_name_matcher): Handle
10043 symbol_name_match_type::SEARCH_NAME.
10044 * infrun.c (insert_exception_resume_breakpoint): Use
10045 lookup_symbol_search_name.
10046 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
10047 * psymtab.c (maintenance_check_psymtabs): Use
10048 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
10049 * stack.c (print_frame_args): Use lookup_symbol_search_name and
10050 SYMBOL_SEARCH_NAME.
10051 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
10052 if symbol_name_match_type::SEARCH_NAME.
10053 (lookup_symbol_in_language): Pass down
10054 symbol_name_match_type::FULL.
10055 (lookup_symbol_search_name): New.
10056 (lookup_language_this): Pass down
10057 symbol_name_match_type::SEARCH_NAME.
10058 (lookup_symbol_aux, lookup_local_symbol): New parameter
10059 'match_type'. Pass it down.
10060 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
10061 (lookup_symbol_search_name): New declaration.
10062 (lookup_symbol_in_block): New 'match_type' parameter.
10064 2018-01-05 Pedro Alves <palves@redhat.com>
10067 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
10069 (ada_lookup_symbol): Reimplement in terms of
10070 ada_lookup_symbol_list, bits factored out from
10071 ada_lookup_encoded_symbol.
10073 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10075 * ada-exp.y (write_object_renaming): When subscripting an array
10076 using a symbol as the index, pass the block in call to
10077 ada_lookup_encoded_symbol when looking that symbol up.
10079 2018-01-05 Jerome Guitton <guitton@adacore.com>
10081 * ada-lang.c (ada_array_length): Use ada_index_type instead of
10084 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10086 * ada-lang.c (ada_to_fixed_value_create): Add handling of
10087 the case where VALUE_LVAL (val0) is not lval_memory.
10089 2018-01-05 Xavier Roirand <roirand@adacore.com>
10091 * ada-valprint.c (print_optional_low_bound): Handle
10092 character-indexed array printing like boolean-indexed array
10095 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10097 * NEWS: Create a new section for the next release branch.
10098 Rename the section of the current branch, now that it has
10101 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10103 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
10104 * version.in: Bump version to 8.1.50.DATE-git.
10106 2018-01-03 Xavier Roirand <roirand@adacore.com>
10108 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
10110 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
10112 (default_exception_support_info) <catch_handlers_sym>: Add field.
10113 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
10114 (ada_exception_name_addr_1): Add "catch handlers" handling.
10115 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
10116 Update all callers.
10117 (create_excep_cond_exprs) <ex>: Add parameter.
10118 (re_set_exception): Update create_excep_cond_exprs call.
10119 (print_it_exception, print_one_exception, print_mention_exception)
10120 (print_recreate_exception): Add "catch handler" handling.
10121 (allocate_location_catch_handlers, re_set_catch_handlers)
10122 (check_status_catch_handlers, print_it_catch_handlers)
10123 (print_one_catch_handlers, print_mention_catch_handlers)
10124 (print_recreate_catch_handlers): New function.
10125 (catch_handlers_breakpoint_ops): New variable.
10126 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
10127 Add parameter. Add "catch handler" handling.
10128 (ada_exception_sym_name, ada_exception_breakpoint_ops):
10129 Add "catch handler" handling.
10130 (ada_exception_catchpoint_cond_string): Add "catch handler"
10132 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
10134 (catch_ada_handlers_command): New function.
10135 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
10136 operations structure.
10137 (_initialize_ada_language): Add "catch handlers" command entry.
10138 * NEWS: Document "catch handlers" feature.
10140 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10142 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
10143 account when creating the array type of the slice.
10144 (ada_value_slice): Likewise.
10146 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10148 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
10150 (create_array_type_with_stride): Add byte_stride_prop parameter.
10151 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
10152 New parameter. Update all callers in this file.
10153 (array_type_has_dynamic_stride): New function.
10154 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
10155 of arrays with dynamic byte strides.
10156 * dwarf2read.c (read_array_type): Add support for dynamic
10157 DW_AT_byte_stride attributes.
10159 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10161 * dwarf2read.c (read_unspecified_type): Treat
10162 DW_TAG_enumeration_type DIEs from Ada units as stubs.
10164 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10166 Update copyright year range in all GDB files.
10168 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10170 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
10171 and gdb/testsuite/gdb.base/step-line.c.
10173 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10175 * copyright.py (main): Dump the contents of
10176 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
10177 even if BY_HAND is empty.
10179 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10181 * top.c (print_gdb_version): Update Copyright year in version
10184 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10186 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
10188 For older changes see ChangeLog-2017.
10194 version-control: never