1 2018-09-05 Joel Brobecker <brobecker@adacore.com>
3 * version.in: Set GDB version number to 8.2.0.DATE-git.
6 2018-09-05 Joel Brobecker <brobecker@adacore.com>
10 2018-09-05 Joel Brobecker <brobecker@adacore.com>
12 * version.in: Set GDB version number to 8.2.
15 2018-09-04 Sergio Durigan Junior <sergiodj@redhat.com>
18 * gnulib/import/m4/getcwd-path-max.m4: Add handling of Hurd,
19 Linux and kFreeBSD platforms.
20 * gnulib/configure: Regenerate.
22 2018-08-31 Tom Tromey <tom@tromey.com>
24 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
27 2018-08-28 Alan Hayward <alan.hayward@arm.com>
29 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
30 (aarch64_linux_collect_sve_regset): Likewise.
31 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
32 * regcache.h (regcache_map_entry_size): New function.
34 2018-08-13 Alan Hayward <alan.hayward@arm.com>
36 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
37 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
38 (SVE_HEADER_VL_LENGTH): Likewise.
39 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
40 (SVE_HEADER_FLAGS_LENGTH): Likewise.
41 (SVE_HEADER_RESERVED_LENGTH): Likewise.
42 (SVE_HEADER_SIZE_OFFSET): Likewise.
43 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
44 (SVE_HEADER_VL_OFFSET): Likewise.
45 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
46 (SVE_HEADER_FLAGS_OFFSET): Likewise.
47 (SVE_HEADER_RESERVED_OFFSET): Likewise.
48 (SVE_HEADER_SIZE): Likewise.
49 (aarch64_linux_core_read_vq): Add function.
50 (aarch64_linux_core_read_description): Check for SVE section.
52 2018-08-13 Alan Hayward <alan.hayward@arm.com>
55 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
57 * aarch64-linux-tdep.c
58 (aarch64_linux_iterate_over_regset_sections): Likewise.
60 (alpha_linux_iterate_over_regset_sections):
62 (alphanbsd_iterate_over_regset_sections): Likewise.
64 (amd64fbsd_iterate_over_regset_sections): Likewise.
66 (amd64_linux_iterate_over_regset_sections): Likewise.
68 (armbsd_iterate_over_regset_sections): Likewise.
70 (arm_fbsd_iterate_over_regset_sections): Likewise.
72 (arm_linux_iterate_over_regset_sections): Likewise.
73 * corelow.c (get_core_registers_cb): Likewise.
74 (core_target::fetch_registers): Likewise.
75 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
76 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
77 * gdbarch.h (void): Regenerate.
78 * gdbarch.sh: Add supply_size and collect_size.
79 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
80 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
81 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
82 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
83 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
84 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
85 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
86 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
87 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
88 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
89 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
90 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
91 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
92 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
93 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
94 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
95 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
96 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
97 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
98 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
99 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
100 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
101 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
102 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
103 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
104 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
105 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
106 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
107 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
109 2018-08-28 Alan Hayward <alan.hayward@arm.com>
111 * corelow.c (core_target::get_core_register_section): Rename
112 min_size to section_min_size.
114 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
116 * python/py-threadevent.c (py_get_event_thread): Initialize
119 2018-08-24 Kevin Buettner <kevinb@redhat.com>
122 * block.h (blockrange, blockranges): New struct declarations.
123 (struct block): Add new field named `ranges'.
124 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
125 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
126 macros for accessing ranges in struct block.
127 (make_blockranges): New declaration.
128 block.c (make_blockranges): New function.
129 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
131 * symtab.h (find_pc_partial_function): Add new parameter `block'.
132 * blockframe.c (cache_pc_function_block): New static global.
133 (clear_pc_function_cache): Clear cache_pc_function_block.
134 (find_pc_partial_function): Move comment to symtab.h. Add
135 support for non-contiguous blocks.
136 * cli/cli-cmds.c (block.h): Include.
137 (print_disassembly): Handle printing of non-contiguous blocks.
138 (disassemble_current_function): Likewise.
139 (disassemble_command): Likewise.
141 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
143 * blockframe.c (get_pc_function_start): Likewise.
144 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
145 (gcc_symbol_address): Likewise.
146 * compile/compile-object-run.c (compile_object_run): Likewise.
147 * compile/compile.c (get_expr_block_and_pc): Likewise.
148 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
149 (func_addr_to_tail_call_list): Likewise.
150 * findvar.c (default_read_var_value): Likewise.
151 * inline-frame.c (inline_frame_this_id): Likewise.
152 (skip-inline_frames): Likewise.
153 * infcmd.c (until_next_command): Likewise.
154 * linespec.c (convert_linespec_to_sals): Likewise.
155 * parse.c (parse_exp_in_context_1): Likewise.
156 * printcmd.c (build_address_symbolic): likewise.
157 (info_address_command): Likewise.
158 symtab.c (find_function_start_sal): Likewise.
159 (skip_prologue_sal): Likewise.
160 (find_function_alias_target): Likewise.
161 (find_gnu_ifunc): Likewise.
162 * stack.c (find_frame_funname): Likewise.
163 * symtab.c (fixup_symbol_section): Likewise.
164 (find_function_start_sal): Likewise.
165 (skip_prologue_sal): Likewsie.
166 (find_function_alias_target): Likewise.
167 (find_gnu_ifunc): Likewise.
168 * tracepoint.c (info_scope_command): Likewise.
169 * value.c (value_fn_field): Likewise.
171 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
172 in place of find_pc_partial_function.
173 * blockframe.c (find_function_entry_range_from_pc): New function.
174 * symtab.h (find_function_entry_range_from_pc): Declare and document.
175 * objfiles.c (objfile_relocate1): Relocate start and end addresses
176 for each range in a block.
178 2018-08-24 Pedro Alves <palves@redhat.com>
179 Simon Marchi <simon.marchi@ericsson.com>
182 * python/py-continueevent.c: Include "gdbthread.h".
183 (create_continue_event_object): Add intro comment. Add 'ptid'
184 parameter. Use it to find thread to pass to
185 create_thread_event_object.
186 (emit_continue_event): Pass PTID down to
187 create_continue_event_object.
188 * python/py-event.h (py_get_event_thread): Declare.
189 (create_thread_event_object): Remove default from 'thread'
191 * python/py-stopevent.c (create_stop_event_object): Use
193 * python/py-threadevent.c (get_event_thread): Rename to ...
194 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
195 and use it to find the thread.
196 (create_thread_event_object): Assert that THREAD isn't null.
197 Don't find the event thread here.
199 2018-08-23 Xavier Roirand <roirand@adacore.com>
201 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
204 2018-08-21 Alan Hayward <alan.hayward@arm.com>
206 * arch/aarch64.h (aarch64_regnum): Update comment.
208 2018-08-21 Alan Hayward <alan.hayward@arm.com>
210 * NEWS: Add SVE to 8.2 section.
212 2018-08-16 Tom Tromey <tom@tromey.com>
214 * top.c (read_command_file): Update.
215 (command_line_input): Remove "repeat" argument.
216 * ada-lang.c (get_selections): Update.
217 * linespec.c (decode_line_2): Update.
218 * defs.h (command_line_input): Remove argument.
219 * cli/cli-script.c (read_next_line): Update.
220 * python/py-gdb-readline.c: Update.
222 2018-08-17 Tom Tromey <tom@tromey.com>
224 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
227 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
229 * symfile.c (set_objfile_default_section_offset): Remove struct
232 2018-07-25 Alan Hayward <alan.hayward@arm.com>
234 * target-descriptions.c (tdesc_register_bitsize): Rename.
235 * target-descriptions.h (tdesc_register_bitsize): Likewise.
236 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
237 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
239 2018-07-24 Keith Seitz <keiths@redhat.comt
242 * dwarf2read.c (dw2_add_symbol_to_list): New function.
243 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
244 instead of add_symbol_to_list.
245 (read_file_scope): Call prepare_one_comp_unit before reading
248 2018-07-22 Tom Tromey <tom@tromey.com>
250 * symfile.c (reread_symbols): Notify iter, not objfile.
252 2018-07-22 Tom Tromey <tom@tromey.com>
254 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
256 (ravenscar_thread_target::prepare_to_store): Likewise.
258 2018-07-17 Tom Tromey <tom@tromey.com>
261 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
263 2018-07-11 Pedro Alves <palves@redhat.com>
266 * remote.c (remote_target::remote_detach_pid): Call
269 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
272 * c-typeprint.c (c_type_print_base_struct_union): Don't print
273 offsets/sizes for static members of a class/struct.
275 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
277 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
279 2018-07-04 Joel Brobecker <brobecker@adacore.com>
281 * version.in: Set GDB version number to 8.1.90.DATE-git.
282 * PROBLEMS: Likewise.
284 2018-07-04 Joel Brobecker <brobecker@adacore.com>
288 2018-07-04 Joel Brobecker <brobecker@adacore.com>
290 * version.in: Set GDB version number to 8.1.90.
291 * PROBLEMS: Likewise.
293 2018-07-04 Joel Brobecker <brobecker@adacore.com>
295 * NEWS: Change "Changes since GDB 8.1" into "Changes in GDB 8.2".
297 2018-07-04 Joel Brobecker <brobecker@adacore.com>
299 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
300 * version.in: Bump version to 8.1.90.DATE-git.
302 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
303 Pedro Alves <palves@redhat.com>
305 * linux-nat.c (linux_init_ptrace): Rename to ...
306 (linux_init_ptrace_procfs): ... this. Call
307 linux_proc_init_warnings.
308 (linux_nat_target::post_attach)
309 (linux_nat_target::post_startup_inferior): Adjust.
310 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
311 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
313 2018-07-04 Tom de Vries <tdevries@suse.de>
315 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
317 (read_comp_unit_head): ... here.
319 2018-07-03 Tom Tromey <tom@tromey.com>
321 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
322 (stop_tracing, tstatus_command)
323 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
324 (print_one_static_tracepoint_marker): Update.
325 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
327 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
329 (all_tracepoints, static_tracepoints_here): Return std::vector.
331 2018-07-03 Tom Tromey <tom@tromey.com>
333 * common/ptid.c (ptid_equal): Remove.
334 * common/ptid.h (ptid_equal): Don't declare.
335 * ada-tasks.c: Update.
336 * breakpoint.c: Update.
337 * common/agent.c: Update.
339 * darwin-nat-info.c: Update.
340 * darwin-nat.c: Update.
342 * dtrace-probe.c: Update.
343 * dummy-frame.c: Update.
344 * fbsd-nat.c: Update.
346 * gdbthread.h: Update.
348 * go32-nat.c: Update.
349 * inf-loop.c: Update.
350 * inf-ptrace.c: Update.
355 * linux-fork.c: Update.
356 * linux-nat.c: Update.
357 * linux-thread-db.c: Update.
358 * mi/mi-cmd-var.c: Update.
359 * mi/mi-interp.c: Update.
360 * mi/mi-main.c: Update.
361 * nto-procfs.c: Update.
362 * ppc-linux-tdep.c: Update.
364 * python/py-inferior.c: Update.
365 * python/py-record-btrace.c: Update.
366 * python/py-record.c: Update.
367 * ravenscar-thread.c: Update.
368 * regcache.c: Update.
369 * remote-sim.c: Update.
371 * sol-thread.c: Update.
374 * tui/tui-stack.c: Update.
376 * windows-nat.c: Update.
377 * windows-tdep.c: Update.
379 2018-07-03 Tom Tromey <tom@tromey.com>
381 * common/ptid.c (ptid_match): Remove.
382 * common/ptid.h (ptid_match): Don't declare.
383 * fbsd-nat.c: Update.
386 * linux-nat.c: Update.
387 * record-btrace.c: Update.
388 * regcache.c: Update.
391 2018-07-03 Tom Tromey <tom@tromey.com>
393 * common/ptid.c (ptid_tid_p): Remove.
394 * common/ptid.h (ptid_tid_p): Don't declare.
395 * sol-thread.c: Update.
397 2018-07-03 Tom Tromey <tom@tromey.com>
399 * common/ptid.c (ptid_lwp_p): Remove.
400 * common/ptid.h (ptid_lwp_p): Don't declare.
401 * fbsd-nat.c: Update.
402 * linux-nat.c: Update.
403 * nat/linux-procfs.c: Update.
404 * nat/x86-linux-dregs.c: Update.
405 * sol-thread.c: Update.
407 2018-07-03 Tom Tromey <tom@tromey.com>
409 * common/ptid.c (ptid_is_pid): Remove.
410 * common/ptid.h (ptid_is_pid): Don't declare.
412 * linux-nat.c: Update.
413 * mi/mi-interp.c: Update.
417 2018-07-03 Tom Tromey <tom@tromey.com>
419 * common/ptid.c (ptid_get_tid): Remove.
420 * common/ptid.h (ptid_get_tid): Don't declare.
421 * ada-tasks.c: Update.
422 * aix-thread.c: Update.
423 * bsd-uthread.c: Update.
424 * darwin-nat.c: Update.
425 * fbsd-nat.c: Update.
426 * i386-darwin-nat.c: Update.
428 * linux-tdep.c: Update.
429 * nto-procfs.c: Update.
430 * ppc-ravenscar-thread.c: Update.
431 * python/py-infthread.c: Update.
432 * ravenscar-thread.c: Update.
433 * sol-thread.c: Update.
434 * sparc-ravenscar-thread.c: Update.
435 * windows-nat.c: Update.
437 2018-07-03 Tom Tromey <tom@tromey.com>
439 * common/ptid.c (ptid_get_lwp): Remove.
440 * common/ptid.h (ptid_get_lwp): Don't declare.
441 * aarch64-linux-nat.c: Update.
442 * ada-tasks.c: Update.
443 * aix-thread.c: Update.
444 * amd64-linux-nat.c: Update.
445 * arm-linux-nat.c: Update.
447 * fbsd-nat.c: Update.
448 * fbsd-tdep.c: Update.
450 * i386-cygwin-tdep.c: Update.
451 * i386-gnu-nat.c: Update.
452 * i386-linux-nat.c: Update.
453 * ia64-linux-nat.c: Update.
454 * inf-ptrace.c: Update.
456 * linux-fork.c: Update.
457 * linux-nat.c: Update.
458 * linux-tdep.c: Update.
459 * linux-thread-db.c: Update.
460 * mips-linux-nat.c: Update.
461 * nat/aarch64-linux-hw-point.c: Update.
462 * nat/aarch64-linux.c: Update.
463 * nat/linux-btrace.c: Update.
464 * nat/linux-osdata.c: Update.
465 * nat/linux-procfs.c: Update.
466 * nat/x86-linux-dregs.c: Update.
467 * obsd-nat.c: Update.
468 * ppc-fbsd-nat.c: Update.
469 * ppc-linux-nat.c: Update.
471 * python/py-infthread.c: Update.
472 * ravenscar-thread.c: Update.
474 * s390-linux-nat.c: Update.
475 * sol-thread.c: Update.
476 * sol2-tdep.c: Update.
477 * spu-linux-nat.c: Update.
478 * x86-linux-nat.c: Update.
479 * xtensa-linux-nat.c: Update.
481 2018-07-03 Tom Tromey <tom@tromey.com>
483 * common/ptid.c (ptid_get_pid): Remove.
484 * common/ptid.h (ptid_get_pid): Don't declare.
485 * aarch64-linux-nat.c: Update.
486 * ada-lang.c: Update.
487 * aix-thread.c: Update.
488 * alpha-bsd-nat.c: Update.
489 * amd64-fbsd-nat.c: Update.
490 * amd64-linux-nat.c: Update.
491 * arm-linux-nat.c: Update.
492 * arm-nbsd-nat.c: Update.
494 * break-catch-syscall.c: Update.
495 * breakpoint.c: Update.
496 * bsd-uthread.c: Update.
499 * darwin-nat.c: Update.
500 * fbsd-nat.c: Update.
501 * fbsd-tdep.c: Update.
504 * hppa-nbsd-nat.c: Update.
505 * hppa-obsd-nat.c: Update.
506 * i386-fbsd-nat.c: Update.
507 * ia64-linux-nat.c: Update.
508 * inf-ptrace.c: Update.
510 * inferior.c: Update.
511 * inferior.h: Update.
514 * linux-fork.c: Update.
515 * linux-nat.c: Update.
516 * linux-tdep.c: Update.
517 * linux-thread-db.c: Update.
518 * m68k-bsd-nat.c: Update.
519 * mi/mi-interp.c: Update.
520 * mi/mi-main.c: Update.
521 * mips-linux-nat.c: Update.
522 * mips-nbsd-nat.c: Update.
523 * mips64-obsd-nat.c: Update.
524 * nat/aarch64-linux-hw-point.c: Update.
525 * nat/aarch64-linux.c: Update.
526 * nat/linux-btrace.c: Update.
527 * nat/linux-osdata.c: Update.
528 * nat/linux-procfs.c: Update.
529 * nat/x86-linux-dregs.c: Update.
530 * nto-procfs.c: Update.
531 * obsd-nat.c: Update.
532 * ppc-linux-nat.c: Update.
533 * ppc-nbsd-nat.c: Update.
534 * ppc-obsd-nat.c: Update.
535 * proc-service.c: Update.
537 * python/py-inferior.c: Update.
538 * python/py-infthread.c: Update.
539 * ravenscar-thread.c: Update.
541 * remote-sim.c: Update.
543 * rs6000-nat.c: Update.
544 * s390-linux-nat.c: Update.
545 * sh-nbsd-nat.c: Update.
546 * sol-thread.c: Update.
547 * sparc-nat.c: Update.
548 * sparc64-tdep.c: Update.
549 * spu-linux-nat.c: Update.
550 * spu-tdep.c: Update.
551 * target-debug.h: Update.
554 * tid-parse.c: Update.
555 * tracefile-tfile.c: Update.
556 * vax-bsd-nat.c: Update.
557 * windows-nat.c: Update.
558 * x86-linux-nat.c: Update.
561 2018-07-03 Tom Tromey <tom@tromey.com>
563 * common/ptid.c (pid_to_ptid): Remove.
564 * common/ptid.h (pid_to_ptid): Don't declare.
565 * aix-thread.c: Update.
566 * arm-linux-nat.c: Update.
567 * common/ptid.c: Update.
568 * common/ptid.h: Update.
571 * darwin-nat.c: Update.
572 * fbsd-nat.c: Update.
573 * fork-child.c: Update.
575 * go32-nat.c: Update.
576 * inf-ptrace.c: Update.
578 * inferior.c: Update.
580 * linux-fork.c: Update.
581 * linux-nat.c: Update.
582 * nat/aarch64-linux-hw-point.c: Update.
583 * nat/fork-inferior.c: Update.
584 * nat/x86-linux-dregs.c: Update.
585 * nto-procfs.c: Update.
586 * obsd-nat.c: Update.
588 * progspace.c: Update.
590 * rs6000-nat.c: Update.
591 * s390-linux-nat.c: Update.
592 * sol-thread.c: Update.
593 * spu-linux-nat.c: Update.
596 * tracefile-tfile.c: Update.
597 * windows-nat.c: Update.
599 2018-07-03 Tom Tromey <tom@tromey.com>
601 * common/ptid.h (ptid_build): Don't declare.
602 * common/ptid.c (ptid_build): Remove.
603 * aix-thread.c: Update.
605 * bsd-uthread.c: Update.
606 * common/agent.c: Update.
607 * common/ptid.c: Update.
608 * common/ptid.h: Update.
610 * darwin-nat.c: Update.
611 * fbsd-nat.c: Update.
613 * linux-fork.c: Update.
614 * linux-nat.c: Update.
615 * linux-thread-db.c: Update.
616 * nat/linux-osdata.c: Update.
617 * nat/linux-procfs.c: Update.
618 * nto-procfs.c: Update.
619 * obsd-nat.c: Update.
620 * proc-service.c: Update.
622 * ravenscar-thread.c: Update.
623 * remote-sim.c: Update.
625 * sol-thread.c: Update.
627 * windows-nat.c: Update.
629 2018-07-03 Tom Tromey <tom@tromey.com>
631 * infrun.c (follow_exec): Use exit_inferior_silent.
632 * inferior.c (exit_inferior_num_silent): Remove.
633 * inferior.h (exit_inferior_num_silent): Don't declare.
635 2018-07-03 Tom Tromey <tom@tromey.com>
638 * darwin-nat.c (darwin_attach_pid): Reset inferior and
639 inferior_ptid on error.
641 2018-07-02 Maciej W. Rozycki <macro@mips.com>
642 Simon Marchi <simon.marchi@polymtl.ca>
645 * disasm.h (gdb_disassembler): Add
646 `m_disassembler_options_holder'. member
647 * disasm.c (get_all_disassembler_options): New function.
648 (gdb_disassembler::gdb_disassembler): Use it.
649 (gdb_buffered_insn_length_init_dis): Likewise.
650 (gdb_buffered_insn_length): Adjust accordingly.
651 (set_disassembler_options): Handle options with arguments.
652 (show_disassembler_options_sfunc): Likewise. Add a leading new
653 line if showing options with descriptions.
654 (disassembler_options_completer): Adapt to using the
655 `disasm_options_and_args_t' structure.
656 * mips-tdep.c (mips_disassembler_options): New variable.
657 (mips_disassembler_options_o32): Likewise.
658 (mips_disassembler_options_n32): Likewise.
659 (mips_disassembler_options_n64): Likewise.
660 (gdb_print_insn_mips): Don't set `disassembler_options'.
661 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
663 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
664 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
665 `gdbarch_disassembler_options_implicit' and
666 `gdbarch_valid_disassembler_options'.
667 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
668 `disasm_options_and_args_t' structure.
669 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
671 (valid_disassembler_options): Switch from `disasm_options_t' to
672 the `disasm_options_and_args_t' structure.
673 * NEWS: Document `set disassembler-options' support for the MIPS
675 * gdbarch.h: Regenerate.
676 * gdbarch.c: Regenerate.
678 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
680 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
682 2018-06-29 Joel Brobecker <brobecker@adacore.com>
684 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
685 parameter in call to amd64_target_description.
686 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
687 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
688 (amd64fbsd_init_abi): Likewise.
689 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
690 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
691 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
692 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
694 2018-06-29 Pedro Alves <palves@redhat.com>
696 * gdb/amd64-tdep.h (amd64_create_target_description): Add
697 "segments" parameter.
698 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
699 (_initialize_amd64_tdep): Update call to
700 amd64_create_target_description.
701 (amd64_target_description): Add "segments" parameter. Adjust
702 the implementation to use it.
703 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
704 call to amd64_create_target_description.
705 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
706 * gdb/arch/amd64.h (amd64_create_target_description): Add
708 * gdb/arch/amd64.c (amd64_create_target_description): Add
709 "segments" parameter. Call create_feature_i386_64bit_segments
710 only if SEGMENTS is true.
711 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
712 call to amd64_create_target_description.
714 2018-06-29 Pedro Alves <palves@redhat.com>
716 * thread.c (thread_target_id_str): New, factored out from ...
717 (print_thread_info_1): ... here. Use it to compute the max
718 "Target Id" column width.
720 2018-06-29 Pedro Alves <palves@redhat.com>
722 * remote.c (remote_target::extra_thread_info): Delete
723 'display_buf' and 'n' locals. from the cache, regardless of
724 packet mechanims is in use. Use cache for qThreadExtra and qP
727 2018-06-29 Pedro Alves <palves@redhat.com>
729 * blockframe.c (find_pc_sect_containing_function): New function.
730 * breakpoint.c (print_breakpoint_location): Don't call
731 find_pc_sect_function.
732 * linespec.c (create_sals_line_offset): Record the location's
734 * linespec.c (convert_address_location_to_sals): Fill in sal's
735 symbol with find_pc_sect_containing_function.
736 * symtab.c (find_function_start_sal): Rename to ...
737 (find_function_start_sal_1): ... this.
738 (find_function_start_sal): Reimplement as wrapper around
739 find_function_start_sal_1, and use
740 find_pc_sect_containing_function to fill in the sal's symbol.
741 (find_function_start_sal(symbol*, bool)): Adjust.
742 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
744 (find_pc_sect_containing_function): Declare.
746 2018-06-29 Pedro Alves <palves@redhat.com>
748 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
749 true if the the location has no symbol.
751 2018-06-28 Tom Tromey <tom@tromey.com>
753 * NEWS: Mention --enable-codesign.
754 * silent-rules.mk (ECHO_SIGN): New variable.
755 * configure.ac: Add --enable-codesign.
756 * configure: Rebuild.
757 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
758 (gdb$(EXEEXT)): Optionally invoke codesign.
760 2018-06-28 Pedro Alves <palves@redhat.com>
762 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
764 (switch_to_thread_no_regs): Adjust comment.
765 * infcmd.c (stop_pc): Delete.
766 (post_create_inferior, info_program_command): Replace references
767 to stop_pc with references to thread_info->suspend.stop_pc.
768 * inferior.h (stop_pc): Delete declaration.
769 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
770 (handle_inferior_event_1, handle_signal_stop)
771 (process_event_stop_test, keep_going_stepped_thread)
772 (handle_step_into_function, handle_step_into_function_backward)
773 (print_stop_location): Replace references to stop_pc with
774 references to thread_info->suspend.stop_pc.
775 (struct infcall_suspend_state) <stop_pc>: Delete field.
776 (save_infcall_suspend_state, restore_infcall_suspend_state):
777 Remove references to inf_stat->stop_pc.
778 * linux-fork.c (fork_load_infrun_state): Likewise.
779 * record-btrace.c (record_btrace_set_replay): Likewise.
780 * record-full.c (record_full_goto_entry): Likewise.
781 * remote.c (print_one_stopped_thread): Likewise.
782 * target.c (target_resume): Extend comment.
783 * thread.c (set_executing_thread): New.
784 (set_executing): Use it.
785 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
786 Remove references to stop_pc.
788 2018-06-28 Pedro Alves <palves@redhat.com>
790 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
791 Moving fetching stop_pc until after ecs->event_thread is refreshed.
793 2018-06-28 Tom Tromey <tom@tromey.com>
795 * coffread.c (coff_symfile_finish): Update.
796 * xcoffread.c (xcoff_symfile_finish): Update.
797 * elfread.c (elf_symfile_finish): Update.
798 * symfile.h (dwarf2_free_objfile): Don't declare.
799 * dwarf2read.c (_initialize_dwarf2_read): Use
800 register_objfile_data_with_cleanup.
801 (dwarf2_free_objfile): Now static. Change signature.
803 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
805 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
806 option "-o" to add-symbol-file-load to add an offset to each
807 section's load address.
808 * symfile.c (set_objfile_default_section_offset): New function.
810 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
812 * symfile.c (add_symbol_file_command): Make sure that sections
813 with the same name are sorted in the same order.
815 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
817 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
818 require the second argument. If omitted, load sections at the
819 addresses specified in the file.
821 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
823 * symfile.c (symbol_file_command, symbol_file_add_main_1)
824 (_initialize_symfile): Add option "-o" to symbol-file to add an
825 offset to each section of the symbol file.
827 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
829 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
831 2018-06-27 Tom Tromey <tom@tromey.com>
833 * stack.c (_initialize_stack): Update "func" help text.
835 2018-06-27 Tom Tromey <tom@tromey.com>
837 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
839 (unwind_infopy_str, pyuw_create_unwind_info)
840 (unwind_infopy_add_saved_register, pyuw_sniffer)
841 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
843 (struct saved_reg): Add constructor.
844 <value>: Now a gdbpy_ref<>.
846 2018-06-27 Tom Tromey <tom@tromey.com>
848 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
850 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
852 * gdb-gdb.py.in: Format using autopep8.
854 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
856 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
857 (type_lookup_function): Recognize CORE_ADDR values.
859 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
861 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
864 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
866 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
869 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
871 * gdb-gdb.py: Move to...
872 * gdb-gdb.py.in: ... here.
873 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
874 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
876 (distclean): Remove gdb-gdb.py when cleaning.
877 (gdb-gdb.py, gdb-gdb.gdb): New rules.
878 * configure: Re-generate.
880 2018-06-27 Pedro Alves <palves@redhat.com>
882 * proc-service.c (get_ps_regcache): New.
883 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
884 (ps_lsetfpregs): Use it.
886 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
889 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
890 (dwarf_decode_lines_1): Adjust.
892 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
894 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
896 <info_proc>: Likewise.
898 2018-06-26 Joel Brobecker <brobecker@adacore.com>
900 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
901 to windows_fetch_one_register, and only handle the case of
902 fetching one register. Move the code that reloads the context
903 and iterates over all registers if R is negative to...
904 (windows_nat_target::fetch_registers): ... here.
905 (do_windows_store_inferior_registers): Rename to
906 windows_store_one_register, and only handle the case of storing
907 one register. Move the code that handles the case where r is
909 (windows_nat_target::store_registers) ... here.
911 2018-06-26 Tom Tromey <tom@tromey.com>
914 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
915 * rust-lang.c (rust_print_struct_def): Add podata parameter.
917 (rust_internal_print_type): Add podata parameter.
918 (rust_print_type): Update.
920 2018-06-26 Tom Tromey <tom@tromey.com>
922 * typeprint.h (struct print_offset_data) <update, finish,
923 maybe_print_hole>: New methods.
924 <indentation>: New constant.
925 * typeprint.c (print_offset_data::indentation): Define.
926 (print_offset_data::maybe_print_hole, print_offset_data::update)
927 (print_offset_data::finish): Move from c-typeprint.c and rename.
928 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
929 (print_spaces_filtered_with_print_options): Update.
930 (c_print_type_union_field_offset, maybe_print_hole)
931 (c_print_type_struct_field_offset): Move to typeprint.c and
933 (c_type_print_base_struct_union): Update.
935 2018-06-25 Pedro Alves <palves@redhat.com>
937 * gdbthread.h (thread_info_ref, delete_thread)
938 (delete_thread_silent, first_thread_of_inferior)
939 (any_thread_of_inferior, switch_to_thread)
940 (enable_thread_stack_temporaries)
941 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
942 (get_last_thread_stack_temporary)
943 (value_in_thread_stack_temporaries, can_access_registers_thread):
944 Spell out "struct thread_info" instead of just "thread_info".
945 * inferior.h (notice_new_inferior): Likewise.
947 2018-06-25 Pedro Alves <palves@redhat.com>
949 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
950 pass thread_info pointer to delete_thread.
951 (windows_nat_target::detach): Pass inferior pointer to
953 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
955 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
956 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
957 and pass a thread_info pointer to delete_thread.
958 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
959 pass thread_info pointer to delete_thread.
960 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
961 delete_thread_silent call.
962 * procfs.c (procfs_target::detach): Pass inferior pointer to
964 (procfs_target::wait): Pass thread_info pointer to delete_thread.
965 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
966 delete_thread_silent call.
967 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
968 pass thread_info pointer to delete_thread.
969 (windows_nat_target::detach): Pass inferior pointer to
972 2018-06-22 Alan Hayward <alan.hayward@arm.com>
974 * regcache.c (readable_regcache::read_part): Fix asserts.
975 (reg_buffer::raw_collect_part): New function.
976 (regcache::write_part): Fix asserts.
977 (reg_buffer::raw_supply_part): New function.
978 (regcache::transfer_regset_register): New helper function.
979 (regcache::transfer_regset): Call new functions.
980 (regcache_supply_regset): Use gdb_byte*.
981 (regcache::supply_regset): Likewise.
982 (regcache_collect_regset): Likewise.
983 (regcache::collect_regset): Likewise.
984 * regcache.h (reg_buffer::raw_collect_part): New declaration.
985 (reg_buffer::raw_supply_part): Likewise.
986 (regcache::transfer_regset_register): Likewise.
987 (regcache::transfer_regset): Use gdb_byte*.
989 2018-06-22 Alan Hayward <alan.hayward@arm.com>
991 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
993 2018-06-21 Pedro Alves <palves@redhat.com>
995 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
996 instead of a ptid_t. All callers adjusted.
997 * ada-tasks.c (ada_get_task_number): Likewise. All callers
999 (print_ada_task_info, display_current_task_id, task_command_1):
1001 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
1003 (breakpoint_kind): Adjust.
1004 (remove_breakpoints_pid): Rename to ...
1005 (remove_breakpoints_inf): ... this. Adjust to take an inferior
1006 pointer. All callers adjusted.
1007 (bpstat_clear_actions): Use inferior_thread.
1008 (get_bpstat_thread): New.
1009 (bpstat_do_actions): Use it.
1010 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
1011 to take a thread_info pointer. All callers adjusted.
1012 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
1013 (breakpoint_re_set_thread): Use inferior_thread.
1014 * breakpoint.h (struct inferior): Forward declare.
1015 (bpstat_stop_status): Update.
1016 (remove_breakpoints_pid): Delete.
1017 (remove_breakpoints_inf): New.
1018 * bsd-uthread.c (bsd_uthread_target::wait)
1019 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
1020 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
1021 (maint_btrace_packet_history_cmd)
1022 (maint_btrace_clear_packet_history_cmd): Adjust.
1023 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
1025 * cli/cli-interp.c: Include "inferior.h".
1026 * common/refcounted-object.h (struct
1027 refcounted_object_ref_policy): New.
1028 * compile/compile-object-load.c: Include gdbthread.h.
1029 (store_regs): Use inferior_thread.
1030 * corelow.c (core_target::close): Use current_inferior.
1031 (core_target_open): Adjust to use first_thread_of_inferior and use
1032 the current inferior.
1033 * ctf.c (ctf_target::close): Adjust to use current_inferior.
1034 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
1035 <thread>: ... this new field. All references adjusted.
1036 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
1037 Take a thread_info pointer instead of a ptid_t.
1038 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
1039 (dummy_frame_discard, register_dummy_frame_dtor): Take a
1040 thread_info pointer instead of a ptid_t.
1041 * elfread.c: Include "inferior.h".
1042 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
1043 Use inferior_thread.
1044 * eval.c (evaluate_subexp): Likewise.
1045 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
1047 * gdb_proc_service.h (struct thread_info): Forward declare.
1048 (struct ps_prochandle) <ptid>: Delete, replaced by ...
1049 <thread>: ... this new field. All references adjusted.
1050 * gdbarch.h, gdbarch.c: Regenerate.
1051 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
1052 'thread' parameter. All implementations and callers adjusted.
1053 * gdbthread.h (thread_info) <set_running>: New method.
1054 (delete_thread, delete_thread_silent): Take a thread_info pointer
1056 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
1057 (first_thread_of_process): Delete, replaced by ...
1058 (first_thread_of_inferior): ... this new function. All callers
1060 (any_live_thread_of_process): Delete, replaced by ...
1061 (any_live_thread_of_inferior): ... this new function. All callers
1063 (switch_to_thread, switch_to_no_thread): Declare.
1064 (is_executing): Delete.
1065 (enable_thread_stack_temporaries): Update comment.
1066 <enable_thread_stack_temporaries>: Take a thread_info pointer
1067 instead of a ptid_t. Incref the thread.
1068 <~enable_thread_stack_temporaries>: Decref the thread.
1071 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1072 (get_last_thread_stack_temporary)
1073 (value_in_thread_stack_temporaries, can_access_registers_thread):
1074 Take a thread_info pointer instead of a ptid_t. All callers
1076 * infcall.c (get_call_return_value): Use inferior_thread.
1077 (run_inferior_call): Work with thread pointers instead of ptid_t.
1078 (call_function_by_hand_dummy): Work with thread pointers instead
1079 of ptid_t. Use thread_info_ref.
1080 * infcmd.c (proceed_thread_callback): Access thread's state
1082 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
1083 access thread's state directly.
1084 (continue_command): Use inferior_thread.
1085 (info_program_command): Use find_thread_ptid and access thread
1087 (proceed_after_attach_callback): Use thread state directly.
1088 (notice_new_inferior): Take a thread_info pointer instead of a
1089 ptid_t. All callers adjusted.
1090 (exit_inferior): Take an inferior pointer instead of a pid. All
1092 (exit_inferior_silent): New.
1093 (detach_inferior): Delete.
1094 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
1095 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
1096 (detach_inferior_command, kill_inferior_command): Use
1097 find_inferior_id instead of valid_gdb_inferior_id and
1098 gdb_inferior_id_to_pid.
1099 (inferior_command): Use inferior and thread pointers.
1100 * inferior.h (struct thread_info): Forward declare.
1101 (notice_new_inferior): Take a thread_info pointer instead of a
1102 ptid_t. All callers adjusted.
1103 (detach_inferior): Delete declaration.
1104 (exit_inferior, exit_inferior_silent): Take an inferior pointer
1105 instead of a pid. All callers adjusted.
1106 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
1107 (valid_gdb_inferior_id): Delete.
1108 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
1109 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
1110 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
1112 <inf>: ... this new field.
1113 <step_ptid>: Delete, replaced by ...
1114 <step_thread>: ... this new field.
1115 (get_displaced_stepping_state): Take an inferior pointer instead
1116 of a pid. All callers adjusted.
1117 (displaced_step_in_progress_any_inferior): Adjust.
1118 (displaced_step_in_progress_thread): Take a thread pointer instead
1119 of a ptid_t. All callers adjusted.
1120 (displaced_step_in_progress, add_displaced_stepping_state): Take
1121 an inferior pointer instead of a pid. All callers adjusted.
1122 (get_displaced_step_closure_by_addr): Adjust.
1123 (remove_displaced_stepping_state): Take an inferior pointer
1124 instead of a pid. All callers adjusted.
1125 (displaced_step_prepare_throw, displaced_step_prepare)
1126 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
1127 All callers adjusted.
1128 (start_step_over): Adjust.
1129 (infrun_thread_ptid_changed): Remove bit updating ptids in the
1130 displaced step queue.
1131 (do_target_resume): Adjust.
1132 (fetch_inferior_event): Use inferior_thread.
1133 (context_switch, get_inferior_stop_soon): Take an
1134 execution_control_state pointer instead of a ptid_t. All callers
1136 (switch_to_thread_cleanup): Delete.
1137 (stop_all_threads): Use scoped_restore_current_thread.
1138 * inline-frame.c: Include "gdbthread.h".
1139 (inline_state) <inline_state>: Take a thread pointer instead of a
1140 ptid_t. All callers adjusted.
1141 <ptid>: Delete, replaced by ...
1142 <thread>: ... this new field.
1143 (find_inline_frame_state): Take a thread pointer instead of a
1144 ptid_t. All callers adjusted.
1145 (skip_inline_frames, step_into_inline_frame)
1146 (inline_skipped_frames, inline_skipped_symbol): Take a thread
1147 pointer instead of a ptid_t. All callers adjusted.
1148 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
1149 (inline_skipped_frames, inline_skipped_symbol): Likewise.
1150 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
1152 * linux-nat.c (get_detach_signal): Likewise.
1153 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
1154 (thread_db_notice_clone): Adjust.
1155 (thread_db_find_new_threads_silently)
1156 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
1157 a thread pointer instead of a ptid_t. All callers adjusted.
1158 * mi/mi-cmd-var.c: Include "inferior.h".
1159 (mi_cmd_var_update_iter): Update to use thread pointers.
1160 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
1162 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
1164 (mi_output_running): ... this new function.
1165 (mi_on_resume_1): Adjust to use it.
1166 (mi_user_selected_context_changed): Adjust to use inferior_thread.
1167 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
1169 (interrupt_thread_callback): : Adjust to use thread and inferior
1171 * proc-service.c: Include "gdbthread.h".
1172 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
1173 * progspace-and-thread.c: Include "inferior.h".
1174 * progspace.c: Include "inferior.h".
1175 * python/py-exitedevent.c (create_exited_event_object): Adjust to
1176 hold a reference to an inferior_object.
1177 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
1179 * python/py-inferior.c (struct inferior_object): Give the type a
1180 tag name instead of a typedef.
1181 (python_on_normal_stop): No need to check if the current thread is
1183 (inferior_to_inferior_object): Change return type to
1184 inferior_object. All callers adjusted.
1185 (find_thread_object): Delete, bits factored out to ...
1186 (thread_to_thread_object): ... this new function.
1187 * python/py-infthread.c (create_thread_object): Use
1188 inferior_to_inferior_object.
1189 (thpy_is_stopped): Use thread pointer directly.
1190 (gdbpy_selected_thread): Use inferior_thread.
1191 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
1192 field, replaced with ...
1193 <thread>: ... this new field. All users adjusted.
1194 (btpy_insn_or_gap_new): Drop const.
1195 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
1197 * python/py-record.c: Include "gdbthread.h".
1198 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
1199 a ptid_t. All callers adjusted.
1200 (gdbpy_current_recording): Use inferior_thread.
1201 * python/py-record.h (recpy_record_object) <ptid>: Delete
1202 field, replaced with ...
1203 <thread>: ... this new field. All users adjusted.
1204 (recpy_element_object) <ptid>: Delete
1205 field, replaced with ...
1206 <thread>: ... this new field. All users adjusted.
1207 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
1208 a ptid_t. All callers adjusted.
1209 * python/py-threadevent.c: Include "gdbthread.h".
1210 (get_event_thread): Use thread_to_thread_object.
1211 * python/python-internal.h (struct inferior_object): Forward
1213 (find_thread_object, find_inferior_object): Delete declarations.
1214 (thread_to_thread_object, inferior_to_inferior_object): New
1216 * record-btrace.c: Include "inferior.h".
1217 (require_btrace_thread): Use inferior_thread.
1218 (record_btrace_frame_sniffer)
1219 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
1220 (get_thread_current_frame): Use scoped_restore_current_thread and
1222 (get_thread_current_frame): Use thread pointer directly.
1223 (record_btrace_replay_at_breakpoint): Use thread's inferior
1225 * record-full.c: Include "inferior.h".
1226 * regcache.c: Include "gdbthread.h".
1227 (get_thread_arch_regcache): Use the inferior's address space
1229 (get_thread_regcache, registers_changed_thread): New.
1230 * regcache.h (get_thread_regcache(thread_info *thread)): New
1232 (registers_changed_thread): New.
1233 (remote_target) <remote_detach_1>: Swap order of parameters.
1234 (remote_add_thread): <remote_add_thread>: Return the new thread.
1235 (get_remote_thread_info(ptid_t)): New overload.
1236 (remote_target::remote_notice_new_inferior): Use thread pointers
1238 (remote_target::process_initial_stop_replies): Use
1239 thread_info::set_running.
1240 (remote_target::remote_detach_1, remote_target::detach)
1241 (extended_remote_target::detach): Adjust.
1242 * stack.c (frame_show_address): Use inferior_thread.
1243 * target-debug.h (target_debug_print_thread_info_pp): New.
1244 * target-delegates.c: Regenerate.
1245 * target.c (default_thread_address_space): Delete.
1246 (memory_xfer_partial_1): Use current_inferior.
1247 (target_detach): Use current_inferior.
1248 (target_thread_address_space): Delete.
1249 (generic_mourn_inferior): Use current_inferior.
1250 * target.h (struct target_ops) <thread_address_space>: Delete.
1251 (target_thread_address_space): Delete.
1252 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
1254 (delete_thread_1, delete_thread, delete_thread_silent): Take a
1255 thread pointer instead of a ptid_t. Adjust all callers.
1256 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
1257 (first_thread_of_process): Delete, replaced by ...
1258 (first_thread_of_inferior): ... this new function. All callers
1260 (any_thread_of_process): Rename to ...
1261 (any_thread_of_inferior): ... this, and take an inferior pointer.
1262 (any_live_thread_of_process): Rename to ...
1263 (any_live_thread_of_inferior): ... this, and take an inferior
1265 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1266 (value_in_thread_stack_temporaries)
1267 (get_last_thread_stack_temporary): Take a thread pointer instead
1268 of a ptid_t. Adjust all callers.
1269 (thread_info::set_running): New.
1270 (validate_registers_access): Use inferior_thread.
1271 (can_access_registers_ptid): Rename to ...
1272 (can_access_registers_thread): ... this, and take a thread
1274 (print_thread_info_1): Adjust to compare thread pointers instead
1276 (switch_to_no_thread, switch_to_thread): Make extern.
1277 (scoped_restore_current_thread::~scoped_restore_current_thread):
1278 Use m_thread pointer directly.
1279 (scoped_restore_current_thread::scoped_restore_current_thread):
1280 Use inferior_thread.
1281 (thread_command): Use thread pointer directly.
1282 (thread_num_make_value_helper): Use inferior_thread.
1283 * top.c (execute_command): Use inferior_thread.
1284 * tui/tui-interp.c: Include "inferior.h".
1285 * varobj.c (varobj_create): Use inferior_thread.
1286 (value_of_root_1): Use find_thread_global_id instead of
1287 global_thread_id_to_ptid.
1289 2018-06-21 Alan Hayward <alan.hayward@arm.com>
1291 * regcache.c (readable_regcache::read_part): Avoid memcpy when
1293 (regcache::write_part): Likewise.
1294 (readable_regcache::cooked_read_part): Update comment.
1295 (readable_regcache::cooked_write_part): Likewise.
1296 * regcache.h: (readable_regcache::read_part): Likewise.
1297 (regcache::write_part): Likewise.
1299 2018-06-21 Richard Bunt <richard.bunt@arm.com>
1300 Dirk Schubert <dirk.schubert@arm.com>
1302 * aarch64-linux-nat.c (post_attach): New.
1303 (aarch64_linux_nat_target::post_attach): Override post_attach to
1304 record the number of hardware debug registers.
1306 2018-06-20 Tom Tromey <tom@tromey.com>
1308 * python/py-param.c (add_setshow_generic): Make parameters const.
1309 (parmpy_init): Update.
1311 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
1313 * regcache.h (regcache_cooked_read_ftype): Rename to...
1314 (register_read_ftype): ...this, change type to function_view.
1315 (class reg_buffer) <save>: Remove src parameter.
1316 (readonly_detached_regcache) <readonly_detached_regcache>: Make
1317 parameter non-const in first overload. Remove src parameter in
1319 * regcache.c (do_cooked_read): Remove.
1320 (readonly_detached_regcache::readonly_detached_regcache): Make
1321 parameter non-const, adjust call to other constructor.
1322 (reg_buffer::save): Remove src parameter.
1323 * frame.c (do_frame_register_read): Remove.
1324 (frame_save_as_regcache): Use lambda function.
1325 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
1326 parameter to ppu2spu_data *.
1327 (ppu2spu_sniffer): Use lambda function.
1329 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
1331 * record-full.c (record_full_target::insert_breakpoint): Remove
1332 "struct" keyword, add const.
1334 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1336 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
1337 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
1338 * configure.ac: Remove AC_PREREQ, add missing quoting.
1339 * gnulib/configure.ac: Modernize usage of
1340 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
1341 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
1342 (AUTOMAKE_VERSION): Bump to 1.15.1.
1343 * configure: Re-generate.
1344 * config.in: Re-generate.
1345 * aclocal.m4: Re-generate.
1346 * gnulib/aclocal.m4: Re-generate.
1347 * gnulib/config.in: Re-generate.
1348 * gnulib/configure: Re-generate.
1349 * gnulib/import/Makefile.in: Re-generate.
1351 2018-06-19 Pedro Alves <palves@redhat.com>
1353 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
1354 (lookup_minimal_symbol_by_pc_section): ... here with
1355 gdb_assert_not_reached added.
1357 2018-06-19 Pedro Alves <palves@redhat.com>
1359 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
1360 parameter with a block parameter. Compare location's block symbol
1361 with the frame's block instead of addresses.
1362 (skip_inline_frames): Pass the current block instead of the
1363 frame's address. Break out as soon as we determine the frame
1364 should not be skipped.
1366 2018-06-18 Tom Tromey <tom@tromey.com>
1368 * solib-aix.c (solib_aix_get_section_offsets): Return
1370 (solib_aix_solib_create_inferior_hook): Update.
1372 2018-06-18 Tom Tromey <tom@tromey.com>
1374 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
1376 2018-06-18 Tom Tromey <tom@tromey.com>
1378 * solib-frv.c (frv_relocate_main_executable): Use
1380 * solib-dsbt.c (dsbt_relocate_main_executable): Use
1383 2018-06-18 Tom Tromey <tom@tromey.com>
1385 * objfiles.h (inhibit_section_map_updates): Update.
1386 (resume_section_map_updates, resume_section_map_updates_cleanup):
1388 * solib-svr4.c (svr4_handle_solib_event): Update.
1389 * objfiles.c (inhibit_section_map_updates): Return
1390 scoped_restore_tmpl<int>.
1391 (resume_section_map_updates, resume_section_map_updates_cleanup):
1394 2018-06-18 Tom Tromey <tom@tromey.com>
1396 * valprint.h (read_string): Update.
1397 * valprint.c (read_string): Change type of "buffer".
1398 (val_print_string): Update.
1399 * python/py-value.c (valpy_string): Update.
1400 * language.h (struct language_defn) <la_get_string>: Change
1402 (default_get_string, c_get_string): Update.
1403 * language.c (default_get_string): Change type of "buffer".
1404 * guile/scm-value.c (gdbscm_value_to_string): Update.
1405 * c-lang.c (c_get_string): Change type of "buffer".
1407 2018-06-18 Tom Tromey <tom@tromey.com>
1409 * ser-mingw.c (struct pipe_state_destroyer): New.
1410 (pipe_state_up): New typedef.
1411 (cleanup_pipe_state): Remove.
1412 (pipe_windows_open): Use pipe_state_up. Don't release argv.
1414 2018-06-18 Tom Tromey <tom@tromey.com>
1416 * rust-lang.h (rust_yyerror): Don't declare.
1417 * rust-lang.c (rust_language_defn): Update.
1418 * rust-exp.y (yyerror): Now static.
1419 * parse.c (parse_exp_in_context_1): Update.
1420 * p-lang.h (p_yyerror): Don't declare.
1421 * p-lang.c (p_language_defn): Update.
1422 * p-exp.y (yyerror): Now static.
1423 * opencl-lang.c (opencl_language_defn): Update.
1424 * objc-lang.c (objc_language_defn): Update.
1425 * m2-lang.h (m2_yyerror): Don't declare.
1426 * m2-lang.c (m2_language_defn): Update.
1427 * m2-exp.y (yyerror): Now static.
1428 * language.h (struct language_defn) <la_error>: Remove.
1429 * language.c (unk_lang_error): Remove.
1430 (unknown_language_defn, auto_language_defn): Remove.
1431 * go-lang.h (go_yyerror): Don't declare.
1432 * go-lang.c (go_language_defn): Update.
1433 * go-exp.y (yyerror): Now static.
1434 * f-lang.h (f_yyerror): Don't declare.
1435 * f-lang.c (f_language_defn): Update.
1436 * f-exp.y (yyerror): Now static.
1437 * d-lang.h (d_yyerror): Don't declare.
1438 * d-lang.c (d_language_defn): Update.
1439 * d-exp.y (yyerror): Now static.
1440 * c-lang.h (c_yyerror): Don't declare.
1441 * c-lang.c (c_language_defn, cplus_language_defn)
1442 (asm_language_defn, minimal_language_defn): Update.
1443 * c-exp.y (yyerror): Now static.
1444 * ada-lang.h (ada_yyerror): Don't declare.
1445 * ada-lang.c (ada_language_defn): Update.
1446 * ada-exp.y (yyerror): Now static.
1448 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1450 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
1451 (store_sveregs_to_thread): Likewise.
1452 (aarch64_linux_fetch_inferior_registers): Check for SVE.
1453 (aarch64_linux_store_inferior_registers): Likewise.
1454 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
1456 (aarch64_sve_regs_copy_to_regcache): Likewise.
1457 (aarch64_sve_regs_copy_from_regcache): Likewise.
1458 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
1460 (aarch64_sve_regs_copy_to_regcache): Likewise.
1461 (aarch64_sve_regs_copy_from_regcache): Likewise.
1462 (sve_context): Structure from Linux headers.
1463 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
1464 (SVE_SIG_ZREG_SIZE): Likewise.
1465 (SVE_SIG_PREG_SIZE): Likewise.
1466 (SVE_SIG_FFR_SIZE): Likewise.
1467 (SVE_SIG_REGS_OFFSET): Likewise.
1468 (SVE_SIG_ZREGS_OFFSET): Likewise.
1469 (SVE_SIG_ZREG_OFFSET): Likewise.
1470 (SVE_SIG_ZREGS_SIZE): Likewise.
1471 (SVE_SIG_PREGS_OFFSET): Likewise.
1472 (SVE_SIG_PREG_OFFSET): Likewise.
1473 (SVE_SIG_PREGS_SIZE): Likewise.
1474 (SVE_SIG_FFR_OFFSET): Likewise.
1475 (SVE_SIG_REGS_SIZE): Likewise.
1476 (SVE_SIG_CONTEXT_SIZE): Likewise.
1477 (SVE_PT_REGS_MASK): Likewise.
1478 (SVE_PT_REGS_FPSIMD): Likewise.
1479 (SVE_PT_REGS_SVE): Likewise.
1480 (SVE_PT_VL_INHERIT): Likewise.
1481 (SVE_PT_VL_ONEXEC): Likewise.
1482 (SVE_PT_REGS_OFFSET): Likewise.
1483 (SVE_PT_FPSIMD_OFFSET): Likewise.
1484 (SVE_PT_FPSIMD_SIZE): Likewise.
1485 (SVE_PT_SVE_ZREG_SIZE): Likewise.
1486 (SVE_PT_SVE_PREG_SIZE): Likewise.
1487 (SVE_PT_SVE_FFR_SIZE): Likewise.
1488 (SVE_PT_SVE_FPSR_SIZE): Likewise.
1489 (SVE_PT_SVE_FPCR_SIZE): Likewise.
1490 (__SVE_SIG_TO_PT): Likewise.
1491 (SVE_PT_SVE_OFFSET): Likewise.
1492 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
1493 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
1494 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
1495 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
1496 (SVE_PT_SVE_PREG_OFFSET): Likewise.
1497 (SVE_PT_SVE_PREGS_SIZE): Likewise.
1498 (SVE_PT_SVE_FFR_OFFSET): Likewise.
1499 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
1500 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
1501 (SVE_PT_SVE_SIZE): Likewise.
1502 (SVE_PT_SIZE): Likewise.
1503 (HAS_SVE_STATE): New define.
1505 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1507 * nat/aarch64-sve-linux-sigcontext.h: New file.
1508 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
1510 (SVE_VQ_MIN): Likewise.
1511 (SVE_VQ_MAX): Likewise.
1512 (SVE_VL_MIN): Likewise.
1513 (SVE_VL_MAX): Likewise.
1514 (SVE_NUM_ZREGS): Likewise.
1515 (SVE_NUM_PREGS): Likewise.
1516 (sve_vl_valid): Likewise.
1517 (struct user_sve_header): Likewise.
1519 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
1520 Richard Bunt <Richard.Bunt@arm.com>
1522 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
1523 was requested by GDB.
1525 2018-06-15 Tom de Vries <tdevries@suse.de>
1527 * MAINTAINERS (Write After Approval): Add Tom de Vries.
1529 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
1531 * gnulib/update-gnulib.sh: Print expected versions of
1534 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
1536 * arch-utils.c (default_type_align): Use type_length_units.
1537 * gdbtypes.c (type_align): Use type_length_units.
1539 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1541 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
1542 of 'define' command.
1544 2018-06-14 Tom de Vries <tdevries@suse.de>
1547 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
1548 get_no_prettyformat_print_options.
1550 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
1552 * sparc-nat.h: Include target.h.
1553 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
1554 <fetch_registers>: Remove this argument in function call.
1555 <store_registers>: Remove this argument in function call, remove
1557 <low_forget_process>: Call sparc64_forget_process instead of
1558 sparc_forget_process.
1560 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1562 * procfs.c (_initialize_procfs): Use add_inf_child_target.
1563 (procfs_target::make_corefile_notes): Adjust to new
1564 target_read_alloc return type.
1566 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1567 Stephen Roberts <stephen.roberts@arm.com>
1570 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
1571 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
1572 Move should_notify_stop local into more inner scope.
1574 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1575 Stephen Roberts <stephen.roberts@arm.com>
1578 * infrun.c (resume_1): Add call to mark_async_event_handler.
1580 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1582 * infrun.c (do_target_wait): Change old version of $pc printed.
1584 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
1586 * dwarf2read.c (read_index_from_section): Rename to...
1587 (read_gdb_index_from_section): ... this, update all callers.
1588 (dwarf2_read_index): Rename to...
1589 (dwarf2_read_gdb_index): ... this, update all callers.
1591 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
1593 * gdb/hppa-linux-nat.c
1594 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
1595 hppa_linux_nat_target::fetch_registers.
1597 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1599 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
1600 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
1601 (AARCH64_DWARF_SVE_FFR): Likewise.
1602 (AARCH64_DWARF_SVE_P0): Likewise.
1603 (AARCH64_DWARF_SVE_Z0): Likewise.
1605 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1607 * common/common-regcache.h (raw_compare): New function.
1608 * regcache.c (regcache::raw_compare): Likewise.
1609 * regcache.h (regcache::raw_compare): New declaration.
1611 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1613 * common/common-regcache.h (reg_buffer_common): New structure.
1614 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
1615 (reg_buffer::raw_supply): Likewise.
1616 (reg_buffer::raw_supply_integer): Likewise.
1617 (reg_buffer::raw_supply_zeroed): Likewise.
1618 (reg_buffer::raw_collect): Likewise.
1619 (reg_buffer::raw_collect_integer): Likewise.
1620 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
1621 (reg_buffer::raw_supply): Likewise.
1622 (reg_buffer::raw_supply_integer): Likewise.
1623 (reg_buffer::raw_supply_zeroed): Likewise.
1624 (reg_buffer::raw_collect): Likewise.
1625 (reg_buffer::raw_collect_integer): Likewise.
1627 2018-06-10 Tom Tromey <tom@tromey.com>
1629 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
1630 (class remote_state) <stop_reply_queue>: Now std::vector.
1631 (remote_state::~remote_state)
1632 (remote_target::stop_reply_queue_length): Update.
1633 (struct queue_iter_param, remove_child_of_pending_fork)
1634 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
1635 (check_pending_event_prevents_wildcard_vcont_callback)
1636 (remove_stop_reply_for_inferior)
1637 (remove_stop_reply_of_remote_state)
1638 (remote_notif_remove_once_on_match)
1639 (stop_reply_match_ptid_and_ws)
1640 (remote_kill_child_of_pending_fork): Remove.
1641 (remote_target::remove_new_fork_children)
1642 (remote_target::check_pending_events_prevent_wildcard_vcont)
1643 (remote_target::discard_pending_stop_replies)
1644 (remote_target::discard_pending_stop_replies_in_queue)
1645 (remote_target::remote_notif_remove_queued_reply)
1646 (remote_target::queued_stop_reply)
1647 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
1648 (remote_target::wait, remote_target::kill_new_fork_children)
1649 (remote_target::async): Update.
1651 2018-06-10 Tom Tromey <tom@tromey.com>
1653 * record-full.c (record_full_arch_list_cleanups): Remove.
1654 (record_full_message): Use try/catch.
1655 (record_full_wait_cleanups): Remove.
1656 (record_full_wait_1): Use try/catch.
1657 (record_full_restore): Likewise.
1659 2018-06-10 Tom Tromey <tom@tromey.com>
1661 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
1662 declare VEC. Add constructor.
1663 <in_target_beneath>: Now bool.
1664 (record_full_breakpoints): Now a std::vector, static.
1665 (record_full_sync_record_breakpoints)
1666 (record_full_init_record_breakpoints)
1667 (record_full_target::insert_breakpoint)
1668 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
1670 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
1672 * dwarf2read.c (process_cu_includes): Remove struct keyword.
1673 * serial.c (serial_interface_lookup): Remove struct keyword.
1675 2018-06-10 Tom Tromey <tom@tromey.com>
1677 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
1679 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
1681 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
1683 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
1684 "beneath" as a method.
1685 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
1686 Use "beneath" as a method.
1688 2018-06-10 Tom Tromey <tom@tromey.com>
1690 * tracefile.c (struct trace_file_writer_deleter): New.
1691 <operator()>: Rename from trace_file_writer_xfree.
1692 (trace_file_writer_up): New typedef.
1693 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
1695 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
1697 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
1698 <m_registers, m_register_status>: Change type to
1700 * regcache.c (reg_buffer::reg_buffer): Use new instead of
1703 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
1705 * common/common-regcache.h (enum register_status): Add
1706 underlying type "signed char".
1707 * regcache.h (reg_buffer) <m_register_status>: Change type to
1709 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
1710 register_status instead of signed char.
1711 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
1712 (reg_buffer::get_register_status): Remove cast.
1713 (readable_regcache::raw_read): Remove cast.
1714 (readable_regcache::cooked_read): Remove cast.
1716 2018-06-09 Tom Tromey <tom@tromey.com>
1718 * source.c (reverse_search_command, forward_search_command): Use
1721 2018-06-09 Tom Tromey <tom@tromey.com>
1723 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
1724 (serial_ops_list): Now static, std::vector.
1725 (serial_interface_lookup, serial_add_interface): Update.
1727 2018-06-09 Tom Tromey <tom@tromey.com>
1729 * dwarf2read.c (process_cu_includes): Update.
1730 (process_full_comp_unit): Update.
1731 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
1734 2018-06-08 Paul Koning <paul_koning@dell.com>
1738 * python/python.c (do_start_initialization):
1739 Avoid call to internal Python API.
1740 (init__gdb_module): New function.
1742 2018-06-08 Gary Benson <gbenson@redhat.com>
1744 * linux-thread-db.c (valprint.h): New include.
1745 (struct check_thread_db_info): New structure.
1746 (check_thread_db_on_load, tdb_testinfo): New static globals.
1747 (check_thread_db, check_thread_db_callback): New functions.
1748 (try_thread_db_load_1): Run integrity checks if requested.
1749 (maintenance_check_libthread_db): New function.
1750 (_initialize_thread_db): Register "maint check libthread-db"
1751 and "maint set/show check-libthread-db".
1752 * NEWS: Mention the above new commands.
1754 2018-06-08 Tom Tromey <tom@tromey.com>
1756 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
1759 2018-06-08 Tom Tromey <tom@tromey.com>
1761 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
1763 2018-06-08 Tom Tromey <tom@tromey.com>
1765 * common/btrace-common.h (struct btrace_data): Add constructor,
1766 destructor, move assignment operator.
1767 <empty, clear, fini>: New methods.
1768 <format>: Initialize.
1769 (btrace_data_init, btrace_data_fini, btrace_data_clear)
1770 (btrace_data_empty): Don't declare.
1771 * common/btrace-common.c (btrace_data_init): Remove.
1772 (btrace_data::fini): Rename from btrace_data_fini.
1773 (btrace_data::empty): Rename from btrace_data_empty.
1774 (btrace_data::clear): Rename from btrace_data_clear. Return
1776 * btrace.h (make_cleanup_btrace_data): Don't declare.
1777 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
1778 (parse_xml_btrace): Update.
1779 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
1780 (maint_btrace_clear_packet_history_cmd): Update.
1782 2018-06-07 Pedro Alves <palves@redhat.com>
1784 * target.h (target_ops) <beneath>: Now a method. All references
1786 (class target_stack): New.
1787 * target.c (g_target_stack): New.
1788 (g_current_top_target): Delete.
1789 (current_top_target): Get the top target out of g_target_stack.
1790 (target_stack::push, target_stack::unpush): New.
1791 (push_target, unpush_target): Reimplement.
1792 (target_is_pushed): Reimplement in terms of g_target_stack.
1793 (target_ops::beneath, target_stack::find_beneath): New.
1795 2018-06-07 Pedro Alves <palves@redhat.com>
1797 * target.h (find_target_beneath): Delete declaration.
1798 * target.c (find_target_beneath): Delete definition.
1799 * aix-thread.c: All callers of find_target_beneath adjusted to
1800 call target_ops::beneath instead.
1801 * bsd-uthread.c: Likewise.
1802 * linux-thread-db.c: Likewise.
1803 * ravenscar-thread.c: Likewise.
1804 * sol-thread.c: Likewise.
1805 * spu-multiarch.c: Likewise.
1807 2018-06-07 Pedro Alves <palves@redhat.com>
1809 * target.h (target_ops) <beneath>: Now a method. All references
1811 (target_ops) <m_beneath>: New.
1812 * target.c (target_ops::beneath): New.
1813 * corelow.c: Adjust all references to target_ops::beneath.
1814 * linux-thread-db.c: Likewise.
1815 * make-target-delegates: Likewise.
1816 * record-btrace.c: Likewise.
1817 * record-full.c: Likewise.
1818 * remote.c: Likewise.
1819 * target.c: Likewise.
1820 * target-delegates.c: Regenerate.
1822 2018-06-07 Pedro Alves <palves@redhat.com>
1824 * target.h (target_stack): Delete.
1825 (current_top_target): Declare function.
1826 * target.c (target_stack): Delete.
1827 (g_current_top_target): New.
1828 (current_top_target): New function.
1829 * auxv.c: Use current_top_target instead of target_stack
1831 * avr-tdep.c: Likewise.
1832 * breakpoint.c: Likewise.
1833 * corefile.c: Likewise.
1834 * elfread.c: Likewise.
1836 * exceptions.c: Likewise.
1837 * frame.c: Likewise.
1838 * gdbarch-selftests.c: Likewise.
1839 * gnu-v3-abi.c: Likewise.
1840 * ia64-tdep.c: Likewise.
1841 * ia64-vms-tdep.c: Likewise.
1842 * infcall.c: Likewise.
1843 * infcmd.c: Likewise.
1844 * infrun.c: Likewise.
1845 * linespec.c: Likewise.
1846 * linux-tdep.c: Likewise.
1847 * minsyms.c: Likewise.
1848 * ppc-linux-nat.c: Likewise.
1849 * ppc-linux-tdep.c: Likewise.
1850 * procfs.c: Likewise.
1851 * regcache.c: Likewise.
1852 * remote.c: Likewise.
1853 * rs6000-tdep.c: Likewise.
1854 * s390-linux-nat.c: Likewise.
1855 * s390-tdep.c: Likewise.
1856 * solib-aix.c: Likewise.
1857 * solib-darwin.c: Likewise.
1858 * solib-dsbt.c: Likewise.
1859 * solib-spu.c: Likewise.
1860 * solib-svr4.c: Likewise.
1861 * solib-target.c: Likewise.
1862 * sparc-tdep.c: Likewise.
1863 * sparc64-tdep.c: Likewise.
1864 * spu-tdep.c: Likewise.
1865 * symfile.c: Likewise.
1866 * symtab.c: Likewise.
1867 * target-descriptions.c: Likewise.
1868 * target-memory.c: Likewise.
1869 * target.c: Likewise.
1870 * target.h: Likewise.
1871 * tracefile-tfile.c: Likewise.
1872 * tracepoint.c: Likewise.
1873 * valops.c: Likewise.
1874 * valprint.c: Likewise.
1875 * value.c: Likewise.
1876 * windows-tdep.c: Likewise.
1877 * mi/mi-main.c: Likewise.
1879 2018-06-07 Tom Tromey <tom@tromey.com>
1881 * valprint.h (build_address_symbolic): Declare.
1882 * printcmd.c (print_address_symbolic): Update.
1883 (build_address_symbolic): Change "name" and "filename" to
1885 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
1887 * defs.h (build_address_symbolic): Remove declaration.
1889 2018-06-07 Alan Hayward <alan.hayward@arm.com>
1891 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
1892 (aarch64_vnv_type): Add function.
1893 (aarch64_pseudo_register_name): Add V regs for SVE.
1894 (aarch64_pseudo_register_type): Likewise.
1895 (aarch64_pseudo_register_reggroup_p): Likewise.
1896 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
1897 (aarch64_pseudo_read_value): Add V regs for SVE.
1898 (aarch64_pseudo_write_2): Use V0 offset for SVE
1899 (aarch64_pseudo_write): Add V regs for SVE.
1900 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
1902 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
1904 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
1905 (sve_vl_from_vq): Likewise.
1907 2018-06-05 Tom Tromey <tom@tromey.com>
1909 * cli/cli-cmds.c (show_version): Update.
1910 * top.c (print_gdb_version): Add "interactive" parameter.
1912 * main.c (captured_main_1): Update.
1913 * top.h (print_gdb_version): Add "interactive" parameter and a
1916 2018-06-05 David Malcolm <dmalcolm@redhat.com>
1918 * common/enum-flags.h: Add trailing semicolon to example in
1921 2018-06-05 Tom Tromey <tom@tromey.com>
1924 * NEWS: Add entry about pager.
1925 * utils.c (pagination_disabled_for_command): New global.
1926 (prompt_for_continue): Allow "c" response to prompt.
1927 (reinitialize_more_filter): Clear
1928 pagination_disabled_for_command.
1929 (fputs_maybe_filtered): Check pagination_disabled_for_command.
1931 2018-06-04 Tom Tromey <tom@tromey.com>
1933 * ada-lang.h (ada_lookup_symbol_list): Update.
1934 * ada-lang.c (resolve_subexp): Update.
1935 (symbols_are_identical_enums): Change type of syms. Remove nsyms
1937 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
1938 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
1939 results parameter to std::vector.
1940 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
1942 * ada-exp.y (block_lookup): Update.
1943 (select_possible_type_sym): Change type of syms. Remove nsyms
1945 (write_var_or_type, write_name_assoc): Update.
1947 2018-06-04 Joel Brobecker <brobecker@adacore.com>
1949 * windows-nat.c (windows_nat_target::xfer_partial): Return
1950 TARGET_XFER_E_IO if we need to delegate to the target beneath
1951 but BENEATH is NULL.
1953 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
1955 * Makefile.in (config.status): Add configure.nat as a
1958 2018-06-04 Tom Tromey <tom@tromey.com>
1960 * cp-name-parser.y (cpname_state): Add method declarations.
1961 (HANDLE_QUAL): Update.
1962 (cpname_state::d_grab, cpname_state::fill_comp)
1963 (cpname_state::make_operator, cpname_state::make_dtor)
1964 (cpname_state::make_builtin_type, cpname_state::make_name)
1965 (cpname_state::d_qualify, cpname_state::d_int_type)
1966 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
1967 (%union): Move earlier.
1969 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1971 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
1973 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1975 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
1976 (aarch64_pseudo_write_1): Likewise.
1977 (aarch64_pseudo_read_value): Use helper.
1978 (aarch64_pseudo_write): Likewise.
1980 2018-06-04 Pedro Alves <palves@redhat.com>
1982 * darwin-nat.c (darwin_ops): Delete.
1983 (darwin_attach_pid): Use get_native_target.
1985 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1987 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
1988 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
1990 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1992 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
1993 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
1994 (aarch64_gdbarch_init): Check for SVE.
1995 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
1997 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1999 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
2000 * aarch64-tdep.h (aarch64_read_description): Likewise.
2001 * arch/aarch64.c (aarch64_create_target_description): Likewise.
2002 * arch/aarch64.h (aarch64_create_target_description): Likewise.
2003 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
2004 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
2005 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
2007 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
2009 * value.c (value_fetch_lazy_bitfield): New.
2010 (value_fetch_lazy_memory): New.
2011 (value_fetch_lazy_register): New.
2012 (value_fetch_lazy): Factor out to smaller functions.
2014 2018-06-01 Tom Tromey <tom@tromey.com>
2016 * cp-name-parser.y (backslashable, represented): Now const.
2018 2018-06-01 Tom Tromey <tom@tromey.com>
2020 * cp-name-parser.y: Include parser-defs.h.
2021 (parser_fprintf): Remove declaration.
2023 2018-06-01 Tom Tromey <tom@tromey.com>
2025 * cp-name-parser.y: Use %pure-parser, %lex-param, and
2027 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
2028 (global_result): Remove globals.
2029 (struct cpname_state): New.
2030 (yyparse): Don't declare.
2031 (yylex, yyerror): Move declarations after %union.
2032 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
2033 (make_name): Add state parameter.
2035 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
2037 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
2039 (yylex): Add lvalp, state parameters.
2040 (yyerror): Add state parameter.
2041 (cp_demangled_name_to_comp): Update.
2043 2018-06-01 Tom Tromey <tom@tromey.com>
2045 * cp-name-parser.y (parser_fprintf): Declare.
2046 (GDB_YY_REMAP_PREFIX): Define.
2047 Include yy-remap.h. Don't redefine yy* identifiers.
2049 2018-06-01 Tom Tromey <tom@tromey.com>
2051 * python/py-type.c (typy_legacy_template_argument): Update.
2052 * cp-support.h (cp_demangled_name_to_comp): Update.
2053 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
2054 parameter to be a "std::string *".
2057 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
2059 * ada-lex.l: Include "diagnostics.h" instead of
2060 "common/diagnostics.h".
2061 * unittests/environ-selftests.c: Likewise.
2062 * common/diagnostics.h: Moved to ../include.
2064 2018-06-01 Joel Brobecker <brobecker@adacore.com>
2066 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
2067 to language_mode_manual while calling breakpoint_re_set_one.
2069 2018-06-01 Tom Tromey <tom@tromey.com>
2071 * valops.c (value_cast_structs, destructor_name_p): Update.
2072 * symtab.c (gdb_mangle_name): Update.
2073 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
2075 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
2076 (pascal_object_print_value_fields, pascal_object_print_value):
2078 * p-typeprint.c (pascal_type_print_derivation_info): Update.
2079 * linespec.c (find_methods): Update.
2080 * gdbtypes.h (type_name_no_tag): Remove.
2081 (type_name_or_error): Rename from type_name_no_tag_or_error.
2082 * gdbtypes.c (type_name_no_tag): Remove.
2083 (type_name_or_error): Rename from type_name_no_tag_or_error.
2084 (lookup_struct_elt_type, check_typedef): Update.
2085 * expprint.c (print_subexp_standard): Update.
2086 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
2087 * d-namespace.c (d_lookup_nested_symbol): Update.
2088 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
2089 (cp_print_class_member): Update.
2090 * cp-namespace.c (cp_lookup_nested_symbol): Update.
2091 * completer.c (add_struct_fields): Update.
2092 * c-typeprint.c (cp_type_print_derivation_info)
2093 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
2095 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
2096 (ada_prefer_type, ada_is_exception_sym): Update.
2098 2018-06-01 Tom Tromey <tom@tromey.com>
2100 * valops.c (enum_constant_from_type, value_namespace_elt)
2101 (value_maybe_namespace_elt): Update.
2102 * valarith.c (find_size_for_pointer_math): Update.
2103 * target-descriptions.c (make_gdb_type): Update.
2104 * symmisc.c (print_symbol): Update.
2105 * stabsread.c (define_symbol, read_type)
2106 (complain_about_struct_wipeout, add_undefined_type)
2107 (cleanup_undefined_types_1): Update.
2108 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
2109 (rust_range_type_p, val_print_struct, rust_print_struct_def)
2110 (rust_internal_print_type, rust_composite_type)
2111 (rust_evaluate_funcall, rust_evaluate_subexp)
2112 (rust_inclusive_range_type_p): Update.
2113 * python/py-type.c (typy_get_tag): Update.
2114 * p-typeprint.c (pascal_type_print_base): Update.
2115 * mdebugread.c (parse_symbol, parse_type): Update.
2116 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
2118 * guile/scm-type.c (gdbscm_type_tag): Update.
2119 * go-lang.c (sixg_string_p): Update.
2120 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
2122 * gdbtypes.h (struct main_type) <tag_name>: Remove.
2123 (TYPE_TAG_NAME): Remove.
2124 * gdbtypes.c (type_name_no_tag): Simplify.
2125 (check_typedef, check_types_equal, recursive_dump_type)
2126 (copy_type_recursive, arch_composite_type): Update.
2127 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
2128 in summary mode when needed.
2129 * eval.c (evaluate_funcall): Update.
2130 * dwarf2read.c (fixup_go_packaging, read_structure_type)
2131 (process_structure_scope, read_enumeration_type)
2132 (read_namespace_type, read_module_type, determine_prefix): Update.
2133 * cp-support.c (inspect_type): Update.
2134 * coffread.c (process_coff_symbol, decode_base_type): Update.
2135 * c-varobj.c (c_is_path_expr_parent): Update.
2136 * c-typeprint.c (c_type_print_base_struct_union): Update.
2137 (c_type_print_base_1): Update. Print struct/class/union/enum in
2138 summary when using C language.
2139 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
2140 (gen_maybe_namespace_elt): Update.
2141 * ada-lang.c (ada_type_name): Simplify.
2142 (empty_record, ada_template_to_fixed_record_type_1)
2143 (template_to_static_fixed_type)
2144 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
2146 2018-06-01 Tom Tromey <tom@tromey.com>
2148 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
2150 * c-typeprint.c (c_print_type_1): Add "language" parameter.
2151 (c_print_type): Update.
2152 (c_print_type): New overload.
2153 (c_type_print_varspec_prefix, c_type_print_args)
2154 (c_type_print_varspec_suffix, c_print_type_no_offsets)
2155 (c_type_print_base_struct_union, c_type_print_base_1)
2156 (cp_type_print_method_args): Add "language" parameter.
2157 (c_type_print_base): Update.
2158 * c-lang.h (c_print_type): Add new overload.
2160 2018-06-01 Tom Tromey <tom@tromey.com>
2162 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
2163 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
2165 2018-06-01 Alan Hayward <alan.hayward@arm.com>
2167 * aarch64-tdep.c (aarch64_sve_register_names): New const
2169 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
2170 (AARCH64_SVE_Z_REGS_NUM): New define.
2171 (AARCH64_SVE_P_REGS_NUM): Likewise.
2172 (AARCH64_SVE_NUM_REGS): Likewise.
2174 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
2176 * nat/linux-ptrace.h [__alpha__]
2177 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
2180 2018-05-31 Maciej W. Rozycki <macro@mips.com>
2182 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
2183 the endianness selected.
2184 * NEWS: Document `set endian auto' mode operation update.
2186 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2188 * Makefile.in: Add new header.
2189 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
2190 (sve_vl_from_vg): Likewise.
2191 (sve_vq_from_vl): Likewise.
2192 (sve_vl_from_vq): Likewise.
2193 (sve_vq_from_vg): Likewise.
2194 (sve_vg_from_vq): Likewise.
2195 * configure.nat: Add new c file.
2196 * nat/aarch64-sve-linux-ptrace.c: New file.
2197 * nat/aarch64-sve-linux-ptrace.h: New file.
2199 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2201 * aarch64-linux-nat.c (aarch64_linux_read_description):
2203 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
2205 * aarch64-tdep.c (tdesc_aarch64_list): Add.
2206 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
2207 (aarch64_gdbarch_init): Add parmeter zero.
2208 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
2209 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
2210 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
2212 * doc/gdb.texinfo: Describe SVE feature
2213 * features/aarch64-sve.c: New file.
2215 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
2218 * gdbarch.sh (significant_addr_bit): Default to zero when
2219 not set by target architecture.
2220 * gdbarch.c: Re-generated.
2221 * utils.c (address_significant): Update.
2223 2018-05-30 Joel Brobecker <brobecker@adacore.com>
2225 * stack.c (func_command): Remove trailing newline in call to error.
2227 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2229 * regcache.h (regcache_raw_collect): Remove, update callers to
2230 use regcache::raw_collect.
2231 * regcache.c (regcache_raw_collect): Remove.
2233 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2235 * regcache.h (regcache_raw_supply): Remove, update callers to
2236 use detached_regcache::raw_supply.
2237 * regcache.c (regcache_raw_supply): Remove.
2239 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2241 * regcache.h (regcache_cooked_write_part): Remove, update
2242 callers to use regcache::cooked_write_part.
2243 * regcache.c (regcache_cooked_write_part): Remove.
2245 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2247 * regcache.h (regcache_cooked_read_part): Remove, update callers
2248 to use readable_regcache::cooked_read_part.
2249 * regcache.c (regcache_cooked_read_part): Remove.
2251 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2253 * regcache.h (regcache_cooked_read_value): Remove, update
2254 callers to use readable_regcache::cooked_read_value.
2255 * regcache.c (regcache_cooked_read_value): Remove.
2257 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2259 * regcache.h (regcache_cooked_write): Remove, update callers to
2260 use regcache::cooked_write.
2261 * regcache.c (regcache_cooked_write): Remove.
2263 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2265 * regcache.h (regcache_invalidate): Remove, update callers to
2266 use detached_regcache::invalidate instead.
2267 * regcache.c (regcache_invalidate): Remove.
2269 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2271 * regcache.h (regcache_raw_write_part): Remove, update callers
2272 to use regcache::raw_write_part instead.
2273 * regcache.c (regcache_raw_write_part): Remove.
2275 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2277 * regcache.h (regcache_raw_read_part): Remove, update callers to
2278 use readable_regcache::raw_read_part instead.
2279 * regcache.c (regcache_raw_read_part): Remove.
2281 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2283 * regcache.h (regcache_cooked_read): Remove, update callers to
2284 use readable_regcache::cooked_read instead.
2285 * regcache.c (regcache_cooked_read): Remove.
2287 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2289 * regcache.h (regcache_raw_write): Remove, update callers to use
2290 regcache::raw_write instead.
2291 * regcache.c (regcache_raw_write): Remove.
2293 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2295 * regcache.h (regcache_raw_read): Remove, update callers to use
2296 readable_regcache::raw_read instead.
2297 * regcache.c (regcache_raw_read): Remove.
2299 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2301 * regcache.h (regcache_raw_update): Remove, update callers to
2302 use readable_regcache::raw_update instead.
2303 * regcache.c (regcache_raw_update): Remove.
2305 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2307 * regcache.h (regcache_register_status): Remove, update callers
2308 to use reg_buffer::get_register_status directly instead.
2309 * regcache.c (regcache_register_status): Remove.
2311 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2313 * regcache.h (regcache_get_ptid): Remove, update all callers to
2314 call regcache::ptid instead.
2315 * regcache.c (regcache_get_ptid): Remove.
2317 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2319 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
2321 2018-05-30 Pedro Alves <palves@redhat.com>
2323 * common/common-exceptions.h (exception_rethrow): Use
2326 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
2328 * breakpoint.c (print_solib_event, check_status_catch_solib):
2329 Remove struct keyword in range-based for loops.
2330 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
2331 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
2333 * linespec.c (find_superclass_methods, search_minsyms_for_name):
2335 * symfile.c (addr_info_make_relative): Likewise.
2336 * thread.c (value_in_thread_stack_temporaries): Likewise.
2338 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
2341 * valops.c (value_struct_elt_for_reference): Call check_typedef on
2342 aggregate type to get its real type before accessing it.
2344 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
2346 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
2347 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
2348 * coff-pe-read.c (add_pe_forwarded_sym): Replace
2349 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
2350 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
2351 * jit.c (jit_breakpoint_re_set_internal): Likewise.
2352 * printcmd.c (info_address_command): Likewise.
2354 2018-05-29 Tom Tromey <tom@tromey.com>
2356 * windows-nat.c (handle_exception): Update fall-through comment.
2358 2018-05-29 Tom Tromey <tom@tromey.com>
2360 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
2361 (struct program_space) <added_solibs>: Now a std::vector.
2362 * breakpoint.c (print_solib_event): Update.
2363 (check_status_catch_solib): Update.
2364 * progspace.c (clear_program_space_solib_cache): Update.
2365 * solib.c (update_solib_list): Update.
2367 2018-05-29 Tom Tromey <tom@tromey.com>
2369 * python/py-type.c (typy_richcompare): Update.
2370 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
2371 * gdbtypes.h (types_deeply_equal): Return bool.
2372 (types_equal): Likewise.
2373 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
2375 (check_types_equal): Change worklist to std::vector. Return
2377 (struct type_equality_entry): Add constructor.
2378 (compare_maybe_null_strings): Return bool.
2379 (check_types_worklist): Return bool. Change worklist to
2381 (types_deeply_equal): Use std::vector.
2382 (types_equal): Return bool.
2383 (compare_maybe_null_strings): Simplify.
2385 2018-05-29 Tom Tromey <tom@tromey.com>
2387 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
2389 2018-05-29 Tom Tromey <tom@tromey.com>
2391 * objc-lang.h: Don't include cp-support.h.
2392 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
2395 2018-05-27 Tom Tromey <tom@tromey.com>
2397 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
2399 2018-05-25 Tom Tromey <tom@tromey.com>
2401 * value.c (value::location): Initialize.
2403 2018-05-25 Tom Tromey <tom@tromey.com>
2405 * dbxread.c (init_bincl_list): Remove.
2406 (bincl_list): Now a std::vector.
2407 (bincls_allocated, next_bincl): Remove.
2408 (free_bincl_list, do_free_bincl_list_cleanup)
2409 (make_cleanup_free_bincl_list): Remove.
2410 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
2412 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
2413 (struct header_file_location): Add constructor.
2414 (add_bincl_to_list): Remove.
2416 2018-05-25 Tom Tromey <tom@tromey.com>
2418 * tui/tui.c (tui_enable): Update.
2419 * mi/mi-interp.c (mi_interp::init): Update.
2420 * interps.h (class interp) <name>: New method.
2421 <m_name>: Rename from name.
2422 (~scoped_restore_interp): Update.
2423 * interps.c (interp::interp): Update.
2424 (interp_add, interp_set, interp_lookup_existing)
2425 (current_interp_named_p): Update.
2427 2018-05-25 Tom Tromey <tom@tromey.com>
2429 * interps.c (interp_name): Remove.
2430 * mi/mi-interp.c (mi_interp::init): Update.
2431 * interps.h (interp_name): Remove.
2432 (~scoped_restore_interp): Update.
2433 * tui/tui.c (tui_enable): Update.
2435 2018-05-25 Tom Tromey <tom@tromey.com>
2437 * utils.c (fputs_maybe_filtered): Update.
2438 * linespec.c (decode_line_full): Update.
2439 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
2440 (mi_print_breakpoint_for_event, mi_solib_loaded)
2441 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
2442 (mi_user_selected_context_changed): Update.
2443 * mi/mi-main.c (mi_execute_command): Update.
2444 * cli/cli-script.c (execute_control_command): Update.
2445 * python/python.c (execute_gdb_command): Update.
2446 * solib.c (info_sharedlibrary_command): Update.
2447 * interps.c (interp_ui_out): Remove.
2448 * interps.h (interp_ui_out): Remove.
2450 2018-05-25 Tom Tromey <tom@tromey.com>
2452 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
2453 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
2454 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
2456 2018-05-25 Tom Tromey <tom@tromey.com>
2458 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
2459 * interps.c (interp_exec): Use scoped_restore.
2461 2018-05-25 Tom Tromey <tom@tromey.com>
2463 * remote.c (remote_target::remote_file_get): Use
2465 (remote_target::remote_file_put): Likewise.
2467 2018-05-25 Tom Tromey <tom@tromey.com>
2469 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
2471 (get_pe_section_index, add_pe_exported_sym): Update.
2472 (read_pe_exported_syms): Use gdb::def_vector.
2474 2018-05-25 Tom Tromey <tom@tromey.com>
2476 * frame.c (remove_prev_frame): Remove.
2477 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
2479 2018-05-25 Maciej W. Rozycki <macro@mips.com>
2481 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
2483 * mips-linux-nat.c (supply_fpregset): Always call
2484 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
2485 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
2486 `mips_fill_fpregset'.
2487 * mips-linux-tdep.c (mips_supply_fpregset)
2488 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
2489 (mips_fill_fpregset_wrapper): Remove functions.
2490 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
2491 (mips_linux_fpregset): Remove variable.
2492 (mips_linux_iterate_over_regset_sections): Use
2493 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
2494 (mips_linux_o32_sigframe_init): Remove comment.
2496 2018-05-25 Pedro Alves <palves@redhat.com>
2498 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
2499 (struct readahead_cache, struct packet_reg, struct
2500 remote_arch_state, class remote_state): Move higher up in the
2502 (remote_target::m_remote_state): Now an object instead of a pointer.
2503 (remote_target::get_remote_state): Adjust.
2505 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
2507 * stack.c (select_and_print_frame): Delete.
2508 (struct function_bounds): Move struct within function.
2509 (func_command): Most content moved into new function
2510 find_frame_for_function, use new function, print result, add
2512 (find_frame_for_function): New function, now returns a result.
2514 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2516 * stack.c (iterate_over_block_arg_vars): Fix comment.
2517 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
2519 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
2523 (scoped_restore_selected_frame::scoped_restore_selected_frame):
2525 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
2527 * frame.h (class scoped_restore_selected_frame): New class.
2528 * stack.c (print_frame_local_vars): Remove catching and rethrowing
2529 of any exception, use scoped_restore_selected_frame to restore the
2532 2018-05-24 Pedro Alves <palves@redhat.com>
2534 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
2537 2018-05-23 Tom Tromey <tom@tromey.com>
2539 * complaints.c (struct complaints): Remove.
2540 (symfile_complaint_book): Remove.
2541 (series): New global.
2542 (complaint_internal): Update.
2543 (clear_complaints): Update.
2545 2018-05-23 Tom Tromey <tom@tromey.com>
2547 * complaints.c (counters): New global.
2548 (struct complain): Remove.
2549 (struct complaints) <root>: Remove.
2550 (complaint_sentinel): Remove.
2551 (symfile_complaint_book): Update.
2552 (find_complaint) Remove.
2553 (complaint_internal, clear_complaints): Update.
2555 2018-05-23 Tom Tromey <tom@tromey.com>
2557 * complaints.c (struct complain) <file, line>: Remove.
2558 (find_complaint): Remove file, line parameters.
2559 (complaint_internal): Update.
2561 2018-05-23 Tom Tromey <tom@tromey.com>
2563 * complaints.c (vcomplaint): Remove.
2564 (complaint_internal) Merge in contents of vcomplaint.
2566 2018-05-23 Tom Tromey <tom@tromey.com>
2568 * complaints.c (struct complaints) <explanation>: Remove.
2569 (symfile_explanations): Remove.
2570 (symfile_complaint_book): Update.
2571 (vcomplaint): Update.
2572 (struct explanation): Remove.
2574 2018-05-23 Tom Tromey <tom@tromey.com>
2576 * complaints.c (symfile_complaints): Remove.
2577 (complaint_internal): Remove "complaints" parameter.
2578 (clear_complaints, vcomplaint): Remove "c" parameter.
2579 (get_complaints): Remove.
2580 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
2581 (dwarf2_debug_line_missing_file_complaint)
2582 (dwarf2_debug_line_missing_end_sequence_complaint)
2583 (dwarf2_complex_location_expr_complaint)
2584 (dwarf2_const_value_length_mismatch_complaint)
2585 (dwarf2_section_buffer_overflow_complaint)
2586 (dwarf2_macro_malformed_definition_complaint)
2587 (dwarf2_invalid_attrib_class_complaint)
2588 (create_addrmap_from_index, dw2_symtab_iter_next)
2589 (dw2_expand_marked_cus)
2590 (dw2_debug_names_iterator::find_vec_in_debug_names)
2591 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
2592 (create_debug_type_hash_table, init_cutu_and_read_dies)
2593 (partial_die_parent_scope, add_partial_enumeration)
2594 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
2595 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
2596 (read_import_statement, read_file_scope, create_dwo_cu_reader)
2597 (create_cus_hash_table, create_dwp_hash_table)
2598 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
2599 (dwarf2_rnglists_process, dwarf2_ranges_process)
2600 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
2601 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
2602 (handle_struct_member_die, process_structure_scope)
2603 (read_array_type, read_common_block, read_module_type)
2604 (read_tag_pointer_type, read_typedef, read_base_type)
2605 (read_subrange_type, load_partial_dies, partial_die_info::read)
2606 (partial_die_info::read, partial_die_info::read)
2607 (partial_die_info::read, read_checked_initial_length_and_offset)
2608 (dwarf2_string_attr, read_formatted_entries)
2609 (dwarf_decode_line_header)
2610 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2611 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
2612 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
2613 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
2614 (get_signatured_type, get_DW_AT_signature_type)
2615 (decode_locdesc, file_file_name, consume_improper_spaces)
2616 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
2617 (dwarf_decode_macro_bytes, dwarf_decode_macros)
2618 (dwarf2_symbol_mark_computed, set_die_type)
2619 (read_attribute_value): Update.
2620 * stap-probe.c (handle_stap_probe, get_stap_base_address):
2622 * dbxread.c (unknown_symtype_complaint)
2623 (lbrac_mismatch_complaint, repeated_header_complaint)
2624 (set_namestring, function_outside_compilation_unit_complaint)
2625 (read_dbx_symtab, process_one_symbol): Update.
2626 * gdbtypes.c (stub_noname_complaint): Update.
2627 * windows-nat.c (handle_unload_dll): Update.
2628 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
2629 (decode_base_type): Update.
2630 * xcoffread.c (bf_notfound_complaint, ef_complaint)
2631 (eb_complaint, record_include_begin, record_include_end)
2632 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
2633 (process_xcoff_symbol, read_symbol)
2634 (function_outside_compilation_unit_complaint)
2635 (scan_xcoff_symtab): Update.
2636 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
2637 * buildsym.c (finish_block_internal, make_blockvector)
2638 (end_symtab_get_static_block, augment_type_symtab): Update.
2639 * dtrace-probe.c (dtrace_process_dof)
2640 (dtrace_static_probe_ops::get_probes): Update.
2641 * complaints.h (struct complaint): Don't declare.
2642 (symfile_complaints): Remove.
2643 (complaint_internal): Remove "complaints" parameter.
2644 (complaint): Likewise.
2645 (clear_complaints): Likewise.
2646 * symfile.c (syms_from_objfile_1, finish_new_objfile)
2647 (reread_symbols): Update.
2648 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
2649 (dwarf2_frame_cache, decode_frame_entry): Update.
2650 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
2651 * objc-lang.c (lookup_objc_class, lookup_child_selector)
2652 (info_selectors_command): Update.
2653 * macrotab.c (macro_include, check_for_redefinition)
2654 (macro_undef): Update.
2655 * objfiles.c (filter_overlapping_sections): Update.
2656 * stabsread.c (invalid_cpp_abbrev_complaint)
2657 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
2658 (define_symbol, error_type, read_type, rs6000_builtin_type)
2659 (stabs_method_name_from_physname, read_member_functions)
2660 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
2661 (attach_fields_to_type, complain_about_struct_wipeout)
2662 (read_range_type, read_args, common_block_start)
2663 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
2665 * mdebugread.c (index_complaint, unknown_ext_complaint)
2666 (basic_type_complaint, bad_tag_guess_complaint)
2667 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
2668 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
2669 (parse_procedure, parse_lines)
2670 (function_outside_compilation_unit_complaint)
2671 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
2672 (bad_tag_guess_complaint, reg_value_complaint): Update.
2673 * cp-support.c (demangled_name_complaint): Update.
2674 * macroscope.c (sal_macro_scope): Update.
2675 * dwarf-index-write.c (class debug_names): Update.
2677 2018-05-23 Tom Tromey <tom@tromey.com>
2679 * complaints.c (clear_complaints): Remove "noisy" parameter.
2680 * complaints.h (clear_complaints): Update.
2681 * symfile.c (syms_from_objfile_1, finish_new_objfile)
2682 (reread_symbols): Update.
2684 2018-05-23 Tom Tromey <tom@tromey.com>
2686 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
2688 (vcomplaint, clear_complaints): Update.
2689 (symfile_explanations): Remove some messages.
2691 2018-05-23 Tom Tromey <tom@tromey.com>
2693 * complaints.c (internal_complaint): Remove.
2694 * complaints.h (internal_complaint): Remove.
2696 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2698 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
2700 2018-05-22 Pedro Alves <palves@redhat.com>
2702 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
2703 (remote_fileio_badfd, remote_fileio_return_errno)
2704 (remote_fileio_return_success, remote_fileio_func_open)
2705 (remote_fileio_func_open, remote_fileio_func_close)
2706 (remote_fileio_func_read, remote_fileio_func_write)
2707 (remote_fileio_func_lseek, remote_fileio_func_rename)
2708 (remote_fileio_func_unlink, remote_fileio_func_stat)
2709 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
2710 (remote_fileio_func_isatty, remote_fileio_func_system): Add
2711 remote_target parameter.
2712 (remote_fio_func_map) <func>: Add remote_target parameter.
2713 (do_remote_fileio_request, remote_fileio_request):
2714 * remote-fileio.h (remote_fileio_request):
2715 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
2716 remote_target parameter.
2717 (remote_notif_process, handle_notification): Adjust to pass down
2719 (remote_notif_state_allocate): Add remote_target parameter. Save
2721 * remote-notif.h (struct remote_target): Forward declare.
2722 (struct notif_client) <parse, ack, can_get_pending_events>: Add
2723 remote_target parameter.
2724 (struct remote_notif_state) <remote>: New field.
2725 (remote_notif_ack, remote_notif_parse): Add remote_target
2727 (remote_notif_state_allocate, remote_notif_state_allocate): Add
2728 remote_target parameter.
2729 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
2730 (threads_listing_context, rmt_thread_action, protocol_feature)
2731 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
2732 (packet_result, struct threads_listing_context, remote_state):
2733 Move definitions and declarations higher up.
2734 (remote_target) <~remote_target>: Declare.
2735 (remote_download_command_source, remote_file_put, remote_file_get)
2736 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
2737 (remote_hostio_pread_vFile, remote_hostio_send_command)
2738 (remote_hostio_set_filesystem, remote_hostio_open)
2739 (remote_hostio_close, remote_hostio_unlink, remote_state)
2740 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
2741 (get_memory_write_packet_size, get_memory_read_packet_size)
2742 (append_pending_thread_resumptions, remote_detach_1)
2743 (append_resumption, remote_resume_with_vcont)
2744 (add_current_inferior_and_thread, wait_ns, wait_as)
2745 (process_stop_reply, remote_notice_new_inferior)
2746 (process_initial_stop_replies, remote_add_thread)
2747 (btrace_sync_conf, remote_btrace_maybe_reopen)
2748 (remove_new_fork_children, kill_new_fork_children)
2749 (discard_pending_stop_replies, stop_reply_queue_length)
2750 (check_pending_events_prevent_wildcard_vcont)
2751 (discard_pending_stop_replies_in_queue, stop_reply)
2752 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
2753 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
2754 (remote_interrupt_as, remote_interrupt_ns)
2755 (remote_get_noisy_reply, remote_query_attached)
2756 (remote_add_inferior, remote_current_thread, get_current_thread)
2757 (set_thread, set_general_thread, set_continue_thread)
2758 (set_general_process, write_ptid)
2759 (remote_unpack_thread_info_response, remote_get_threadinfo)
2760 (parse_threadlist_response, remote_get_threadlist)
2761 (remote_threadlist_iterator, remote_get_threads_with_ql)
2762 (remote_get_threads_with_qxfer)
2763 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
2764 (get_offsets, remote_check_symbols, remote_supported_packet)
2765 (remote_query_supported, remote_packet_size)
2766 (remote_serial_quit_handler, remote_detach_pid)
2767 (remote_vcont_probe, remote_resume_with_hc)
2768 (send_interrupt_sequence, interrupt_query)
2769 (remote_notif_get_pending_events, fetch_register_using_p)
2770 (send_g_packet, process_g_packet, fetch_registers_using_g)
2771 (store_register_using_P, store_registers_using_G)
2772 (set_remote_traceframe, check_binary_download)
2773 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
2774 (remote_xfer_live_readonly_partial, remote_read_bytes)
2775 (remote_send_printf, remote_flash_write, readchar)
2776 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
2777 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
2778 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
2779 (extended_remote_disable_randomization, extended_remote_run)
2780 (send_environment_packet, extended_remote_environment_support)
2781 (extended_remote_set_inferior_cwd, remote_write_qxfer)
2782 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
2783 (packet_command): Now methods of ...
2784 (remote_target): ... this class.
2785 (m_remote_state) <remote_target>: New field.
2786 (struct remote_state) <stop_reply_queue,
2787 remote_async_inferior_event_token, wait_forever_enabled_p>: New
2789 (remote_state::remote_state): Allocate stop_reply_queue.
2790 (remote_state): Delete global.
2791 (get_remote_state_raw): Delete.
2792 (remote_target::get_remote_state): Allocate m_remote_state on
2794 (get_current_remote_target): New.
2795 (remote_ops, extended_remote_ops): Delete.
2796 (wait_forever_enabled_p, remote_async_inferior_event_token):
2797 Delete, moved to struct remote_state.
2798 (remote_target::close): Delete self. Destruction bits split to
2800 (remote_target::~remote_target): ... this.
2801 (show_memory_packet_size): Adjust to use
2802 get_current_remote_target.
2803 (struct protocol_feature) <func>: Add remote_target parameter.
2804 All callers adjusted.
2805 (curr_quit_handler_target): New.
2806 (remote_serial_quit_handler): Reimplement.
2807 (remote_target::open_1): Adjust to use get_current_remote_target.
2808 Heap-allocate remote_target/extended_remote_target instances.
2809 (vcont_builder::vcont_builder): Add remote_target parameter, and
2810 save it in m_remote. All callers adjusted.
2811 (vcont_builder::m_remote): New field.
2812 (vcont_builder::restart, vcont_builder::flush)
2813 (vcont_builder::push_action): Use it.
2814 (remote_target::commit_resume): Use it.
2815 (struct queue_iter_param) <remote>: New field.
2816 (remote_target::remove_new_fork_children): Fill in 'remote' field.
2817 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
2818 (check_pending_event_prevents_wildcard_vcont_callback)
2819 (remote_target::check_pending_events_prevent_wildcard_vcont)
2820 (remote_target::discard_pending_stop_replies)
2821 (remote_target::discard_pending_stop_replies_in_queue)
2822 (remote_target::remote_notif_remove_queued_reply): Fill in
2824 (remote_notif_get_pending_events): New.
2825 (remote_target::readchar, remote_target::remote_serial_write):
2826 Save/restore curr_quit_handler_target.
2828 (kill_new_fork_children): Fill in 'remote' field.
2829 (packet_command): Use get_current_remote_target, defer to
2830 remote_target method of same name.
2831 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
2832 parameter, and save it in m_remote. All callers adjusted.
2833 (scoped_remote_fd::release): Use m_remote.
2834 (scoped_remote_fd::m_remote): New field.
2835 (remote_file_put, remote_file_get, remote_file_delete): Use
2836 get_current_remote_target, defer to remote_target method of same
2838 (remote_btrace_reset): Add remote_state paremeter. Update all
2840 (remote_async_inferior_event_handler). Pass down 'data'.
2841 (remote_new_objfile): Use get_current_remote_target.
2842 (remote_target::vcont_r_supported): New.
2843 (set_range_stepping): Use get_current_remote_target and
2844 remote_target::vcont_r_supported.
2845 (_initialize_remote): Don't allocate 'remote_state' and
2846 'stop_reply_queue' globals.
2847 * remote.h (struct remote_target): Forward declare.
2848 (getpkt, putpkt, remote_notif_get_pending_events): Add
2849 'remote_target' parameter.
2851 2018-05-22 Pedro Alves <palves@redhat.com>
2853 * remote.c (vcont_builder): Now a class. Make all data members
2855 (vcont_builder) <vcont_builder, restart, flush, push_action>:
2857 (vcont_builder_restart): Rename to ...
2858 (vcont_builder::restart): ... this.
2859 (vcont_builder_flush): Rename to ...
2860 (vcont_builder::flush): ... this.
2861 (vcont_builder_push_action): Rename to ...
2862 (vcont_builder::push_action): ... this.
2863 (remote_target::commit_resume): Adjust.
2865 2018-05-22 Pedro Alves <palves@redhat.com>
2867 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
2868 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
2869 (get_fixed_memory_packet_size): New.
2870 (get_memory_packet_size): Use it.
2871 (set_memory_packet_size): Don't override the config size with
2872 DEFAULT_MAX_MEMORY_PACKET_SIZE.
2873 (show_memory_packet_size): Use get_fixed_memory_packet_size.
2874 Don't refer to get_memory_packet_size if not connected to a remote
2875 target. Show "(default)" if configured size is 0.
2877 2018-05-22 Pedro Alves <palves@redhat.com>
2879 * remote.c (remote_target::mourn_inferior): Move
2880 discard_pending_stop_replies call here from ...
2881 (_initialize_remote): ... here.
2883 2018-05-22 Pedro Alves <palves@redhat.com>
2885 * remote.c (compare_section_command): Remove set_general_process
2888 2018-05-22 Pedro Alves <palves@redhat.com>
2890 * remote.c (struct packet_reg, struct remote_arch_state):
2891 Move higher up in the file.
2892 (remote_state) <m_arch_states>: Store remote_arch_state values
2893 instead of remote_arch_state pointers.
2894 (remote_state::get_remote_arch_state): Adjust.
2896 2018-05-22 Pedro Alves <palves@redhat.com>
2898 * remote.c: Include <unordered_map>.
2899 (remote_state): Now a class.
2900 (remote_state) <get_remote_arch_state>: Declare method.
2901 <get_remote_arch_state>: New field.
2902 (remote_arch_state) <remote_arch_state>: Declare ctor.
2903 <regs>: Now a unique_ptr.
2904 (remote_gdbarch_data_handle): Delete.
2905 (get_remote_arch_state): Delete.
2906 (remote_state::get_remote_arch_state): New.
2907 (get_remote_state): Adjust to call remote_state's
2908 get_remote_arch_state method.
2909 (init_remote_state): Delete, bits factored out to ...
2910 (remote_arch_state::remote_arch_state): ... this new method.
2911 (get_remote_packet_size, get_memory_packet_size)
2912 (process_g_packet, remote_target::fetch_registers)
2913 (remote_target::prepare_to_store, store_registers_using_G)
2914 (remote_target::store_registers, remote_target::get_trace_status):
2915 Adjust to call remote_state's method.
2916 (_initialize_remote): Remove reference to
2917 remote_gdbarch_data_handle.
2919 2018-05-22 Pedro Alves <palves@redhat.com>
2921 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
2922 pread>: New method declarations.
2923 (remote_target::open_1): Adjust.
2924 (readahead_cache_invalidate): Rename to ...
2925 (readahead_cache::invalidate): ... this, and adjust to be a class
2927 (readahead_cache_invalidate_fd): Rename to ...
2928 (readahead_cache::invalidate_fd): ... this, and adjust to be a
2930 (remote_hostio_pwrite): Adjust.
2931 (remote_hostio_pread_from_cache): Rename to ...
2932 (readahead_cache::pread): ... this, and adjust to be a class
2934 (remote_hostio_close): Adjust.
2936 2018-05-22 Pedro Alves <palves@redhat.com>
2938 * remote.c (remote_hostio_close_cleanup): Delete.
2939 (class scoped_remote_fd): New.
2940 (remote_file_put, remote_file_get): Use it.
2942 2018-05-22 Pedro Alves <palves@redhat.com>
2944 (struct vCont_action_support): Use bool and initialize all fields.
2945 (struct readahead_cache): Initialize all fields.
2946 (remote_state): Use bool and initialize all fields.
2947 (remote_state::remote_state, remote_state::~remote_state): New.
2948 (new_remote_state): Delete.
2949 (_initialize_remote): Use new to allocate remote_state.
2951 2018-05-22 Pedro Alves <palves@redhat.com>
2955 * c-exp.y: Include "c-support.h".
2956 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
2957 of tolower. Use c_ident_is_alpha to scan names.
2958 * c-lang.c: Include "c-support.h".
2959 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
2960 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
2961 * c-support.h: New file, with bits factored out from ...
2962 * cp-name-parser.y: ... this file.
2963 Include "c-support.h".
2964 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
2965 c-support.h and renamed.
2966 (symbol_end, yylex): Adjust.
2968 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2970 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
2971 parameter type to CORE_ADDR.
2972 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
2973 parameter type in declaration to CORE_ADDR.
2974 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
2975 target_auxv_search to get AT_HWCAP and use the result to get the
2977 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
2978 to CORE_ADDR. Remove the cast of the return value to unsigned
2979 long. Fix error predicate of target_auxv_search.
2980 (ppc_linux_nat_target::read_description): Change the type of the
2981 hwcap variable to CORE_ADDR.
2983 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2985 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
2986 if the size of fpscr is larger than 32 bits.
2988 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2990 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
2991 (ppc32_linux_vsxregmap): New global.
2992 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
2993 regcache_supply_regset, and regcache_collect_regset.
2994 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
2995 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
2996 (fetch_vsx_register, store_vsx_register): Remove.
2997 (fetch_vsx_registers): Add regno parameter. Get regset using
2998 ppc_linux_vsxregset. Use regset to supply registers.
2999 (store_vsx_registers): Add regno parameter. Get regset using
3000 ppc_linux_vsxregset. Use regset to collect registers.
3001 (fetch_register): Call fetch_vsx_registers instead of
3003 (store_register): Call store_vsx_registers instead of
3005 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
3006 new regno parameter.
3007 (store_ppc_registers): Call store_vsx_registers with -1 for the
3008 new regno parameter.
3009 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
3010 (ppc_collect_vsxregset): Remove.
3012 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3014 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
3016 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
3017 for vector register offset fields.
3018 (ppc64_fbsd_reg_offsets): Likewise.
3019 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
3020 to vector register offset fields.
3021 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
3022 to vector register offset fields.
3023 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
3024 vector register offset fields.
3025 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
3026 initializers for vector register offset fields.
3027 (rs6000_aix64_reg_offsets): Likewise.
3028 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
3029 (ppc_supply_vrregset): Remove.
3030 (ppc_collect_vrregset): Remove.
3031 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
3032 (ppc_linux_vrregset) : New function.
3033 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
3034 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
3035 (ppc32_linux_vrregset): Remove.
3036 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
3037 and use result instead of ppc32_linux_vrregset.
3038 (ppc32_linux_reg_offsets): Remove initializers for vector register
3040 (ppc64_linux_reg_offsets): Likewise.
3041 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
3042 * ppc-linux-nat.c: Include regset.h.
3043 (gdb_vrregset_t): Adjust comment to account for little-endian
3045 (supply_vrregset, fill_vrregset): Remove.
3046 (fetch_altivec_register, store_altivec_register): Remove.
3047 (fetch_altivec_registers): Add regno parameter. Get regset using
3048 ppc_linux_vrregset. Use regset to supply registers.
3049 (store_altivec_registers): Add regno parameter. Get regset using
3050 ppc_linux_vrregset. Use regset to collect registers.
3051 (fetch_register): Call fetch_altivec_registers instead of
3052 fetch_altivec_register.
3053 (store_register): Call store_altivec_registers instead of
3054 store_altivec_register.
3055 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
3056 the new regno parameter.
3057 (store_ppc_registers): Call store_altivec_registers with -1 for
3058 the new regno parameter.
3060 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3062 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
3063 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
3064 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
3065 (gdb_vrregset_t): Change array type size to
3066 PPC_LINUX_SIZEOF_VRREGSET.
3067 (gdb_vsxregset_t): Change array type size to
3068 PPC_LINUX_SIZEOF_VSXREGSET.
3069 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
3070 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
3071 PPC_LINUX_SIZEOF_VSXREGSET.
3073 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3075 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
3076 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
3078 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
3079 ppc_linux_target_wordsize with tid.
3080 (ppc_linux_nat_target::read_description): Call ppc_linux_target
3082 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
3083 (ppc64_64bit_inferior_p): Add static and inline specifiers.
3084 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
3085 tid parameter. Remove static specifier.
3086 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
3087 (ppc_linux_target_wordsize): New declaration.
3089 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3091 * arch/ppc-linux-common.c: New file.
3092 * arch/ppc-linux-common.h: New file.
3093 * arch/ppc-linux-tdesc.h: New file.
3094 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
3095 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
3096 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
3097 arch/ppc-linux-tdesc.h.
3098 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
3099 arch/ppc-linux-tdesc.h.
3100 (ppc_linux_nat_target::read_description): Remove target
3101 description matching code. Fill a ppc_linux_features struct and
3102 call ppc_linux_match_description with it. Move comment about ISA
3103 2.05 to ppc-linux-common.c.
3104 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
3105 arch/ppc-linux-tdesc.h.
3106 (ppc_linux_core_read_description): Remove target description
3107 matching code. Fill a ppc_linux_features struct and call
3108 ppc_linux_match_description with it.
3109 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
3110 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
3111 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
3112 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
3113 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
3114 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
3115 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
3116 (tdesc_powerpc_e500l): Remove.
3118 2018-05-22 Joel Brobecker <brobecker@adacore.com>
3120 * ada-lang.c (catch_assert_command): Pass empty string instead
3121 of NULL for excep_string argument.
3123 2018-05-22 Maciej W. Rozycki <macro@mips.com>
3125 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
3126 the width of the requested register exceeds the width of the
3129 2018-05-21 Tom Tromey <tom@tromey.com>
3131 * printcmd.c (output_command): Remove.
3132 (output_command_const): Rename to output_command.
3133 * valprint.h (output_command): Rename from output_command_const.
3134 * tracepoint.c (trace_dump_actions): Call output_command.
3136 2018-05-21 Tom Tromey <tom@tromey.com>
3138 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
3139 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
3140 * ada-lang.h (create_ada_exception_catchpoint): Update.
3141 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
3143 (create_excep_cond_exprs, ~ada_catchpoint)
3144 (should_stop_exception, print_one_exception)
3145 (print_mention_exception, print_recreate_exception): Update.
3146 (ada_get_next_arg): Remove.
3147 (catch_ada_exception_command_split): Use std::string. Change type
3148 of "excep_string", "cond_string".
3149 (catch_ada_exception_command): Update.
3150 (create_ada_exception_catchpoint): Change type of excep_string.
3151 (ada_exception_sal): Remove excep_string parameter.
3152 (~ada_catchpoint): Remove.
3154 2018-05-21 Tom Tromey <tom@tromey.com>
3156 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
3159 2018-05-21 Tom Tromey <tom@tromey.com>
3161 * ada-lang.c (ada_exception_message_1, ada_exception_message):
3162 Return unique_xmalloc_ptr.
3163 (print_it_exception): Update.
3165 2018-05-21 Tom Tromey <tom@tromey.com>
3167 * tracepoint.c (trace_dump_actions): Use std::string.
3169 2018-05-21 Tom Tromey <tom@tromey.com>
3171 * symfile.c (reread_symbols): Use std::string for original_name.
3173 2018-05-21 Tom Tromey <tom@tromey.com>
3175 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
3176 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
3179 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
3181 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
3183 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
3184 * objfiles.c (get_objfile_bfd_data): Allocate
3185 objfile_per_bfd_storage with obstack_new when allocating on
3188 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
3190 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
3192 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
3193 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
3194 * mdebugread.c (mdebug_build_psymtabs): Likewise.
3195 (add_pending): Likewise.
3196 (parse_symbol): Likewise.
3197 (parse_partial_symbols): Likewise.
3198 (psymtab_to_symtab_1): Likewise.
3199 (new_psymtab): Likewise.
3200 (elfmdebug_build_psymtabs): Likewise.
3201 * minsyms.c (terminate_minimal_symbol_table): Likewise.
3202 * objfiles.c (get_objfile_bfd_data): Likewise.
3203 (objfile_register_static_link): Likewise.
3204 * psymtab.c (allocate_psymtab): Likewise.
3205 * stabsread.c (read_member_functions): Likewise.
3206 * xcoffread.c (xcoff_end_psymtab): Likewise.
3208 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
3210 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
3211 compiler supports std::is_trivially_constructible.
3212 * common/poison.h: Include obstack.h.
3213 (IsMallocable): Define to is_trivially_constructible if the
3214 compiler supports it, define to true_type otherwise.
3218 (XOBNEWVEC): Redefine.
3219 * gdb_obstack.h (obstack_zalloc): New.
3220 (OBSTACK_ZALLOC): Redefine.
3221 (obstack_calloc): New.
3222 (OBSTACK_CALLOC): Redefine.
3224 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
3225 (gdbarch_obstack): New declaration in gdbarch.h, definition in
3227 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
3228 obstack_calloc/obstack_zalloc.
3229 (gdbarch_obstack_zalloc): Remove.
3230 * target-descriptions.c (tdesc_data_init): Use obstack_new.
3232 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3234 * stack.c (backtrace_command_1): Remove useless variable int i.
3236 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3238 * stack.c (print_frame_info): Fix comment.
3240 2018-05-18 Tom Tromey <tom@tromey.com>
3242 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
3243 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
3244 (~dwarf2_per_objfile): Update
3245 (dwarf2_get_dwz_file): Use new.
3246 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
3249 2018-05-18 Tom Tromey <tom@tromey.com>
3251 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
3253 * dwarf2read.c (struct dwp_file): Add constructor and
3255 (open_and_init_dwp_file): Return a unique_ptr.
3256 (dwarf2_per_objfile, create_dwp_hash_table)
3257 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
3258 (lookup_dwo_unit_in_dwp): Update.
3259 (open_and_init_dwp_file, get_dwp_file): Update.
3261 2018-05-18 Tom Tromey <tom@tromey.com>
3263 * dwarf2read.c (dwarf2_per_objfile): Update.
3264 (struct mapped_index): Add initializers.
3265 (dwarf2_read_index): Use new.
3266 (dw2_symtab_iter_init): Update.
3267 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
3270 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
3272 * dwarf2read.c (mapped_index) <total_size>: Remove.
3274 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
3276 * unittests/format_pieces-selftests.c (test_format_specifier):
3279 2018-05-18 Tom Tromey <tom@tromey.com>
3281 * c-typeprint.c (maybe_print_hole): New function.
3282 (c_print_type_struct_field_offset): Update.
3283 (c_type_print_base_struct_union): Call maybe_print_hole.
3285 2018-05-17 Keith Seitz <keiths@redhat.com>
3287 * breakpoint.c (build_bpstat_chain): New function, moved from
3289 (bpstat_stop_status): Add optional parameter, `stop_chain'.
3290 If no stop chain is passed, call build_bpstat_chain to build it.
3291 * breakpoint.h (build_bpstat_chain): Declare.
3292 (bpstat_stop_status): Move documentation here from breakpoint.c.
3293 * infrun.c (handle_signal_stop): Before eliding inlined frames,
3294 build the stop chain and pass it to skip_inline_frames.
3295 Pass this stop chain to bpstat_stop_status.
3296 * inline-frame.c: Include breakpoint.h.
3297 (stopped_by_user_bp_inline_frame): New function.
3298 (skip_inline_frames): Add parameter `stop_chain'.
3299 Move documention to inline-frame.h.
3300 If non-NULL, use stopped_by_user_bp_inline_frame to determine
3301 whether the frame should be elided.
3302 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
3303 Add moved documentation and update for new parameter.
3305 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
3308 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3309 unittests/format_pieces-selftests.c.
3310 * common/format.h (format_piece) <operator==>: New.
3311 (format_pieces) <operator[]>: Remove.
3312 * common/format.c (format_pieces::format_pieces): Handle \e.
3313 * unittests/format_pieces-selftests.c: New.
3315 2018-05-17 Tom Tromey <tom@tromey.com>
3318 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
3319 (dw2_instantiate_symtab): Add skip_partial parameter.
3320 (dw2_find_last_source_symtab, dw2_map_expand_apply)
3321 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
3322 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
3323 (dw2_expand_symtabs_matching_one)
3324 (dw2_find_pc_sect_compunit_symtab)
3325 (dw2_debug_names_lookup_symbol)
3326 (dw2_debug_names_expand_symtabs_for_function): Update.
3327 (init_cutu_and_read_dies): Add skip_partial parameter.
3328 (process_psymtab_comp_unit, build_type_psymtabs_1)
3329 (process_skeletonless_type_unit, load_partial_comp_unit)
3330 (psymtab_to_symtab_1): Update.
3331 (load_full_comp_unit): Add skip_partial parameter.
3332 (process_imported_unit_die, dwarf2_read_addr_index)
3333 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
3334 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
3335 (read_signatured_type): Update.
3337 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
3339 * value.c (release_value): Remove unused variable.
3340 (record_latest_value): Likewise.
3341 (access_value_history): Likewise.
3342 (preserve_values): Likewise.
3344 2018-05-17 Tom Tromey <tom@tromey.com>
3346 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
3349 2018-05-16 Maciej W. Rozycki <macro@mips.com>
3352 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
3353 Also handle registers whose width is not a multiple of
3355 (linux_nat_trad_target::store_register): Likewise.
3357 2018-05-16 Tom Tromey <tom@tromey.com>
3359 * gdbcore.h (core_bfd): Redefine.
3360 * corelow.c (core_target::close): Update.
3361 (core_target_open): Update.
3362 * progspace.h (struct program_space) <cbfd>: Now a
3365 2018-05-16 Tom Tromey <tom@tromey.com>
3368 * symfile-add-flags.h (enum symfile_add_flags)
3369 <SYMFILE_NOT_FILENAME>: New constant.
3370 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
3371 objfile name from BFD.
3372 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
3373 * minidebug.c (find_separate_debug_file_in_section): Put
3374 ".gnu_debugdata" into BFD's file name.
3376 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
3378 * regcache.c (regcache_read_ftype, regcache_write_ftype):
3381 2018-05-15 Tamar Christina <tamar.christina@arm.com>
3384 * aarch64-tdep.c (aarch64_analyze_prologue,
3385 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
3386 Indicate not interested in errors.
3388 2018-05-15 Maciej W. Rozycki <macro@mips.com>
3390 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
3391 Supply the MIPS_ZERO_REGNUM register.
3393 2018-05-15 Maciej W. Rozycki <macro@mips.com>
3395 * mips-tdep.c (mask_address_var): Make variable static.
3397 2018-05-14 Tom Tromey <tom@tromey.com>
3399 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
3401 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
3403 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
3404 FXSAVE_ADDR for the mxcsr register.
3406 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
3408 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
3410 2018-05-11 Pedro Alves <palves@redhat.com>
3412 * corelow.c (core_target) <core_target>: No longer inline.
3413 Initialize m_core_gdbarch, m_core_vec and build the section table
3415 <~core_target>: New.
3416 <core_gdbarch, get_core_register_section>: New methods.
3417 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
3418 factored out from ...
3419 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
3421 (sniff_core_bfd): Add gdbarch parameter.
3422 (core_close): Delete, merged into ...
3423 (core_target::close): ... here. Delete self.
3424 (core_close_cleanup): Delete.
3425 (core_target_open): Allocate a core_target on the heap. Use a
3426 unique_ptr instead of a cleanup. Bits moved into the core_target
3427 ctor. Adjust to use core_target methods instead of globals.
3428 (get_core_register_section): Rename to ...
3429 (core_target::get_core_register_section): ... this and adjust.
3430 (struct get_core_registers_cb_data): New.
3431 (get_core_registers_cb): Use it. Use bool.
3432 (core_target::fetch_registers, core_target::files_info)
3433 (core_target::xfer_partial, core_target::read_description)
3434 (core_target::pid_to, core_target::thread_name): Adjust to
3435 reference class fields instead of globals.
3436 * target.h (struct target_ops_deleter, target_ops_up): New.
3438 2018-05-11 Pedro Alves <palves@redhat.com>
3440 * corefile.c (core_file_command): Move to corelow.c.
3441 * corelow.c (the_core_target): Delete.
3442 (core_file_command): Moved from corefile.c. Check exec_bfd
3443 instead of the_core_target. Use target_detach instead of calling
3444 into the_core_target directly.
3445 (maybe_say_no_core_file_now): New.
3446 (core_target::detach): Use it.
3447 (_initialize_corelow): Remove references to the_core_target.
3448 * gdbcore.h (the_core_target): Delete.
3450 2018-05-11 Tom Tromey <tromey@redhat.com>
3451 Pedro Alves <palves@redhat.com>
3453 * corefile.c (core_bfd): Remove.
3454 * gdbcore.h (core_bfd): Now a macro.
3455 * progspace.h (struct program_space) <cbfd>: New field.
3457 2018-05-11 Tom Tromey <tom@tromey.com>
3459 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
3462 2018-05-10 Tom Tromey <tom@tromey.com>
3464 * configure: Rebuild.
3465 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
3467 2018-05-10 Joel Brobecker <brobecker@adacore.com>
3470 * regformats/regdat.sh: Adjust script, following the addition
3471 of the new expedite_regs parameter to init_target_desc.
3473 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
3476 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
3477 set_gdbarch_significant_addr_bit.
3478 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
3479 set_gdbarch_significant_addr_bit.
3480 * utils.c (address_significant): Update to sign extend addr.
3482 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
3484 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
3485 (xtensa_linux_init_abi): Limit tdep->num_regs by
3486 tdep->num_nopriv_regs.
3487 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
3488 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
3491 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
3493 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
3495 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
3497 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
3498 (I387_MXCSR_INIT_VAL): New constant.
3499 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
3500 buffer if it was supplied by the inferior.
3501 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
3502 (i387_xsave_get_clear_bv): New function.
3503 (i387_supply_xsave): Only read x87 control registers from the
3504 xsave buffer if the feature is enabled, and the state will have
3505 been written, otherwise, provide a suitable default.
3506 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
3507 including x87 control registers. Update control registers if they
3508 have changed from the default value, and mark features as enabled
3510 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
3512 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
3514 * spu-tdep.c (info_spu_event_command): Fix output formatting.
3516 2018-05-07 Tom Tromey <tom@tromey.com>
3518 * configure: Rebuild.
3519 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
3521 2018-05-07 Tom Tromey <tom@tromey.com>
3524 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
3525 bit. Use correct value for VDIV.
3527 2018-05-04 Tom Tromey <tom@tromey.com>
3529 * configure: Rebuild.
3530 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
3532 2018-05-04 Tom Tromey <tom@tromey.com>
3534 * linux-record.c (record_linux_system_call) <case
3535 RECORD_SYS_RECVFROM>: Add "break".
3537 2018-05-04 Tom Tromey <tom@tromey.com>
3539 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
3540 Add missing "break".
3541 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
3542 Add missing "break".
3544 2018-05-04 Tom Tromey <tom@tromey.com>
3546 * rs6000-tdep.c (ppc_process_record_op4)
3547 (ppc_process_record_op63): Add fall-through comment.
3549 2018-05-04 Tom Tromey <tom@tromey.com>
3551 * i386-tdep.c (i386_process_record): Add fall-through comment.
3553 2018-05-04 Tom Tromey <tom@tromey.com>
3555 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
3558 2018-05-04 Tom Tromey <tom@tromey.com>
3560 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
3561 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
3562 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
3564 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
3566 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
3569 2018-05-04 Tom Tromey <tom@tromey.com>
3571 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
3573 2018-05-04 Tom Tromey <tom@tromey.com>
3575 * s390-tdep.c (s390_process_record): Fix fall-through comments.
3576 * xcoffread.c (scan_xcoff_symtab): Move comment later.
3577 * symfile.c (section_is_mapped): Fix fall-through comment.
3578 * stabsread.c (define_symbol, read_member_functions): Fix
3579 fall-through comment.
3580 * s390-linux-tdep.c (s390_process_record): Fix fall-through
3582 * remote.c (remote_wait_as): Fix fall-through comment.
3583 * p-exp.y (yylex): Fix fall-through comment.
3584 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
3586 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
3587 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
3588 * jv-exp.y (yylex): Fix fall-through comment.
3589 * go-exp.y (lex_one_token): Fix fall-through comment.
3590 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
3591 fall-through comment.
3592 * f-exp.y (yylex): Fix fall-through comment.
3593 * dwarf2read.c (process_die): Fix fall-through comments.
3594 * dbxread.c (process_one_symbol): Fix fall-through comment.
3595 * d-exp.y (lex_one_token): Fix fall-through comment.
3596 * cp-name-parser.y (yylex): Fix fall-through comment.
3597 * coffread.c (coff_symtab_read): Fix fall-through comment.
3598 * c-exp.y (lex_one_token): Fix fall-through comment.
3599 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
3601 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
3604 2018-05-04 Tom Tromey <tom@tromey.com>
3607 * NEWS: Mention gdb.execute change.
3608 * gdbcmd.h (execute_control_command): Don't declare.
3609 * python/python.c (execute_gdb_command): Use read_command_lines_1,
3610 execute_control_commands, execute_control_commands_to_string.
3611 * cli/cli-script.h (execute_control_commands)
3612 (execute_control_commands_to_string): Declare.
3613 (execute_control_command): Add from_tty parameter.
3614 * cli/cli-script.c (execute_control_commands)
3615 (execute_control_commands_to_string): New functions.
3616 (execute_user_command): Use execute_control_commands.
3617 (execute_control_command_1): Add "from_tty" parameter. Update.
3618 (execute_control_command): Likewise.
3620 2018-05-04 Tom Tromey <tom@tromey.com>
3623 * NEWS: Mention that breakpoint commands are writable.
3624 * python/py-breakpoint.c (bppy_set_commands): New function.
3625 (breakpoint_object_getset) <"commands">: Use it.
3627 2018-05-04 Tom Tromey <tom@tromey.com>
3629 * tracepoint.c (actions_command): Update.
3630 * mi/mi-cmd-break.c (mi_command_line_array)
3631 (mi_command_line_array_cnt, mi_command_line_array_ptr)
3632 (mi_read_next_line): Remove.
3633 (mi_cmd_break_commands): Update.
3634 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
3636 * cli/cli-script.c (get_command_line): Update.
3637 (process_next_line): Use function_view. Constify.
3638 (recurse_read_control_structure, read_command_lines)
3639 (read_command_lines_1): Change argument types to function_view.
3640 (do_define_command, document_command): Update.
3641 * breakpoint.h (check_tracepoint_command): Don't declare.
3642 * breakpoint.c (check_tracepoint_command): Remove.
3643 (commands_command_1, create_tracepoint_from_upload): Update.
3645 2018-05-04 Tom Tromey <tom@tromey.com>
3648 * cli/cli-script.h (enum command_control_type) <define_control>:
3650 * cli/cli-script.c (multi_line_command_p): Handle define_control.
3651 (build_command_line, execute_control_command_1)
3652 (process_next_line): Likewise.
3653 (do_define_command): New function, extracted from define_command.
3654 (define_command): Use it.
3656 2018-05-04 Tom Tromey <tom@tromey.com>
3658 * tracepoint.c (actions_command): Update.
3659 * cli/cli-script.h (read_command_lines): Update.
3660 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
3661 (MAX_TMPBUF): Remove define.
3662 (define_command): Use string_printf.
3663 (document_command): Likewise.
3664 * breakpoint.c (commands_command_1): Update.
3666 2018-05-04 Tom Tromey <tom@tromey.com>
3668 * top.c (execute_command): Update.
3669 * cli/cli-script.h (print_command_lines): Now varargs.
3670 * cli/cli-script.c (print_command_lines): Now varargs.
3671 (execute_control_command_1) <case while_control, case if_control>:
3674 2018-05-04 Tom Tromey <tom@tromey.com>
3676 * tracepoint.c (all_tracepoint_actions): Rename from
3677 all_tracepoint_actions_and_cleanup. Change return type.
3678 (actions_command, encode_actions_1, encode_actions)
3679 (trace_dump_actions, tdump_command): Update.
3680 * remote.c (remote_download_command_source): Update.
3681 * python/python.c (gdbpy_eval_from_control_command)
3682 (python_command, python_interactive_command): Update.
3683 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
3684 * guile/guile.c (guile_command)
3685 (gdbscm_eval_from_control_command, guile_command): Update.
3686 * compile/compile.c (compile_code_command)
3687 (compile_print_command, compile_to_object): Update.
3688 * cli/cli-script.h (struct command_lines_deleter): New.
3689 (counted_command_line): New typedef.
3690 (struct command_line): Add constructor, destructor.
3691 <body_list>: Remove.
3692 <body_list_0, body_list_1>: New members.
3693 (command_line_up): Remove typedef.
3694 (read_command_lines, read_command_lines_1, get_command_line):
3696 (copy_command_lines): Don't declare.
3697 * cli/cli-script.c (build_command_line): Use "new".
3698 (get_command_line): Return counted_command_line.
3699 (print_command_lines, execute_user_command)
3700 (execute_control_command_1, while_command, if_command): Update.
3701 (realloc_body_list): Remove.
3702 (process_next_line, recurse_read_control_structure): Update.
3703 (read_command_lines, read_command_lines_1): Return counted_command_line.
3704 (free_command_lines): Use "delete".
3705 (copy_command_lines): Remove.
3706 (define_command, document_command, show_user_1): Update.
3707 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
3708 a counted_command_line.
3709 * breakpoint.h (counted_command_line): Remove typedef.
3710 (breakpoint_set_commands): Update.
3711 * breakpoint.c (check_no_tracepoint_commands)
3712 (validate_commands_for_breakpoint): Update.
3713 (breakpoint_set_commands): Change commands to be a
3714 counted_command_line.
3715 (commands_command_1, update_dprintf_command_list)
3716 (create_tracepoint_from_upload): Update.
3718 2018-05-04 Tom Tromey <tom@tromey.com>
3720 * cli/cli-decode.h (cmd_list_element): New constructor.
3721 (~cmd_list_element): New destructor.
3722 (struct cmd_list_element): Add initializers.
3723 * cli/cli-decode.c (do_add_cmd): Use "new".
3724 (delete_cmd): Use "delete".
3726 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
3727 Pedro Alves <palves@redhat.com>
3729 PR breakpoints/19806 and support for PR external/20207.
3730 * NEWS: Mention Aarch64 watchpoint improvements.
3731 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
3732 watchpoints and PR external/20207 watchpoints.
3733 * nat/aarch64-linux-hw-point.c
3734 (kernel_supports_any_contiguous_range): New.
3735 (aarch64_watchpoint_offset): New.
3736 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
3737 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
3738 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
3739 (aarch64_align_watchpoint): New parameters aligned_offset_p and
3740 next_addr_orig_p. Support PR external/20207 watchpoints.
3741 (aarch64_downgrade_regs): New.
3742 (aarch64_dr_state_insert_one_point): New parameters offset and
3744 (aarch64_dr_state_remove_one_point): Likewise.
3745 (aarch64_handle_breakpoint): Update caller.
3746 (aarch64_handle_aligned_watchpoint): Likewise.
3747 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
3749 (aarch64_linux_set_debug_regs): Remove const from state. Call
3750 aarch64_downgrade_regs.
3751 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
3752 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
3753 (DR_CONTROL_MASK): ... this.
3754 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
3755 (unsigned int aarch64_watchpoint_offset): New prototype.
3756 (aarch64_linux_set_debug_regs): Remove const from state.
3757 * utils.c (align_up, align_down): Move to ...
3758 * common/common-utils.c (align_up, align_down): ... here.
3759 * utils.h (align_up, align_down): Move to ...
3760 * common/common-utils.h (align_up, align_down): ... here.
3762 2018-05-04 Joel Brobecker <brobecker@adacore.com>
3764 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
3765 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
3766 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
3767 Re-implement to match the ABI as summarized in GCC's
3768 gcc/config/sparc/sparc.c. All callers updated.
3769 (sparc32_store_arguments): Remove assertion.
3771 2018-05-04 Tom Tromey <tom@tromey.com>
3773 * printcmd.c: Don't include tui.h.
3774 (decode_format): Use skip_spaces.
3776 2018-05-04 Tom Tromey <tom@tromey.com>
3779 * printcmd.c (last_count): New global.
3780 (x_command): Use saved count when repeating.
3782 2018-05-04 Tom Tromey <tom@tromey.com>
3784 * nto-procfs.c (do_closedir_cleanup): Remove.
3785 (procfs_pidlist): Use gdb_dir_up.
3786 * procfs.c (do_closedir_cleanup): Remove.
3787 (proc_update_threads): Use gdb_dir_up.
3788 * common/filestuff.h (struct gdb_dir_deleter): New.
3789 (gdb_dir_up): New typedef.
3791 2018-05-04 Tom Tromey <tom@tromey.com>
3793 * ada-lang.c (print_mention_exception): Use std::string.
3795 2018-05-04 Tom Tromey <tom@tromey.com>
3797 * ada-lang.c (create_excep_cond_exprs): Update.
3798 (ada_exception_catchpoint_cond_string): Use std::string.
3800 2018-05-04 Tom Tromey <tom@tromey.com>
3802 * ada-lang.c (xget_renaming_scope): Return std::string.
3803 (old_renaming_is_invisible): Update.
3805 2018-05-04 Tom Tromey <tom@tromey.com>
3807 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
3808 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
3810 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
3812 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
3814 2018-05-04 Tom Tromey <tom@tromey.com>
3816 * remote.c (remote_query_supported_append): Change type.
3817 (remote_check_symbols): Update.
3819 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
3822 * configure.ac: Prepend libpython.
3823 * python/python-config.py: Likewise.
3824 * configure: Regenerate.
3826 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
3828 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
3830 2018-05-03 Pedro Alves <palves@redhat.com>
3833 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
3834 override. Write 'true' instead of '1'.
3835 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
3838 2018-05-02 Pedro Alves <palves@redhat.com>
3840 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
3841 add_inf_child_target.
3842 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
3843 add_inf_child_target.
3844 * aix-thread.c (aix_thread_target_info): New.
3845 (aix_thread_target) <shortname, longname, doc>: Delete.
3847 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
3848 add_inf_child_target.
3849 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
3850 add_inf_child_target.
3851 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
3852 add_inf_child_target.
3853 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
3854 add_inf_child_target.
3855 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
3856 add_inf_child_target.
3857 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
3858 add_inf_child_target.
3859 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
3860 add_inf_child_target.
3861 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
3862 add_inf_child_target.
3863 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
3864 add_inf_child_target.
3865 * bfd-target.c (target_bfd_target_info): New.
3866 (target_bfd) <shortname, longname, doc>: Delete.
3868 * bsd-kvm.c (bsd_kvm_target_info): New.
3869 (bsd_kvm_target) <shortname, longname, doc>: Delete.
3871 (bsd_kvm_target::open): Rename to ...
3872 (bsd_kvm_target_open): ... this. Adjust.
3873 * bsd-uthread.c (bsd_uthread_target_info): New.
3874 (bsd_uthread_target) <shortname, longname, doc>: Delete.
3876 * corefile.c (core_file_command): Adjust.
3877 * corelow.c (core_target_info): New.
3878 (core_target) <shortname, longname, doc>: Delete.
3880 (core_target::open): Rename to ...
3881 (core_target_open): ... this. Adjust.
3882 * ctf.c (ctf_target_info): New.
3883 (ctf_target) <shortname, longname, doc>: Delete.
3885 (ctf_target::open): Rename to ...
3886 (ctf_target_open): ... this.
3887 (_initialize_ctf): Adjust.
3888 * exec.c (exec_target_info): New.
3889 (exec_target) <shortname, longname, doc>: Delete.
3891 (exec_target::open): Rename to ...
3892 (exec_target_open): ... this.
3893 * gdbcore.h (core_target_open): Declare.
3894 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
3895 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
3896 add_inf_child_target.
3897 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
3898 add_inf_child_target.
3899 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
3900 add_inf_child_target.
3901 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
3902 add_inf_child_target.
3903 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
3904 add_inf_child_target.
3905 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
3906 add_inf_child_target.
3907 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
3908 add_inf_child_target.
3909 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
3910 add_inf_child_target.
3911 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
3912 add_inf_child_target.
3913 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
3914 add_inf_child_target.
3915 * inf-child.c (inf_child_target_info): New.
3916 (inf_child_target::info): New.
3917 (inf_child_open_target): Remove 'target' parameter. Use
3918 get_native_target instead.
3919 (inf_child_target::open): Delete.
3920 (add_inf_child_target): New.
3921 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
3924 (add_inf_child_target): Declare.
3925 (inf_child_open_target): Declare.
3926 * linux-thread-db.c (thread_db_target_info): New.
3927 (thread_db_target) <shortname, longname, doc>: Delete.
3929 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
3930 add_inf_child_target.
3931 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
3932 add_inf_child_target.
3933 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
3934 add_inf_child_target.
3935 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
3936 add_inf_child_target.
3937 * make-target-delegates (print_class): Adjust.
3938 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
3939 add_inf_child_target.
3940 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
3941 add_inf_child_target.
3942 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
3943 add_inf_child_target.
3944 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
3945 add_inf_child_target.
3946 * nto-procfs.c (nto_native_target_info): New.
3947 (nto_procfs_target_native) <shortname, longname, doc>:
3950 (nto_procfs_target_info): New.
3951 (nto_procfs_target_procfs) <shortname, longname, doc>:
3954 (init_procfs_targets): Adjust.
3955 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
3956 add_inf_child_target.
3957 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
3958 add_inf_child_target.
3959 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
3960 add_inf_child_target.
3961 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
3962 add_inf_child_target.
3963 * ravenscar-thread.c (ravenscar_target_info): New.
3964 (ravenscar_thread_target) <shortname, longname, doc>:
3967 * record-btrace.c (record_btrace_target_info):
3968 (record_btrace_target) <shortname, longname, doc>: Delete.
3970 (record_btrace_target::open): Rename to ...
3971 (record_btrace_target_open): ... this. Adjust.
3972 * record-full.c (record_longname, record_doc): New.
3973 (record_full_base_target) <shortname, longname, doc>: Delete.
3975 (record_full_target_info): New.
3976 (record_full_target): <shortname>: Delete.
3978 (record_full_core_open_1, record_full_open_1): Update comments.
3979 (record_full_base_target::open): Rename to ...
3980 (record_full_open): ... this.
3981 (cmd_record_full_restore): Update.
3982 (_initialize_record_full): Update.
3983 * remote-sim.c (remote_sim_target_info): New.
3984 (gdbsim_target) <shortname, longname, doc>: Delete.
3986 (gdbsim_target::open): Rename to ...
3987 (gdbsim_target_open): ... this.
3988 (_initialize_remote_sim): Adjust.
3989 * remote.c (remote_doc): New.
3990 (remote_target_info): New.
3991 (remote_target) <shortname, longname, doc>: Delete.
3993 (extended_remote_target_info): New.
3994 (extended_remote_target) <shortname, longname, doc>: Delete.
3996 (remote_target::open_1): Make static. Adjust.
3997 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
3998 * s390-linux-nat.c (_initialize_s390_nat): Use
3999 add_inf_child_target.
4000 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
4001 add_inf_child_target.
4002 * sol-thread.c (thread_db_target_info): New.
4003 (sol_thread_target) <shortname, longname, doc>: Delete.
4005 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
4006 add_inf_child_target.
4007 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
4008 add_inf_child_target.
4009 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
4010 add_inf_child_target.
4011 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
4012 add_inf_child_target.
4013 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
4014 add_inf_child_target.
4015 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
4016 add_inf_child_target.
4017 * spu-linux-nat.c (_initialize_spu_nat): Use
4018 add_inf_child_target.
4019 * spu-multiarch.c (spu_multiarch_target_info): New.
4020 (spu_multiarch_target) <shortname, longname, doc>: Delete.
4022 * target-delegates.c: Regenerate.
4023 * target.c: Include <unordered_map>.
4024 (target_ops_p): Delete.
4025 (DEF_VEC_P(target_ops_p)): Delete.
4026 (target_factories): New.
4027 (test_target_info): New.
4028 (test_target_ops::info): New.
4029 (open_target): Adjust to use target_factories.
4030 (add_target_with_completer): Rename to ...
4031 (add_target): ... this. Change prototype. Register target_info
4032 and open callback in target_factories. Register target_info in
4033 command context instead of target_ops.
4034 (add_target): Delete old implementation.
4035 (add_deprecated_target_alias): Change prototype. Adjust.
4036 (the_native_target): New.
4037 (set_native_target, get_native_target): New.
4038 (find_default_run_target): Use the_native_target.
4039 (find_attach_target, find_run_target): Simplify.
4040 (target_ops::open): Delete.
4041 (dummy_target_info): New.
4042 (dummy_target::shortname, dummy_target::longname)
4043 (dummy_target::doc): Delete.
4044 (dummy_target::info): New.
4045 (debug_target::shortname, debug_target::longname)
4046 (debug_target::doc): Delete.
4047 (debug_target::info): New.
4048 * target.h (struct target_info): New.
4049 (target_ops::~target_ops): Add comment.
4050 (target_ops::info): New.
4051 (target_ops::shortname, target_ops::longname, target_ops::doc): No
4052 longer virtual. Implement in terms of target_info.
4053 (set_native_target, get_native_target): Declare.
4054 (target_open_ftype): New.
4055 (add_target, add_target_with_completer)
4056 (add_deprecated_target_alias): Change prototype.
4057 (test_target) <shortname, longname, doc>: Delete.
4059 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
4060 add_inf_child_target.
4061 * tracefile-tfile.c (tfile_target_info): New.
4062 (tfile_target) <shortname, longname, doc>: Delete.
4064 (tfile_target::open): Rename to ...
4065 (tfile_target_open): ... this.
4066 (_initialize_tracefile_tfile): Adjust.
4067 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
4068 add_inf_child_target.
4069 * windows-nat.c (_initialize_windows_nat): Use
4070 add_inf_child_target.
4071 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
4072 add_inf_child_target.
4074 2018-05-02 Pedro Alves <palves@redhat.com>
4076 * linux-nat.h (linux_nat_target) <low_new_thread,
4077 low_delete_thread, low_new_fork, low_forget_process,
4078 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
4079 New virtual methods.
4080 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
4081 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
4082 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
4083 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
4084 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
4086 * linux-fork.c (delete_fork): Adjust to call low method.
4087 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
4088 (linux_nat_new_fork, linux_nat_forget_process_hook)
4089 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
4090 (linux_nat_status_is_event):
4091 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
4092 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
4094 (sigtrap_is_event): Rename to ...
4095 (linux_nat_target::low_status_is_event): ... this.
4096 (linux_nat_set_status_is_event): Delete.
4097 (save_stop_reason, linux_nat_wait_1)
4098 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
4100 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
4101 (linux_nat_set_new_fork, linux_nat_set_forget_process)
4102 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
4103 (linux_nat_set_prepare_to_resume): Delete.
4104 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
4105 low virtual methods.
4106 * amd64-linux-nat.c: Likewise.
4107 * arm-linux-nat.c: Likewise.
4108 * i386-linux-nat.c: Likewise.
4109 * ia64-linux-nat.c: Likewise.
4110 * mips-linux-nat.c: Likewise.
4111 * ppc-linux-nat.c: Likewise.
4112 * s390-linux-nat.c: Likewise.
4113 * sparc64-linux-nat.c: Likewise.
4114 * x86-linux-nat.c: Likewise.
4115 * x86-linux-nat.h: Include "nat/x86-linux.h".
4116 (x86_linux_nat_target) <low_new_fork, low_forget_process,
4117 low_prepare_to_resume, low_new_thread, low_delete_thread>:
4120 2018-05-02 Pedro Alves <palves@redhat.com>
4122 * target.h (target_ops)
4123 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4124 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
4125 stopped_by_watchpoint, have_continuable_watchpoint,
4126 stopped_data_address, watchpoint_addr_within_range,
4127 can_accel_watchpoint_condition, can_run, thread_alive,
4128 has_all_memory, has_memory, has_stack, has_registers,
4129 has_execution, can_async_p, is_async_p, supports_non_stop,
4130 always_non_stop_p, can_execute_reverse, supports_multi_process,
4131 supports_enable_disable_tracepoint,
4132 supports_disable_randomization, supports_string_tracing,
4133 supports_evaluation_of_breakpoint_conditions,
4134 can_run_breakpoint_commands, filesystem_is_local,
4135 can_download_tracepoint, get_trace_state_variable_value,
4136 set_trace_notes, get_tib_address, use_agent, can_use_agent,
4137 record_is_replaying, record_will_replay,
4138 augmented_libraries_svr4_read>: Adjust to return bool.
4139 * aarch64-linux-nat.c: All implementations adjusted.
4140 * aix-thread.c: All implementations adjusted.
4141 * arm-linux-nat.c: All implementations adjusted.
4142 * breakpoint.c: All implementations adjusted.
4143 * bsd-kvm.c: All implementations adjusted.
4144 * bsd-uthread.c: All implementations adjusted.
4145 * corelow.c: All implementations adjusted.
4146 * ctf.c: All implementations adjusted.
4147 * darwin-nat.c: All implementations adjusted.
4148 * darwin-nat.h: All implementations adjusted.
4149 * exec.c: All implementations adjusted.
4150 * fbsd-nat.c: All implementations adjusted.
4151 * fbsd-nat.h: All implementations adjusted.
4152 * gnu-nat.c: All implementations adjusted.
4153 * gnu-nat.h: All implementations adjusted.
4154 * go32-nat.c: All implementations adjusted.
4155 * ia64-linux-nat.c: All implementations adjusted.
4156 * inf-child.c: All implementations adjusted.
4157 * inf-child.h: All implementations adjusted.
4158 * inf-ptrace.c: All implementations adjusted.
4159 * inf-ptrace.h: All implementations adjusted.
4160 * linux-nat.c: All implementations adjusted.
4161 * linux-nat.h: All implementations adjusted.
4162 * mips-linux-nat.c: All implementations adjusted.
4163 * nto-procfs.c: All implementations adjusted.
4164 * ppc-linux-nat.c: All implementations adjusted.
4165 * procfs.c: All implementations adjusted.
4166 * ravenscar-thread.c: All implementations adjusted.
4167 * record-btrace.c: All implementations adjusted.
4168 * record-full.c: All implementations adjusted.
4169 * remote-sim.c: All implementations adjusted.
4170 * remote.c: All implementations adjusted.
4171 * s390-linux-nat.c: All implementations adjusted.
4172 * sol-thread.c: All implementations adjusted.
4173 * spu-multiarch.c: All implementations adjusted.
4174 * target-delegates.c: All implementations adjusted.
4175 * target.c: All implementations adjusted.
4176 * target.h: All implementations adjusted.
4177 * tracefile-tfile.c: All implementations adjusted.
4178 * tracefile.c: All implementations adjusted.
4179 * tracefile.h: All implementations adjusted.
4180 * windows-nat.c: All implementations adjusted.
4181 * x86-linux-nat.h: All implementations adjusted.
4182 * x86-nat.h: All implementations adjusted.
4184 2018-05-02 Pedro Alves <palves@redhat.com>
4186 * make-target-delegates (scan_target_h): Don't trim lines here.
4187 Replace sequences of tabs and/or whitespace with a single
4189 (top level, parsing methods): Trim each line before processing it
4192 2018-05-02 Pedro Alves <palves@redhat.com>
4193 John Baldwin <jhb@freebsd.org>
4195 * target.h (enum strata) <debug_stratum>: New.
4196 (struct target_ops) <all delegation methods>: Replace by C++
4197 virtual methods, and drop "to_" prefix. All references updated
4199 <to_shortname, to_longname, to_doc, to_data,
4200 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
4201 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
4202 virtual methods. All references updated throughout.
4203 <can_attach, supports_terminal_ours, can_create_inferior,
4204 get_thread_control_capabilities, attach_no_wait>: New
4206 <insert_breakpoint, remove_breakpoint>: Now
4207 TARGET_DEFAULT_NORETURN methods.
4208 <info_proc>: Now returns bool.
4210 (OPS_MAGIC): Delete.
4211 (current_target): Delete. All references replaced by references
4213 (target_stack): ... this. New.
4214 (target_shortname, target_longname): Adjust.
4215 (target_can_run): Now a function declaration.
4216 (default_child_has_all_memory, default_child_has_memory)
4217 (default_child_has_stack, default_child_has_registers)
4218 (default_child_has_execution): Remove target_ops parameter.
4219 (complete_target_initialization): Delete.
4220 (memory_breakpoint_target): New template class.
4221 (test_target_ops): Refactor as a C++ class with virtual methods.
4222 * make-target-delegates (NAME_PART): Tighten.
4223 (POINTER_PART, CP_SYMBOL): New.
4224 (SIMPLE_RETURN_PART): Reimplement.
4225 (VEC_RETURN_PART): Expect less.
4226 (RETURN_PART, VIRTUAL_PART): New.
4227 (METHOD): Adjust to C++ virtual methods.
4228 (scan_target_h): Remove reference to C99.
4229 (dname): Output "target_ops::" prefix.
4230 (write_function_header): Adjust to output a C++ class method.
4231 (write_declaration): New.
4232 (write_delegator): Adjust to output a C++ class method.
4233 (tdname): Output "dummy_target::" prefix.
4234 (write_tdefault, write_debugmethod): Adjust to output a C++ class
4236 (tdefault_names, debug_names): Delete.
4237 (return_types, tdefaults, styles, argtypes_array): New.
4238 (top level): All methods are delegators.
4240 (top level): Print dummy_target and debug_target classes.
4241 * target-delegates.c: Regenerate.
4242 * target-debug.h (target_debug_print_enum_info_proc_what)
4243 (target_debug_print_thread_control_capabilities)
4244 (target_debug_print_thread_info_p): New.
4245 * target.c (dummy_target): Delete.
4246 (the_dummy_target, the_debug_target): New.
4247 (target_stack): Now extern.
4248 (set_targetdebug): Push/unpush debug target.
4249 (default_child_has_all_memory, default_child_has_memory)
4250 (default_child_has_stack, default_child_has_registers)
4251 (default_child_has_execution): Remove target_ops parameter.
4252 (complete_target_initialization): Delete.
4253 (add_target_with_completer): No longer call
4254 complete_target_initialization.
4255 (target_supports_terminal_ours): Use regular delegation.
4256 (update_current_target): Delete.
4257 (push_target): No longer check magic number. Don't call
4258 update_current_target.
4259 (unpush_target): Don't call update_current_target.
4260 (target_is_pushed): No longer check magic number.
4261 (target_require_runnable): Skip for all stratums over
4263 (target_ops::info_proc): New.
4264 (target_info_proc): Use find_target_at and
4265 find_default_run_target.
4266 (target_supports_disable_randomization): Use regular delegation.
4267 (target_get_osdata): Use find_target_at.
4268 (target_ops::open, target_ops::close, target_ops::can_attach)
4269 (target_ops::attach, target_ops::can_create_inferior)
4270 (target_ops::create_inferior, target_ops::can_run)
4271 (target_can_run): New.
4272 (default_fileio_target): Use regular delegation.
4273 (target_ops::fileio_open, target_ops::fileio_pwrite)
4274 (target_ops::fileio_pread, target_ops::fileio_fstat)
4275 (target_ops::fileio_close, target_ops::fileio_unlink)
4276 (target_ops::fileio_readlink): New.
4277 (target_fileio_open_1, target_fileio_unlink)
4278 (target_fileio_readlink): Always call the target method. Handle
4280 (return_zero, return_zero_has_execution): Delete.
4281 (init_dummy_target): Delete.
4282 (dummy_target::dummy_target, dummy_target::shortname)
4283 (dummy_target::longname, dummy_target::doc)
4284 (debug_target::debug_target, debug_target::shortname)
4285 (debug_target::longname, debug_target::doc): New.
4286 (target_supports_delete_record): Use regular delegation.
4287 (setup_target_debug): Delete.
4288 (maintenance_print_target_stack): Skip debug_stratum.
4289 (initialize_targets): Instantiate the_dummy_target and
4291 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
4293 (target_auxv_search, fprint_target_auxv): Adjust.
4294 (info_auxv_command): Adjust to use target_stack.
4295 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
4296 * exceptions.c (print_flush): Handle a NULL target_stack.
4297 * regcache.c (target_ops_no_register): Refactor as class with
4300 * exec.c (exec_target): New class.
4301 (exec_ops): Now an exec_target.
4302 (exec_open, exec_close_1, exec_get_section_table)
4303 (exec_xfer_partial, exec_files_info, exec_has_memory)
4304 (exec_make_note_section): Refactor as exec_target methods.
4305 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
4307 (exec_target::find_memory_regions): New.
4308 (_initialize_exec): Don't call init_exec_ops.
4309 * gdbcore.h (exec_file_clear): Delete.
4311 * corefile.c (core_target): Delete.
4312 (core_file_command): Adjust.
4313 * corelow.c (core_target): New class.
4314 (the_core_target): New.
4315 (core_close): Remove target_ops parameter.
4316 (core_close_cleanup): Adjust.
4317 (core_target::close): New.
4318 (core_open, core_detach, get_core_registers, core_files_info)
4319 (core_xfer_partial, core_thread_alive, core_read_description)
4320 (core_pid_to_str, core_thread_name, core_has_memory)
4321 (core_has_stack, core_has_registers, core_info_proc): Rework as
4322 core_target methods.
4323 (ignore, core_remove_breakpoint, init_core_ops): Delete.
4324 (_initialize_corelow): Initialize the_core_target.
4325 * gdbcore.h (core_target): Delete.
4326 (the_core_target): New.
4328 * ctf.c: (ctf_target): New class.
4329 (ctf_ops): Now a ctf_target.
4330 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
4331 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
4332 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
4334 (init_ctf_ops): Delete.
4335 (_initialize_ctf): Don't call it.
4336 * tracefile-tfile.c (tfile_target): New class.
4337 (tfile_ops): Now a tfile_target.
4338 (tfile_open, tfile_close, tfile_files_info)
4339 (tfile_get_tracepoint_status, tfile_trace_find)
4340 (tfile_fetch_registers, tfile_xfer_partial)
4341 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
4342 Refactor as tfile_target methods.
4343 (tfile_xfer_partial_features): Remove target_ops parameter.
4344 (init_tfile_ops): Delete.
4345 (_initialize_tracefile_tfile): Don't call it.
4346 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
4347 (tracefile_has_stack, tracefile_has_registers)
4348 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
4349 tracefile_target methods.
4350 (init_tracefile_ops): Delete.
4351 (tracefile_target::tracefile_target): New.
4352 * tracefile.h: Include "target.h".
4353 (tracefile_target): New class.
4354 (init_tracefile_ops): Delete.
4356 * spu-multiarch.c (spu_multiarch_target): New class.
4357 (spu_ops): Now a spu_multiarch_target.
4358 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
4359 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
4360 (spu_search_memory, spu_mourn_inferior): Refactor as
4361 spu_multiarch_target methods.
4362 (init_spu_ops): Delete.
4363 (_initialize_spu_multiarch): Remove references to init_spu_ops,
4364 complete_target_initialization.
4366 * ravenscar-thread.c (ravenscar_thread_target): New class.
4367 (ravenscar_ops): Now a ravenscar_thread_target.
4368 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
4369 (ravenscar_thread_alive, ravenscar_pid_to_str)
4370 (ravenscar_fetch_registers, ravenscar_store_registers)
4371 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
4372 (ravenscar_stopped_by_hw_breakpoint)
4373 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
4374 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
4375 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
4377 (init_ravenscar_thread_ops): Delete.
4378 (_initialize_ravenscar): Remove references to
4379 init_ravenscar_thread_ops and complete_target_initialization.
4381 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
4382 (bsd_uthread_target): New class.
4383 (bsd_uthread_ops): Now a bsd_uthread_target.
4384 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
4385 (bsd_uthread_close, bsd_uthread_mourn_inferior)
4386 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
4387 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
4388 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
4389 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
4390 (bsd_uthread_target): Delete function.
4391 (_initialize_bsd_uthread): Remove reference to
4392 complete_target_initialization.
4394 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
4395 (target_bfd): ... this new class.
4396 (target_bfd_xfer_partial, target_bfd_get_section_table)
4397 (target_bfd_close): Refactor as target_bfd methods.
4398 (target_bfd::~target_bfd): New.
4399 (target_bfd_reopen): Adjust.
4400 (target_bfd::close): New.
4402 * record-btrace.c (record_btrace_target): New class.
4403 (record_btrace_ops): Now a record_btrace_target.
4404 (record_btrace_open, record_btrace_stop_recording)
4405 (record_btrace_disconnect, record_btrace_close)
4406 (record_btrace_async, record_btrace_info)
4407 (record_btrace_insn_history, record_btrace_insn_history_range)
4408 (record_btrace_insn_history_from, record_btrace_call_history)
4409 (record_btrace_call_history_range)
4410 (record_btrace_call_history_from, record_btrace_record_method)
4411 (record_btrace_is_replaying, record_btrace_will_replay)
4412 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
4413 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
4414 (record_btrace_store_registers, record_btrace_prepare_to_store)
4415 (record_btrace_to_get_unwinder)
4416 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
4417 (record_btrace_commit_resume, record_btrace_wait)
4418 (record_btrace_stop, record_btrace_can_execute_reverse)
4419 (record_btrace_stopped_by_sw_breakpoint)
4420 (record_btrace_supports_stopped_by_sw_breakpoint)
4421 (record_btrace_stopped_by_hw_breakpoint)
4422 (record_btrace_supports_stopped_by_hw_breakpoint)
4423 (record_btrace_update_thread_list, record_btrace_thread_alive)
4424 (record_btrace_goto_begin, record_btrace_goto_end)
4425 (record_btrace_goto, record_btrace_stop_replaying_all)
4426 (record_btrace_execution_direction)
4427 (record_btrace_prepare_to_generate_core)
4428 (record_btrace_done_generating_core): Refactor as
4429 record_btrace_target methods.
4430 (init_record_btrace_ops): Delete.
4431 (_initialize_record_btrace): Remove reference to
4432 init_record_btrace_ops.
4433 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
4434 the execution_direction global.
4435 (record_full_base_target, record_full_target)
4436 (record_full_core_target): New classes.
4437 (record_full_ops): Now a record_full_target.
4438 (record_full_core_ops): Now a record_full_core_target.
4439 (record_full_target::detach, record_full_target::disconnect)
4440 (record_full_core_target::disconnect)
4441 (record_full_target::mourn_inferior, record_full_target::kill):
4443 (record_full_open, record_full_close, record_full_async): Refactor
4444 as methods of the record_full_base_target class.
4445 (record_full_resume, record_full_commit_resume): Refactor
4446 as methods of the record_full_target class.
4447 (record_full_wait, record_full_stopped_by_watchpoint)
4448 (record_full_stopped_data_address)
4449 (record_full_stopped_by_sw_breakpoint)
4450 (record_full_supports_stopped_by_sw_breakpoint)
4451 (record_full_stopped_by_hw_breakpoint)
4452 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
4453 methods of the record_full_base_target class.
4454 (record_full_store_registers, record_full_xfer_partial)
4455 (record_full_insert_breakpoint, record_full_remove_breakpoint):
4456 Refactor as methods of the record_full_target class.
4457 (record_full_can_execute_reverse, record_full_get_bookmark)
4458 (record_full_goto_bookmark, record_full_execution_direction)
4459 (record_full_record_method, record_full_info, record_full_delete)
4460 (record_full_is_replaying, record_full_will_replay)
4461 (record_full_goto_begin, record_full_goto_end, record_full_goto)
4462 (record_full_stop_replaying): Refactor as methods of the
4463 record_full_base_target class.
4464 (record_full_core_resume, record_full_core_kill)
4465 (record_full_core_fetch_registers)
4466 (record_full_core_prepare_to_store)
4467 (record_full_core_store_registers, record_full_core_xfer_partial)
4468 (record_full_core_insert_breakpoint)
4469 (record_full_core_remove_breakpoint)
4470 (record_full_core_has_execution): Refactor
4471 as methods of the record_full_core_target class.
4472 (record_full_base_target::supports_delete_record): New.
4473 (init_record_full_ops): Delete.
4474 (init_record_full_core_ops): Delete.
4475 (record_full_save): Refactor as method of the
4476 record_full_base_target class.
4477 (_initialize_record_full): Remove references to
4478 init_record_full_ops and init_record_full_core_ops.
4480 * remote.c (remote_target, extended_remote_target): New classes.
4481 (remote_ops): Now a remote_target.
4482 (extended_remote_ops): Now an extended_remote_target.
4483 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
4484 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
4485 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
4486 (remote_pass_signals, remote_set_syscall_catchpoint)
4487 (remote_program_signals, )
4488 (remote_thread_always_alive): Remove target_ops parameter.
4489 (remote_thread_alive, remote_thread_name)
4490 (remote_update_thread_list, remote_threads_extra_info)
4491 (remote_static_tracepoint_marker_at)
4492 (remote_static_tracepoint_markers_by_strid)
4493 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
4494 (remote_open): Refactor as methods of remote_target.
4495 (extended_remote_open, extended_remote_detach)
4496 (extended_remote_attach, extended_remote_post_attach):
4497 (extended_remote_supports_disable_randomization)
4498 (extended_remote_create_inferior): : Refactor as method of
4499 extended_remote_target.
4500 (remote_set_permissions, remote_open_1, remote_detach)
4501 (remote_follow_fork, remote_follow_exec, remote_disconnect)
4502 (remote_resume, remote_commit_resume, remote_stop)
4503 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
4504 (remote_terminal_ours, remote_wait, remote_fetch_registers)
4505 (remote_prepare_to_store, remote_store_registers)
4506 (remote_flash_erase, remote_flash_done, remote_files_info)
4507 (remote_kill, remote_mourn, remote_insert_breakpoint)
4508 (remote_remove_breakpoint, remote_insert_watchpoint)
4509 (remote_watchpoint_addr_within_range)
4510 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
4511 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
4512 (remote_supports_stopped_by_sw_breakpoint)
4513 (remote_stopped_by_hw_breakpoint)
4514 (remote_supports_stopped_by_hw_breakpoint)
4515 (remote_stopped_by_watchpoint, remote_stopped_data_address)
4516 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
4517 (remote_verify_memory): Refactor as methods of remote_target.
4518 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
4520 (remote_xfer_partial, remote_get_memory_xfer_limit)
4521 (remote_search_memory, remote_rcmd, remote_memory_map)
4522 (remote_pid_to_str, remote_get_thread_local_address)
4523 (remote_get_tib_address, remote_read_description): Refactor as
4524 methods of remote_target.
4525 (remote_target::fileio_open, remote_target::fileio_pwrite)
4526 (remote_target::fileio_pread, remote_target::fileio_close): New.
4527 (remote_hostio_readlink, remote_hostio_fstat)
4528 (remote_filesystem_is_local, remote_can_execute_reverse)
4529 (remote_supports_non_stop, remote_supports_disable_randomization)
4530 (remote_supports_multi_process, remote_supports_cond_breakpoints)
4531 (remote_supports_enable_disable_tracepoint)
4532 (remote_supports_string_tracing)
4533 (remote_can_run_breakpoint_commands, remote_trace_init)
4534 (remote_download_tracepoint, remote_can_download_tracepoint)
4535 (remote_download_trace_state_variable, remote_enable_tracepoint)
4536 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
4537 (remote_trace_start, remote_get_trace_status)
4538 (remote_get_tracepoint_status, remote_trace_stop)
4539 (remote_trace_find, remote_get_trace_state_variable_value)
4540 (remote_save_trace_data, remote_get_raw_trace_data)
4541 (remote_set_disconnected_tracing, remote_core_of_thread)
4542 (remote_set_circular_trace_buffer, remote_traceframe_info)
4543 (remote_get_min_fast_tracepoint_insn_len)
4544 (remote_set_trace_buffer_size, remote_set_trace_notes)
4545 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
4546 (remote_disable_btrace, remote_teardown_btrace)
4547 (remote_read_btrace, remote_btrace_conf)
4548 (remote_augmented_libraries_svr4_read, remote_load)
4549 (remote_pid_to_exec_file, remote_can_do_single_step)
4550 (remote_execution_direction, remote_thread_handle_to_thread_info):
4551 Refactor as methods of remote_target.
4552 (init_remote_ops, init_extended_remote_ops): Delete.
4553 (remote_can_async_p, remote_is_async_p, remote_async)
4554 (remote_thread_events, remote_upload_tracepoints)
4555 (remote_upload_trace_state_variables): Refactor as methods of
4557 (_initialize_remote): Remove references to init_remote_ops and
4558 init_extended_remote_ops.
4560 * remote-sim.c (gdbsim_target): New class.
4561 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
4562 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
4563 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
4564 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
4565 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
4566 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
4567 Refactor as methods of gdbsim_target.
4568 (gdbsim_ops): Now a gdbsim_target.
4569 (init_gdbsim_ops): Delete.
4570 (gdbsim_cntrl_c): Adjust.
4571 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
4573 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
4574 (the_amd64_linux_nat_target): New.
4575 (amd64_linux_fetch_inferior_registers)
4576 (amd64_linux_store_inferior_registers): Refactor as methods of
4577 amd64_linux_nat_target.
4578 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
4579 * i386-linux-nat.c: Don't include "linux-nat.h".
4580 (i386_linux_nat_target): New class.
4581 (the_i386_linux_nat_target): New.
4582 (i386_linux_fetch_inferior_registers)
4583 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
4584 as methods of i386_linux_nat_target.
4585 (_initialize_i386_linux_nat): Adjust. Set linux_target.
4586 * inf-child.c (inf_child_ops): Delete.
4587 (inf_child_fetch_inferior_registers)
4588 (inf_child_store_inferior_registers): Delete.
4589 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
4590 methods of inf_child_target.
4591 (inf_child_target::supports_terminal_ours)
4592 (inf_child_target::terminal_init)
4593 (inf_child_target::terminal_inferior)
4594 (inf_child_target::terminal_ours_for_output)
4595 (inf_child_target::terminal_ours, inf_child_target::interrupt)
4596 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
4598 (inf_child_open, inf_child_disconnect, inf_child_close)
4599 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
4600 (inf_child_post_startup_inferior, inf_child_can_run)
4601 (inf_child_pid_to_exec_file): Refactor as methods of
4603 (inf_child_follow_fork): Delete.
4604 (inf_child_target::can_create_inferior)
4605 (inf_child_target::can_attach): New.
4606 (inf_child_target::has_all_memory, inf_child_target::has_memory)
4607 (inf_child_target::has_stack, inf_child_target::has_registers)
4608 (inf_child_target::has_execution): New.
4609 (inf_child_fileio_open, inf_child_fileio_pwrite)
4610 (inf_child_fileio_pread, inf_child_fileio_fstat)
4611 (inf_child_fileio_close, inf_child_fileio_unlink)
4612 (inf_child_fileio_readlink, inf_child_use_agent)
4613 (inf_child_can_use_agent): Refactor as methods of
4615 (return_zero, inf_child_target): Delete.
4616 (inf_child_target::inf_child_target): New.
4617 * inf-child.h: Include "target.h".
4618 (inf_child_target): Delete function prototype.
4619 (inf_child_target): New class.
4620 (inf_child_open_target, inf_child_mourn_inferior)
4621 (inf_child_maybe_unpush_target): Delete.
4622 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
4623 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
4624 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
4625 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
4626 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
4627 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
4628 (inf_ptrace_wait, inf_ptrace_xfer_partial)
4629 (inf_ptrace_thread_alive, inf_ptrace_files_info)
4630 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
4631 methods of inf_ptrace_target.
4632 (inf_ptrace_target): Delete function.
4633 * inf-ptrace.h: Include "inf-child.h".
4634 (inf_ptrace_target): Delete function declaration.
4635 (inf_ptrace_target): New class.
4636 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
4637 * linux-nat.c (linux_target): New.
4638 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
4639 (linux_nat_target::~linux_nat_target): New.
4640 (linux_child_post_attach, linux_child_post_startup_inferior)
4641 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
4642 (linux_child_remove_fork_catchpoint)
4643 (linux_child_insert_vfork_catchpoint)
4644 (linux_child_remove_vfork_catchpoint)
4645 (linux_child_insert_exec_catchpoint)
4646 (linux_child_remove_exec_catchpoint)
4647 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
4648 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
4649 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
4650 (linux_nat_stopped_data_address)
4651 (linux_nat_stopped_by_sw_breakpoint)
4652 (linux_nat_supports_stopped_by_sw_breakpoint)
4653 (linux_nat_stopped_by_hw_breakpoint)
4654 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
4655 (linux_nat_kill, linux_nat_mourn_inferior)
4656 (linux_nat_xfer_partial, linux_nat_thread_alive)
4657 (linux_nat_update_thread_list, linux_nat_pid_to_str)
4658 (linux_nat_thread_name, linux_child_pid_to_exec_file)
4659 (linux_child_static_tracepoint_markers_by_strid)
4660 (linux_nat_is_async_p, linux_nat_can_async_p)
4661 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
4662 (linux_nat_supports_multi_process)
4663 (linux_nat_supports_disable_randomization, linux_nat_async)
4664 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
4665 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
4666 (linux_nat_fileio_open, linux_nat_fileio_readlink)
4667 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
4668 methods of linux_nat_target.
4669 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
4670 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
4672 (check_stopped_by_watchpoint): Adjust.
4673 (linux_xfer_partial): Delete.
4674 (linux_target_install_ops, linux_target, linux_nat_add_target):
4676 (linux_nat_target::linux_nat_target): New.
4677 * linux-nat.h: Include "inf-ptrace.h".
4678 (linux_nat_target): New.
4679 (linux_target, linux_target_install_ops, linux_nat_add_target):
4680 Delete function declarations.
4681 (linux_target): Declare global.
4682 * linux-thread-db.c (thread_db_target): New.
4683 (thread_db_target::thread_db_target): New.
4684 (thread_db_ops): Delete.
4685 (the_thread_db_target): New.
4686 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
4687 (thread_db_update_thread_list, thread_db_pid_to_str)
4688 (thread_db_extra_thread_info)
4689 (thread_db_thread_handle_to_thread_info)
4690 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
4691 (thread_db_resume): Refactor as methods of thread_db_target.
4692 (init_thread_db_ops): Delete.
4693 (_initialize_thread_db): Remove reference to init_thread_db_ops.
4694 * x86-linux-nat.c: Don't include "linux-nat.h".
4695 (super_post_startup_inferior): Delete.
4696 (x86_linux_nat_target::~x86_linux_nat_target): New.
4697 (x86_linux_child_post_startup_inferior)
4698 (x86_linux_read_description, x86_linux_enable_btrace)
4699 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
4700 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
4701 methods of x86_linux_nat_target.
4702 (x86_linux_create_target): Delete. Bits folded ...
4703 (x86_linux_add_target): ... here. Now takes a linux_nat_target
4705 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
4706 (x86_linux_nat_target): New class.
4707 (x86_linux_create_target): Delete.
4708 (x86_linux_add_target): Now takes a linux_nat_target pointer.
4709 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
4710 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
4711 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
4712 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
4713 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
4715 (x86_use_watchpoints): Delete.
4716 * x86-nat.h: Include "breakpoint.h" and "target.h".
4717 (x86_use_watchpoints): Delete.
4718 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
4719 (x86_stopped_by_watchpoint, x86_stopped_data_address)
4720 (x86_insert_watchpoint, x86_remove_watchpoint)
4721 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
4722 (x86_stopped_by_hw_breakpoint): New declarations.
4723 (x86_nat_target): New template class.
4725 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
4726 (the_ppc_linux_nat_target): New.
4727 (ppc_linux_fetch_inferior_registers)
4728 (ppc_linux_can_use_hw_breakpoint)
4729 (ppc_linux_region_ok_for_hw_watchpoint)
4730 (ppc_linux_ranged_break_num_registers)
4731 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
4732 (ppc_linux_insert_mask_watchpoint)
4733 (ppc_linux_remove_mask_watchpoint)
4734 (ppc_linux_can_accel_watchpoint_condition)
4735 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
4736 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
4737 (ppc_linux_watchpoint_addr_within_range)
4738 (ppc_linux_masked_watch_num_registers)
4739 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
4740 (ppc_linux_read_description): Refactor as methods of
4741 ppc_linux_nat_target.
4742 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
4744 * procfs.c (procfs_xfer_partial): Delete forward declaration.
4745 (procfs_target): New class.
4746 (the_procfs_target): New.
4747 (procfs_target): Delete function.
4748 (procfs_auxv_parse, procfs_attach, procfs_detach)
4749 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
4750 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
4751 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
4752 (procfs_create_inferior, procfs_update_thread_list)
4753 (procfs_thread_alive, procfs_pid_to_str)
4754 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
4755 (procfs_stopped_data_address, procfs_insert_watchpoint)
4756 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
4757 (proc_find_memory_regions, procfs_info_proc)
4758 (procfs_make_note_section): Refactor as methods of procfs_target.
4759 (_initialize_procfs): Adjust.
4760 * sol-thread.c (sol_thread_target): New class.
4761 (sol_thread_ops): Now a sol_thread_target.
4762 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
4763 (sol_thread_fetch_registers, sol_thread_store_registers)
4764 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
4765 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
4766 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
4767 (init_sol_thread_ops): Delete.
4768 (_initialize_sol_thread): Adjust. Remove references to
4769 init_sol_thread_ops and complete_target_initialization.
4771 * windows-nat.c (windows_nat_target): New class.
4772 (windows_fetch_inferior_registers)
4773 (windows_store_inferior_registers, windows_resume, windows_wait)
4774 (windows_attach, windows_detach, windows_pid_to_exec_file)
4775 (windows_files_info, windows_create_inferior)
4776 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
4777 (windows_close, windows_pid_to_str, windows_xfer_partial)
4778 (windows_get_tib_address, windows_get_ada_task_ptid)
4779 (windows_thread_name, windows_thread_alive): Refactor as
4780 windows_nat_target methods.
4781 (do_initial_windows_stuff): Adjust.
4782 (windows_target): Delete function.
4783 (_initialize_windows_nat): Adjust.
4785 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
4786 (darwin_mourn_inferior, darwin_kill_inferior)
4787 (darwin_create_inferior, darwin_attach, darwin_detach)
4788 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
4789 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
4790 (darwin_supports_multi_process): Refactor as darwin_nat_target
4792 (darwin_resume_to, darwin_files_info): Delete.
4793 (_initialize_darwin_inferior): Rename to ...
4794 (_initialize_darwin_nat): ... this. Adjust to C++ification.
4795 * darwin-nat.h: Include "inf-child.h".
4796 (darwin_nat_target): New class.
4797 (darwin_complete_target): Delete.
4798 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
4799 (darwin_target): New.
4800 (i386_darwin_fetch_inferior_registers)
4801 (i386_darwin_store_inferior_registers): Refactor as methods of
4803 (darwin_complete_target): Delete, with ...
4804 (_initialize_i386_darwin_nat): ... bits factored out here.
4806 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
4807 (the_alpha_linux_nat_target): New.
4808 (alpha_linux_register_u_offset): Refactor as
4809 alpha_linux_nat_target method.
4810 (_initialize_alpha_linux_nat): Adjust.
4811 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
4812 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
4813 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
4814 methods of linux_nat_trad_target.
4815 (linux_trad_target): Delete.
4816 * linux-nat-trad.h (linux_trad_target): Delete function.
4817 (linux_nat_trad_target): New class.
4818 * mips-linux-nat.c (mips_linux_nat_target): New class.
4819 (super_fetch_registers, super_store_registers, super_close):
4821 (the_mips_linux_nat_target): New.
4822 (mips64_linux_regsets_fetch_registers)
4823 (mips64_linux_regsets_store_registers)
4824 (mips64_linux_fetch_registers, mips64_linux_store_registers)
4825 (mips_linux_register_u_offset, mips_linux_read_description)
4826 (mips_linux_can_use_hw_breakpoint)
4827 (mips_linux_stopped_by_watchpoint)
4828 (mips_linux_stopped_data_address)
4829 (mips_linux_region_ok_for_hw_watchpoint)
4830 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
4831 (mips_linux_close): Refactor as methods of mips_linux_nat.
4832 (_initialize_mips_linux_nat): Adjust to C++ification.
4834 * aix-thread.c (aix_thread_target): New class.
4835 (aix_thread_ops): Now an aix_thread_target.
4836 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
4837 (aix_thread_fetch_registers, aix_thread_store_registers)
4838 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
4839 (aix_thread_thread_alive, aix_thread_pid_to_str)
4840 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
4841 Refactor as methods of aix_thread_target.
4842 (init_aix_thread_ops): Delete.
4843 (_initialize_aix_thread): Remove references to init_aix_thread_ops
4844 and complete_target_initialization.
4845 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
4846 (rs6000_nat_target): New class.
4847 (the_rs6000_nat_target): New.
4848 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
4849 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
4850 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
4851 (super_create_inferior): Delete.
4852 (_initialize_rs6000_nat): Adjust to C++ification.
4854 * arm-linux-nat.c (arm_linux_nat_target): New class.
4855 (the_arm_linux_nat_target): New.
4856 (arm_linux_fetch_inferior_registers)
4857 (arm_linux_store_inferior_registers, arm_linux_read_description)
4858 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
4859 (arm_linux_remove_hw_breakpoint)
4860 (arm_linux_region_ok_for_hw_watchpoint)
4861 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
4862 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
4863 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
4864 arm_linux_nat_target.
4865 (_initialize_arm_linux_nat): Adjust to C++ification.
4867 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
4868 (the_aarch64_linux_nat_target): New.
4869 (aarch64_linux_fetch_inferior_registers)
4870 (aarch64_linux_store_inferior_registers)
4871 (aarch64_linux_child_post_startup_inferior)
4872 (aarch64_linux_read_description)
4873 (aarch64_linux_can_use_hw_breakpoint)
4874 (aarch64_linux_insert_hw_breakpoint)
4875 (aarch64_linux_remove_hw_breakpoint)
4876 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
4877 (aarch64_linux_region_ok_for_hw_watchpoint)
4878 (aarch64_linux_stopped_data_address)
4879 (aarch64_linux_stopped_by_watchpoint)
4880 (aarch64_linux_watchpoint_addr_within_range)
4881 (aarch64_linux_can_do_single_step): Refactor as methods of
4882 aarch64_linux_nat_target.
4883 (super_post_startup_inferior): Delete.
4884 (_initialize_aarch64_linux_nat): Adjust to C++ification.
4886 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
4887 (the_hppa_linux_nat_target): New.
4888 (hppa_linux_fetch_inferior_registers)
4889 (hppa_linux_store_inferior_registers): Refactor as methods of
4890 hppa_linux_nat_target.
4891 (_initialize_hppa_linux_nat): Adjust to C++ification.
4893 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
4894 (the_ia64_linux_nat_target): New.
4895 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
4896 (ia64_linux_stopped_data_address)
4897 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
4898 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
4899 ia64_linux_nat_target methods.
4900 (super_xfer_partial): Delete.
4901 (_initialize_ia64_linux_nat): Adjust to C++ification.
4903 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
4904 (the_m32r_linux_nat_target): New.
4905 (m32r_linux_fetch_inferior_registers)
4906 (m32r_linux_store_inferior_registers): Refactor as
4907 m32r_linux_nat_target methods.
4908 (_initialize_m32r_linux_nat): Adjust to C++ification.
4910 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
4911 (the_m68k_linux_nat_target): New.
4912 (m68k_linux_fetch_inferior_registers)
4913 (m68k_linux_store_inferior_registers): Refactor as
4914 m68k_linux_nat_target methods.
4915 (_initialize_m68k_linux_nat): Adjust to C++ification.
4917 * s390-linux-nat.c (s390_linux_nat_target): New class.
4918 (the_s390_linux_nat_target): New.
4919 (s390_linux_fetch_inferior_registers)
4920 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
4921 (s390_insert_watchpoint, s390_remove_watchpoint)
4922 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
4923 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
4924 (s390_auxv_parse, s390_read_description): Refactor as methods of
4925 s390_linux_nat_target.
4926 (_initialize_s390_nat): Adjust to C++ification.
4928 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
4929 (the_sparc_linux_nat_target): New.
4930 (_initialize_sparc_linux_nat): Adjust to C++ification.
4931 * sparc-nat.c (sparc_fetch_inferior_registers)
4932 (sparc_store_inferior_registers): Remove target_ops parameter.
4933 * sparc-nat.h (sparc_fetch_inferior_registers)
4934 (sparc_store_inferior_registers): Remove target_ops parameter.
4935 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
4936 (the_sparc64_linux_nat_target): New.
4937 (_initialize_sparc64_linux_nat): Adjust to C++ification.
4939 * spu-linux-nat.c (spu_linux_nat_target): New class.
4940 (the_spu_linux_nat_target): New.
4941 (spu_child_post_startup_inferior, spu_child_post_attach)
4942 (spu_child_wait, spu_fetch_inferior_registers)
4943 (spu_store_inferior_registers, spu_xfer_partial)
4944 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
4946 (_initialize_spu_nat): Adjust to C++ification.
4948 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
4949 (the_tilegx_linux_nat_target): New.
4950 (fetch_inferior_registers, store_inferior_registers):
4951 Refactor as methods.
4952 (_initialize_tile_linux_nat): Adjust to C++ification.
4954 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
4955 (the_xtensa_linux_nat_target): New.
4956 (xtensa_linux_fetch_inferior_registers)
4957 (xtensa_linux_store_inferior_registers): Refactor as
4958 xtensa_linux_nat_target methods.
4959 (_initialize_xtensa_linux_nat): Adjust to C++ification.
4961 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
4962 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
4963 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
4964 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
4965 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
4966 (fbsd_stopped_by_sw_breakpoint)
4967 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
4968 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
4969 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
4970 (fbsd_post_startup_inferior, fbsd_post_attach)
4971 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
4972 (fbsd_set_syscall_catchpoint)
4973 (super_xfer_partial, super_resume, super_wait)
4974 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
4975 (fbsd_handle_debug_trap): Remove target_ops parameter.
4976 (fbsd_nat_add_target): Delete.
4977 * fbsd-nat.h: Include "inf-ptrace.h".
4978 (fbsd_nat_add_target): Delete.
4979 (USE_SIGTRAP_SIGINFO): Define.
4980 (fbsd_nat_target): New class.
4982 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
4983 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
4984 (amd64bsd_target): Delete.
4985 * amd64-bsd-nat.h: New file.
4986 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
4988 (amd64_fbsd_nat_target): New class.
4989 (the_amd64_fbsd_nat_target): New.
4990 (amd64fbsd_read_description): Refactor as method of
4991 amd64_fbsd_nat_target.
4992 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
4993 (_initialize_amd64fbsd_nat): Adjust to C++ification.
4994 * amd64-nat.h (amd64bsd_target): Delete function declaration.
4995 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
4996 (i386bsd_store_inferior_registers): Remove target_ops parameter.
4997 (i386bsd_target): Delete.
4998 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
4999 (i386bsd_fetch_inferior_registers)
5000 (i386bsd_store_inferior_registers): Declare.
5001 (i386_bsd_nat_target): New class.
5002 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
5003 (the_i386_fbsd_nat_target): New.
5004 (i386fbsd_resume, i386fbsd_read_description): Refactor as
5005 i386_fbsd_nat_target methods.
5006 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
5007 (_initialize_i386fbsd_nat): Adjust to C++ification.
5008 * x86-bsd-nat.c (super_mourn_inferior): Delete.
5009 (x86bsd_mourn_inferior, x86bsd_target): Delete.
5010 (_initialize_x86_bsd_nat): Adjust to C++ification.
5011 * x86-bsd-nat.h: Include "x86-nat.h".
5012 (x86bsd_target): Delete declaration.
5013 (x86bsd_nat_target): New class.
5015 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
5016 (the_aarch64_fbsd_nat_target): New.
5017 (aarch64_fbsd_fetch_inferior_registers)
5018 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
5019 aarch64_fbsd_nat_target.
5020 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
5021 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
5022 (the_alpha_bsd_nat_target): New.
5023 (alphabsd_fetch_inferior_registers)
5024 (alphabsd_store_inferior_registers): Refactor as
5025 alpha_bsd_nat_target methods.
5026 (_initialize_alphabsd_nat): Refactor as methods of
5027 alpha_bsd_nat_target.
5028 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
5029 (the_amd64_nbsd_nat_target): New.
5030 (_initialize_amd64nbsd_nat): Adjust to C++ification.
5031 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
5032 (the_amd64_obsd_nat_target): New.
5033 (_initialize_amd64obsd_nat): Adjust to C++ification.
5034 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
5035 (the_arm_fbsd_nat_target): New.
5036 (arm_fbsd_fetch_inferior_registers)
5037 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
5038 (_initialize_arm_fbsd_nat): Refactor as methods of
5039 arm_fbsd_nat_target.
5040 (_initialize_arm_fbsd_nat): Adjust to C++ification.
5041 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
5042 (the_arm_netbsd_nat_target): New.
5043 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
5044 arm_netbsd_nat_target.
5045 (_initialize_arm_netbsd_nat): Adjust to C++ification.
5046 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
5047 (the_hppa_nbsd_nat_target): New.
5048 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
5049 hppa_nbsd_nat_target methods.
5050 (_initialize_hppanbsd_nat): Adjust to C++ification.
5051 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
5052 (the_hppa_obsd_nat_target): New.
5053 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
5054 methods of hppa_obsd_nat_target.
5055 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
5057 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
5058 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
5060 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
5061 (_initialize_i386obsd_nat): Use add_target.
5062 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
5063 (the_m68k_bsd_nat_target): New.
5064 (m68kbsd_fetch_inferior_registers)
5065 (m68kbsd_store_inferior_registers): Refactor as methods of
5066 m68k_bsd_nat_target.
5067 (_initialize_m68kbsd_nat): Adjust to C++ification.
5068 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
5069 (the_mips_fbsd_nat_target): New.
5070 (mips_fbsd_fetch_inferior_registers)
5071 (mips_fbsd_store_inferior_registers): Refactor as methods of
5072 mips_fbsd_nat_target.
5073 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
5075 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
5076 (the_mips_nbsd_nat_target): New.
5077 (mipsnbsd_fetch_inferior_registers)
5078 (mipsnbsd_store_inferior_registers): Refactor as methods of
5079 mips_nbsd_nat_target.
5080 (_initialize_mipsnbsd_nat): Adjust to C++ification.
5081 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
5082 (the_mips64_obsd_nat_target): New.
5083 (mips64obsd_fetch_inferior_registers)
5084 (mips64obsd_store_inferior_registers): Refactor as methods of
5085 mips64_obsd_nat_target.
5086 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
5088 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
5090 * nbsd-nat.h: Include "inf-ptrace.h".
5091 (nbsd_nat_target): New class.
5092 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
5093 (obsd_wait): Refactor as methods of obsd_nat_target.
5094 (obsd_add_target): Delete.
5095 * obsd-nat.h: Include "inf-ptrace.h".
5096 (obsd_nat_target): New class.
5097 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
5098 (the_ppc_fbsd_nat_target): New.
5099 (ppcfbsd_fetch_inferior_registers)
5100 (ppcfbsd_store_inferior_registers): Refactor as methods of
5101 ppc_fbsd_nat_target.
5102 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
5104 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
5105 (the_ppc_nbsd_nat_target): New.
5106 (ppcnbsd_fetch_inferior_registers)
5107 (ppcnbsd_store_inferior_registers): Refactor as methods of
5108 ppc_nbsd_nat_target.
5109 (_initialize_ppcnbsd_nat): Adjust to C++ification.
5110 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
5111 (the_ppc_obsd_nat_target): New.
5112 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
5113 methods of ppc_obsd_nat_target.
5114 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
5116 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
5117 (the_sh_nbsd_nat_target): New.
5118 (shnbsd_fetch_inferior_registers)
5119 (shnbsd_store_inferior_registers): Refactor as methods of
5121 (_initialize_shnbsd_nat): Adjust to C++ification.
5122 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
5123 (inf_ptrace_xfer_partial): Delete.
5124 (sparc_xfer_partial, sparc_target): Delete.
5125 * sparc-nat.h (sparc_fetch_inferior_registers)
5126 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
5127 (sparc_target): Delete function declaration.
5128 (sparc_target): New template class.
5129 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
5130 (_initialize_sparcnbsd_nat): Adjust to C++ification.
5131 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
5132 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
5134 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
5135 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
5136 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
5137 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
5139 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
5140 (the_vax_bsd_nat_target): New.
5141 (vaxbsd_fetch_inferior_registers)
5142 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
5144 (_initialize_vaxbsd_nat): Adjust to C++ification.
5146 * bsd-kvm.c (bsd_kvm_target): New class.
5147 (bsd_kvm_ops): Now a bsd_kvm_target.
5148 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
5149 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
5150 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
5152 (bsd_kvm_return_one): Delete.
5153 (bsd_kvm_add_target): Adjust to C++ification.
5155 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
5156 (nto_procfs_target_procfs): New classes.
5157 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
5158 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
5159 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
5160 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
5161 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
5162 (procfs_remove_hw_breakpoint, procfs_resume)
5163 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
5164 (procfs_kill_inferior, procfs_store_registers)
5165 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
5166 as methods of nto_procfs_target.
5167 (nto_procfs_ops): Now an nto_procfs_target_procfs.
5168 (nto_native_ops): Delete.
5169 (procfs_open, procfs_native_open): Delete.
5170 (nto_native_ops): Now an nto_procfs_target_native.
5171 (init_procfs_targets): Adjust to C++ification.
5172 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
5173 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
5174 Refactor as methods of nto_procfs_target.
5176 * go32-nat.c (go32_nat_target): New class.
5177 (the_go32_nat_target): New.
5178 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
5179 (go32_store_registers, go32_xfer_partial, go32_files_info)
5180 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
5181 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
5182 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
5183 (go32_pid_to_str): Refactor as methods of go32_nat_target.
5184 (go32_target): Delete.
5185 (_initialize_go32_nat): Adjust to C++ification.
5187 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
5188 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
5189 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
5190 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
5192 (gnu_target): Delete.
5193 * gnu-nat.h (gnu_target): Delete.
5194 (gnu_nat_target): New class.
5195 * i386-gnu-nat.c (gnu_base_target): New.
5196 (i386_gnu_nat_target): New class.
5197 (the_i386_gnu_nat_target): New.
5198 (_initialize_i386gnu_nat): Adjust to C++ification.
5200 2018-05-02 Pedro Alves <palves@redhat.com>
5202 * bfd-target.c (target_bfd_xclose): Rename to ...
5203 (target_bfd_close): ... this.
5204 (target_bfd_reopen): Adjust.
5205 * target.c (target_close): Remove references to to_xclose.
5206 * target.h (target_ops::to_xclose): Delete.
5207 (target_ops::to_close): Update comments.
5209 2018-05-02 Pedro Alves <palves@redhat.com>
5211 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
5213 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
5214 * inf-ptrace.c (inf_ptrace_register_u_offset)
5215 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
5216 (inf_ptrace_store_register, inf_ptrace_store_registers)
5217 (inf_ptrace_trad_target): Move to ...
5218 * linux-nat-trad.c: ... this new file.
5219 * linux-nat-trad.h: New file.
5220 * linux-nat.c (linux_target_install_ops): Make extern.
5221 (linux_trad_target): Delete.
5222 * linux-nat.h (linux_trad_target): Delete declaration.
5223 (linux_target_install_ops): Declare.
5224 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
5227 2018-05-02 Pedro Alves <palves@redhat.com>
5229 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
5230 procfs_target/add_target here.
5231 * procfs.c (procfs_target): Make static.
5232 (_initialize_procfs): Call add_target here.
5233 * procfs.h (struct target_ops): Remove forward declaration.
5234 (procfs_target): Remove declaration.
5235 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
5237 2018-05-02 Pedro Alves <palves@redhat.com>
5239 * procfs.c (procfs_stopped_by_watchpoint)
5240 (procfs_insert_watchpoint, procfs_remove_watchpoint)
5241 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
5243 (procfs_use_watchpoints): Delete, move contents...
5244 (procfs_target): ... here.
5245 * procfs.h (procfs_use_watchpoints): Delete declaration.
5246 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
5247 procfs_use_watchpoints.
5248 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
5249 procfs_use_watchpoints.
5251 2018-05-02 Tom Tromey <tom@tromey.com>
5254 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
5255 and var_zuinteger_unlimited.
5256 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
5257 and PARAM_ZUINTEGER_UNLIMITED.
5258 (set_parameter_value): Handle var_zuinteger and
5259 var_zuinteger_unlimited.
5260 (add_setshow_generic): Likewise.
5261 (parmpy_init): Likewise.
5263 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
5266 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
5267 pointer is not null before dereferencing it.
5269 2018-04-30 Tom Tromey <tom@tromey.com>
5271 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
5274 2018-04-30 Tom Tromey <tom@tromey.com>
5276 * breakpoint.c (mention): Remove use of is_mi_like_p.
5277 (print_mention_ranged_breakpoint): Likewise.
5278 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
5281 2018-04-30 Tom Tromey <tom@tromey.com>
5283 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
5285 2018-04-30 Tom Tromey <tom@tromey.com>
5287 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
5288 (info_spu_event_command): Remove some uses of is_mi_like_p.
5290 2018-04-30 Tom Tromey <tom@tromey.com>
5292 * python/py-framefilter.c (py_print_single_arg)
5293 (enumerate_locals, py_print_args, py_print_frame): Remove some
5294 uses of is_mi_like_p.
5296 2018-04-30 Tom Tromey <tom@tromey.com>
5299 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
5300 * ui-out.h (ui_out::is_mi_like_p): Now const.
5301 (ui_out::do_is_mi_like_p): Now const.
5302 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
5304 2018-04-30 Tom Tromey <tom@tromey.com>
5306 * varobj.c (varobj_set_visualizer): Use new_reference.
5307 * python/python.c (gdbpy_decode_line): Use new_reference.
5308 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
5311 2018-04-30 Tom Tromey <tom@tromey.com>
5313 * varobj.c (install_new_value): Use new_reference.
5314 * value.h (value_incref): Return void. Swap intro comment with
5316 * value.c (set_value_parent): Use new_reference.
5317 (value_incref): Return void. Update intro comment.
5318 (release_value): Use new_reference.
5319 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
5321 2018-04-30 Tom Tromey <tom@tromey.com>
5323 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
5324 * gdb_bfd.h (new_bfd_ref): Remove.
5325 (gdb_bfd_open): Update comment.
5326 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
5327 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
5328 (gdb_bfd_fdopenr): Use new_reference.
5329 * exec.c (exec_file_attach): Use new_reference.
5331 2018-04-30 Tom Tromey <tom@tromey.com>
5333 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
5336 2018-04-30 Tom Tromey <tom@tromey.com>
5338 * jit.c (jit_read_code_entry): Use type_align.
5339 * i386-tdep.c (i386_gdbarch_init): Don't call
5340 set_gdbarch_long_long_align_bit.
5341 * gdbarch.sh: Remove long_long_align_bit.
5342 * gdbarch.c, gdbarch.h: Rebuild.
5343 * arc-tdep.c (arc_type_align): New function.
5344 (arc_gdbarch_init): Use arc_type_align. Don't call
5345 set_gdbarch_long_long_align_bit.
5347 2018-04-30 Tom Tromey <tom@tromey.com>
5349 * rust-lang.c (rust_type_alignment): Remove.
5350 (rust_composite_type): Use type_align.
5352 2018-04-30 Tom Tromey <tom@tromey.com>
5354 * NEWS: Mention Type.align.
5355 * python/py-type.c (typy_get_alignof): New function.
5356 (type_object_getset): Add "alignof".
5358 2018-04-30 Tom Tromey <tom@tromey.com>
5362 * std-operator.def (UNOP_ALIGNOF): New operator.
5363 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
5365 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
5366 * c-lang.c (c_op_print_tab): Add alignof.
5367 * c-exp.y (ALIGNOF): New token.
5368 (exp): Add "ALIGNOF" production.
5369 (ident_tokens): Add _Alignof and alignof.
5371 2018-04-30 Tom Tromey <tom@tromey.com>
5373 * i386-tdep.c (i386_type_align): New function.
5374 (i386_gdbarch_init): Update.
5375 * gdbarch.sh (type_align): New method.
5376 * gdbarch.c, gdbarch.h: Rebuild.
5377 * arch-utils.h (default_type_align): Declare.
5378 * arch-utils.c (default_type_align): New function.
5379 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
5380 (struct type) <align_log2>: New field.
5381 <instance_flags>: Now a bitfield.
5382 (TYPE_RAW_ALIGN): New macro.
5383 (type_align, type_raw_align, set_type_align): Declare.
5384 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
5386 * dwarf2read.c (quirk_rust_enum): Set type alignment.
5387 (get_alignment, maybe_set_alignment): New functions.
5388 (read_structure_type, read_enumeration_type, read_array_type)
5389 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
5390 (read_subrange_type, read_base_type): Set type alignment.
5392 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
5394 * dwarf2read.c (read_index_from_section): Use bool.
5396 2018-04-29 Fabian Groffen <grobian@gentoo.org>
5399 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
5402 2018-04-29 John Reiser <jreiser@BitWagon.com>
5405 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
5406 last step, and do it atomically.
5408 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
5410 * compile/compile-c-types.c (convert_int, convert_float):
5413 2018-04-27 Tom Tromey <tom@tromey.com>
5416 * rust-lang.c (rust_inclusive_range_type_p): New function.
5417 (rust_range): Handle inclusive ranges.
5418 (rust_compute_range): Likewise.
5419 * rust-exp.y (struct rust_op) <inclusive>: New field.
5420 (DOTDOTEQ): New constant.
5421 (range_expr): Add "..=" productions.
5422 (operator_tokens): Add "..=" token.
5423 (ast_range): Add "inclusive" parameter.
5424 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
5426 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
5428 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
5429 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
5431 * expprint.c (print_subexp_standard): Handle new bounds values.
5432 (dump_subexp_body_standard): Likewise.
5434 2018-04-27 Tom Tromey <tom@tromey.com>
5436 * configure: Rebuild.
5437 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
5438 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
5440 (class symbol_needs_eval_context): Likewise.
5441 * dwarf2read.c (mock_mapped_index::symbol_name_count)
5442 (mock_mapped_index::symbol_name_at): Use "override". Remove
5444 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
5446 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
5447 * aarch64-tdep.c (instruction_reader::read): Use "override".
5448 (instruction_reader_test::read): Likewise.
5449 * arm-tdep.c (instruction_reader::read): Use "override".
5450 (instruction_reader_thumb::read): Likewise.
5452 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
5455 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
5456 instead of remote_send.
5457 (remote_send): Remove.
5459 2018-04-26 Pedro Alves <palves@redhat.com>
5461 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
5462 find_function_start_sal instead of find_pc_line.
5464 2018-04-26 Pedro Alves <palves@redhat.com>
5466 * breakpoint.c (set_breakpoint_location_function): Handle
5468 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
5469 * elfread.c (elf_symtab_read): Give data symbols with
5470 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
5471 (elf_rel_plt_read): Update comment.
5472 * linespec.c (convert_linespec_to_sals): Handle
5474 (minsym_found): Handle mst_data_gnu_ifunc.
5475 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
5476 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
5477 * parse.c (find_minsym_type_and_address): Handle
5479 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
5480 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
5481 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
5483 <mst_data_gnu_ifunc>: New enumerator.
5485 2018-04-26 Pedro Alves <palves@redhat.com>
5487 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
5488 (lookup_minimal_symbol_by_pc_section): ... this. Replace
5489 'want_trampoline' parameter by a lookup_msym_prefer parameter.
5491 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
5492 (lookup_minimal_symbol_by_pc): Adjust.
5493 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
5494 (lookup_solib_trampoline_symbol_by_pc): Adjust.
5495 * minsyms.h (lookup_msym_prefer): New enum.
5496 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
5497 parameter by a lookup_msym_prefer parameter.
5499 2018-04-26 Pedro Alves <palves@redhat.com>
5501 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
5502 ends in "@plt" instead of looking at the symbol's section.
5504 2018-04-26 Pedro Alves <palves@redhat.com>
5506 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
5508 (find_pc_partial_function_gnu_ifunc): Rename to ...
5509 (find_pc_partial_function): ... this, and remove references to
5511 (find_pc_partial_function): Delete old implementation.
5512 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
5514 2018-04-26 Pedro Alves <palves@redhat.com>
5516 * linespec.c (struct bound_minimal_symbol_search_key): New.
5517 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
5518 skip first line if we found a GNU ifunc minimal symbol by name.
5519 (compare_msymbols): Change parameters to work with a destructured
5521 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
5524 2018-04-26 Pedro Alves <palves@redhat.com>
5526 * breakpoint.c (set_breakpoint_location_function): Don't resolve
5527 ifunc targets here. Instead, if we have an ifunc minsym, use its
5529 (add_location_to_breakpoint): Store the minsym and the objfile in
5530 the breakpoint location.
5531 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
5532 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
5533 Record the minsym in the sal.
5534 * symtab.h (symtab_and_line) <msymbol>: New field.
5536 2018-04-26 Pedro Alves <palves@redhat.com>
5538 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
5539 unless we actually resolved the ifunc.
5541 2018-04-26 Pedro Alves <palves@redhat.com>
5543 * c-exp.y (variable production): Prefer ifunc minsyms over
5544 regular function symbols.
5545 * symtab.c (find_gnu_ifunc): New function.
5546 * minsyms.h (lookup_msym_prefer): New enum.
5547 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
5548 parameter by a lookup_msym_prefer parameter.
5549 * symtab.h (find_gnu_ifunc): New declaration.
5551 2018-04-26 Pedro Alves <palves@redhat.com>
5553 * blockframe.c (find_gnu_ifunc_target_type): New function.
5554 (find_function_type): New.
5555 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
5556 return a value with a memory address.
5557 (eval_call): For calls to GNU ifunc functions, try to find the
5558 type of the target function from the type that the resolver
5560 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
5562 * infcall.c (find_function_return_type): Delete.
5563 (find_function_addr): Add 'function_type' parameter. For calls to
5564 GNU ifunc functions, try to find the type of the target function
5565 from the type that the resolver returns, and return it via
5567 (call_function_by_hand_dummy): Adjust to use the function type
5568 returned by find_function_addr.
5569 (find_function_addr): Add 'function_type' parameter and move
5571 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
5574 2018-04-26 Pedro Alves <palves@redhat.com>
5576 * c-exp.y (variable production): Skip finding an alias for ifunc
5579 2018-04-26 Pedro Alves <palves@redhat.com>
5581 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
5583 2018-04-25 Pedro Alves <palves@redhat.com>
5585 * infcmd.c (kill_command): Print the pid as string, not the whole
5586 thread's ptid. Add comment. s/has been killed/killed/ in output
5588 * remote.c (remote_detach_1): Print the pid as string, not the
5589 whole thread's ptid.
5591 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5592 Sergio Durigan Junior <sergiodj@redhat.com>
5593 Pedro Alves <palves@redhat.com>
5595 * infcmd.c (kill_command): Print message when inferior has
5597 * inferior.c (print_inferior_events): Remove 'static'. Set as
5599 (add_inferior): Improve message printed when
5600 'print_inferior_events' is on.
5601 (exit_inferior): Remove message printed when
5602 'print_inferior_events' is on.
5603 (detach_inferior): Improve message printed when
5604 'print_inferior_events' is on.
5605 (initialize_inferiors): Use 'add_inferior_silent' to set
5606 'current_inferior_'.
5607 * inferior.h (print_inferior_events): Declare here as
5609 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
5610 '[Detaching...]' messages when 'print_inferior_events' is on.
5611 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
5612 as prefix/suffix for messages. Remove periods. Fix erroneous
5613 'Detaching after fork from child...', replace it by '... from
5615 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
5616 prefix/suffix when printing 'Detaching...' messages. Print
5617 them when 'print_inferior_events' is on.
5618 * remote.c (remote_detach_1): Print message when detaching
5619 from inferior and '!is_fork_parent'.
5621 2018-04-24 Tom Tromey <tom@tromey.com>
5623 * cli-out.h: Reindent.
5625 2018-04-24 Tom Tromey <tom@tromey.com>
5627 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
5628 (cli_ui_out::do_field_string): Use fputs_filtered.
5629 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
5631 2018-04-23 Tom Tromey <tom@tromey.com>
5633 * guile/scm-frame.c (gdbscm_frame_read_var): Use
5634 gdb::unique_xmalloc_ptr.
5636 2018-04-23 Tom Tromey <tom@tromey.com>
5638 * configure: Rebuild.
5640 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
5643 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
5644 prepare_for_testing. Set normal_bp to r_debug_state if target
5647 2018-04-21 Pedro Alves <palves@redhat.com>
5648 Rajendra SY <rajendra.sy@gmail.com>
5650 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
5651 * remote.c (extended_remote_attach): In all-stop mode, mark the
5652 thread as executing.
5654 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5656 * thread.c (thread_apply_all_command): Fix comment.
5657 (thread_command): Fix comment.
5659 2018-04-10 Alan Hayward <alan.hayward@arm.com>
5661 * common/tdesc.h (tdesc_create_feature): Remove xml filename
5663 * features/aarch64-core.c (create_feature_aarch64_core):
5665 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
5667 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
5669 * features/i386/32bit-avx512.c
5670 (create_feature_i386_32bit_avx512): Likewise.
5671 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
5673 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
5675 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
5677 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
5679 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
5681 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
5683 * features/i386/64bit-avx512.c
5684 (create_feature_i386_64bit_avx512): Likewise.
5685 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
5687 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
5689 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
5691 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
5693 * features/i386/64bit-segments.c
5694 (create_feature_i386_64bit_segments): Likewise.
5695 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
5697 * features/i386/x32-core.c
5698 (create_feature_i386_x32_core): Likewise.
5699 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
5700 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
5701 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
5702 * target-descriptions.c: In generated code, don't pass xml
5705 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5707 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
5708 (print_xml_feature::visit_post): Likewise.
5709 (print_xml_feature::visit): Likewise.
5710 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
5711 (print_xml_feature): Add new class.
5712 * regformats/regdat.sh: Null xmltarget on feature targets.
5713 * target-descriptions.c (struct target_desc): Add xmltarget.
5714 (maintenance_check_tdesc_xml_convert): Add unittest function.
5715 (tdesc_get_features_xml): Add function to get xml.
5716 (maintenance_check_xml_descriptions): Test xml generation.
5717 * xml-tdesc.c (string_read_description_xml): Add function.
5718 * xml-tdesc.h (string_read_description_xml): Add declaration.
5720 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5722 * features/Makefile: Add feature marker to targets with new style
5723 target descriptions.
5724 * regformats/aarch64.dat: Regenerate.
5725 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
5726 * regformats/i386/amd64-avx-linux.dat: Likewise.
5727 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
5728 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
5729 * regformats/i386/amd64-linux.dat: Likewise.
5730 * regformats/i386/amd64-mpx-linux.dat: Likewise.
5731 * regformats/i386/amd64.dat: Likewise.
5732 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
5733 * regformats/i386/i386-avx-linux.dat: Likewise.
5734 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
5735 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
5736 * regformats/i386/i386-linux.dat: Likewise.
5737 * regformats/i386/i386-mmx-linux.dat: Likewise.
5738 * regformats/i386/i386-mpx-linux.dat: Likewise.
5739 * regformats/i386/i386.dat: Likewise.
5740 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
5741 * regformats/i386/x32-avx-linux.dat: Likewise.
5742 * regformats/i386/x32-linux.dat: Likewise.
5743 * regformats/tic6x-c62x-linux.dat: Likewise.
5744 * regformats/tic6x-c64x-linux.dat: Likewise.
5745 * regformats/tic6x-c64xp-linux.dat: Likewise.
5746 * regformats/regdat.sh: Parse feature marker.
5748 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5750 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
5751 (tdesc_osabi_name): Likewise.
5752 * target-descriptions.c (tdesc_architecture_name): Add new
5754 (tdesc_osabi_name): Likewise.
5756 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5758 * common/tdesc.c (tdesc_predefined_type): Move to here.
5759 (tdesc_named_type): Likewise.
5760 (tdesc_create_vector): Likewise.
5761 (tdesc_create_struct): Likewise.
5762 (tdesc_set_struct_size): Likewise.
5763 (tdesc_create_union): Likewise.
5764 (tdesc_create_flags): Likewise.
5765 (tdesc_create_enum): Likewise.
5766 (tdesc_add_field): Likewise.
5767 (tdesc_add_typed_bitfield): Likewise.
5768 (tdesc_add_bitfield): Likewise.
5769 (tdesc_add_flag): Likewise.
5770 (tdesc_add_enum_value): Likewise.
5771 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
5772 (struct tdesc_type_vector): Likewise.
5773 (struct tdesc_type_field): Likewise.
5774 (struct tdesc_type_with_fields): Likewise.
5775 (tdesc_create_enum): Add declaration.
5776 (tdesc_add_typed_bitfield): Likewise.
5777 (tdesc_add_enum_value): Likewise.
5778 * target-descriptions.c (tdesc_type_field): Move from here.
5779 (tdesc_type_builtin): Likewise.
5780 (tdesc_type_vector): Likewise.
5781 (tdesc_type_with_fields): Likewise.
5782 (tdesc_predefined_types): Likewise.
5783 (tdesc_named_type): Likewise.
5784 (tdesc_create_vector): Likewise.
5785 (tdesc_create_struct): Likewise.
5786 (tdesc_set_struct_size): Likewise.
5787 (tdesc_create_union): Likewise.
5788 (tdesc_create_flags): Likewise.
5789 (tdesc_create_enum): Likewise.
5790 (tdesc_add_field): Likewise.
5791 (tdesc_add_typed_bitfield): Likewise.
5792 (tdesc_add_bitfield): Likewise.
5793 (tdesc_add_flag): Likewise.
5794 (tdesc_add_enum_value): Likewise.
5795 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
5796 (tdesc_add_typed_bitfield): Likewise.
5797 (tdesc_add_enum_value): Likewise.
5799 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5801 * common/tdesc.c (tdesc_feature::accept): Move to here.
5802 (tdesc_feature::operator==): Likewise.
5803 (tdesc_create_reg): Likewise.
5804 * common/tdesc.h (tdesc_type_kind): Likewise.
5805 (struct tdesc_type): Likewise.
5806 (struct tdesc_feature): Likewise.
5807 * regformats/regdat.sh: Create a feature.
5808 * target-descriptions.c (tdesc_type_kind): Move from here.
5809 (tdesc_type): Likewise.
5810 (tdesc_type_up): Likewise.
5811 (tdesc_feature): Likewise.
5812 (tdesc_create_reg): Likewise.
5814 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5816 * Makefile.in: Add arch/tdesc.c
5817 * common/tdesc.c: New file.
5818 * common/tdesc.h (tdesc_element_visitor): Move to here.
5819 (tdesc_element): Likewise.
5820 (tdesc_reg): Likewise.
5821 (tdesc_reg_up): Likewise.
5822 * regformats/regdef.h (reg): Add offset to constructors.
5823 * target-descriptions.c (tdesc_element_visitor): Move from here.
5824 (tdesc_element): Likewise.
5825 (tdesc_reg): Likewise.
5826 (tdesc_reg_up): Likewise.
5828 2018-04-17 Tom Tromey <tom@tromey.com>
5830 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
5833 2018-04-17 Tom Tromey <tom@tromey.com>
5835 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
5837 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
5839 * symtab.c (print_symbol_info): Skip printing filename and line
5840 number when `last' is NULL.
5841 (symtab_symbol_info): Use empty string instead of NULL for first
5842 invocation of print_symbol_info.
5843 (rbreak_command): Pass NULL to `last' parameter of
5846 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
5848 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
5851 2018-04-16 Pedro Alves <palves@redhat.com>
5853 * MAINTAINERS (sh): Remove.
5854 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
5855 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
5856 (ALLDEPFILES): Remove sh64-tdep.c.
5857 * NEWS: Mentions that support for SH-5/SH64 is removed.
5858 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
5859 (sh*-*-openbsd*): Ditto.
5860 (sh64-*-elf*): Remove.
5862 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
5863 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
5864 * sh-tdep.c: No longer include "sh64-tdep.h".
5865 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
5866 * sh64-tdep.c, sh64-tdep.h: Remove files.
5868 2018-04-16 Pedro Alves <palves@redhat.com>
5870 * MAINTAINERS: Remove m88k.
5871 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
5872 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
5873 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
5874 * NEWS: Mention that support for m88k was removed.
5875 * configure.host (m88*-*-*): Remove support.
5876 * configure.nat (m88k-*-*): Remove support.
5877 * configure.tgt (m88*-*-openbsd*): Remove.
5878 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
5880 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
5882 * configure.tgt (x86_tobjs): New variable.
5883 (amd64_tobjs, i386_tobjs): Use it.
5885 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5887 * symtab.c (print_symbol_info): Precede the symbol definition by
5888 the line number when available.
5889 * NEWS: Advertise this enhancement.
5891 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5893 * NEWS (New options): announce set/show record btrace cpu.
5894 * btrace.c: Include record-btrace.h.
5895 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
5896 the vendor is unknown.
5897 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
5898 Maybe overwrite the btrace configuration's cpu.
5899 (btrace_compute_ftrace): Add cpu parameter. Update callers.
5900 (btrace_fetch): Add cpu parameter. Update callers.
5901 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
5902 Maybe overwrite the btrace configuration's cpu. Skip enabling
5903 errata workarounds if the vendor is unknown.
5904 * python/py-record-btrace.c: Include record-btrace.h.
5905 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
5906 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
5907 * record-btrace.c (record_btrace_cpu_state_kind): New.
5908 (record_btrace_cpu): New.
5909 (set_record_btrace_cpu_cmdlist): New.
5910 (record_btrace_get_cpu): New.
5911 (require_btrace_thread, record_btrace_info)
5912 (record_btrace_resume_thread): Call record_btrace_get_cpu.
5913 (cmd_set_record_btrace_cpu_none): New.
5914 (cmd_set_record_btrace_cpu_auto): New.
5915 (cmd_set_record_btrace_cpu): New.
5916 (cmd_show_record_btrace_cpu): New.
5917 (_initialize_record_btrace): Initialize set/show record btrace cpu
5919 * record-btrace.h (record_btrace_get_cpu): New.
5921 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5923 * record.c (set_record_command): Fix typo in message.
5925 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5927 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
5929 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5931 * infrun.c (process_event_stop_test): Call
5932 gdbarch_in_indirect_branch_thunk.
5933 * gdbarch.sh (in_indirect_branch_thunk): New.
5934 * gdbarch.c: Regenerated.
5935 * gdbarch.h: Regenerated.
5938 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
5939 (HFILES_NO_SRCDIR): Add x86-tdep.h.
5940 (ALLDEPFILES): Add x86-tdep.c.
5941 * arch-utils.h (default_in_indirect_branch_thunk): New.
5942 * arch-utils.c (default_in_indirect_branch_thunk): New.
5943 * i386-tdep: Include x86-tdep.h.
5944 (i386_in_indirect_branch_thunk): New.
5945 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
5947 * amd64-tdep: Include x86-tdep.h.
5948 (amd64_in_indirect_branch_thunk): New.
5949 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
5951 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
5954 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
5955 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
5956 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
5959 2018-04-12 Tom Tromey <tom@tromey.com>
5961 * rust-lang.c (rust_print_struct_def): Remove univariant code.
5962 (rust_evaluate_subexp): Likewise.
5964 2018-04-12 Pedro Alves <palves@redhat.com>
5966 * procfs.c (procfs_detach): Make forward declaration's prototype
5967 match definition's protototype.
5968 (proc_get_LDT_entry): Remove stale do_cleanups call.
5970 2018-04-12 Pedro Alves <palves@redhat.com>
5972 * target.h (target_ops::to_has_exited): Delete.
5973 (target_has_exited): Delete.
5974 * target-delegates.c: Regenerate.
5976 2018-04-11 Pedro Alves <palves@redhat.com>
5978 * target.c (fileio_fh_t::t): Add comment.
5979 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
5980 (target_fileio_close): Handle a NULL target.
5981 (invalidate_fileio_fh): New.
5982 (target_close): Call it.
5983 * remote.c (remote_hostio_send_command): No longer check whether
5984 remote_desc is open.
5986 2018-04-11 Pedro Alves <palves@redhat.com>
5988 * target.c (fileio_fh_t): Make it a named struct instead of a
5990 (fileio_fh_t::is_closed): New method.
5991 (DEF_VEC_O (fileio_fh_t)): Remove.
5992 (fileio_fhandles): Now a std::vector.
5993 (is_closed_fileio_fh): Delete.
5994 (acquire_fileio_fd): Adjust. Rename parameters.
5995 (release_fileio_fd): Adjust.
5996 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
5997 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
5998 (target_fileio_close): Adjust.
6000 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
6002 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
6005 2018-04-10 Pedro Alves <palves@redhat.com>
6007 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
6008 (scoped_finish_thread_state): New class.
6009 * infcmd.c (run_command_1): Use it instead of finish_thread_state
6011 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
6012 (fetch_inferior_event, normal_stop): Likewise.
6013 * thread.c (finish_thread_state_cleanup): Delete.
6015 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6016 Pedro Alves <palves@redhat.com>
6018 * value.c: Include "selftest.h" and "common/array-view.h".
6019 (struct range) <operator ==>: New.
6020 (test_ranges_contain): New.
6021 (check_ranges_vector): New.
6022 (test_insert_into_bit_range_vector): New.
6023 (_initialize_values): Register selftests.
6024 * common/array-view.h (operator==, operator!=): New.
6026 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6028 * common/gdb_vecs.h (unordered_remove): Add overload that takes
6030 * inline-frame.c: Include <algorithm>.
6031 (struct inline_state): Add constructor.
6032 (inline_state_s): Remove.
6033 (DEF_VEC_O(inline_state_s)): Remove.
6034 (inline_states): Change type to std::vector.
6035 (find_inline_frame_state): Adjust to std::vector.
6036 (allocate_inline_frame_state): Remove.
6037 (clear_inline_frame_state): Adjust to std::vector.
6038 (skip_inline_frames): Adjust to std::vector.
6040 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6042 * tracepoint.h (struct trace_state_variable): Add constructor.
6043 <name>: Change type to std::string.
6044 * tracepoint.c (tsv_s): Remove.
6045 (DEF_VEC_O(tsv_s)): Remove.
6046 (tvariables): Change to std::vector.
6047 (create_trace_state_variable): Adjust to std::vector.
6048 (find_trace_state_variable): Likewise.
6049 (find_trace_state_variable_by_number): Likewise.
6050 (delete_trace_state_variable): Likewise.
6051 (trace_variable_command): Adjust to std::string.
6052 (delete_trace_variable_command): Likewise.
6053 (tvariables_info_1): Adjust to std::vector.
6054 (save_trace_state_variables): Likewise.
6055 (start_tracing): Likewise.
6056 (merge_uploaded_trace_state_variables): Adjust to std::vector
6058 * target.h (struct target_ops)
6059 <to_download_trace_state_variable>: Pass reference to
6060 trace_state_variable.
6061 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
6062 * target-delegates.c: Re-generate.
6063 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
6064 (mi_tsv_deleted): Likewise.
6065 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
6066 * remote.c (remote_download_trace_state_variable): Change
6067 pointer to reference and adjust.
6068 * make-target-delegates (parse_argtypes): Handle references.
6069 (write_function_header): Likewise.
6070 (munge_type): Likewise.
6072 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6074 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6075 string_view-selftests.c.
6076 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
6078 * unittests/basic_string_view/cons/char/1.cc: Likewise.
6079 * unittests/basic_string_view/cons/char/2.cc: Likewise.
6080 * unittests/basic_string_view/cons/char/3.cc: Likewise.
6081 * unittests/basic_string_view/element_access/char/1.cc:
6083 * unittests/basic_string_view/element_access/char/empty.cc:
6085 * unittests/basic_string_view/element_access/char/front_back.cc:
6087 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
6088 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
6090 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
6092 * unittests/basic_string_view/modifiers/swap/char/1.cc:
6094 * unittests/basic_string_view/operations/compare/char/1.cc:
6096 * unittests/basic_string_view/operations/compare/char/13650.cc:
6098 * unittests/basic_string_view/operations/copy/char/1.cc:
6100 * unittests/basic_string_view/operations/data/char/1.cc:
6102 * unittests/basic_string_view/operations/find/char/1.cc:
6104 * unittests/basic_string_view/operations/find/char/2.cc:
6106 * unittests/basic_string_view/operations/find/char/3.cc:
6108 * unittests/basic_string_view/operations/find/char/4.cc:
6110 * unittests/basic_string_view/operations/rfind/char/1.cc:
6112 * unittests/basic_string_view/operations/rfind/char/2.cc:
6114 * unittests/basic_string_view/operations/rfind/char/3.cc:
6116 * unittests/basic_string_view/operations/substr/char/1.cc:
6118 * unittests/basic_string_view/operators/char/2.cc: Likewise.
6119 * unittests/string_view-selftests.c: New file.
6121 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6123 * unittests/basic_string_view/capacity/1.cc: New file.
6124 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
6125 * unittests/basic_string_view/cons/char/1.cc: New file.
6126 * unittests/basic_string_view/cons/char/2.cc: New file.
6127 * unittests/basic_string_view/cons/char/3.cc: New file.
6128 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
6129 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
6130 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
6131 * unittests/basic_string_view/element_access/char/1.cc: New file.
6132 * unittests/basic_string_view/element_access/char/2.cc: New file.
6133 * unittests/basic_string_view/element_access/char/empty.cc: New file.
6134 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
6135 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
6136 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
6137 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
6138 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
6139 * unittests/basic_string_view/include.cc: New file.
6140 * unittests/basic_string_view/inserters/char/1.cc: New file.
6141 * unittests/basic_string_view/inserters/char/2.cc: New file.
6142 * unittests/basic_string_view/inserters/char/3.cc: New file.
6143 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
6144 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
6145 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
6146 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
6147 * unittests/basic_string_view/literals/types.cc: New file.
6148 * unittests/basic_string_view/literals/values.cc: New file.
6149 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
6150 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
6151 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
6152 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
6153 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
6154 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
6155 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
6156 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
6157 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
6158 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
6159 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
6160 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
6161 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
6162 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
6163 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
6164 * unittests/basic_string_view/operations/data/char/1.cc: New file.
6165 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
6166 * unittests/basic_string_view/operations/find/char/1.cc: New file.
6167 * unittests/basic_string_view/operations/find/char/2.cc: New file.
6168 * unittests/basic_string_view/operations/find/char/3.cc: New file.
6169 * unittests/basic_string_view/operations/find/char/4.cc: New file.
6170 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
6171 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
6172 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
6173 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
6174 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
6175 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
6176 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
6177 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
6178 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
6179 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
6180 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
6181 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
6182 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
6183 * unittests/basic_string_view/operators/char/2.cc: New file.
6184 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
6185 * unittests/basic_string_view/range_access/char/1.cc: New file.
6186 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
6187 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
6188 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
6189 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
6190 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
6191 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
6192 * unittests/basic_string_view/requirements/typedefs.cc: New file.
6193 * unittests/basic_string_view/typedefs.cc: New file.
6194 * unittests/basic_string_view/types/1.cc: New file.
6196 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6198 * common/gdb_string_view.h: Remove libstdc++ implementation
6199 details, adjust to gdb reality.
6200 * common/gdb_string_view.tcc: Likewise.
6201 * cli/cli-script.c (struct string_view): Remove.
6202 (user_args) <m_args>: Change element type to gdb::string_view.
6203 (user_args::insert_args): Adjust.
6205 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6207 * common/gdb_string_view.h: New file.
6208 * common/gdb_string_view.tcc: New file.
6210 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6212 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
6213 * configure: Re-generate.
6215 2018-04-09 Pedro Alves <palves@redhat.com>
6217 * gdbarch.sh: Include "observable.h" instead of "observer.h".
6218 (set_target_gdbarch): Call
6219 gdb::observers::architecture_changed.notify instead of
6220 observer_notify_architecture_changed.
6222 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6224 * tracepoint.c (struct current_traceframe_cleanup): Remove.
6225 (do_restore_current_traceframe_cleanup): Remove.
6226 (restore_current_traceframe_cleanup_dtor): Remove.
6227 (make_cleanup_restore_current_traceframe): Remove.
6228 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
6230 * tracepoint.h (struct scoped_restore_current_traceframe): New.
6231 * infrun.c (fetch_inferior_event): Use
6232 scoped_restore_current_traceframe.
6234 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6236 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
6238 <n_allocated_type_units>: Remove.
6239 <all_type_units>: Change to std::vector.
6240 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
6241 to std::vector change.
6242 (dwarf2_per_objfile::get_cutu): Likewise.
6243 (dwarf2_per_objfile::get_tu): Likewise.
6244 (create_signatured_type_table_from_index): Likewise.
6245 (create_signatured_type_table_from_debug_names): Likewise.
6246 (dw2_symtab_iter_next): Likewise.
6247 (dw2_print_stats): Likewise.
6248 (dw2_expand_all_symtabs): Likewise.
6249 (dw2_expand_marked_cus): Likewise.
6250 (dw2_debug_names_iterator::next): Likewise.
6251 (dwarf2_initialize_objfile): Likewise.
6252 (add_signatured_type_cu_to_table): Likewise.
6253 (create_all_type_units): Likewise.
6254 (add_type_unit): Likewise.
6255 (struct tu_abbrev_offset): Add constructor.
6256 (build_type_psymtabs_1): Adjust to std::vector change.
6257 (print_tu_stats): Likewise.
6258 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
6259 (write_debug_names): Likewise.
6261 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6263 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
6264 Make an std::vector.
6265 <n_comp_units>: Remove.
6266 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
6267 to std::vector change.
6268 (dwarf2_per_objfile::get_cutu): Likewise.
6269 (dwarf2_per_objfile::get_cu): Likewise.
6270 (create_cus_from_index): Likewise.
6271 (create_addrmap_from_index): Likewise.
6272 (create_addrmap_from_aranges): Likewise.
6273 (dwarf2_read_index): Likewise.
6274 (dw2_find_last_source_symtab): Likewise.
6275 (dw2_map_symtabs_matching_filename): Likewise.
6276 (dw2_symtab_iter_next): Likewise.
6277 (dw2_print_stats): Likewise.
6278 (dw2_expand_all_symtabs): Likewise.
6279 (dw2_expand_symtabs_with_fullname): Likewise.
6280 (dw2_expand_marked_cus): Likewise.
6281 (dw2_map_symbol_filenames): Likewise.
6282 (create_cus_from_debug_names): Likewise.
6283 (dwarf2_read_debug_names): Likewise.
6284 (dw2_debug_names_iterator::next): Likewise.
6285 (dwarf2_initialize_objfile): Likewise.
6286 (set_partial_user): Likewise.
6287 (dwarf2_build_psymtabs_hard): Likewise.
6288 (read_comp_units_from_section): Remove arguments, adjust to
6290 (create_all_comp_units): Adjust to std::vector and
6291 read_comp_units_from_section changes.
6292 (dwarf2_find_containing_comp_unit): Adjust to std::vector
6294 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
6295 (psyms_seen_size): Likewise.
6296 (write_gdbindex): Likewise.
6297 (write_debug_names): Likewise.
6299 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6301 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
6302 with dwarf2_per_objfile.
6303 (create_cus_from_index): Likewise.
6304 (create_signatured_type_table_from_index): Likewise.
6305 (dwarf2_read_index): Likewise.
6306 (dwarf2_initialize_objfile): Likewise.
6307 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
6308 per_cu rather than get_dwarf2_per_objfile.
6310 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6312 * dwarf2read.h (struct signatured_type): Forward declare.
6313 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
6315 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
6316 (dw2_get_cutu): ...this.
6317 (dwarf2_per_objfile::get_cu): Rename from...
6318 (dw2_get_cu): ...this.
6319 (dwarf2_per_objfile::get_tu): New.
6320 (create_addrmap_from_index): Adjust.
6321 (create_addrmap_from_aranges): Adjust.
6322 (dw2_find_last_source_symtab): Adjust.
6323 (dw2_map_symtabs_matching_filename): Adjust.
6324 (dw2_symtab_iter_next): Adjust.
6325 (dw2_print_stats): Adjust.
6326 (dw2_expand_all_symtabs): Adjust.
6327 (dw2_expand_symtabs_with_fullname): Adjust.
6328 (dw2_expand_marked_cus): Adjust.
6329 (dw_expand_symtabs_matching_file_matcher): Adjust.
6330 (dw2_map_symbol_filenames): Adjust.
6331 (dw2_debug_names_iterator::next): Adjust.
6332 (dwarf2_initialize_objfile): Adjust.
6333 (set_partial_user): Adjust.
6334 (dwarf2_build_psymtabs_hard): Adjust.
6336 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6338 * dwarf2read.c (create_signatured_type_table_from_debug_names):
6339 Remove unused variables.
6340 (dw2_map_symtabs_matching_filename): Likewise.
6341 (dwarf2_record_block_ranges): Likewise.
6342 (dwarf2_read_addr_index): Likewise.
6343 (follow_die_offset): Likewise.
6345 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6347 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
6348 to symbol_file_add_main.
6350 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6353 * mi/mi-console.c (do_fputc_async_safe): New.
6354 (mi_console_file::write_async_safe): New.
6355 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
6356 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
6358 * ui-file.c (ui_file::putstrn): Adjust call to
6359 fputstrn_unfiltered.
6360 * utils.c (printchar): Replace do_fputs and do_fprintf
6361 parameters by do_fputc.
6362 (fputstr_filtered): Adjust call to printchar.
6363 (fputstr_unfiltered): Likewise.
6364 (fputstrn_filtered): Likewise.
6365 (fputstrn_unfiltered): Add do_fputc parameter, pass to
6367 * utils.h (do_fputc_ftype): New typedef.
6368 (fputstrn_unfiltered): Add do_fputc parameter.
6370 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6372 * regformats/i386/i386-avx.dat: Remove.
6374 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6377 * amd64-tdep.c (amd64_none_init_abi): New function.
6378 (amd64_x32_none_init_abi): New function.
6379 (_initialize_amd64_tdep): Register handlers for x86-64 and
6380 x64_32 with GDB_OSABI_NONE.
6381 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
6382 GDB_OSABI_NONE osabi.
6384 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6387 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
6389 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
6390 * osabi.c (gdb_osabi_names): Add "unknown" entry.
6392 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6394 * common/byte-vector.h (char_vector): New type.
6395 * target.h (target_read_alloc): Return
6396 gdb::optional<byte_vector>.
6397 (target_read_stralloc): Return gdb::optional<char_vector>.
6398 (target_get_osdata): Return gdb::optional<char_vector>.
6399 * target.c (target_read_alloc_1): Templatize. Replacement
6400 manual memory management with vector.
6401 (target_read_alloc): Change return type, adjust.
6402 (target_read_stralloc): Change return type, adjust.
6403 (target_get_osdata): Change return type, adjust.
6404 * auxv.c (struct auxv_info) <length>: Remove.
6405 <data>: Change type to gdb::optional<byte_vector>.
6406 (auxv_inferior_data_cleanup): Free auxv_info with delete.
6407 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
6408 (target_auxv_search): Adjust.
6409 (fprint_target_auxv): Adjust.
6410 * avr-tdep.c (avr_io_reg_read_command): Adjust.
6411 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
6412 (linux_make_corefile_notes): Adjust.
6413 * osdata.c (get_osdata): Adjust.
6414 * remote.c (remote_get_threads_with_qxfer): Adjust.
6415 (remote_memory_map): Adjust.
6416 (remote_traceframe_info): Adjust.
6417 (btrace_read_config): Adjust.
6418 (remote_read_btrace): Adjust.
6419 (remote_pid_to_exec_file): Adjust.
6420 * solib-aix.c (solib_aix_get_library_list): Adjust.
6421 * solib-dsbt.c (decode_loadmap): Don't free buf.
6422 (dsbt_get_initial_loadmaps): Adjust.
6423 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
6424 * solib-target.c (solib_target_current_sos): Adjust.
6425 * tracepoint.c (sdata_make_value): Adjust.
6426 * xml-support.c (xinclude_start_include): Adjust.
6427 (xml_fetch_content_from_file): Adjust.
6428 * xml-support.h (xml_fetch_another): Change return type.
6429 (xml_fetch_content_from_file): Change return type.
6430 * xml-syscall.c (xml_init_syscalls_info): Adjust.
6431 * xml-tdesc.c (file_read_description_xml): Adjust.
6432 (fetch_available_features_from_target): Change return type.
6433 (target_fetch_description_xml): Adjust.
6434 (target_read_description_xml): Adjust.
6436 2018-04-06 Tom Tromey <tom@tromey.com>
6438 * value.c (~value): Update.
6439 (struct value) <contents>: Now unique_xmalloc_ptr.
6440 (value_contents_bits_eq, allocate_value_contents)
6441 (value_contents_raw, value_contents_all_raw)
6442 (value_contents_for_printing, value_contents_for_printing_const)
6443 (set_value_enclosing_type): Update.
6445 2018-04-06 Tom Tromey <tom@tromey.com>
6447 * value.c (range_s): Remove typedef, VEC.
6448 (struct range): Add operator<.
6449 (range_lessthan): Remove.
6450 (ranges_contain): Change type.
6452 (struct value) <unavailable, optimized_out>: Now std::vector.
6453 (value_entirely_available)
6454 (value_entirely_covered_by_range_vector)
6455 (value_entirely_unavailable, value_entirely_optimized_out):
6457 (insert_into_bit_range_vector): Change argument type.
6458 (find_first_range_overlap): Likewise.
6459 (struct ranges_and_idx, value_contents_bits_eq)
6460 (require_not_optimized_out, require_available): Update.
6461 (ranges_copy_adjusted): Change argument types.
6462 (value_optimized_out, value_copy, value_fetch_lazy): Update.
6464 2018-04-06 Tom Tromey <tom@tromey.com>
6466 * value.c (~value): Update.
6467 (struct value) <parent>: Now a value_ref_ptr.
6468 (value_parent, set_value_parent, value_address, value_copy):
6471 2018-04-06 Tom Tromey <tom@tromey.com>
6473 * value.c (struct value): Add constructor, destructor, and member
6475 (allocate_value_lazy, value_decref): Update.
6477 2018-04-06 Tom Tromey <tom@tromey.com>
6479 * value.c (struct value) <released, next>: Remove.
6480 (all_values): Now a std::vector.
6481 (allocate_value_lazy): Update.
6482 (value_next): Remove.
6483 (value_mark, value_free_to_mark, release_value)
6484 (value_release_to_mark): Update.
6486 2018-04-06 Tom Tromey <tom@tromey.com>
6488 * value.h (fetch_subexp_value, value_release_to_mark): Update.
6489 (free_value_chain): Remove.
6490 * value.c (free_value_chain): Remove.
6491 (value_release_to_mark): Return a std::vector.
6492 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
6494 (check_condition): Update.
6495 * eval.c (fetch_subexp_value): Change "val_chain" to a
6497 * breakpoint.c (update_watchpoint): Update.
6498 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
6500 2018-04-06 Tom Tromey <tom@tromey.com>
6502 * value.h (free_all_values): Remove.
6503 * value.c (free_all_values): Remove.
6505 2018-04-06 Tom Tromey <tom@tromey.com>
6507 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
6508 (value_history_chain, value_history_count): Remove.
6509 (value_history): New global.
6510 (record_latest_value, access_value_history, show_values)
6511 (preserve_values): Update.
6513 2018-04-06 Tom Tromey <tom@tromey.com>
6515 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
6516 * varobj.c (varobj_set_display_format, varobj_set_value)
6517 (install_default_visualizer, construct_visualizer)
6518 (install_new_value, ~varobj, varobj_get_value_type)
6519 (my_value_of_variable, varobj_editable_p): Update.
6520 * c-varobj.c (c_describe_child, c_value_of_variable)
6521 (cplus_number_of_children, cplus_describe_child): Update.
6522 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
6523 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
6524 (ada_value_of_variable, ada_value_is_changeable_p): Update.
6526 2018-04-06 Tom Tromey <tom@tromey.com>
6528 * printcmd.c (last_examine_address): Change type to
6530 (do_examine, x_command): Update.
6532 2018-04-06 Tom Tromey <tom@tromey.com>
6534 * value.c (release_value): Update.
6535 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
6536 (struct bpstats) <val>: Now a value_ref_ptr.
6537 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
6538 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
6539 (~watchpoint, print_it_watchpoint, watch_command_1)
6540 (invalidate_bp_value_on_memory_change): Update.
6542 2018-04-06 Tom Tromey <tom@tromey.com>
6544 * varobj.c (varobj_clear_saved_item)
6545 (update_dynamic_varobj_children, install_new_value, ~varobj):
6547 * value.h (value_incref): Move declaration earlier.
6548 (value_decref): Rename from value_free.
6549 (struct value_ref_policy): New.
6550 (value_ref_ptr): New typedef.
6551 (struct value_deleter): Remove.
6552 (gdb_value_up): Remove typedef.
6553 (release_value): Change return type.
6554 (release_value_or_incref): Remove.
6555 * value.c (set_value_parent): Update.
6556 (value_incref): Change return type.
6557 (value_decref): Rename from value_free.
6558 (value_free_to_mark, free_all_values, free_value_chain): Update.
6559 (release_value): Return value_ref_ptr.
6560 (release_value_or_incref): Remove.
6561 (record_latest_value, set_internalvar, clear_internalvar):
6563 * stack.c (info_frame_command): Don't call value_free.
6564 * python/py-value.c (valpy_dealloc, valpy_new)
6565 (value_to_value_object): Update.
6566 * printcmd.c (do_examine): Update.
6567 * opencl-lang.c (lval_func_free_closure): Update.
6568 * mi/mi-main.c (register_changed_p): Don't call value_free.
6569 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
6570 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
6571 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
6573 * guile/scm-value.c (vlscm_free_value_smob)
6574 (vlscm_scm_from_value): Update.
6575 * frame.c (frame_register_unwind, frame_unwind_register_signed)
6576 (frame_unwind_register_unsigned, get_frame_register_bytes)
6577 (put_frame_register_bytes): Don't call value_free.
6578 * findvar.c (address_from_register): Don't call value_free.
6579 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
6580 * dwarf2loc.c (entry_data_value_free_closure)
6581 (value_of_dwarf_reg_entry, free_pieced_value_closure)
6582 (dwarf2_evaluate_loc_desc_full): Update.
6583 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
6584 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
6585 (~watchpoint, watch_command_1)
6586 (invalidate_bp_value_on_memory_change): Update.
6587 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
6589 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
6592 * warning.m4: Add -Wno-error=deprecated-register.
6593 * configure: Re-generate.
6595 2018-04-05 Tom Tromey <tom@tromey.com>
6597 * linespec.h: Remove include of "vec.h".
6599 2018-04-05 Tom Tromey <tom@tromey.com>
6601 * linespec.c (typep): Remove typedef.
6602 (find_methods, find_superclass_methods): Take a std::vector.
6603 (find_method): Use std::vector.
6605 2018-04-05 Tom Tromey <tom@tromey.com>
6607 * utils.c (compare_strings): Remove.
6608 * utils.h (compare_strings): Remove.
6609 * objc-lang.h (find_imps): Update.
6610 * objc-lang.c (find_methods): Take a std::vector.
6611 (uniquify_strings, find_imps): Likewise.
6612 * linespec.c (find_methods): Take a std::vector.
6613 (decode_objc): Use std::vector.
6614 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
6616 (find_method, find_function_symbols): Use std::vector.
6618 2018-04-05 Tom Tromey <tom@tromey.com>
6620 * completer.c (completion_tracker::completion_tracker): Remove
6622 (completion_tracker::discard_completions): Likewise.
6623 * breakpoint.c (ambiguous_names_p): Remove cast.
6624 * ada-lang.c (_initialize_ada_language): Remove cast.
6625 * utils.h (streq): Update.
6626 (streq_hash): Add new declaration.
6627 * utils.c (streq): Return bool.
6628 (streq_hash): New function.
6630 2018-04-05 Tom Tromey <tom@tromey.com>
6632 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
6633 Remove a string copy.
6635 2018-04-05 Tom Tromey <tom@tromey.com>
6637 * linespec.c (filter_results): Use std::vector.
6638 (decode_line_2, decode_line_full): Update.
6640 2018-04-05 Tom Tromey <tom@tromey.com>
6642 * linespec.c (canonical_to_fullform): Return std::string.
6643 (filter_results): Update.
6644 (struct decode_line_2_item): Add constructor.
6645 <fullform, displayform>: Now std::string.
6646 (decode_line_2_compare_items): Now a std::sort comparator.
6647 (decode_line_2): Update.
6649 2018-04-05 Tom Tromey <tom@tromey.com>
6651 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
6652 (unexpected_linespec_error): Update.
6653 (linespec_parse_basic, parse_linespec): Update.
6655 2018-04-05 Tom Tromey <tom@tromey.com>
6657 * linespec.c (linespec_parse_basic): Reindent.
6659 2018-04-05 Tom Tromey <tom@tromey.com>
6661 * minsyms.h (iterate_over_minimal_symbols): Update.
6662 * minsyms.c (iterate_over_minimal_symbols): Take a
6664 * linespec.c (struct collect_minsyms): Remove.
6665 (compare_msyms): Now a std::sort comparator.
6666 (add_minsym): Add parameters.
6667 (search_minsyms_for_name): Update. Use std::vector.
6669 2018-04-03 Tom Tromey <tom@tromey.com>
6671 * mipsread.c (read_alphacoff_dynamic_symtab): Use
6674 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
6676 * MAINTAINERS (Write After Approval): Add Weimin Pan.
6678 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
6681 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
6682 printing static type.
6684 2018-04-01 Tom Tromey <tom@tromey.com>
6686 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
6687 (rs6000_xfer_shared_libraries): Update.
6689 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
6691 * common/gdb_vecs.h (char_ptr): Remove.
6692 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
6694 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
6696 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
6698 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
6700 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
6702 * tracepoint.h (struct uploaded_tp): Initialize fields.
6703 <actions, step_actions, cmd_strings>: Change type to
6704 std::vector<char *>.
6705 * tracepoint.c (get_uploaded_tp): Allocate with new.
6706 (free_uploaded_tps): Free with delete.
6707 (parse_tracepoint_definition): Adjust to std::vector change.
6708 * breakpoint.c (read_uploaded_action): Likewise.
6709 (create_tracepoint_from_upload): Likewise.
6710 * ctf.c (ctf_write_uploaded_tp): Likewise.
6711 (SET_ARRAY_FIELD): Likewise.
6712 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
6714 2018-03-30 Tom Tromey <tom@tromey.com>
6716 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
6718 (svr4_keep_data_in_core): Update.
6719 (svr4_read_so_list): Update.
6721 2018-03-30 Tom Tromey <tom@tromey.com>
6723 * windows-nat.c (handle_output_debug_string, handle_exception):
6725 * target.h (target_read_string): Update.
6726 * target.c (target_read_string): Change "string" to
6728 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
6730 * solib-frv.c (frv_current_sos): Update.
6731 * solib-dsbt.c (dsbt_current_sos): Update.
6732 * solib-darwin.c (darwin_current_sos): Update.
6733 * linux-thread-db.c (inferior_has_bug): Update.
6734 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
6735 Update. Remove alloca.
6736 * ada-lang.c (ada_main_name): Update.
6738 2018-03-30 Tom Tromey <tom@tromey.com>
6740 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
6741 (struct dwo_file_deleter): New.
6742 (dwo_file_up): New typedef.
6743 (open_and_init_dwo_file): Use dwo_file_up.
6744 (free_dwo_file_cleanup): Remove.
6746 2018-03-30 Tom Tromey <tom@tromey.com>
6748 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
6749 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
6751 2018-03-30 Tom Tromey <tom@tromey.com>
6753 * dwarf2read.c (class free_cached_comp_units): New class.
6754 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
6755 (free_cached_comp_units): Remove function.
6757 2018-03-30 Tom Tromey <tom@tromey.com>
6759 * utils.h (make_cleanup_unpush_target): Remove.
6760 * inf-ptrace.c (struct target_unpusher): New.
6761 (target_unpush_up) New typedef.
6762 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
6764 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
6766 2018-03-27 Tom Tromey <tom@tromey.com>
6768 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
6770 2018-03-27 Pedro Alves <palves@redhat.com>
6771 Tom Tromey <tom@tromey.com>
6773 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
6774 destructor. Now a class.
6775 (gdb_readline_wrapper_cleanup): Remove function.
6776 (gdb_readline_wrapper): Remove cleanups.
6778 2018-03-27 Tom Tromey <tom@tromey.com>
6780 * typeprint.h (struct type_print_options) <local_typedefs,
6781 global_typedefs>: Remove "struct" keyword.
6782 (class typedef_hash_table): New class.
6783 (recursively_update_typedef_hash, add_template_parameters)
6784 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
6785 (find_typedef_in_hash): Don't declare.
6786 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
6787 (typedef_hash_table::recursively_update): Rename from
6788 recursively_update_typedef_hash. Now a member.
6789 (typedef_hash_table::add_template_parameters): Rename from
6790 add_template_parameters. Now a member.
6791 (typedef_hash_table::typedef_hash_table): Now a constructor;
6792 rename from create_typedef_hash.
6793 (typedef_hash_table::~typedef_hash_table): Now a destructor;
6794 rename from free_typedef_hash.
6795 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
6796 (do_free_global_table): Remove.
6797 (typedef_hash_table::typedef_hash_table): New constructor; renamed
6798 from copy_type_recursive.
6799 (create_global_typedef_table): Remove.
6800 (typedef_hash_table::find_global_typedef): Now a member of
6802 (typedef_hash_table::find_typedef): Rename from
6803 find_typedef_in_hash; now a member.
6804 (whatis_exp): Update.
6805 * extension.h (struct ext_lang_type_printers): Add constructor and
6807 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
6809 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
6810 Now a constructor; rename from start_ext_lang_type_printers.
6811 (ext_lang_type_printers): Now a destructor; rename from
6812 free_ext_lang_type_printers.
6813 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
6815 (c_type_print_base_struct_union): Update. Remove cleanups.
6817 2018-03-27 Tom Tromey <tom@tromey.com>
6819 * dwarf-index-write.c: Include <cmath>.
6821 2018-03-27 Joel Brobecker <brobecker@adacore.com>
6823 * NEWS: Add entry describing new "set|show varsize-limit" command.
6824 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
6826 * printcmd.c (_initialize_printcmd): Add "set var" alias of
6829 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
6831 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
6833 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
6834 * dwarf-index-common.c: New file.
6835 * dwarf-index-common.h: New file.
6836 * dwarf-index-write.c: New file.
6837 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
6838 (struct dwarf2_section_info): Move from here.
6839 (dwarf2_section_info_def): Likewise.
6840 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
6841 (offset_type): Likewise.
6842 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
6843 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
6844 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
6845 (byte_swap): Likewise.
6846 (MAYBE_SWAP): Likewise.
6847 (dwarf2_per_cu_ptr): Likewise.
6848 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
6849 (struct tu_stats): Likewise.
6850 (struct dwarf2_per_objfile): Likewise.
6851 (struct dwarf2_per_cu_data): Likewise.
6852 (struct signatured_type): Likewise.
6853 (sig_type_ptr): Likewise.
6854 (DEF_VEC_P (sig_type_ptr)): Likewise.
6855 (INDEX4_SUFFIX): Likewise.
6856 (INDEX5_SUFFIX): Likewise.
6857 (DEBUG_STR_SUFFIX): Likewise.
6858 (dwarf2_read_section): Make non-static.
6859 (mapped_index_string_hash): Move from here.
6860 (dwarf5_djb_hash): Likewise.
6861 (file_write): Likewise.
6862 (class data_buf): Likewise.
6863 (struct symtab_index_entry): Likewise.
6864 (struct mapped_symtab): Likewise.
6865 (find_slot): Likewise.
6866 (hash_expand): Likewise.
6867 (add_index_entry): Likewise.
6868 (uniquify_cu_indices): Likewise.
6869 (class c_str_view): Likewise.
6870 (class c_str_view_hasher): Likewise.
6871 (class vector_hasher): Likewise.
6872 (write_hash_table): Likewise.
6873 (psym_index_map): Likewise.
6874 (struct addrmap_index_data): Likewise.
6875 (add_address_entry): Likewise.
6876 (add_address_entry_worker): Likewise.
6877 (write_address_map): Likewise.
6878 (symbol_kind): Likewise.
6879 (write_psymbols): Likewise.
6880 (struct signatured_type_index_data): Likewise.
6881 (write_one_signatured_type): Likewise.
6882 (recursively_count_psymbols): Likewise.
6883 (recursively_write_psymbols): Likewise.
6884 (class debug_names): Likewise.
6885 (check_dwarf64_offsets): Likewise.
6886 (psyms_seen_size): Likewise.
6887 (write_gdbindex): Likewise.
6888 (write_debug_names): Likewise.
6889 (assert_file_size): Likewise.
6890 (write_psymtabs_to_index): Likewise.
6891 (save_gdb_index_command): Likewise.
6892 (_initialize_dwarf2_read): Don't register the "save gdb-index"
6894 * dwarf2read.h: New file.
6896 2018-03-27 Joel Brobecker <brobecker@adacore.com>
6899 * dwarf2read.c (dwarf2_physname): Do not return the demangled
6900 symbol name if the CU's language stores symbol names in linkage
6902 * language.h (struct language_defn)
6903 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
6904 all instances of this struct.
6906 2018-03-26 Tom Tromey <tom@tromey.com>
6908 * stack.c (backtrace_command_1): Remove verbose code.
6910 2018-03-26 Tom Tromey <tom@tromey.com>
6912 * python/py-framefilter.c (py_print_type): Don't catch
6913 exceptions. Return void.
6914 (py_print_value): Likewise.
6915 (py_print_single_arg): Likewise.
6916 (enumerate_args): Don't catch exceptions.
6917 (py_print_args): Likewise.
6918 (py_print_frame): Likewise.
6919 (gdbpy_apply_frame_filter): Catch exceptions here.
6921 2018-03-26 Tom Tromey <tom@tromey.com>
6923 * stack.c (_initialize_stack): Remove trailing newlines from help
6924 text. Add "Usage" line to "backtrace" help.
6926 2018-03-26 Tom Tromey <tom@tromey.com>
6929 * python/py-framefilter.c (py_print_args): Call wrap_hint.
6931 2018-03-26 Tom Tromey <tom@tromey.com>
6933 * python/py-framefilter.c (py_print_single_arg): Return
6934 EXT_LANG_BT_ERROR from catch.
6936 2018-03-26 Tom Tromey <tom@tromey.com>
6939 * stack.c (backtrace_command_1): Move some code into no-filters
6942 2018-03-26 Tom Tromey <tom@tromey.com>
6944 * python/py-framefilter.c (throw_quit_or_print_exception): New
6946 (gdbpy_apply_frame_filter): Use it.
6948 2018-03-26 Tom Tromey <tom@tromey.com>
6951 * python/py-framefilter.c (py_print_type, py_print_value)
6952 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
6955 2018-03-26 Tom Tromey <tom@tromey.com>
6957 * python/py-framefilter.c (enumerate_args): Use
6958 gdb::unique_xmalloc_ptr.
6960 2018-03-26 Tom Tromey <tom@tromey.com>
6962 * python/py-framefilter.c (py_print_frame): Return
6964 (gdbpy_apply_frame_filter): Update comment.
6965 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
6967 <EXT_LANG_BT_NO_FILTERS>: Change value.
6969 2018-03-26 Tom Tromey <tom@tromey.com>
6972 * stack.c (backtrace_command): Parse "hide" argument.
6973 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
6974 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
6977 2018-03-26 Tom Tromey <tom@tromey.com>
6979 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
6981 (backtrace_command): Remove "fulltrace", add "flags".
6983 2018-03-26 Tom Tromey <tom@tromey.com>
6985 * stack.c (backtrace_command): Rewrite command line parsing.
6987 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
6989 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
6991 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
6993 * filename-seen-cache.h: Add include guard.
6995 2018-03-26 Keith Seitz <keiths@redhat.com>
6997 * symfile.c (place_section): Remove "struct" from section_addr_info
6999 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
7000 "struct" keyword from section_addr_info.
7002 2018-03-26 Alan Hayward <alan.hayward@arm.com>
7004 * regformats/regdef.h (reg): Add constructors.
7006 2018-03-25 Pedro Alves <palves@redhat.com>
7008 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
7009 if then/else bodies in var_func_name extraction.
7011 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
7013 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
7014 lookup_minimal_symbol() to find symbol entry.
7015 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
7017 2018-03-23 Keith Seitz <keiths@redhat.com>
7020 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
7021 nested type definitions for C++, too.
7023 2018-03-23 Tom Tromey <tom@tromey.com>
7025 * machoread.c (struct oso_el): Add a constructor. Don't define as
7027 (macho_register_oso): Remove.
7028 (macho_symtab_read): Take a std::vector.
7029 (oso_el_compare_name): Now a std::sort comparator.
7030 (macho_symfile_read_all_oso): Take a std::vector.
7031 (macho_symfile_read): Use std::vector. Remove cleanups.
7033 2018-03-22 Tom Tromey <tom@tromey.com>
7035 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
7036 (record_full_goto_bookmark): Use std::string.
7038 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7041 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
7044 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7046 * rs6000-tdep.c (store_insn_p): New function.
7047 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
7048 and cr_reg to their unshifted values. Use store_insn_p to
7049 match LR saves using either R1 or fdata->alloca_reg. Use
7050 store_insn_p to match CR saves. Set alloca_reg_offset
7051 when alloca_reg and framep are set. Remove lr_reg shift
7052 when assigning to fdata->lr_register.
7054 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
7056 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
7057 command line args instead of emitting a warning.
7059 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
7061 * tracepoint.h (struct static_tracepoint_marker): Initialize
7062 fields, define default constructor, move constructor and move
7063 assignment, disable the rest.
7064 <str_id, extra>: Make std::string.
7065 (release_static_tracepoint_marker): Remove.
7066 (free_current_marker): Remove.
7067 * tracepoint.c (free_current_marker): Remove.
7068 (parse_static_tracepoint_marker_definition): Adjust to
7069 std::string, use new hex2str overload.
7070 (release_static_tracepoint_marker): Remove.
7071 (print_one_static_tracepoint_marker): Get marker by reference
7072 and adjust to std::string.
7073 (info_static_tracepoint_markers_command): Adjust to std::vector
7075 * target.h (static_tracepoint_marker_p): Remove typedef.
7076 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
7077 (struct target_ops) <to_static_tracepoint_marker_at>: Return
7079 <to_static_tracepoint_markers_by_strid>: Return std::vector.
7081 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
7082 (target_debug_print_std_vector_static_tracepoint_marker): New.
7083 (target_debug_print_struct_static_tracepoint_marker_p): Rename
7085 (target_debug_print_static_tracepoint_marker_p): ... this.
7086 * target-delegates.c: Re-generate.
7087 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
7089 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
7090 (decode_static_tracepoint_spec): Adjust to std::vector.
7091 (tracepoint_print_one_detail): Adjust to std::string.
7092 (strace_marker_decode_location): Adjust to std::string.
7093 (update_static_tracepoint): Adjust to std::string, remove call
7094 to release_static_tracepoint_marker.
7095 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
7096 Adjust to std::vector.
7097 * remote.c (remote_static_tracepoint_marker_at): Return bool.
7098 (remote_static_tracepoint_markers_by_strid): Adjust to
7100 * common/rsp-low.h (hex2str): New overload with explicit count
7102 * common/rsp-low.c (hex2str): New overload with explicit count
7104 * unittests/rsp-low-selftests.c (test_hex2str): New function.
7105 (_initialize_rsp_low_selftests): Add test_hex2str test.
7106 * unittests/tracepoint-selftests.c
7107 (test_parse_static_tracepoint_marker_definition): Adjust to
7110 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
7112 * tracepoint.c (parse_static_tracepoint_marker_definition):
7113 Consider case where the definition is followed by more
7115 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7116 tracepoint-selftests.c.
7117 * unittests/tracepoint-selftests.c: New.
7119 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7121 * MAINTAINERS (Write After Approval): Add Pedro Franco de
7124 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
7126 * symtab.c (find_pc_sect_line): fixed indentation.
7128 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
7130 * symtab.c (find_pc_sect_line): now uses binary search.
7132 2018-03-19 Tom Tromey <tom@tromey.com>
7134 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
7137 2018-03-19 Pedro Alves <palves@redhat.com>
7138 Tom Tromey <tom@tromey.com>
7140 * unittests/observable-selftests.c: New file.
7141 * common/observable.h: New file.
7142 * observable.h: New file.
7143 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
7144 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
7145 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
7146 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
7147 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
7148 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
7149 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
7150 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
7151 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
7152 python/py-breakpoint.c, python/py-finishbreakpoint.c,
7153 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
7154 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
7155 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
7156 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
7157 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
7158 tui/tui-interp.c, valops.c: Update all users.
7159 * tui/tui-hooks.c (tui_bp_created_observer)
7160 (tui_bp_deleted_observer, tui_bp_modified_observer)
7161 (tui_inferior_exit_observer, tui_before_prompt_observer)
7162 (tui_normal_stop_observer, tui_register_changed_observer):
7164 (tui_observers_token): New global.
7165 (attach_or_detach, tui_attach_detach_observers): New functions.
7166 (tui_install_hooks, tui_remove_hooks): Use
7167 tui_attach_detach_observers.
7168 * record-btrace.c (record_btrace_thread_observer): Remove.
7169 (record_btrace_thread_observer_token): New global.
7170 * observer.sh: Remove.
7171 * observer.c: Rename to observable.c.
7172 * observable.c (namespace gdb_observers): Define new objects.
7173 (observer_debug): Move into gdb_observers namespace.
7174 (struct observer, struct observer_list, xalloc_observer_list_node)
7175 (xfree_observer_list_node, generic_observer_attach)
7176 (generic_observer_detach, generic_observer_notify): Remove.
7177 (_initialize_observer): Update.
7178 Don't include observer.inc.
7179 * Makefile.in (generated_files): Remove observer.h, observer.inc.
7180 (clean mostlyclean): Likewise.
7181 (observer.h, observer.inc): Remove targets.
7182 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
7183 (COMMON_SFILES): Use observable.c, not observer.c.
7184 * .gitignore: Remove observer.h.
7186 2018-03-18 Tom Tromey <tom@tromey.com>
7188 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
7190 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
7192 2018-03-17 Tom Tromey <tom@tromey.com>
7194 * auto-load.c (auto_load_objfile_script_1): Use std::string.
7196 2018-03-17 Tom Tromey <tom@tromey.com>
7198 * target.c (class scoped_target_fd): New.
7199 (target_fileio_close_cleanup): Remove.
7200 (target_fileio_read_alloc_1): Use scoped_target_fd.
7202 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
7204 * silent-rules.mk: New.
7205 * Makefile.in: Include silent-rules.mk
7206 (srcdir, VPATH, top_srcdir): Move up.
7207 (COMPILE): Add ECHO_CXX.
7208 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
7209 (init.c): Add ECHO_INIT_C.
7210 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
7211 (version.c): Add ECHO_GEN.
7212 (printcmd.o): Add ECHO_CXX.
7213 (target-float.o): Add ECHO_CXX.
7214 (ada-exp.o): Add ECHO_CXX.
7215 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
7216 (insight$(EXEEXT)): Add ECHO_CXXLD.
7217 * gnulib/configure.ac: Add AM_SILENT_RULES.
7218 * gnulib/aclocal.m4: Re-generate.
7219 * gnulib/configure: Re-generate.
7220 * gnulib/import/Makefile.in: Re-generate.
7222 2018-03-16 Tom Tromey <tom@tromey.com>
7224 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
7225 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
7226 * utils.c (do_free_section_addr_info)
7227 (make_cleanup_free_section_addr_info): Remove.
7228 * symfile.h (struct other_sections): Add constructor.
7229 (struct section_addr_info): Remove.
7230 (section_addr_info): New typedef.
7231 (struct sym_fns) <sym_offsets>: Change type of parameter.
7232 (build_section_addr_info_from_objfile)
7233 (relative_addr_info_to_section_offsets, addr_info_make_relative)
7234 (default_symfile_offsets, symbol_file_add)
7235 (symbol_file_add_from_bfd)
7236 (build_section_addr_info_from_section_table): Update.
7237 (alloc_section_addr_info, free_section_addr_info): Don't declare.
7238 * symfile.c (alloc_section_addr_info): Remove.
7239 (build_section_addr_info_from_section_table): Change return type.
7241 (build_section_addr_info_from_bfd)
7242 (build_section_addr_info_from_objfile): Likewise.
7243 (free_section_addr_info): Remove.
7244 (relative_addr_info_to_section_offsets): Change type of "addrs".
7245 (addrs_section_compar): Now a std::sort comparator.
7246 (addrs_section_sort): Change return type.
7247 (addr_info_make_relative): Change type of "addrs". Update.
7248 (default_symfile_offsets, syms_from_objfile_1)
7249 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
7250 (symbol_file_add_separate): Update.
7251 (symbol_file_add): Change type of "addrs". Update.
7252 (add_symbol_file_command): Update. Remove cleanups.
7253 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
7255 * symfile-debug.c (debug_sym_offsets): Change type of "info".
7256 * solib.c (solib_read_symbols): Update.
7257 * objfiles.c (objfile_relocate): Update. Remove cleanups.
7258 * machoread.c (macho_symfile_offsets): Update.
7259 * jit.c (jit_bfd_try_read_symtab): Update.
7261 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
7263 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7264 unittests/utils-selftests.c.
7265 * unittests/utils-selftests.c: New file.
7267 2018-03-14 Tom Tromey <tom@tromey.com>
7270 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
7273 2018-03-14 Tom Tromey <tom@tromey.com>
7276 * printcmd.c (printf_pointer): Allow "-" in format.
7278 2018-03-14 Tom Tromey <tom@tromey.com>
7280 * printcmd.c (_initialize_printcmd): Add usage to printf.
7282 2018-03-14 Yao Qi <qiyao@sourceware.org>
7284 * MAINTAINERS: Update my email address.
7286 2018-03-13 Tom Tromey <tom@tromey.com>
7288 * machoread.c (macho_check_dsym): Change filenamep to a
7290 (macho_symfile_read): Update.
7291 * symfile.c (load_command): Use std::string.
7293 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
7295 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
7296 to error message string.
7297 (riscv_register_name): Use xsnprintf instead of sprintf.
7298 (riscv_insn::fetch_instruction): Use gdb_assert instead of
7300 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
7302 (riscv_push_dummy_call): Likewise.
7304 2018-03-12 Tom Tromey <tom@tromey.com>
7306 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
7307 Use gdb::byte_vector.
7308 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
7310 2018-03-12 Yao Qi <yao.qi@linaro.org>
7312 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
7313 parameter type to readable_regcache.
7314 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
7317 2018-03-11 Tom Tromey <tom@tromey.com>
7319 * dwarf2read.c (struct nextfield): Add initializers.
7320 (struct nextfnfield): Remove.
7321 (struct fnfieldlist): Add initializers. Remove "length" and
7322 "head", use std::vector.
7323 (struct decl_field_list): Remove.
7324 (struct field_info): Add initializers.
7325 <fields, baseclasses>: Now std::vector.
7326 <nbaseclasses, nfnfields, typedef_field_list_count,
7327 nested_types_list_count>: Remove.
7328 (dwarf2_add_field, dwarf2_add_type_defn)
7329 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
7330 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
7331 (process_structure_scope): Update.
7333 2018-03-11 Tom Tromey <tom@tromey.com>
7335 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
7336 for use by std::sort.
7337 (build_type_psymtabs_1): Use std::vector.
7339 2018-03-09 Eli Zaretskii <eliz@gnu.org>
7341 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
7342 and LIBMPFR in the printed configuration.
7344 2018-03-08 Tom Tromey <tom@tromey.com>
7346 * source.c (get_filename_and_charpos): Use scoped_fd.
7347 * nto-procfs.c (procfs_open_1): Use scoped_fd.
7348 (procfs_pidlist): Likewise.
7349 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
7350 (iterate_over_mappings): Likewise.
7352 2018-03-08 Tom Tromey <tom@tromey.com>
7354 * infcall.c (struct call_return_meta_info)
7355 <stack_temporaries_enabled>: Remove.
7356 (get_call_return_value, call_function_by_hand_dummy): Update.
7357 * thread.c (disable_thread_stack_temporaries): Remove.
7358 (enable_thread_stack_temporaries): Remove.
7359 (thread_stack_temporaries_enabled_p): Return bool.
7360 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
7361 (get_last_thread_stack_temporary): Update.
7362 * eval.c (evaluate_subexp): Update.
7363 * gdbthread.h (class enable_thread_stack_temporaries): Now a
7364 class, not a function.
7365 (value_ptr, value_vec): Remove typedefs.
7366 (class thread_info) <stack_temporaries_enabled>: Now bool.
7367 <stack_temporaries>: Now a std::vector.
7368 (thread_stack_temporaries_enabled_p)
7369 (value_in_thread_stack_temporaries): Return bool.
7371 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
7373 * remote.c (putpkt_binary): Fix omitted bytes reporting.
7374 (getpkt_or_notif_sane_1): Likewise.
7376 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7378 * build-id.c (build_id_to_debug_bfd): Use std::string.
7380 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7382 * build-id.c (find_separate_debug_file_by_buildid): Return
7384 * build-id.h (find_separate_debug_file_by_buildid): Return
7386 * coffread.c (coff_symfile_read): Adjust to std::string.
7387 * elfread.c (elf_symfile_read): Adjust to std::string.
7388 * symfile.c (separate_debug_file_exists): Change parameter to
7390 (find_separate_debug_file): Return std::string.
7391 (find_separate_debug_file_by_debuglink): Return std::string.
7392 * symfile.h (find_separate_debug_file_by_debuglink): Return
7395 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7397 * common/xml-utils.c (xml_escape_text): Move code to...
7398 (xml_escape_text_append): ... this new function.
7399 * common/xml-utils.h (xml_escape_text_append): New declaration.
7400 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
7402 (_initialize_xml_utils): register test_xml_escape_text_append as
7405 2018-03-07 Alan Hayward <alan.hayward@arm.com>
7407 * defs.h: Remove MAX_REGISTER_SIZE.
7408 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
7410 * python/py-unwind.c (pyuw_sniffer): Likewise.
7412 2018-03-07 Tom Tromey <tom@tromey.com>
7414 * linux-tdep.c (linux_info_proc): Update.
7415 * target.h (struct target_ops) <to_fileio_readlink>: Return
7417 (target_fileio_readlink): Return optional<string>.
7418 * remote.c (remote_hostio_readlink): Return optional<string>.
7419 * inf-child.c (inf_child_fileio_readlink): Return
7421 * target.c (target_fileio_readlink): Return optional<string>.
7423 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
7425 * regcache.c (cooked_read_test): Add riscv to the list of
7426 architectures that have a save_reggroup.
7428 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
7430 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
7431 value is not a dynamic class object.
7433 2018-03-06 Tom Tromey <tom@tromey.com>
7435 * rust-exp.y: Formatting fixes.
7437 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7439 * riscv-tdep.c (riscv_register_name): Remove target description
7441 (riscv_gdbarch_init): Remove target description check.
7443 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7445 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
7447 * riscv-tdep.h: Likewise.
7449 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7451 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
7452 (riscv_pseudo_register_write): Delete.
7453 (riscv_gdbarch_init): Remove all use of pseudo registers.
7455 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7457 * record-btrace.c (btrace_print_lines): Replace cleanup
7458 parameter with RAII equivalents.
7459 (btrace_insn_history): Replace cleanup with RAII equivalents.
7460 * ui-out.h (make_cleanup_ui_out_list_begin_end,
7461 make_cleanup_ui_out_tuple_begin_end): Remove.
7462 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
7463 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
7464 make_cleanup_ui_out_list_begin_end): Remove.
7466 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7468 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
7469 parameter types to std::vector. Use bool.
7470 (record_btrace_wait): Replace VEC(tp_t) with
7471 std::vector<thread_info *>.
7472 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
7474 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7476 * record-btrace.c (record_btrace_disable_callback): Remove.
7477 (struct scoped_btrace_disable): New.
7478 (record_btrace_open): Use scoped_btrace_disable.
7480 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7482 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
7483 reading values from registers.
7485 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7487 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
7490 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7492 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
7493 change parameter type. Use GDB's print functions, and use
7494 core_addr_to_string where appropriate.
7495 (riscv_push_dummy_call): Use core_addr_to_string where
7496 appropriate, update call to riscv_print_arg_location, and reindent
7498 (riscv_return_value): Update call to riscv_print_arg_location.
7500 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7501 Tim Newsome <tim@sifive.com>
7502 Albert Ou <a0u@eecs.berkeley.edu>
7503 Darius Rad <darius@bluespec.com>
7505 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
7506 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
7507 (ALLDEPFILES): Add riscv-tdep.c
7508 * configure.tgt: Add riscv support.
7509 * riscv-tdep.c: New file.
7510 * riscv-tdep.h: New file.
7511 * NEWS: Mention new target.
7512 * MAINTAINERS: Add entry for riscv.
7514 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7516 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
7517 fields within aggregates.
7519 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
7521 * record-btrace.c (btrace_print_lines): Change type of flags to
7522 gdb_disassembly_flags.
7524 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7526 * fbsd-nat.c: Include "inf-ptrace.h".
7527 (USE_SIGTRAP_SIGINFO): Conditionally define.
7528 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
7529 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
7530 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
7532 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
7534 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
7536 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
7537 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
7538 "supports_stopped_by_hw_breakpoint" target methods.
7540 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7542 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
7543 * fbsd-nat.c (debug_fbsd_nat): New variable.
7544 (show_fbsd_nat_debug): New function.
7545 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
7546 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
7548 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7550 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
7551 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
7553 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
7554 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
7557 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7559 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
7560 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
7562 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7564 * charset.c (struct charset_vector): New.
7565 (charsets): Change type to charset_vector.
7566 (find_charset_names): Adjust.
7568 (_initialize_charset): Adjust.
7570 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7572 * progspace.h (struct program_space) <deleted_solibs>: Change
7573 type to std::vector<std::string>.
7574 * progspace.c (clear_program_space_solib_cache): Adjust.
7575 * breakpoint.c (print_solib_event): Adjust.
7576 (check_status_catch_solib): Adjust.
7577 * solib.c (update_solib_list): Adjust.
7578 * ui-out.h (class ui_out) <field_string>: New overload.
7579 * ui-out.c (ui_out::field_string): New overload.
7581 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7583 * progspace.h (struct program_space): Add constructor and
7584 destructor, initialize fields.
7585 (add_program_space): Remove.
7586 * progspace.c (add_program_space): Rename to...
7587 (program_space::program_space): ... this.
7588 (release_program_space): Rename to...
7589 (program_space::~program_space): ... this.
7590 (delete_program_space): Use delete to delete program_space.
7591 (initialize_progspace): Use new to allocate program_space.
7592 * inferior.c (add_inferior_with_spaces): Likewise.
7593 (clone_inferior_command): Likewise.
7594 * infrun.c (follow_fork_inferior): Likewise.
7595 (handle_vfork_child_exec_or_exit): Likewise.
7597 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7599 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
7600 (delim_string_to_char_ptr_vec): Return std::vector of
7601 gdb::unique_xmalloc_ptr.
7602 (dirnames_to_char_ptr_vec_append): Take std::vector of
7603 gdb::unique_xmalloc_ptr.
7604 (dirnames_to_char_ptr_vec): Return std::vector of
7605 gdb::unique_xmalloc_ptr.
7606 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
7607 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
7608 (delim_string_to_char_ptr_vec): Return an std::vector of
7609 gdb::unique_xmalloc_ptr, adjust the code.
7610 (dirnames_to_char_ptr_vec_append): Take an std::vector of
7611 gdb::unique_xmalloc_ptr, adjust the code.
7612 (dirnames_to_char_ptr_vec): Return an std::vector of
7613 gdb::unique_xmalloc_ptr, adjust the code.
7614 * auto-load.c (auto_load_safe_path_vec): Change type to
7615 std::vector of gdb::unique_xmalloc_ptr.
7616 (auto_load_expand_dir_vars): Return an std::vector of
7617 gdb::unique_xmalloc_ptr, adjust the code.
7618 (auto_load_safe_path_vec_update): Adjust.
7619 (filename_is_in_auto_load_safe_path_vec): Adjust.
7620 (auto_load_objfile_script_1): Adjust.
7621 * build-id.c (build_id_to_debug_bfd): Adjust.
7622 * linux-thread-db.c (thread_db_load_search): Adjust.
7623 * source.c (add_path): Adjust.
7625 * symfile.c (find_separate_debug_file): Adjust.
7626 * utils.c (do_free_char_ptr_vec): Remove.
7627 (make_cleanup_free_char_ptr_vec): Remove.
7629 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
7632 * common/pathstuff.c: Conditionally include "<windows.h>".
7634 2018-03-01 Georg Sauthoff <mail@georg.so>
7637 * gcore.in: Quote variables and switch interpreter to bash.
7639 2018-03-01 Tom Tromey <tom@tromey.com>
7641 * dwarf2read.c (alloc_discriminant_info): Fix default_index
7642 assertion. Add assertion for discriminant_index.
7643 (quirk_rust_enum): Use correct base type name in univariant case.
7645 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
7647 * record.c (get_call_history_modifiers): Return a
7649 (cmd_record_call_history): Adjust.
7650 * record-btrace.c (record_btrace_call_history): Adjust.
7651 (record_btrace_call_history_range): Adjust.
7652 (record_btrace_call_history_from): Adjust.
7653 * target-debug.h (target_debug_print_record_print_flags): New.
7654 * target-delegates.c: Re-generate.
7655 * target.c (target_call_history): Change flags type.
7656 (target_call_history_from): Likewise.
7657 (target_call_history_range): Likewise.
7658 * target.h (struct target_ops) <target_call_history>: Likewise.
7659 (target_call_history_from): Likewise.
7660 (target_call_history_range): Likewise.
7662 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
7663 Simon Marchi <simon.marchi@polymtl.ca>
7665 * common/common-utils.c: Include "sys/stat.h".
7666 (is_regular_file): Move here from "source.c"; change return
7668 * common/common-utils.h (is_regular_file): New prototype.
7669 * common/pathstuff.c (contains_dir_separator): New function.
7670 * common/pathstuff.h (contains_dir_separator): New prototype.
7671 * source.c: Don't include "sys/stat.h".
7672 (is_regular_file): Move to "common/common-utils.c".
7674 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
7676 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
7677 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
7678 * auto-load.c: Include "common/pathstuff.h".
7679 * common/common-def.h (current_directory): Move here.
7680 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
7682 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
7684 * common/pathstuff.c: New file.
7685 * common/pathstuff.h: New file.
7686 * compile/compile.c: Include "common/pathstuff.h".
7687 * defs.h (current_directory): Move to "common/common-defs.h".
7688 * dwarf2read.c: Include "common/pathstuff.h".
7690 * guile/scm-safe-call.c: Likewise.
7691 * linux-thread-db.c: Likewise.
7693 * nto-tdep.c: Likewise.
7694 * objfiles.c: Likewise.
7695 * source.c: Likewise.
7696 * symtab.c: Likewise.
7697 * utils.c: Include "common/pathstuff.h".
7698 (gdb_realpath): Move to "common/pathstuff.c".
7699 (gdb_realpath_keepfile): Likewise.
7700 (gdb_abspath): Likewise.
7701 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
7702 (gdb_realpath_keepfile): Likewise.
7703 (gdb_abspath): Likewise.
7705 2018-02-28 John Baldwin <jhb@FreeBSD.org>
7707 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
7708 wildcard process pid for super_resume for kernels with a
7711 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
7713 * compile/compile.c (get_args): Add additional comments
7714 explaining function.
7716 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
7717 Tom Tromey <tom@tromey.com>
7719 * target.h (memory_write_request_s): Remove typedef. Don't define
7721 (target_write_memory_blocks): Change argument to std::vector.
7722 (struct memory_write_request): Add constructor.
7723 * target-memory.c (compare_block_starting_address): Return bool.
7724 Change argument types.
7725 (claim_memory): Change arguments to use std::vector.
7726 (split_regular_and_flash_blocks, blocks_to_erase)
7727 (compute_garbled_blocks): Likewise.
7728 (cleanup_request_data, cleanup_write_requests_vector): Remove.
7729 (target_write_memory_blocks): Change argument to std::vector.
7730 * symfile.c (struct load_section_data): Add constructor and
7731 destructor. Use std::vector for "requests".
7732 (struct load_progress_data): Add initializers.
7733 (load_section_callback): Update. Use "new".
7734 (clear_memory_write_data): Remove.
7735 (generic_load): Update.
7737 2018-02-27 Alan Hayward <alan.hayward@arm.com>
7739 * arch/aarch64.h: Use common/tdesc.h.
7741 2018-02-26 Maciej W. Rozycki <macro@mips.com>
7743 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
7744 architecture with a 64-bit ABI.
7746 2018-02-26 Maciej W. Rozycki <macro@mips.com>
7748 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
7749 ahead of target description loading.
7751 2018-02-26 Tom Tromey <tom@tromey.com>
7753 * stack.c (backtrace_command_1): Update.
7754 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
7756 * python/py-framefilter.c (py_print_frame)
7757 (gdbpy_apply_frame_filter): Change type of "flags".
7758 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
7760 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
7761 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
7762 * extension.h (enum frame_filter_flag): Rename from
7764 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
7765 (apply_ext_lang_frame_filter): Change type of "flags".
7766 * extension.c (apply_ext_lang_frame_filter): Change type of
7768 * extension-priv.h (struct extension_language_ops)
7769 <apply_frame_filter>: Change type of "flags".
7771 2018-02-26 Tom Tromey <tom@tromey.com>
7774 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
7775 off-by-one in py_end computation.
7776 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
7778 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
7781 2018-02-26 Tom Tromey <tom@tromey.com>
7783 * dwarf2read.c (struct variant_field): New.
7784 (struct nextfield) <variant>: New field.
7785 (dwarf2_add_field): Handle DW_TAG_variant_part.
7786 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
7787 discriminated union.
7788 (read_structure_type): Handle DW_TAG_variant_part.
7789 (handle_struct_member_die): New function, extracted from
7790 process_structure_scope. Handle DW_TAG_variant.
7791 (process_structure_scope): Handle discriminated unions. Call
7792 handle_struct_member_die.
7794 2018-02-26 Tom Tromey <tom@tromey.com>
7796 * rust-lang.h (rust_last_path_segment): Declare.
7797 * rust-lang.c (rust_last_path_segment): Now public. Change
7799 (struct disr_info): Remove.
7800 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
7801 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
7802 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
7803 (rust_enum_p, rust_enum_variant): New function.
7804 (rust_underscore_fields): Remove "offset" parameter.
7805 (rust_print_enum): New function.
7806 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
7807 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
7808 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
7810 (rust_internal_print_type): New function, from rust_print_type.
7812 (rust_print_type): Call rust_internal_print_type.
7813 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
7814 Update enum handling.
7815 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
7816 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
7817 (rust_union_quirks): New functions.
7818 (process_full_comp_unit, process_full_type_unit): Call
7820 (process_structure_scope): Update rust_unions if necessary.
7822 2018-02-26 Tom Tromey <tom@tromey.com>
7824 * value.h (value_union_variant): Declare.
7825 * valops.c (value_union_variant): New function.
7826 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
7827 (struct discriminant_info): New.
7828 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
7830 (struct main_type) <flag_discriminated_union>: New field.
7832 2018-02-26 Tom Tromey <tom@tromey.com>
7834 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7835 unittests/unpack-selftests.c.
7836 * unittests/unpack-selftests.c: New file.
7837 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
7839 2018-02-26 Yao Qi <yao.qi@linaro.org>
7841 * dwarf2read.c (struct partial_die_info) <read>: New method.
7842 (read_partial_die): Remove the declaration.
7843 (load_partial_dies): Update.
7844 (partial_die_info::partial_die_info):
7845 (read_partial_die): Change it to partial_die_info::read.
7847 2018-02-26 Yao Qi <yao.qi@linaro.org>
7849 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
7850 (fixup_partial_die): Remove declaration.
7851 (scan_partial_symbols): Update.
7852 (partial_die_parent_scope): Likewise.
7853 (partial_die_full_name): Likewise.
7854 (fixup_partial_die): Change it to partial_die_info::fixup.
7856 2018-02-26 Yao Qi <yao.qi@linaro.org>
7858 * dwarf2read.c (read_partial_die): Update the declaration.
7859 (load_partial_dies): Caller update.
7860 (read_partial_die): Remove one argument abbrev_len.
7862 2018-02-26 Yao Qi <yao.qi@linaro.org>
7864 * dwarf2read.c (struct partial_die_info): Add ctor, delete
7865 assignment operator.
7866 (load_partial_dies): Use ctor and copy ctor.
7867 (read_partial_die): Update.
7868 (dwarf2_cu::find_partial_die): Use ctor.
7870 2018-02-26 Yao Qi <yao.qi@linaro.org>
7872 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
7873 (find_partial_die_in_comp_unit): Change it to
7874 dwarf2_cu::find_partial_die.
7875 (find_partial_die): Update.
7877 2018-02-26 Yao Qi <yao.qi@linaro.org>
7879 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
7882 2018-02-26 Yao Qi <yao.qi@linaro.org>
7884 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
7886 2018-02-26 Alan Hayward <alan.hayward@arm.com>
7888 * arch/amd64.h: Use common/tdesc.h.
7889 * arch/i386.c: Likewise.
7890 * arch/i386.h: Likewise.
7891 * arch/tic6x.c: Likewise.
7892 * arch/tdesc.h: Move file from here...
7893 * common/tdesc.h: ...to here.
7894 * features/aarch64-core.c: Regenerate.
7895 * features/aarch64-fpu.c: Regenerate.
7896 * features/i386/32bit-avx.c: Regenerate.
7897 * features/i386/32bit-avx512.c: Regenerate.
7898 * features/i386/32bit-core.c: Regenerate.
7899 * features/i386/32bit-linux.c: Regenerate.
7900 * features/i386/32bit-mpx.c: Regenerate.
7901 * features/i386/32bit-pkeys.c: Regenerate.
7902 * features/i386/32bit-sse.c: Regenerate.
7903 * features/i386/64bit-avx.c: Regenerate.
7904 * features/i386/64bit-avx512.c: Regenerate.
7905 * features/i386/64bit-core.c: Regenerate.
7906 * features/i386/64bit-linux.c: Regenerate.
7907 * features/i386/64bit-mpx.c: Regenerate.
7908 * features/i386/64bit-pkeys.c: Regenerate.
7909 * features/i386/64bit-segments.c: Regenerate.
7910 * features/i386/64bit-sse.c: Regenerate.
7911 * features/i386/x32-core.c: Regenerate.
7912 * features/tic6x-c6xp.c: Regenerate.
7913 * features/tic6x-core.c: Regenerate.
7914 * features/tic6x-gp.c: Regenerate.
7915 * target-descriptions.c: Use common/tdesc.h.
7916 * target-descriptions.h: Likewise.
7918 2018-02-24 Tom Tromey <tom@tromey.com>
7920 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
7921 (try_thread_db_load_from_dir, thread_db_load_search): Use
7923 (info_auto_load_libthread_db_compare): Return bool. Change
7925 (info_auto_load_libthread_db): Use std::vector, std::string.
7928 2018-02-24 Tom Tromey <tom@tromey.com>
7930 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
7932 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
7934 * gdbarch.c: Rebuild.
7935 * gdbarch.h: Rebuild.
7936 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
7937 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
7938 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
7941 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
7943 * gdbtypes.h (sect_offset): Change type to uint64_t.
7944 (sect_offset_str): New function.
7945 * dwarf2read.c (create_addrmap_from_aranges): Use
7947 (error_check_comp_unit_head): Likewise.
7948 (create_debug_type_hash_table): Likewise.
7949 (read_cutu_die_from_dwo): Likewise.
7950 (init_cutu_and_read_dies): Likewise.
7951 (init_cutu_and_read_dies_no_follow): Likewise.
7952 (process_psymtab_comp_unit_reader): Likewise.
7953 (partial_die_parent_scope): Likewise.
7954 (peek_die_abbrev): Likewise.
7955 (process_queue): Likewise.
7956 (dwarf2_physname): Likewise.
7957 (read_namespace_alias): Likewise.
7958 (read_import_statement): Likewise.
7959 (create_dwo_cu_reader): Likewise.
7960 (create_cus_hash_table): Likewise.
7961 (lookup_dwo_cutu): Likewise.
7962 (inherit_abstract_dies): Likewise.
7963 (read_func_scope): Likewise.
7964 (read_call_site_scope): Likewise.
7965 (dwarf2_add_member_fn): Likewise.
7966 (read_common_block): Likewise.
7967 (read_module_type): Likewise.
7968 (read_typedef): Likewise.
7969 (read_subrange_type): Likewise.
7970 (load_partial_dies): Likewise.
7971 (read_partial_die): Likewise.
7972 (find_partial_die): Likewise.
7973 (read_str_index): Likewise.
7974 (dwarf2_string_attr): Likewise.
7975 (build_error_marker_type): Likewise.
7976 (lookup_die_type): Likewise.
7977 (dump_die_shallow): Likewise.
7978 (follow_die_ref): Likewise.
7979 (dwarf2_fetch_die_loc_sect_off): Likewise.
7980 (dwarf2_fetch_constant_bytes): Likewise.
7981 (follow_die_sig): Likewise.
7982 (get_signatured_type): Likewise.
7983 (get_DW_AT_signature_type): Likewise.
7984 (dwarf2_find_containing_comp_unit): Likewise.
7985 (set_die_type): Likewise.
7987 2018-02-21 John Baldwin <jhb@FreeBSD.org>
7989 * arch/aarch64.c: Include "common-defs.h".
7990 * arch/amd64.c: Likewise.
7991 * arch/i386.c: Likewise.
7993 2018-02-21 Tom Tromey <tom@tromey.com>
7995 * value.h: (extract_field_op): Update.
7996 * eval.c (extract_field_op): Return a const char *.
7997 * expression.h (parse_expression_for_completion): Update.
7998 * completer.c (complete_expression): Update.
7999 (add_struct_fields): Make fieldname const.
8000 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
8001 (mark_completion_tag, parse_exp_in_context_1): Update.
8002 (parse_expression_for_completion): Change "name" to
8003 unique_xmalloc_ptr*.
8005 2018-02-21 Tom Tromey <tom@tromey.com>
8007 * infcall.c (call_function_by_hand_dummy): Use std::vector.
8009 2018-02-21 Yao Qi <yao.qi@linaro.org>
8011 * avr-tdep.c (avr_read_pc): Change parameter type to
8013 * gdbarch.sh (read_pc): Likewise.
8014 * gdbarch.c: Re-generated.
8015 * gdbarch.h: Re-generated.
8016 * hppa-tdep.c (hppa_read_pc): Change parameter type to
8018 * ia64-tdep.c (ia64_read_pc): Likewise.
8019 * mips-tdep.c (mips_read_pc): Likewise.
8020 * spu-tdep.c (spu_read_pc): Likewise.
8022 2018-02-21 Yao Qi <yao.qi@linaro.org>
8024 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
8025 * regcache-dump.c: New file.
8026 * regcache.c: Move register_dump to regcache-dump.c.
8027 (maintenance_print_registers): Likewise.
8028 (maintenance_print_raw_registers): Likewise.
8029 (maintenance_print_cooked_registers): Likewise.
8030 (maintenance_print_register_groups): Likewise.
8031 (maintenance_print_remote_registers): Likewise.
8032 (_initialize_regcache): Likewise.
8033 * regcache.h (register_dump): Moved from regcache.c.
8035 2018-02-21 Yao Qi <yao.qi@linaro.org>
8037 * regcache.c (regcache::regcache): Update.
8038 (regcache::invalidate): Move it to detached_regcache::invalidate.
8039 (get_thread_arch_aspace_regcache): Update.
8040 (regcache::raw_update): Update.
8041 (regcache::cooked_read): Remove some code.
8042 (regcache::cooked_read_value): Likewise.
8043 (regcache::raw_write): Remove assert on m_readonly_p.
8044 (regcache::raw_supply_integer): Move it to
8045 detached_regcache::raw_supply_integer.
8046 (regcache::raw_supply_zeroed): Likewise.
8047 * regcache.h (detached_regcache) <raw_supply_integer>: New
8049 <raw_supply_zeroed, invalidate>: Likewise.
8050 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
8051 <invalidate>: Likewise.
8052 <m_readonly_p>: Removed.
8054 2018-02-21 Yao Qi <yao.qi@linaro.org>
8056 * infcmd.c (get_return_value): Let stop_regs point to
8057 get_current_regcache.
8058 * regcache.c (regcache::regcache): Remove.
8059 (register_dump_reg_buffer): New class.
8060 (regcache_print): Adjust.
8061 * regcache.h (regcache): Remove constructors.
8063 2018-02-21 Yao Qi <yao.qi@linaro.org>
8065 * regcache.c (class register_dump): New class.
8066 (register_dump_regcache, register_dump_none): New class.
8067 (register_dump_remote, register_dump_groups): New class.
8068 (regcache_print): Update.
8069 * regcache.h (regcache_dump_what): Move it to regcache.c.
8070 (regcache) <dump>: Remove.
8072 2018-02-21 Yao Qi <yao.qi@linaro.org>
8074 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
8076 (jit_unwind_reg_set_impl): Call raw_supply.
8077 (jit_frame_sniffer): Use reg_buffer_rw.
8078 * record-full.c (record_full_core_regbuf): Change its type.
8079 (record_full_core_open_1): Use reg_buffer_rw.
8080 (record_full_close): Likewise.
8081 (record_full_core_fetch_registers): Use regcache->raw_supply.
8082 (record_full_core_store_registers): Likewise.
8083 * regcache.c (regcache::get_register_status): Move it to
8085 (regcache_raw_set_cached_value): Remove.
8086 (regcache::raw_set_cached_value): Remove.
8087 (regcache::raw_write): Call raw_supply.
8088 (regcache::raw_supply): Move it to reg_buffer_rw.
8089 * regcache.h (regcache_raw_set_cached_value): Remove.
8090 (reg_buffer_rw): New class.
8092 2018-02-21 Yao Qi <yao.qi@linaro.org>
8094 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
8095 readonly_detached_regcache.
8096 (dummy_frame_prev_register): Use regcache->cooked_read.
8097 * frame.c (frame_save_as_regcache): Change return type.
8098 (frame_pop): Update.
8099 * frame.h (frame_save_as_regcache): Update declaration.
8100 * inferior.h (get_infcall_suspend_state_regcache): Update
8102 * infrun.c (infcall_suspend_state) <registers>: use
8103 readonly_detached_regcache.
8104 (save_infcall_suspend_state): Don't use regcache_dup.
8105 (get_infcall_suspend_state_regcache): Change return type.
8106 * linux-fork.c (struct fork_info) <savedregs>: Change to
8107 readonly_detached_regcache.
8109 (fork_save_infrun_state): Don't use regcache_dup.
8110 (info_checkpoints_command): Adjust.
8111 * mi/mi-main.c (register_changed_p): Update declaration.
8112 (mi_cmd_data_list_changed_registers): Use
8113 readonly_detached_regcache.
8114 (register_changed_p): Change parameter type to
8115 readonly_detached_regcache.
8116 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
8117 readonly_detached_regcache.
8118 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
8119 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
8121 (regcache::save): Move it to reg_buffer.
8122 (regcache::restore): Change parameter type.
8123 (regcache_dup): Remove.
8124 * regcache.h (reg_buffer) <save>: New method.
8125 (readonly_detached_regcache): New class.
8126 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
8127 readonly_detached_regcache.
8128 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
8130 2018-02-21 Yao Qi <yao.qi@linaro.org>
8132 * frame.c (frame_save_as_regcache): Use regcache method save.
8133 (frame_pop): Use regcache method restore.
8134 * infrun.c (restore_infcall_suspend_state): Likewise.
8135 * linux-fork.c (fork_load_infrun_state): Likewise.
8136 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
8138 * regcache.c (regcache_save): Remove.
8139 (regcache::restore): More asserts.
8140 (regcache_cpy): Remove.
8141 * regcache.h (regcache_save): Remove the declaration.
8142 (regcache::restore): Move from private to public.
8143 Remove the friend declaration of regcache_cpy.
8144 (regcache_cpy): Remove declaration.
8146 2018-02-21 Yao Qi <yao.qi@linaro.org>
8148 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
8149 parameter type to 'readable_regcache *'.
8150 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
8151 * arm-tdep.c (arm_neon_quad_read): Likewise.
8152 (arm_pseudo_read): Likewise.
8153 * avr-tdep.c (avr_pseudo_register_read): Likewise.
8154 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
8155 * frv-tdep.c (frv_pseudo_register_read): Likewise.
8156 * gdbarch.c: Re-generated.
8157 * gdbarch.h: Re-generated.
8158 * gdbarch.sh (pseudo_register_read): Change parameter type to
8159 'readable_regcache *'.
8160 (pseudo_register_read_value): Likewise.
8161 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
8162 (h8300_pseudo_register_read): Likewise.
8163 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
8164 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
8165 (i386_pseudo_register_read_into_value): Likewise.
8166 (i386_pseudo_register_read_value): Likewise.
8167 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
8169 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
8170 * m32c-tdep.c (m32c_raw_read): Likewise.
8171 (m32c_read_flg): Likewise.
8172 (m32c_banked_register): Likewise.
8173 (m32c_banked_read): Likewise.
8174 (m32c_sb_read): Likewise.
8175 (m32c_part_read): Likewise.
8176 (m32c_cat_read): Likewise.
8177 (m32c_r3r2r1r0_read): Likewise.
8178 (m32c_pseudo_register_read): Likewise.
8179 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
8180 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
8181 (mep_pseudo_cr64_read): Likewise.
8182 (mep_pseudo_register_read): Likewise.
8183 * mips-tdep.c (mips_pseudo_register_read): Likewise.
8184 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
8185 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
8186 * regcache.c (regcache::raw_read): Move it to readable_regcache.
8187 (regcache::cooked_read): Likewise.
8188 (regcache::cooked_read_value): Likewise.
8189 (regcache_cooked_read_signed):
8190 (regcache::cooked_read): Likewise.
8191 * regcache.h (readable_regcache): New class.
8192 (regcache): Inherit readable_regcache. Move some methods to
8194 * rl78-tdep.c (rl78_pseudo_register_read): Change
8195 parameter type to 'readable_regcache *'.
8196 * rs6000-tdep.c (do_regcache_raw_read): Remove.
8197 (e500_pseudo_register_read): Change parameter type to
8198 'readable_regcache *'.
8199 (dfp_pseudo_register_read): Likewise.
8200 (vsx_pseudo_register_read): Likewise.
8201 (efpr_pseudo_register_read): Likewise.
8202 * s390-tdep.c (s390_pseudo_register_read): Likewise.
8203 * sh-tdep.c (sh_pseudo_register_read): Likewise.
8204 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
8205 (sh64_pseudo_register_read): Likewise.
8206 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
8207 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
8208 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
8209 (spu_pseudo_register_read): Likewise.
8210 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
8211 (xtensa_pseudo_register_read): Likewise.
8213 2018-02-21 Yao Qi <yao.qi@linaro.org>
8215 * regcache.c (regcache::regcache): Call reg_buffer ctor.
8216 (regcache::arch): Move it to reg_buffer::arch.
8217 (regcache::register_buffer): Likewise.
8218 (regcache::assert_regnum): Likewise.
8219 (regcache::num_raw_registers): Likewise.
8220 * regcache.h (reg_buffer): New class.
8221 (regcache): Inherit reg_buffer.
8223 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
8225 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
8226 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
8228 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
8230 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
8232 2018-02-19 Alan Hayward <alan.hayward@arm.com>
8234 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
8235 (SFILES): Remove common/*.c files.
8236 (COMMON_OBS): Remove some *.o files built from common/*.c files.
8237 * common/common.host: Add common reference.
8238 * configure.ac: Likewise.
8239 * configure: Regenerate.
8241 2018-02-16 Yao Qi <yao.qi@linaro.org>
8243 * block.c (block_namespace_info): Inherit allocate_on_obstack.
8244 (block_initialize_namespace): Use new.
8245 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
8246 (dwarf2_free_objfile): Use delete.
8247 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
8248 (copy_type_recursive): Use new.
8249 * gdb_obstack.h (allocate_on_obstack): New.
8251 2018-02-15 Yao Qi <yao.qi@linaro.org>
8254 * inferior.c (exit_inferior_1): Reset inf->control.
8256 2018-02-15 Joel Brobecker <brobecker@adacore.com>
8258 * ada-lang.c (ada_to_fixed_value_create): Delete advance
8261 2018-02-14 Pedro Alves <palves@redhat.com>
8263 * frame-unwind.c (frame_unwind_try_unwinder): Always call
8264 frame_cleanup_after_sniffer on exception.
8266 2018-02-14 Tom Tromey <tom@tromey.com>
8268 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
8270 (solib_bfd_open): Make pathname const.
8271 * solib.c (solib_bfd_open): Make pathname const.
8272 * solib-spu.c (spu_bfd_fopen): Make name const.
8273 (spu_bfd_open): Make pathname const.
8274 * solib-darwin.c (darwin_bfd_open): Make pathname const.
8275 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
8277 2018-02-14 Tom Tromey <tom@tromey.com>
8279 * symfile.c (symfile_bfd_open): Update.
8280 * source.h (openp, source_full_path_of, find_and_open_source):
8281 Change argument type to unique_xmalloc_ptr.
8282 * source.c (openp): Take a unique_xmalloc_ptr.
8283 (source_full_path_of, find_and_open_source): Likewise.
8284 (open_source_file, symtab_to_fullname): Update.
8285 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
8287 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
8288 (exec_file_find): Update.
8289 * psymtab.c (psymtab_to_fullname): Update.
8290 * nto-tdep.h (nto_find_and_open_solib): Update.
8291 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
8293 * exec.c (exec_file_attach): Update.
8294 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
8295 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
8297 2018-02-14 Tom Tromey <tom@tromey.com>
8299 * solib.c: Include source.h.
8300 * nto-tdep.c: Include source.h.
8301 * mi/mi-cmd-env.c: Include source.h.
8302 * infcmd.c: Include source.h.
8303 * exec.c: Include source.h.
8304 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
8305 (add_path, directory_switch, source_path, init_source_path): Move
8307 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
8308 (add_path, directory_switch, source_path, init_source_path):
8311 2018-02-14 Tom Tromey <tom@tromey.com>
8313 * solist.h (exec_file_find, solib_find): Return
8315 (solib_bfd_fopen): Take a const char *.
8316 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
8317 (exec_file_find, solib_find): Likewise.
8318 (solib_bfd_fopen): Do not take ownership of "pathname".
8319 (solib_bfd_open): Use unique_xmalloc_ptr.
8320 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
8321 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
8322 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
8323 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
8325 2018-02-14 Joel Brobecker <brobecker@adacore.com>
8327 * ada-lang.c (name_match_type_from_name): Remove reference to
8328 ada_name_for_lookup in function's documentation.
8329 * ada-lang.h (ada_name_for_lookup): Delete declaration.
8331 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
8333 * defs.h (enum openp_flags): New enum.
8334 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
8335 Move to enum openp_flags.
8336 (openp_flags): New enum flags.
8337 (openp): Change parameter type to openp_flags.
8338 * source.c (openp): Change parameter type to openp_flags.
8339 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
8340 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
8342 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
8344 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
8347 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
8349 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
8351 (class dwarf2_queue_guard): ...the destructor of this new class.
8352 (dw2_do_instantiate_symtab): Create instance of the new class
8353 dwarf2_queue_guard, remove cleanup.
8355 2018-02-09 Tom Tromey <tom@tromey.com>
8357 * source.c (find_source_lines): Don't reference past the end of
8360 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8362 * remote.c (remote_btrace_maybe_reopen): Change error message.
8363 * btrace.c (btrace_enable): Likewise.
8364 (parse_xml_btrace): Likewise.
8365 (parse_xml_btrace_conf): Likewise.
8367 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8369 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
8370 (linux_enable_pt, linux_enable_bts): Call
8371 diagnose_perf_event_open_fail.
8373 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8375 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
8376 Remove parameter and change return type. Update callers. Move it.
8377 (linux_enable_bts, linux_enable_pt): Improve error message.
8378 (linux_enable_pt): Remove zero buffer size check.
8379 (linux_enable_btrace): Improve error messages. Remove NULL return
8382 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8384 * btrace.c (btrace_enable): Remove target_supports_btrace call.
8385 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
8386 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
8387 (linux_supports_pt, linux_supports_btrace): Remove.
8388 (linux_enable_bts): Call cpu_supports_bts.
8389 * nat/linux-btrace.h (linux_supports_btrace): Remove.
8390 * remote.c (remote_supports_btrace): Remove.
8391 (init_remote_ops): Remove remote_supports_btrace.
8392 * target-delegates.c: Regenerated.
8393 * target.c (target_supports_btrace): Remove.
8394 * target.h (target_ops) <to_supports_btrace>: Remove
8395 (target_supports_btrace): Remove.
8396 * x86-linux-nat.c (x86_linux_create_target): Remove
8397 linux_supports_btrace.
8399 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8401 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
8403 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
8404 exception and use message in own exception.
8406 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8408 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
8409 (perf_event_pt_event_type): Use gdb_file_up.
8410 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
8411 scoped_fd, and scoped_mmap.
8413 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8415 * common/scoped_mmap.h: New.
8416 * unittests/scoped_mmap-selftest.c: New.
8417 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8418 unittests/scoped_mmap-selftest.c.
8420 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8422 * common/scoped_fd.h: New.
8423 * unittests/scoped_fd-selftest.c: New.
8424 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8425 unittests/scoped_fd-selftest.c.
8427 2018-02-09 Tom Tromey <tom@tromey.com>
8429 * auto-load.c (auto_load_section_scripts): Use
8430 gdb::unique_xmalloc_ptr.
8432 2018-02-09 Tom Tromey <tom@tromey.com>
8434 * auto-load.c (execute_script_contents): Use std::string.
8436 2018-02-09 Joel Brobecker <brobecker@adacore.com>
8438 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
8439 Python function, rather than a new command.
8441 2018-02-08 Tom Tromey <tom@tromey.com>
8443 * solib.c (solib_find_1): Use std::string.
8444 (solib_bfd_fopen): Use unique_xmalloc_ptr.
8446 2018-02-08 Tom Tromey <tom@tromey.com>
8448 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
8450 2018-02-08 Tom Tromey <tom@tromey.com>
8452 * source.c (find_source_lines): Use gdb::def_vector.
8454 2018-02-08 Tom Tromey <tom@tromey.com>
8456 * macrocmd.c (struct temporary_macro_definition): New.
8457 (macro_define_command): Use temporary_macro_definition. Remove
8459 (free_macro_definition_ptr): Remove.
8461 2018-02-08 Tom Tromey <tom@tromey.com>
8463 * macroexp.c (maybe_expand): Use std::string.
8465 2018-02-08 Tom Tromey <tom@tromey.com>
8467 * macroexp.c (struct macro_buffer): Add initializers for some
8469 (init_buffer, init_shared_buffer, free_buffer)
8470 (free_buffer_return_text): Remove.
8471 (macro_buffer): New constructors.
8472 (~macro_buffer): New destructor.
8473 (macro_buffer::set_shared): New method.
8474 (macro_buffer::resize_buffer, macro_buffer::appendc)
8475 (macro_buffer::appendmem): Now methods, not free functions.
8476 (set_token, append_tokens_without_splicing, stringify)
8477 (macro_stringify): Update.
8478 (gather_arguments): Change return type. Remove argc_p argument,
8479 add args_ptr argument. Use std::vector.
8480 (substitute_args): Remove argc argument. Accept std::vector.
8481 (expand): Update. Use std::vector.
8482 (scan, macro_expand, macro_expand_next): Update.
8484 2018-02-08 Tom Tromey <tom@tromey.com>
8486 * symtab.c (default_collect_symbol_completion_matches_break_on):
8487 Use unique_xmalloc_ptr.
8488 * macroscope.h: (sal_macro_scope, user_macro_scope)
8489 (default_macro_scope): Return unique_xmalloc_ptr.
8490 * macroscope.c (sal_macro_scope, user_macro_scope)
8491 (default_macro_scope): Return unique_xmalloc_ptr.
8492 * macroexp.h (macro_expand, macro_expand_once): Return
8494 * macroexp.c (macro_expand, macro_expand_once): Return
8496 * macrocmd.c (macro_expand_command, macro_expand_once_command)
8497 (info_macro_command, info_macros_command): Use
8499 * compile/compile-c-support.c (write_macro_definitions): Use
8501 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
8503 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
8505 * value.c (value_static_field): Assign field type instead of
8506 containing type when returning an optimized out value.
8508 2018-02-06 Yao Qi <yao.qi@linaro.org>
8510 * ft32-tdep.c (ft32_read_pc): Remove.
8511 (ft32_write_pc): Remove.
8512 (ft32_gdbarch_init): Update.
8513 * m32r-tdep.c (m32r_read_pc): Remove.
8514 (m32r_gdbarch_init): Update.
8515 * mep-tdep.c (mep_read_pc): Remove.
8516 (mep_gdbarch_init): Update.
8517 * microblaze-tdep.c (microblaze_write_pc): Remove.
8518 (microblaze_gdbarch_init): Update.
8519 * mn10300-tdep.c (mn10300_read_pc): Remove.
8520 (mn10300_write_pc): Remove.
8521 (mn10300_gdbarch_init): Update.
8522 * moxie-tdep.c (moxie_read_pc): Remove.
8523 (moxie_write_pc): Remove.
8524 (moxie_gdbarch_init): Update.
8526 2018-02-06 Yao Qi <yao.qi@linaro.org>
8528 * expprint.c (print_subexp_standard): Handle
8529 OP_F77_UNDETERMINED_ARGLIST.
8530 (dump_subexp_body_standard): Likewise.
8532 2018-02-05 Alan Hayward <alan.hayward@arm.com>
8534 * target-descriptions.c (tdesc_element_visitor) Add empty
8536 (tdesc_type): Move make_gdb_type from here.
8537 (tdesc_type_builtin): Likewise.
8538 (tdesc_type_vector): Likewise.
8539 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
8540 (make_gdb_type_struct): Move from tdesc_type_with_fields.
8541 (make_gdb_type_union): Likewise.
8542 (make_gdb_type_flags): Likewise.
8543 (make_gdb_type_enum): Likewise.
8544 (make_gdb_type): New function.
8545 (tdesc_register_type): Use static make_gdb_type.
8547 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
8549 * infcmd.c (default_print_one_register_info): Align natural-format
8550 column values consistently one under another.
8551 (pad_to_column): New function.
8553 2018-02-05 Joel Brobecker <brobecker@adacore.com>
8555 * dwarf2read.c (dwarf2_physname): Move commment.
8557 2018-02-01 Leszek Swirski <leszeks@google.com>
8559 * varobj.c (varobj_formatted_print_options): Allow recursive
8560 pretty printing if pretty printing is enabled.
8562 2018-02-01 Leszek Swirski <leszeks@google.com>
8564 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
8565 names after a structop as a filename.
8567 2018-02-01 Yao Qi <yao.qi@linaro.org>
8569 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
8570 (arm_record_coproc_data_proc): Likewise.
8572 2018-02-01 Yao Qi <yao.qi@linaro.org>
8574 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
8576 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
8578 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
8579 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
8581 2018-01-31 Pedro Alves <palves@redhat.com>
8583 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
8584 * inflow.c (child_terminal_save_inferior): Wrap reference to
8585 tcgetpgrp in HAVE_TERMIOS_H.
8586 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
8588 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
8589 always iterate over all inferiors.
8590 (gdbsim_cntrl_c): Adjust.
8591 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
8593 2018-01-31 Joel Brobecker <brobecker@adacore.com>
8595 * gdbtypes.c (lookup_array_range_type): Make sure the array's
8596 index type is objfile-owned if the element type is as well.
8598 2018-01-31 Joel Brobecker <brobecker@adacore.com>
8602 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
8604 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
8605 "features/s390x-linux64.c".
8606 (_initialize_s390_linux_tdep): Remove initialization of tdescs
8607 s390_linux32 and s390x_linux64.
8608 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
8610 * s390-tdep.c: Include "features/s390-linux32.c" and
8611 "features/s390x-linux64.c".
8612 (s390_tdesc_valid): Add check for tdesc_has_registers.
8613 (s390_gdbarch_init): Make sure there is always a valid tdesc.
8614 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
8615 tdesc_s390x_linux64.
8616 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
8617 tdesc_s390x_linux64 to...
8618 * s390-tdep.h: ...here.
8620 2018-01-30 Pedro Alves <palves@redhat.com>
8623 * config.in, configure: Regenerate.
8624 * configure.ac: Check for getpgid.
8625 * go32-nat.c (go32_pass_ctrlc): New.
8626 (go32_target): Install it.
8627 * inf-child.c (inf_child_target): Install
8628 child_terminal_save_inferior, child_pass_ctrlc and
8630 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
8631 (inf_ptrace_target): No longer install it.
8632 * infcmd.c (interrupt_target_1): Adjust.
8633 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
8634 (child_interrupt): Declare.
8635 (inferior::terminal_state): New.
8636 * inflow.c (struct terminal_info): Update comments.
8637 (inferior_process_group): Delete.
8638 (terminal_is_ours): Delete.
8639 (gdb_tty_state): New.
8640 (child_terminal_init): Adjust.
8641 (is_gdb_terminal, sharing_input_terminal_1)
8642 (sharing_input_terminal): New functions.
8643 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
8644 Set the process's actual process group in the foreground if
8645 possible. Handle is_ours_for_output/is_ours distinction. Don't
8646 mark terminal as the inferior's if not sharing GDB's terminal.
8647 Don't check attach_flag.
8648 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
8649 pass down a target_terminal_state.
8650 (child_terminal_save_inferior): New, factored out from ...
8651 (child_terminal_ours_1): ... this. Handle
8652 target_terminal_state::is_ours_for_output.
8653 (child_interrupt, child_pass_ctrlc): New.
8654 (inflow_inferior_exit): Clear the inferior's terminal_state.
8655 (copy_terminal_info): Copy the inferior's terminal state.
8656 (_initialize_inflow): Remove reference to terminal_is_ours.
8657 * inflow.h (inferior_process_group): Delete.
8658 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
8659 * procfs.c (procfs_target): Don't install procfs_interrupt.
8660 (procfs_interrupt): Delete.
8661 * remote.c (remote_serial_quit_handler): Adjust.
8662 (remote_interrupt): Remove ptid parameter. Adjust.
8663 * target-delegates.c: Regenerate.
8664 * target.c: Include "terminal.h".
8665 (target_terminal::terminal_state): Rename to ...
8666 (target_terminal::m_terminal_state): ... this.
8667 (target_terminal::init): Adjust.
8668 (target_terminal::inferior): Adjust to per-inferior
8670 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
8671 (target_terminal::ours, target_terminal::ours_for_output): Use
8672 target_terminal_is_ours_kind.
8673 (target_interrupt): Remove ptid parameter. Adjust.
8674 (default_target_pass_ctrlc): Adjust.
8675 * target.h (target_ops::to_terminal_save_inferior): New field.
8676 (target_ops::to_interrupt): Remove ptid_t parameter.
8677 (target_interrupt): Remove ptid_t parameter. Update comment.
8678 (target_pass_ctrlc): Update comment.
8679 * target/target.h (target_terminal_state): New scoped enum,
8681 (target_terminal::terminal_state): ... here.
8682 (target_terminal::inferior): Update comments.
8683 (target_terminal::restore_inferior): New.
8684 (target_terminal::is_inferior, target_terminal::is_ours)
8685 (target_terminal::is_ours_for_output): Adjust.
8686 (target_terminal::scoped_restore_terminal_state): Adjust to
8687 rename, and call restore_inferior() instead of inferior().
8688 (target_terminal::scoped_restore_terminal_state::m_state): Change
8690 (target_terminal::terminal_state): Rename to ...
8691 (target_terminal::m_terminal_state): ... this and change type.
8693 2018-01-30 Pedro Alves <palves@redhat.com>
8695 * linux-nat.c (wait_for_signal): New function.
8696 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
8698 (async_terminal_is_ours)
8699 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
8700 (linux_nat_add_target): Don't override
8701 to_terminal_inferior/to_terminal_ours.
8703 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
8705 * remote.c (remote_follow_fork): Don't call "detach_inferior".
8707 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
8709 * dwarf2read.c (free_dwo_files): Add forward-declaration.
8710 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
8711 dwarf2_per_objfile_free here.
8712 (dwarf2_per_objfile_free): Remove.
8713 (_initialize_dwarf2_read): Don't register
8714 dwarf2_per_objfile_free as a registry cleanup.
8716 2018-01-27 Eli Zaretskii <eliz@gnu.org>
8718 Avoid compilation errors in MinGW native builds
8720 The error is triggered by including python-internal.h, and the
8723 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
8724 from build-gnulib/import/math.h:27,
8725 from d:/usr/Python26/include/pyport.h:235,
8726 from d:/usr/Python26/include/Python.h:58,
8727 from python/python-internal.h:94,
8728 from python/py-arch.c:24:
8729 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
8733 This happens because Python headers define 'hypot' to expand t
8734 '_hypot' in the Windows builds.
8735 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
8736 'hypoth'. This avoids a compilation error.
8738 2018-01-26 Alan Hayward <alan.hayward@arm.com>
8740 * MAINTAINERS (Write After Approval): Fix ordering.
8742 2018-01-26 Alan Hayward <alan.hayward@arm.com>
8744 * MAINTAINERS (Write After Approval): Add Alan Hayward.
8746 2018-01-26 Alan Modra <amodra@gmail.com>
8748 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
8749 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
8750 Remove nop. Make const. Comment.
8751 (powerpc32_plt_stub_so_2): New.
8752 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
8753 Correct count. Update uses.
8754 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
8755 Move common code reading PLT entry word. Correct
8756 powerpc32_plt_stub PLT address calculation.
8757 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
8758 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
8759 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
8760 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
8761 (ppc64_standard_linkage8): Likewise.
8762 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
8763 Correct insns description.
8764 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
8766 2018-01-24 Pedro Alves <palves@redhat.com>
8768 GCC PR libstdc++/83906
8769 * gdbtypes.c (operator==(const dynamic_prop &,
8770 const dynamic_prop &)): New.
8771 (operator==(const range_bounds &, const range_bounds &)): New.
8772 (check_types_equal): Use them instead of memcmp.
8773 * gdbtypes.h (operator==(const dynamic_prop &,
8774 const dynamic_prop &)): Declare.
8775 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
8776 (operator==(const range_bounds &, const range_bounds &)): Declare.
8777 (operator!=(const range_bounds &, const range_bounds &)): Declare.
8779 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8781 * s390-linux-tdep.c (s390_record_address_mask)
8782 (s390_record_calc_disp_common, s390_record_calc_disp)
8783 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
8784 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
8785 (s390_process_record): Move to s390-tdep.c.
8786 (s390_linux_init_abi_any): Adjust.
8787 * s390-tdep.c (s390_record_address_mask)
8788 (s390_record_calc_disp_common, s390_record_calc_disp)
8789 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
8790 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
8791 (s390_process_record): Moved from s390-linux-tdep.c
8792 (s390_gdbarch_init): Adjust.
8794 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8796 * s390-linux-nat.c (s390-tdep.h): New include.
8797 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
8798 (HFILES_NO_SRCDIR): Add s390-tdep.h.
8799 (ALLDEPFILES): Add s390-tdep.c.
8800 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
8801 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
8802 * s390-tdep.h: ...this. New file.
8803 * s390-linux-tdep.c (s390-tdep.h): New include.
8804 (_initialize_s390_tdep): Rename to...
8805 (_initialize_s390_linux_tdep): ...this and adjust.
8806 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
8807 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
8809 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
8810 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
8811 (s390_is_partial_instruction, s390_software_single_step)
8812 (is_non_branch_ril, s390_displaced_step_copy_insn)
8813 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
8814 (s390_prologue_data, s390_addr, s390_store, s390_load)
8815 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
8816 (s390_register_call_saved, s390_guess_tracepoint_registers)
8817 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
8818 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
8819 (s390_pseudo_register_name, s390_pseudo_register_type)
8820 (s390_pseudo_register_read, s390_pseudo_register_write)
8821 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
8822 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
8823 (s390_addr_bits_remove, s390_address_class_type_flags)
8824 (s390_address_class_type_flags_to_name)
8825 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
8826 (s390_function_arg_float, s390_function_arg_vector)
8827 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
8828 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
8829 (s390_frame_align, s390_register_return_value, s390_return_value)
8830 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
8831 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
8832 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
8833 (s390_trad_frame_prev_register, s390_unwind_cache)
8834 (s390_prologue_frame_unwind_cache)
8835 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
8836 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
8837 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
8838 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
8839 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
8840 (s390_frame_base_address, s390_local_base_address)
8841 (s390_frame_base, s390_gcc_target_options)
8842 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
8843 (s390_validate_reg_range, s390_tdesc_valid)
8844 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
8845 * s390-tdep.c: ...this. New file.
8847 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8849 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
8850 (s390_process_record, s390_gdbarch_tdep_alloc)
8851 (s390_linux_init_abi_any): Use/set new hook.
8853 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8855 * s390-linux-tdep.c (osabi.h): New include.
8856 (s390_linux_init_abi_31, s390_linux_init_abi_64)
8857 (s390_linux_init_abi_any): New functions.
8858 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
8860 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8862 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
8863 tdesc_has_registers check
8865 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8867 * s390-linux-tdep.c (s390_tdesc_valid): New function.
8868 (s390_validate_reg_range): New macro.
8869 (s390_gdbarch_init): Adjust.
8871 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8873 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
8874 (s390_gdbarch_tdep_alloc): Adjust.
8875 (s390_gdbarch_init): Adjust.
8877 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8879 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
8880 <have_tdb>: Change type to bool.
8881 (s390_gdbarch_tdep_alloc): Adjust.
8882 (s390_gdbarch_init): Adjust.
8884 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8886 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
8887 (gdbarch_tdep) <have_upper, have_vx>: New fields.
8888 (s390_gdbarch_tdep_alloc): New function.
8889 (s390_gdbarch_init): Allocate tdep at start and use its fields
8890 instead of separate variables.
8892 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8894 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
8895 when looking for cached gdbarch and add comment for remaining.
8897 2018-01-22 Pedro Alves <palves@redhat.com>
8898 Sergio Durigan Junior <sergiodj@redhat.com>
8900 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
8903 2018-01-22 Maciej W. Rozycki <macro@mips.com>
8905 * MAINTAINERS: Update my company e-mail address.
8907 2018-01-22 Yao Qi <yao.qi@linaro.org>
8909 * regcache.c (cooked_write_test): New function.
8910 (_initialize_regcache): Register the test.
8912 2018-01-22 Yao Qi <yao.qi@linaro.org>
8914 * ia64-tdep.c (ia64_pseudo_register_read): Call
8915 regcache->cooked_read instead of regcache_cooked_read_unsigned.
8916 * m32c-tdep.c (m32c_cat_read): Likewise.
8917 (m32c_r3r2r1r0_read): Likewise.
8918 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
8919 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
8921 2018-01-22 Yao Qi <yao.qi@linaro.org>
8923 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
8924 method raw_read instead of regcache_raw_read.
8925 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
8926 * arm-tdep.c (arm_neon_quad_read): Likewise.
8927 * avr-tdep.c (avr_pseudo_register_read): Likewise.
8928 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
8929 * frv-tdep.c (frv_pseudo_register_read): Likewise.
8930 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
8931 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
8932 (i386_pseudo_register_read_into_value): Likewise.
8933 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
8934 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
8935 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
8936 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
8937 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
8938 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
8939 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
8940 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
8941 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
8943 2018-01-22 Yao Qi <yao.qi@linaro.org>
8945 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
8946 * configure.tgt: Remove target mt.
8947 * mt-tdep.c: Remove.
8948 * regcache.c (cooked_read_test): Remove the check for mt.
8950 2018-01-22 Yao Qi <yao.qi@linaro.org>
8952 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
8953 instead of gdbarch_pseudo_register_read_value.
8955 2018-01-22 Joel Brobecker <brobecker@adacore.com>
8957 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
8960 2018-01-22 Joel Brobecker <brobecker@adacore.com>
8962 * linespec.c (create_sals_line_offset): Remove code that preserved
8963 the symtab_and_line's line number.
8965 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8967 * varobj.c (varobj_create): Don't set valid_block when creating a
8970 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8972 * varobj.c (varobj_create): Remove out of date comment.
8974 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8977 * ada-exp.y (write_var_from_sym): Pass extra parameter when
8978 updating innermost block.
8979 * parse.c (innermost_block_tracker::update): Take extra type
8980 parameter, and check types match before updating innermost block.
8981 (write_dollar_variable): Update innermost block for registers.
8982 * parser-defs.h (enum innermost_block_tracker_type): New enum.
8983 (innermost_block_tracker::innermost_block_tracker): Initialise
8985 (innermost_block_tracker::reset): Take type parameter.
8986 (innermost_block_tracker::update): Take type parameter, and pass
8987 type through as needed.
8988 (innermost_block_tracker::m_types): New member.
8989 * varobj.c (varobj_create): Pass type when reseting innermost
8992 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8994 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
8995 * ada-lang.c (resolve_subexp): Likewise.
8996 * breakpoint.c (set_breakpoint_condition) Likewise.
8997 (watch_command_1) Likewise.
8998 * c-exp.y (variable): Likewise.
8999 * d-exp.y (PrimaryExpression): Likewise.
9000 * f-exp.y (variable): Likewise.
9001 * go-exp.y (variable): Likewise.
9002 * m2-exp.y (variable): Likewise.
9003 * objfiles.c (objfile::~objfile): Likewise.
9004 * p-exp.y (variable): Likewise.
9005 * parse.c (innermost_block): Change type.
9006 * parser-defs.h (class innermost_block_tracker): New.
9007 (innermost_block): Change to innermost_block_tracker.
9008 * printcmd.c (display_command): Switch to innermost_block API.
9009 (do_one_display): Likewise.
9010 * rust-exp.y (do_one_display): Likewise.
9011 * symfile.c (clear_symtab_users): Likewise.
9012 * varobj.c (varobj_create): Switch to innermost_block API, replace
9013 use of innermost_block with block stored on varobj object.
9015 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
9017 * expression.h (innermost_block): Remove declaration.
9018 * varobj.c: Add 'parser-defs.h' include.
9020 2018-01-19 Tom Tromey <tom@tromey.com>
9022 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
9023 symbols in the static and global blocks.
9025 2018-01-19 James Clarke <jrtc27@jrtc27.com>
9027 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
9028 gdb_ptrace.h, and move including gdb_wait.h ...
9029 * nat/linux-ptrace.h: ... to here.
9031 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9033 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
9034 inf_ptrace_detach_success.
9035 (inf_ptrace_detach_success): Add inferior parameter, use it
9036 instead of inferior_ptid, pass it to detach_inferior.
9037 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
9039 * inferior.c (detach_inferior): Add overload that takes an
9041 * inferior.h (detach_inferior): Likewise.
9042 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
9043 use inferior_ptid, adjust call to inf_ptrace_detach_success.
9044 * linux-thread-db.c (thread_db_detach): Use inf parameter.
9046 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9048 * target.h (struct target_ops) <to_detach>: Add inferior
9050 (target_detach): Likewise.
9051 * target.c (dispose_inferior): Pass inferior down.
9052 (target_detach): Pass inferior down. Assert that it is equal to
9053 the current inferior.
9054 * aix-thread.c (aix_thread_detach): Pass inferior down.
9055 * corefile.c (core_file_command): Pass current_inferior() down.
9056 * corelow.c (core_detach): Add inferior parameter.
9057 * darwin-nat.c (darwin_detach): Likewise.
9058 * gnu-nat.c (gnu_detach): Likewise.
9059 * inf-ptrace.c (inf_ptrace_detach): Likewise.
9060 * infcmd.c (detach_command): Pass current_inferior() down to
9062 * infrun.c (follow_fork_inferior): Pass parent_inf to
9064 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
9066 * linux-nat.c (linux_nat_detach): Add inferior parameter.
9067 * linux-thread-db.c (thread_db_detach): Likewise.
9068 * nto-procfs.c (procfs_detach): Likewise.
9069 * procfs.c (procfs_detach): Likewise.
9070 * record.c (record_detach): Likewise.
9071 * record.h (struct inferior): Forward-declare.
9072 (record_detach): Add inferior parameter.
9073 * remote-sim.c (gdbsim_detach): Likewise.
9074 * remote.c (remote_detach_1): Likewise.
9075 (remote_detach): Likewise.
9076 (extended_remote_detach): Likewise.
9077 * sol-thread.c (sol_thread_detach): Likewise.
9078 * target-debug.h (target_debug_print_inferior_p): New macro.
9079 * target-delegates.c: Re-generate.
9080 * top.c (kill_or_detach): Pass inferior down to target_detach.
9081 * windows-nat.c (windows_detach): Add inferior parameter.
9083 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9085 * target.h (struct target_ops) <to_detach>: Remove args
9087 (target_detach): Likewise.
9088 * target.c (dispose_inferior): Adjust.
9089 (target_detach): Remove args parameter, adjust.
9090 * aix-thread.c (aix_thread_detach): Adjust.
9091 * corefile.c (core_file_command): Adjust.
9092 * corelow.c (core_detach): Adjust.
9093 * darwin-nat.c (darwin_detach): Adjust.
9094 * gnu-nat.c (gnu_detach): Adjust.
9095 * inf-ptrace.c (inf_ptrace_detach): Adjust.
9096 * infcmd.c (detach_command): Adjust
9097 * infrun.c (follow_fork_inferior): Adjust.
9098 (handle_vfork_child_exec_or_exit): Adjust.
9099 * linux-fork.c (linux_fork_detach): Remove args parameter.
9100 * linux-fork.h (linux_fork_detach): Likewise.
9101 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
9102 * linux-thread-db.c (thread_db_detach): Likewise.
9103 * nto-procfs.c (procfs_detach): Likewise.
9104 * procfs.c (procfs_detach): Likewise.
9105 (do_detach): Remove signo parameter.
9106 * record.c (record_detach): Remove args parameter.
9107 * record.h (record_detach): Likewise.
9108 * remote-sim.c (gdbsim_detach): Likewise.
9109 * remote.c (remote_detach_1): Likewise.
9110 (remote_detach): Likewise.
9111 (extended_remote_detach): Likewise.
9112 * sol-thread.c (sol_thread_detach): Likewise.
9113 * target-delegates.c: Re-generate.
9114 * top.c (struct qt_args) <args>: Remove field.
9115 (kill_or_detach): Don't pass args.
9116 (quit_force): Don't set args.
9117 * windows-nat.c (windows_detach): Remove args parameter.
9119 2018-01-19 Yao Qi <yao.qi@linaro.org>
9121 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
9122 (arm_linux_init_abi): Install it.
9124 2018-01-19 Yao Qi <yao.qi@linaro.org>
9126 * osabi.c (gdb_osabi_names): Extend the regexp for
9127 arm-linux-gnueabihf.
9129 2018-01-18 Yao Qi <yao.qi@linaro.org>
9131 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
9133 (abbrev_table::add_abbrev): Update.
9134 (abbrev_table::lookup_abbrev): Update.
9136 2018-01-18 Yao Qi <yao.qi@linaro.org>
9138 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
9140 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
9142 * compile/compile.c (compile_to_object): Convert "triplet_rx"
9145 2018-01-17 Tom Tromey <tom@tromey.com>
9147 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
9149 2018-01-17 Tom Tromey <tom@tromey.com>
9151 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
9152 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
9153 (create_array_type_with_stride): Update.
9154 * dwarf2read.c (set_die_type): Update.
9156 2018-01-17 Tom Tromey <tom@tromey.com>
9158 * dwarf2read.c (delayed_method_info): Remove typedef.
9159 (dwarf2_cu::method_info): Now a std::vector.
9160 (add_to_method_list): Update.
9161 (free_delayed_list): Remove.
9162 (compute_delayed_physnames): Update.
9163 (process_full_comp_unit, process_full_type_unit): Clear the method
9164 list. Remove cleanups.
9165 (psymtab_include_file_name): Add name_holder parameter. Use
9167 (dwarf_decode_lines): Update.
9169 2018-01-17 Tom Tromey <tom@tromey.com>
9170 Simon Marchi <simon.marchi@ericsson.com>
9172 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
9173 (dwarf2_per_objfile::free_cached_comp_units)
9174 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
9175 (init_cutu_and_read_dies_no_follow): Update.
9176 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
9177 (dwarf2_cu::~dwarf2_cu): New.
9178 (free_heap_comp_unit, free_stack_comp_unit): Remove.
9179 (age_cached_comp_units, free_one_cached_comp_unit): Update.
9181 2018-01-17 Tom Tromey <tom@tromey.com>
9182 Simon Marchi <simon.marchi@ericsson.com>
9184 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
9185 (struct die_reader_specs) <abbrev_table>: New member.
9186 (struct abbrev_table): Add constructor.
9187 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
9188 <abbrev_obstack>: Now an auto_obstack.
9189 (abbrev_table_up): New typedef.
9190 (init_cu_die_reader): Add abbrev_table parameter.
9191 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
9192 Add result_dwo_abbrev_table.
9193 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
9194 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
9196 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
9198 (skip_children): Update.
9199 (abbrev_table::alloc_abbrev): Rename from
9200 abbrev_table_alloc_abbrev.
9201 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
9202 (abbrev_table::lookup_abbrev): Rename from
9203 abbrev_table_lookup_abbrev.
9204 (abbrev_table_read_table): Return abbrev_table_up.
9205 (abbrev_table_free, abbrev_table_free_cleanup)
9206 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
9207 (load_partial_dies): Update.
9209 2018-01-17 Tom Tromey <tom@tromey.com>
9211 * dwarf2read.c (dwarf2_compute_name): Update comment.
9212 (read_func_scope, read_variable): Update.
9213 (new_symbol): Remove.
9214 (new_symbol_full): Rename to new_symbol.
9216 2018-01-17 Mike Gulick <mgulick@mathworks.com>
9219 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
9220 a warning instead of throwing an error, set section size to 0 and return
9222 * gdb_bfd.h (gdb_bfd_map_section): Update description.
9224 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
9226 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
9228 (linux_ptrace_attach_fail_reason_string): Likewise.
9229 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
9231 (linux_ptrace_attach_fail_reason_string): Likewise.
9232 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
9234 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
9236 * linux-nat.c (linux_nat_attach): Remove xstrdup.
9238 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
9241 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
9242 checking for fs_base/gs_base fields in struct user_regs_struct.
9243 * configure: Regenerate.
9245 2018-01-17 Yao Qi <yao.qi@linaro.org>
9247 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
9249 (aarch64_linux_init_abi): Install it to gdbarch hook
9252 2018-01-15 Pedro Alves <palves@redhat.com>
9254 * common/signals-state-save-restore.c
9255 (save_original_signals_state): Fix typos.
9257 2017-01-12 Tom Tromey <tom@tromey.com>
9258 Sergio Durigan Junior <sergiodj@redhat.com>
9260 * Makefile.in (install-only): Install gdb-add-index.
9262 2018-01-12 John Baldwin <jhb@FreeBSD.org>
9264 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
9266 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9268 * infrun.c (keep_going_pass_signal): Clear step-over info when
9269 insert_breakpoints fails.
9271 2018-01-11 Pedro Alves <palves@redhat.com>
9274 * infrun.c (resume): Rename to ...
9275 (resume_1): ... this.
9276 (resume): Reimplement as wrapper around resume_1.
9278 2018-01-11 Pedro Alves <palves@redhat.com>
9281 * remote.c (remote_parse_stop_reply): Default to the last-set
9282 general thread instead of to 'magic_null_ptid'.
9284 2018-01-10 Pedro Alves <palves@redhat.com>
9286 * language.h (language_get_symbol_name_matcher): Rename ...
9287 (get_symbol_name_matcher): ... this.
9288 * language.c (language_get_symbol_name_matcher): Ditto.
9289 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
9292 2018-01-10 Pedro Alves <palves@redhat.com>
9296 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
9297 Adjust to use language_get_symbol_name_matcher instead of
9298 language_defn::la_get_symbol_name_matcher.
9299 * language.c (language_get_symbol_name_matcher): If in Ada mode
9300 and the lookup name is a verbatim match, return Ada's matcher.
9301 * language.h (language_get_symbol_name_matcher): Adjust comment.
9302 (ada_lookup_name_info::verbatim_p):: New method.
9304 2018-01-10 Pedro Alves <palves@redhat.com>
9307 * ada-lang.c (ada_collect_symbol_completion_matches): If the
9308 minsym's language is language_auto or language_cplus, pass down
9309 language_ada instead.
9310 * symtab.c (compare_symbol_name): Don't frob symbol language here.
9312 2018-01-10 Pedro Alves <palves@redhat.com>
9315 * minsyms.c (linkage_name_str): New function.
9316 (iterate_over_minimal_symbols): Use it.
9318 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9320 * NEWS: Document that 'info proc' now works on FreeBSD.
9322 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9324 * configure.ac: Check for kinfo_getfile in libutil.
9325 * configure: Regenerate.
9326 * config.in: Regenerate.
9327 * fbsd-nat.c: Include "fbsd-tdep.h".
9328 (fbsd_fetch_cmdline): New.
9329 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
9330 rather than calling error.
9331 (fbsd_info_proc): New.
9332 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
9333 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
9334 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
9336 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9338 * fbsd-nat.c (struct free_deleter): Remove.
9339 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
9341 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9343 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
9344 NULL for an empty pathname.
9346 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9348 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
9349 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
9350 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
9351 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
9352 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
9353 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
9354 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
9355 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
9356 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
9357 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
9358 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
9359 (fbsd_core_fetch_timeval, fbsd_print_sigset)
9360 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
9361 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
9362 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
9364 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
9366 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
9367 (gnu_xfer_auxv): New function.
9368 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
9371 2018-01-08 Yao Qi <yao.qi@linaro.org>
9372 Simon Marchi <simon.marchi@ericsson.com>
9374 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
9376 (COMMON_OBS): Remove selftest.o.
9377 * configure.ac: Append selftest-arch.c and common/selftest.c to
9378 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
9379 * configure: Re-generated.
9380 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
9382 (maintenance_info_selftests): Likewise.
9384 2018-01-08 Xavier Roirand <roirand@adacore.com>
9386 * ada-valprint.c (val_print_packed_array_elements): Use
9387 proper number of elements when printing an array indexed
9388 by an enumeration type.
9390 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9392 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
9393 (dw2_get_file_names_reader): Adjust.
9394 (lookup_dwo_signatured_type): Adjust.
9395 (lookup_dwp_signatured_type): Adjust.
9396 (lookup_signatured_type): Adjust.
9397 (create_type_unit_group): Adjust.
9398 (get_type_unit_group): Adjust.
9399 (process_psymtab_comp_unit_reader): Adjust.
9400 (build_type_psymtabs_reader): Adjust.
9401 (scan_partial_symbols): Adjust.
9402 (add_partial_symbol): Adjust.
9403 (add_partial_subprogram): Adjust.
9404 (peek_die_abbrev): Adjust.
9405 (fixup_go_packaging): Adjust.
9406 (process_imported_unit_die): Adjust.
9407 (dwarf2_compute_name): Adjust.
9408 (dwarf2_physname): Adjust.
9409 (read_import_statement): Adjust.
9410 (handle_DW_AT_stmt_list): Adjust.
9411 (read_file_scope): Adjust.
9412 (read_func_scope): Adjust.
9413 (read_lexical_block_scope): Adjust.
9414 (read_call_site_scope): Adjust.
9415 (read_variable): Adjust.
9416 (dwarf2_rnglists_process): Adjust.
9417 (dwarf2_ranges_process): Adjust.
9418 (dwarf2_ranges_read): Adjust.
9419 (dwarf2_get_pc_bounds): Adjust.
9420 (dwarf2_record_block_ranges): Adjust.
9421 (dwarf2_add_field): Adjust.
9422 (dwarf2_add_member_fn): Adjust.
9423 (read_structure_type): Adjust.
9424 (process_structure_scope): Adjust.
9425 (read_enumeration_type): Adjust.
9426 (read_array_type): Adjust.
9427 (mark_common_block_symbol_computed): Adjust.
9428 (read_common_block): Adjust.
9429 (read_namespace_type): Adjust.
9430 (read_namespace): Adjust.
9431 (read_module_type): Adjust.
9432 (read_tag_pointer_type): Adjust.
9433 (read_tag_ptr_to_member_type): Adjust.
9434 (read_tag_string_type): Adjust.
9435 (read_subroutine_type): Adjust.
9436 (read_typedef): Adjust.
9437 (read_base_type): Adjust.
9438 (attr_to_dynamic_prop): Adjust.
9439 (read_subrange_type): Adjust.
9440 (read_unspecified_type): Adjust.
9441 (dwarf2_read_abbrevs): Adjust.
9442 (load_partial_dies): Adjust.
9443 (read_partial_die): Adjust.
9444 (find_partial_die): Adjust.
9445 (guess_partial_die_structure_name): Adjust.
9446 (fixup_partial_die): Adjust.
9447 (read_attribute_value): Adjust.
9448 (read_addr_index): Adjust.
9449 (read_addr_index_from_leb128): Adjust.
9450 (read_str_index): Adjust.
9451 (dwarf2_string_attr): Adjust.
9452 (get_debug_line_section): Adjust.
9453 (dwarf_decode_line_header): Adjust.
9454 (lnp_state_machine::check_line_address): Adjust.
9455 (dwarf_decode_lines_1): Adjust.
9456 (dwarf_decode_lines): Adjust.
9457 (dwarf2_start_symtab): Adjust.
9458 (var_decode_location): Adjust.
9459 (new_symbol_full): Adjust.
9460 (dwarf2_const_value_data): Adjust.
9461 (dwarf2_const_value_attr): Adjust.
9462 (dwarf2_const_value): Adjust.
9464 (die_containing_type): Adjust.
9465 (build_error_marker_type): Adjust.
9466 (lookup_die_type): Adjust.
9467 (guess_full_die_structure_name): Adjust.
9468 (anonymous_struct_prefix): Adjust.
9469 (determine_prefix): Adjust.
9470 (dwarf2_name): Adjust.
9471 (follow_die_ref_or_sig): Adjust.
9472 (follow_die_offset): Adjust.
9473 (follow_die_ref): Adjust.
9474 (follow_die_sig_1): Adjust.
9475 (follow_die_sig): Adjust.
9476 (get_signatured_type): Adjust.
9477 (get_DW_AT_signature_type): Adjust.
9478 (decode_locdesc): Adjust.
9479 (dwarf_decode_macros): Adjust.
9480 (cu_debug_loc_section): Adjust.
9481 (fill_in_loclist_baton): Adjust.
9482 (dwarf2_symbol_mark_computed): Adjust.
9483 (init_one_comp_unit): Don't assign
9484 dwarf2_cu::dwarf2_per_objfile.
9485 (set_die_type): Adjust.
9487 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9489 * dwarf2read.c (struct mapped_debug_names): Add constructor.
9490 <dwarf2_per_objfile>: New field.
9491 (dwarf2_per_objfile): Remove global.
9492 (get_dwarf2_per_objfile): New function.
9493 (set_dwarf2_per_objfile): New function.
9494 (dwarf2_build_psymtabs_hard): Change objfile parameter to
9496 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
9497 (read_abbrev_offset): Likewise.
9498 (read_indirect_string): Likewise.
9499 (read_indirect_line_string): Likewise.
9500 (read_indirect_string_at_offset): Likewise.
9501 (read_indirect_string_from_dwz): Likewise.
9502 (dwarf2_find_containing_comp_unit): Change objfile parameter to
9504 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
9505 (create_all_comp_units): Change objfile parameter to
9507 (create_all_type_units): Likewise.
9508 (process_queue): Add dwarf2_per_objfile parameter.
9509 (read_and_check_comp_unit_head): Likewise.
9510 (lookup_dwo_unit_in_dwp): Likewise.
9511 (get_dwp_file): Likewise.
9512 (process_cu_includes): Likewise.
9513 (struct free_dwo_file_cleanup_data): New struct.
9514 (dwarf2_has_info): Use get_dwarf2_per_objfile and
9515 set_dwarf2_per_objfile.
9516 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
9517 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
9518 context, adjust calls.
9519 (dw2_instantiate_symtab): Likewise.
9520 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
9521 (dw2_get_cu): Likewise.
9522 (create_cu_from_index_list): Change objfile parameter to
9524 (create_cus_from_index_list): Get dwarf2_per_objfile from
9525 context, adjust calls.
9526 (create_cus_from_index): Likewise.
9527 (create_signatured_type_table_from_index): Change objfile
9528 parameter to dwarf2_per_objfile.
9529 (create_signatured_type_table_from_debug_names): Change objfile
9530 parameter to dwarf2_per_objfile.
9531 (create_addrmap_from_index): Likewise.
9532 (create_addrmap_from_aranges): Likewise.
9533 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
9534 (dw2_setup): Remove.
9535 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
9537 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
9538 get_dwarf2_per_objfile.
9539 (dw2_forget_cached_source_info): Likewise.
9540 (dw2_map_symtabs_matching_filename): Likewise.
9541 (struct dw2_symtab_iterator) <index>: Remove.
9542 <dwarf2_per_objfile>: New field.
9543 (dw2_symtab_iter_init): Replace index parameter with
9545 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
9546 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
9547 (dw2_print_stats): Likewise.
9548 (dw2_dump): Likewise.
9549 (dw2_expand_symtabs_for_function): Likewise.
9550 (dw2_expand_all_symtabs): Likewise.
9551 (dw2_expand_symtabs_with_fullname): Likewise.
9552 (dw2_expand_marked_cus): Replace index and objfile parameters
9553 with dwarf2_per_objfile.
9554 (dw_expand_symtabs_matching_file_matcher): Add
9555 dwarf2_per_objfile parameter and adjust calls.
9556 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
9558 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
9559 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
9561 (create_cus_from_debug_names_list): Replace objfile parameter
9562 with dwarf2_per_objfile and adjust calls.
9563 (create_cus_from_debug_names): Likewise.
9564 (dwarf2_read_debug_names): Likewise.
9565 (mapped_debug_names::namei_to_name): Adjust call.
9566 (dw2_debug_names_iterator::next): Likewise.
9567 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
9568 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
9569 (dw2_debug_names_dump): Likewise.
9570 (dw2_debug_names_expand_symtabs_for_function): Likewise.
9571 (dw2_debug_names_expand_symtabs_matching): Likewise.
9572 (dwarf2_initialize_objfile): Likewise.
9573 (dwarf2_build_psymtabs): Likewise.
9574 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
9576 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
9577 (read_and_check_comp_unit_head): Likewise.
9578 (read_abbrev_offset): Likewise.
9579 (create_debug_type_hash_table): Likewise.
9580 (create_debug_types_hash_table): Likewise.
9581 (create_all_type_units): Replace objfile parameter with
9583 (add_type_unit): Add dwarf2_per_objfile parameter.
9584 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
9585 with dwarf2_per_objfile.
9586 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
9587 (lookup_dwp_signatured_type): Likewise.
9588 (lookup_signatured_type): Likewise.
9589 (read_cutu_die_from_dwo): Likewise.
9590 (init_tu_and_read_dwo_dies): Likewise.
9591 (init_cutu_and_read_dies): Likewise.
9592 (init_cutu_and_read_dies_no_follow): Likewise.
9593 (allocate_type_unit_groups_table): Add objfile parameter.
9594 (create_type_unit_group): Use dwarf2_per_objfile from cu.
9595 (get_type_unit_group): Likewise.
9596 (process_psymtab_comp_unit): Update call.
9597 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
9598 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
9599 (print_tu_stats): Likewise.
9600 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
9602 (build_type_psymtabs): Change objfile parameter to
9604 (process_skeletonless_type_unit): Use dwarf2_per_objfile
9605 passed in void* parameter.
9606 (process_skeletonless_type_units): Change objfile parameter to
9608 (set_partial_user): Likewise.
9609 (dwarf2_build_psymtabs_hard): Likewise.
9610 (read_comp_units_from_section): Likewise.
9611 (create_all_comp_units): Likewise.
9612 (scan_partial_symbols): Update calls.
9613 (add_partial_symbol): Likewise.
9614 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
9615 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
9616 (process_queue): Add dwarf2_per_objfile parameter.
9617 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
9618 (compute_compunit_symtab_includes): Likewise.
9619 (process_cu_includes): Add dwarf2_per_objfile parameter.
9620 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
9621 (process_full_type_unit): Likewise.
9622 (process_imported_unit_die): Update call.
9623 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
9624 (read_file_scope): Likewise.
9625 (allocate_dwo_file_hash_table): Add objfile parameter.
9626 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
9627 (create_cus_hash_table): Likewise.
9628 (create_dwp_hash_table): Likewise.
9629 (create_dwo_unit_in_dwp_v1): Likewise.
9630 (create_dwp_v2_section): Likewise.
9631 (create_dwo_unit_in_dwp_v2): Likewise.
9632 (lookup_dwo_unit_in_dwp): Likewise.
9633 (try_open_dwop_file): Likewise.
9634 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
9635 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
9636 cleanup to include a reference to dwarf2_per_objfile.
9637 (open_dwp_file): Add dwarf2_per_objfile parameter.
9638 (open_and_init_dwp_file): Likewise.
9639 (get_dwp_file): Likewise.
9640 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
9641 (queue_and_load_all_dwo_tus): Update call.
9642 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
9644 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
9645 (dwarf2_ranges_process): Likewise.
9646 (dwarf2_get_pc_bounds): Likewise.
9647 (mark_common_block_symbol_computed): Likewise.
9648 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
9649 (dwarf2_read_abbrevs): Update call.
9650 (read_partial_die): Use dwarf2_per_objfile from cu.
9651 (find_partial_die): Likewise.
9652 (fixup_partial_die): Likewise.
9653 (read_attribute_value): Likewise.
9654 (read_indirect_string_at_offset_from): Add objfile parameter.
9655 (read_indirect_string_at_offset): Add dwarf2_per_objfile
9657 (read_indirect_string_from_dwz): Add objfile parameter.
9658 (read_indirect_string): Add objfile parameter.
9659 (read_addr_index_1): Add dwarf2_per_objfile parameter.
9660 (read_addr_index): Use dwarf2_per_objfile from cu.
9661 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
9663 (read_str_index): Use dwarf2_per_objfile from cu.
9664 (get_debug_line_section): Likewise.
9665 (read_formatted_entries): Add dwarf2_per_objfile parameter.
9666 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
9667 (new_symbol_full): Use dwarf2_per_objfile from cu.
9668 (build_error_marker_type): Likewise.
9669 (lookup_die_type): Likewise.
9670 (determine_prefix): Likewise.
9671 (follow_die_offset): Likewise.
9672 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
9673 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
9674 (dwarf2_fetch_die_type_sect_off): Likewise.
9675 (dwarf2_get_die_type): Likewise.
9676 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
9677 (get_signatured_type): Likewise.
9678 (get_DW_AT_signature_type): Likewise.
9679 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
9680 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
9681 (cu_debug_loc_section): Likewise.
9682 (fill_in_loclist_baton): Likewise.
9683 (dwarf2_symbol_mark_computed): Likewise.
9684 (dwarf2_find_containing_comp_unit): Change objfile parameter to
9686 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
9688 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
9689 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
9690 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
9691 (set_die_type): Use dwarf2_free_objfile from cu.
9692 (get_die_type_at_offset): Likewise.
9693 (dwarf2_per_objfile_free): Don't assign global variable.
9694 (debug_names) <constructor>: Add dwarf2_per_objfile
9695 parameter, update m_debugstrlookup construction.
9696 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
9698 <m_dwarf2_per_objfile>: New field.
9699 <lookup>: Use m_dwarf2_per_objfile.
9700 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
9701 (psyms_seen_size): Likewise.
9702 (write_gdbindex): Replace objfile parameter with
9704 (write_debug_names): Likewise.
9705 (write_psymtabs_to_index): Likewise.
9706 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
9709 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9711 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
9712 <dwarf2_per_objfile>: New field.
9713 (struct dwarf2_per_cu_data) <objfile>: Remove.
9714 <dwarf2_per_objfile>: New field.
9715 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
9717 (create_signatured_type_table_from_index): Likewise.
9718 (create_debug_type_hash_table): Likewise.
9719 (fill_in_sig_entry_from_dwo_entry): Likewise.
9720 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
9721 (create_type_unit_group): Assign dwarf2_per_objfile instead of
9723 (create_partial_symtab): Access objfile through
9725 (process_psymtab_comp_unit_reader): Likewise.
9726 (read_comp_units_from_section): Likewise.
9727 (scan_partial_symbols): Likewise.
9728 (add_partial_symbol): Likewise.
9729 (add_partial_subprogram): Likewise.
9730 (peek_die_abbrev): Likewise.
9731 (fixup_go_packaging): Likewise.
9732 (process_full_comp_unit): Likewise.
9733 (process_full_type_unit): Likewise.
9734 (process_imported_unit_die): Likewise.
9735 (dwarf2_compute_name): Likewise.
9736 (dwarf2_physname): Likewise.
9737 (read_import_statement): Likewise.
9738 (create_cus_hash_table): Assign dwarf2_physname instead of
9740 (read_func_scope): Access objfile through dwarf2_per_objfile.
9741 (read_lexical_block_scope): Likewise.
9742 (read_call_site_scope): Likewise.
9743 (read_variable): Likewise.
9744 (dwarf2_rnglists_process): Likewise.
9745 (dwarf2_ranges_process): Likewise.
9746 (dwarf2_ranges_read): Likewise.
9747 (dwarf2_record_block_ranges): Likewise.
9748 (dwarf2_add_field): Likewise.
9749 (dwarf2_add_member_fn): Likewise.
9750 (read_structure_type): Likewise.
9751 (process_structure_scope): Likewise.
9752 (read_enumeration_type): Likewise.
9753 (read_array_type): Likewise.
9754 (read_common_block): Likewise.
9755 (read_namespace_type): Likewise.
9756 (read_namespace): Likewise.
9757 (read_module_type): Likewise.
9758 (read_tag_pointer_type): Likewise.
9759 (read_tag_ptr_to_member_type): Likewise.
9760 (read_tag_string_type): Likewise.
9761 (read_subroutine_type): Likewise.
9762 (read_typedef): Likewise.
9763 (read_base_type): Likewise.
9764 (attr_to_dynamic_prop): Likewise.
9765 (read_subrange_type): Likewise.
9766 (read_unspecified_type): Likewise.
9767 (load_partial_dies): Likewise.
9768 (read_partial_die): Likewise.
9769 (find_partial_die): Likewise.
9770 (guess_partial_die_structure_name): Likewise.
9771 (fixup_partial_die): Likewise.
9772 (read_attribute_value): Likewise.
9773 (read_addr_index_from_leb128): Likewise.
9774 (dwarf2_read_addr_index): Likewise.
9775 (dwarf2_string_attr): Likewise.
9776 (lnp_state_machine::check_line_address): Likewise.
9777 (dwarf_decode_lines_1): Likewise.
9778 (dwarf_decode_lines): Likewise.
9779 (dwarf2_start_symtab): Likewise.
9780 (var_decode_location): Likewise.
9781 (new_symbol_full): Likewise.
9782 (dwarf2_const_value_data): Likewise.
9783 (dwarf2_const_value_attr): Likewise.
9784 (dwarf2_const_value): Likewise.
9785 (die_type): Likewise.
9786 (die_containing_type): Likewise.
9787 (lookup_die_type): Likewise.
9788 (guess_full_die_structure_name): Likewise.
9789 (anonymous_struct_prefix): Likewise.
9790 (dwarf2_name): Likewise.
9791 (follow_die_ref_or_sig): Likewise.
9792 (follow_die_offset): Likewise.
9793 (follow_die_ref): Likewise.
9794 (dwarf2_fetch_die_loc_sect_off): Likewise.
9795 (dwarf2_fetch_constant_bytes): Likewise.
9796 (dwarf2_fetch_die_type_sect_off): Likewise.
9797 (dwarf2_get_die_type): Likewise.
9798 (follow_die_sig): Likewise.
9799 (decode_locdesc): Likewise.
9800 (dwarf2_per_cu_objfile): Likewise.
9801 (dwarf2_per_cu_text_offset): Likewise.
9802 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
9804 (set_die_type): Access objfile through
9807 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9809 * valprint.c (converted_character_d): Remove typedef.
9810 (DEF_VEC_O (converted_character_d)): Remove.
9811 (count_next_character): Use std::vector.
9812 (print_converted_chars_to_obstack): Likewise.
9813 (generic_printstr): Likewise.
9815 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9817 * xml-support.h (struct gdb_xml_value): Add constructor.
9818 <value>: Change type to unique_xmalloc_ptr.
9819 (gdb_xml_value_s): Remove typedef.
9820 (DEF_VEC_O (gdb_xml_value_s)): Remove.
9821 (gdb_xml_element_start_handler): Change parameter type to
9823 (xml_find_attribute): Likewise.
9824 * xml-support.c (xml_find_attribute): Change parameter type to
9825 std::vector and adjust.
9826 (gdb_xml_values_cleanup): Remove.
9827 (gdb_xml_parser::start_element): Adjust to std::vector.
9828 (xinclude_start_include): Change paraeter type to std::vector
9830 * btrace.c (check_xml_btrace_version): Likewise.
9831 (parse_xml_btrace_block): Likewise.
9832 (parse_xml_btrace_pt_config_cpu): Likewise.
9833 (parse_xml_btrace_pt): Likewise.
9834 (parse_xml_btrace_conf_bts): Likewise.
9835 (parse_xml_btrace_conf_pt): Likewise.
9836 * memory-map.c (memory_map_start_memory): Likewise.
9837 (memory_map_start_property): Likewise.
9838 * osdata.c (osdata_start_osdata): Likewise.
9839 (osdata_start_item): Likewise.
9840 (osdata_start_column): Likewise.
9841 * remote.c (start_thread): Likewise.
9842 * solib-aix.c (library_list_start_library): Likewise.
9843 (library_list_start_list): Likewise.
9844 * solib-svr4.c (library_list_start_library): Likewise.
9845 (svr4_library_list_start_list): Likewise.
9846 * solib-target.c (library_list_start_segment): Likewise.
9847 (library_list_start_section): Likewise.
9848 (library_list_start_library): Likewise.
9849 (library_list_start_list): Likewise.
9850 * tracepoint.c (traceframe_info_start_memory): Likewise.
9851 (traceframe_info_start_tvar): Likewise.
9852 * xml-syscall.c (syscall_start_syscall): Likewise.
9853 * xml-tdesc.c (tdesc_start_target): Likewise.
9854 (tdesc_start_feature): Likewise.
9855 (tdesc_start_reg): Likewise.
9856 (tdesc_start_union): Likewise.
9857 (tdesc_start_struct): Likewise.
9858 (tdesc_start_flags): Likewise.
9859 (tdesc_start_enum): Likewise.
9860 (tdesc_start_field): Likewise.
9861 (tdesc_start_enum_value): Likewise.
9862 (tdesc_start_vector): Likewise.
9864 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9866 * extension.h (struct xmethod_worker) <clone>: Remove.
9867 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
9869 (python_xmethod_worker::clone): Remove.
9870 * valops.c (find_overload_match): Use std::move instead of
9873 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9875 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
9876 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
9877 <free_xmethod_worker_data>: Remove.
9878 <get_matching_xmethod_workers>: Chance VEC to std::vector.
9879 <get_xmethod_arg_types>: Remove.
9880 <get_xmethod_result_type>: Remove.
9881 <invoke_xmethod>: Remove.
9882 * extension.c (new_xmethod_worker): Remove.
9883 (clone_xmethod_worker): Remove.
9884 (get_matching_xmethod_workers): Return void, pass std::vector by
9886 (get_xmethod_arg_types): Rename to...
9887 (xmethod_worker::get_arg_types): ... this, and adjust.
9888 (get_xmethod_result_type): Rename to...
9889 (xmethod_worker::get_result_type): ... this, and adjust.
9890 (invoke_xmethod): Remove.
9891 (free_xmethod_worker): Remove.
9892 (free_xmethod_worker_vec): Remove.
9893 * extension.h (enum ext_lang_rc): Move here from
9895 (struct xmethod_worker): Add constructor and destructor.
9898 <invoke, clone, do_get_result_type, do_get_arg_types>: New
9899 virtual pure methods.
9900 <get_arg_types, get_result_type>: New methods.
9901 (xmethod_worker_ptr): Remove typedef.
9902 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
9903 (xmethod_worker_vec): Remove typedef.
9904 (xmethod_worker_up): New typedef.
9905 (invoke_xmethod): Remove.
9906 (clone_xmethod_worker): Remove.
9907 (free_xmethod_worker): Remove.
9908 (free_xmethod_worker_vec): Remove.
9909 (get_xmethod_arg_types): Remove.
9910 (get_xmethod_result_type): Remove.
9911 * valops.c (find_method_list): Use std::vector, don't use
9912 intermediate vector.
9913 (value_find_oload_method_list): Use std::vector.
9914 (find_overload_match): Use std::vector.
9915 (find_oload_champ): Use std::vector.
9916 * value.c (value_free): Use operator delete.
9917 (value_of_xmethod): Rename to...
9918 (value_from_xmethod): ... this. Don't assign
9919 xmethod_worker::value, take rvalue-reference.
9920 (result_type_of_xmethod): Adjust.
9921 (call_xmethod): Adjust.
9922 * value.h: Include extension.h.
9923 (struct xmethod_worker): Don't forward-declare.
9924 (value_of_xmethod): Rename to...
9925 (value_from_xmethod): ... this, take rvalue-reference.
9926 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
9927 (struct python_xmethod_worker): ... this, add constructor and
9929 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
9930 (gdbpy_free_xmethod_worker_data): Rename to...
9931 (python_xmethod_worker::~python_xmethod_worker): ... this and
9933 (gdbpy_clone_xmethod_worker_data): Rename to...
9934 (python_xmethod_worker::clone): ... this and adjust.
9935 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
9937 (gdbpy_get_xmethod_arg_types): Rename to...
9938 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
9939 (gdbpy_get_xmethod_result_type): Rename to...
9940 (python_xmethod_worker::do_get_result_type): ... this and
9942 (gdbpy_invoke_xmethod): Rename to...
9943 (python_xmethod_worker::invoke): ... this and adjust.
9944 (new_python_xmethod_worker): Rename to...
9945 (python_xmethod_worker::python_xmethod_worker): ... this and
9947 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
9949 (gdbpy_free_xmethod_worker_data): Remove.
9950 (gdbpy_get_matching_xmethod_workers): Use std::vector.
9951 (gdbpy_get_xmethod_arg_types): Remove.
9952 (gdbpy_get_xmethod_result_type): Remove.
9953 (gdbpy_invoke_xmethod): Remove.
9954 * python/python.c (python_extension_ops): Remove obsolete
9957 2018-01-05 Pedro Alves <palves@redhat.com>
9960 * common/signals-state-save-restore.c
9961 (save_original_signals_state): New parameter 'quiet'. Warn if we
9962 find a custom handler preinstalled, instead of internal erroring.
9963 But only warn if !quiet.
9964 * common/signals-state-save-restore.h
9965 (save_original_signals_state): New parameter 'quiet'.
9966 * main.c (captured_main_1): Move save_original_signals_state call
9967 after option handling, and pass QUIET.
9969 2018-01-05 Pedro Alves <palves@redhat.com>
9971 * spu-tdep.c (spu_catch_start): Pass
9972 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
9974 2018-01-05 Pedro Alves <palves@redhat.com>
9977 * ada-lang.c (literal_symbol_name_matcher): New function.
9978 (ada_get_symbol_name_matcher): Use it for
9979 symbol_name_match_type::SEARCH_NAME.
9980 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
9981 it down instead of assuming symbol_name_match_type::FULL.
9982 * block.h (block_lookup_symbol): New parameter 'match_type'.
9983 * c-valprint.c (print_unpacked_pointer): Use
9984 lookup_symbol_search_name instead of lookup_symbol.
9985 * compile/compile-object-load.c (get_out_value_type): Pass down
9986 symbol_name_match_type::SEARCH_NAME.
9987 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
9988 symbol_name_match_type::FULL.
9989 * cp-support.c (cp_get_symbol_name_matcher): Handle
9990 symbol_name_match_type::SEARCH_NAME.
9991 * infrun.c (insert_exception_resume_breakpoint): Use
9992 lookup_symbol_search_name.
9993 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
9994 * psymtab.c (maintenance_check_psymtabs): Use
9995 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
9996 * stack.c (print_frame_args): Use lookup_symbol_search_name and
9998 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
9999 if symbol_name_match_type::SEARCH_NAME.
10000 (lookup_symbol_in_language): Pass down
10001 symbol_name_match_type::FULL.
10002 (lookup_symbol_search_name): New.
10003 (lookup_language_this): Pass down
10004 symbol_name_match_type::SEARCH_NAME.
10005 (lookup_symbol_aux, lookup_local_symbol): New parameter
10006 'match_type'. Pass it down.
10007 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
10008 (lookup_symbol_search_name): New declaration.
10009 (lookup_symbol_in_block): New 'match_type' parameter.
10011 2018-01-05 Pedro Alves <palves@redhat.com>
10014 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
10016 (ada_lookup_symbol): Reimplement in terms of
10017 ada_lookup_symbol_list, bits factored out from
10018 ada_lookup_encoded_symbol.
10020 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10022 * ada-exp.y (write_object_renaming): When subscripting an array
10023 using a symbol as the index, pass the block in call to
10024 ada_lookup_encoded_symbol when looking that symbol up.
10026 2018-01-05 Jerome Guitton <guitton@adacore.com>
10028 * ada-lang.c (ada_array_length): Use ada_index_type instead of
10031 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10033 * ada-lang.c (ada_to_fixed_value_create): Add handling of
10034 the case where VALUE_LVAL (val0) is not lval_memory.
10036 2018-01-05 Xavier Roirand <roirand@adacore.com>
10038 * ada-valprint.c (print_optional_low_bound): Handle
10039 character-indexed array printing like boolean-indexed array
10042 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10044 * NEWS: Create a new section for the next release branch.
10045 Rename the section of the current branch, now that it has
10048 2018-01-05 Joel Brobecker <brobecker@adacore.com>
10050 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
10051 * version.in: Bump version to 8.1.50.DATE-git.
10053 2018-01-03 Xavier Roirand <roirand@adacore.com>
10055 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
10057 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
10059 (default_exception_support_info) <catch_handlers_sym>: Add field.
10060 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
10061 (ada_exception_name_addr_1): Add "catch handlers" handling.
10062 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
10063 Update all callers.
10064 (create_excep_cond_exprs) <ex>: Add parameter.
10065 (re_set_exception): Update create_excep_cond_exprs call.
10066 (print_it_exception, print_one_exception, print_mention_exception)
10067 (print_recreate_exception): Add "catch handler" handling.
10068 (allocate_location_catch_handlers, re_set_catch_handlers)
10069 (check_status_catch_handlers, print_it_catch_handlers)
10070 (print_one_catch_handlers, print_mention_catch_handlers)
10071 (print_recreate_catch_handlers): New function.
10072 (catch_handlers_breakpoint_ops): New variable.
10073 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
10074 Add parameter. Add "catch handler" handling.
10075 (ada_exception_sym_name, ada_exception_breakpoint_ops):
10076 Add "catch handler" handling.
10077 (ada_exception_catchpoint_cond_string): Add "catch handler"
10079 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
10081 (catch_ada_handlers_command): New function.
10082 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
10083 operations structure.
10084 (_initialize_ada_language): Add "catch handlers" command entry.
10085 * NEWS: Document "catch handlers" feature.
10087 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10089 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
10090 account when creating the array type of the slice.
10091 (ada_value_slice): Likewise.
10093 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10095 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
10097 (create_array_type_with_stride): Add byte_stride_prop parameter.
10098 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
10099 New parameter. Update all callers in this file.
10100 (array_type_has_dynamic_stride): New function.
10101 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
10102 of arrays with dynamic byte strides.
10103 * dwarf2read.c (read_array_type): Add support for dynamic
10104 DW_AT_byte_stride attributes.
10106 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10108 * dwarf2read.c (read_unspecified_type): Treat
10109 DW_TAG_enumeration_type DIEs from Ada units as stubs.
10111 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10113 Update copyright year range in all GDB files.
10115 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10117 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
10118 and gdb/testsuite/gdb.base/step-line.c.
10120 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10122 * copyright.py (main): Dump the contents of
10123 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
10124 even if BY_HAND is empty.
10126 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10128 * top.c (print_gdb_version): Update Copyright year in version
10131 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10133 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
10135 For older changes see ChangeLog-2017.
10141 version-control: never