1 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
3 * symfile.c (set_objfile_default_section_offset): Remove struct
6 2018-07-14 Stafford Horne <shorne@gmail.com>
8 * (Responsible Maintainers): Add myself as or1k maintainer.
10 2018-07-13 Tom Tromey <tom@tromey.com>
12 * symfile.c (set_objfile_default_section_offset): Use extra braces
15 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
17 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
20 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
22 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
23 unittests/cli-utils-selftests.c
24 * unittests/cli-utils-selftests.c: New file.
26 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
28 * NEWS: Mention new commands. Mention change to 'thread apply'.
30 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
32 * thread.c (thr_try_catch_cmd): New function.
33 (thread_apply_all_command): Handle qcs flags.
34 (thread_apply_command): Handle qcs flags.
35 (taas_command): New function.
36 (tfaas_command): New function.
37 (_initialize_thread): Update to setup the new commands 'taas
38 and 'tfaas'. Change doc string for 'thread apply'.
40 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
42 * stack.c: (trailing_outermost_frame): New function, mostly
43 extracted from backtrace_command_1.
44 (leading_innermost_frame): New function.
45 (backtrace_command_1): Update to call trailing_outermost_frame.
46 (frame_apply_command_count): New function.
47 (frame_apply_level_command): New function.
48 (frame_apply_all_command): New function.
49 (frame_apply_command): New function.
50 (faas_command): New function.
51 (frame_cmd_list): New variable.
52 (_initialize_stack): Update to setup the new commands 'frame apply'
55 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
57 * cli-utils.c (number_or_range_parser::get_number): Only handle
58 numbers or convenience var as numbers.
59 (parse_flags): New function.
60 (parse_flags_qcs): New function.
61 (number_or_range_parser::finished): Ensure parsing end is detected
63 * cli-utils.h (parse_flags): New function.
64 (parse_flags_qcs): New function.
65 (number_or_range_parser): Remove m_finished bool.
66 (number_or_range_parser::skip_range): Set m_in_range to false.
68 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
70 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
73 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
74 Jan Kratochvil <jan.kratochvil@redhat.com>
75 Paul Fertser <fercerpav@gmail.com>
76 Tsutomu Seki <sekiriki@gmail.com>
77 Pedro Alves <palves@redhat.com>
79 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
80 'unittests/parse-connection-spec-selftests.c'.
81 (COMMON_SFILES): Add 'common/netstuff.c'.
82 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
83 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
84 * common/netstuff.c: New file.
85 * common/netstuff.h: New file.
86 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
87 (wait_for_connect): Update comment. New parameter
88 'gdb::optional<int> sock' instead of 'struct serial *scb'.
89 Use 'sock' directly instead of 'scb->fd'.
90 (try_connect): New function, with code from 'net_open'.
91 (net_open): Rewrite main loop to deal with multiple
92 sockets/addresses. Handle IPv6-style hostnames; implement
93 support for IPv6 connections.
94 * unittests/parse-connection-spec-selftests.c: New file.
96 2018-07-11 Pedro Alves <palves@redhat.com>
99 * remote.c (remote_target::remote_detach_pid): Call
102 2018-07-11 Pedro Alves <palves@redhat.com>
104 * h8300-tdep.c (h8300_gdbarch_init): Remove
105 set_gdbarch_ecoff_reg_to_regnum calls.
107 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
110 * c-typeprint.c (c_type_print_base_struct_union): Don't print
111 offsets/sizes for static members of a class/struct.
113 2018-07-11 Alan Hayward <alan.hayward@arm.com>
115 * target-descriptions.c (tdesc_register_bitsize): Rename.
116 * target-descriptions.h (tdesc_register_bitsize): Likewise.
117 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
118 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
120 2018-07-10 Tom Tromey <tom@tromey.com>
122 * breakpoint.c (moribund_locations): Now static and a
124 (breakpoint_init_inferior, moribund_breakpoint_here_p)
125 (build_bpstat_chain, update_global_location_list)
126 (breakpoint_retire_moribund): Update.
127 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
130 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
132 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
133 (riscv_register_reggroup_p): Use new function, remove unneeded
135 (riscv_push_dummy_call): Extend assert to compare against xlen or
136 flen based on register type.
138 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
140 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
142 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
144 * remote.c (show_hardware_watchpoint_limit): New function.
145 (show_hardware_watchpoint_length_limit): New function.
146 (show_hardware_breakpoint_limit): New function.
147 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
148 where appropriate, update help text.
150 2018-07-09 Tom Tromey <tom@tromey.com>
152 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
153 (CLIBS): Don't mention NAT_CLIBS.
155 2018-07-09 Tom Tromey <tom@tromey.com>
157 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
158 (LIBGDB_OBS, clean mostlyclean): Update.
159 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
161 2018-07-09 Tom Tromey <tom@tromey.com>
163 * Makefile.in (%.c: %.y): Use ECHO_YACC.
164 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
165 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
167 2018-07-09 Tom Tromey <tom@tromey.com>
169 * Makefile.in (ALLDEPFILES): Remove exec.c.
170 (COMMON_OBS): Remove exec.o.
171 (COMMON_SFILES): Add exec.c.
173 2018-07-09 Tom Tromey <tom@tromey.com>
175 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
177 2018-07-09 Tom Tromey <tom@tromey.com>
179 * Makefile.in (clean mostlyclean): Remove stamp-version.
180 (version.c): Depend on stamp-version.
181 (stamp-version): New rule, from version.c rule.
183 2018-07-09 Tom Tromey <tom@tromey.com>
185 * Makefile.in (init.c): Depend on stamp-init.
186 (stamp-init): New rule, from init.c rule.
187 (clean mostlyclean): Remove stamp-init.
189 2018-07-09 Tom Tromey <tom@tromey.com>
191 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
192 SUBDIR_GCC_COMPILE_SRCS.
194 2018-07-09 Tom Tromey <tom@tromey.com>
196 * Makefile.in (init.c): Remove some unused sed rules.
198 2018-07-09 Tom Tromey <tom@tromey.com>
200 * Makefile.in (TSOBS): Remove.
201 (INIT_FILES): Update.
202 (LIBGDB_OBS): Update.
203 (COMMON_SFILES): Add inflow.c.
204 (SFILES): Remove inflow.c.
206 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
208 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
210 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
212 * ia64-tdep.c (get_reg_name, get_fpreg_name, get_saveloc_name,
213 is_signal_frame_name, step_name, init_remote_name,
214 create_addr_space_name, destroy_addr_space_name,
215 search_unwind_table_name, find_dyn_list_name): Constify.
217 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
219 * darwin-nat.c (darwin_pthread_kill): New function.
220 (darwin_resume_thread): Use darwin_pthread_kill.
222 2018-07-05 Tom de Vries <tdevries@suse.de>
224 * macroexp.c (macro_buffer) <operator=>: New member function.
226 2018-07-04 Tom Tromey <tom@tromey.com>
228 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
230 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
232 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
233 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
237 2018-07-04 Joel Brobecker <brobecker@adacore.com>
239 * NEWS: Create a new section for the next release branch.
240 Rename the section of the current branch, now that it has
243 2018-07-04 Joel Brobecker <brobecker@adacore.com>
245 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
246 * version.in: Bump version to 8.2.50.DATE-git.
248 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
249 Pedro Alves <palves@redhat.com>
251 * linux-nat.c (linux_init_ptrace): Rename to ...
252 (linux_init_ptrace_procfs): ... this. Call
253 linux_proc_init_warnings.
254 (linux_nat_target::post_attach)
255 (linux_nat_target::post_startup_inferior): Adjust.
256 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
257 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
259 2018-07-04 Tom de Vries <tdevries@suse.de>
261 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
263 (read_comp_unit_head): ... here.
265 2018-07-03 Tom Tromey <tom@tromey.com>
267 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
268 (stop_tracing, tstatus_command)
269 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
270 (print_one_static_tracepoint_marker): Update.
271 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
273 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
275 (all_tracepoints, static_tracepoints_here): Return std::vector.
277 2018-07-03 Tom Tromey <tom@tromey.com>
279 * common/ptid.c (ptid_equal): Remove.
280 * common/ptid.h (ptid_equal): Don't declare.
281 * ada-tasks.c: Update.
282 * breakpoint.c: Update.
283 * common/agent.c: Update.
285 * darwin-nat-info.c: Update.
286 * darwin-nat.c: Update.
288 * dtrace-probe.c: Update.
289 * dummy-frame.c: Update.
290 * fbsd-nat.c: Update.
292 * gdbthread.h: Update.
294 * go32-nat.c: Update.
295 * inf-loop.c: Update.
296 * inf-ptrace.c: Update.
301 * linux-fork.c: Update.
302 * linux-nat.c: Update.
303 * linux-thread-db.c: Update.
304 * mi/mi-cmd-var.c: Update.
305 * mi/mi-interp.c: Update.
306 * mi/mi-main.c: Update.
307 * nto-procfs.c: Update.
308 * ppc-linux-tdep.c: Update.
310 * python/py-inferior.c: Update.
311 * python/py-record-btrace.c: Update.
312 * python/py-record.c: Update.
313 * ravenscar-thread.c: Update.
314 * regcache.c: Update.
315 * remote-sim.c: Update.
317 * sol-thread.c: Update.
320 * tui/tui-stack.c: Update.
322 * windows-nat.c: Update.
323 * windows-tdep.c: Update.
325 2018-07-03 Tom Tromey <tom@tromey.com>
327 * common/ptid.c (ptid_match): Remove.
328 * common/ptid.h (ptid_match): Don't declare.
329 * fbsd-nat.c: Update.
332 * linux-nat.c: Update.
333 * record-btrace.c: Update.
334 * regcache.c: Update.
337 2018-07-03 Tom Tromey <tom@tromey.com>
339 * common/ptid.c (ptid_tid_p): Remove.
340 * common/ptid.h (ptid_tid_p): Don't declare.
341 * sol-thread.c: Update.
343 2018-07-03 Tom Tromey <tom@tromey.com>
345 * common/ptid.c (ptid_lwp_p): Remove.
346 * common/ptid.h (ptid_lwp_p): Don't declare.
347 * fbsd-nat.c: Update.
348 * linux-nat.c: Update.
349 * nat/linux-procfs.c: Update.
350 * nat/x86-linux-dregs.c: Update.
351 * sol-thread.c: Update.
353 2018-07-03 Tom Tromey <tom@tromey.com>
355 * common/ptid.c (ptid_is_pid): Remove.
356 * common/ptid.h (ptid_is_pid): Don't declare.
358 * linux-nat.c: Update.
359 * mi/mi-interp.c: Update.
363 2018-07-03 Tom Tromey <tom@tromey.com>
365 * common/ptid.c (ptid_get_tid): Remove.
366 * common/ptid.h (ptid_get_tid): Don't declare.
367 * ada-tasks.c: Update.
368 * aix-thread.c: Update.
369 * bsd-uthread.c: Update.
370 * darwin-nat.c: Update.
371 * fbsd-nat.c: Update.
372 * i386-darwin-nat.c: Update.
374 * linux-tdep.c: Update.
375 * nto-procfs.c: Update.
376 * ppc-ravenscar-thread.c: Update.
377 * python/py-infthread.c: Update.
378 * ravenscar-thread.c: Update.
379 * sol-thread.c: Update.
380 * sparc-ravenscar-thread.c: Update.
381 * windows-nat.c: Update.
383 2018-07-03 Tom Tromey <tom@tromey.com>
385 * common/ptid.c (ptid_get_lwp): Remove.
386 * common/ptid.h (ptid_get_lwp): Don't declare.
387 * aarch64-linux-nat.c: Update.
388 * ada-tasks.c: Update.
389 * aix-thread.c: Update.
390 * amd64-linux-nat.c: Update.
391 * arm-linux-nat.c: Update.
393 * fbsd-nat.c: Update.
394 * fbsd-tdep.c: Update.
396 * i386-cygwin-tdep.c: Update.
397 * i386-gnu-nat.c: Update.
398 * i386-linux-nat.c: Update.
399 * ia64-linux-nat.c: Update.
400 * inf-ptrace.c: Update.
402 * linux-fork.c: Update.
403 * linux-nat.c: Update.
404 * linux-tdep.c: Update.
405 * linux-thread-db.c: Update.
406 * mips-linux-nat.c: Update.
407 * nat/aarch64-linux-hw-point.c: Update.
408 * nat/aarch64-linux.c: Update.
409 * nat/linux-btrace.c: Update.
410 * nat/linux-osdata.c: Update.
411 * nat/linux-procfs.c: Update.
412 * nat/x86-linux-dregs.c: Update.
413 * obsd-nat.c: Update.
414 * ppc-fbsd-nat.c: Update.
415 * ppc-linux-nat.c: Update.
417 * python/py-infthread.c: Update.
418 * ravenscar-thread.c: Update.
420 * s390-linux-nat.c: Update.
421 * sol-thread.c: Update.
422 * sol2-tdep.c: Update.
423 * spu-linux-nat.c: Update.
424 * x86-linux-nat.c: Update.
425 * xtensa-linux-nat.c: Update.
427 2018-07-03 Tom Tromey <tom@tromey.com>
429 * common/ptid.c (ptid_get_pid): Remove.
430 * common/ptid.h (ptid_get_pid): Don't declare.
431 * aarch64-linux-nat.c: Update.
432 * ada-lang.c: Update.
433 * aix-thread.c: Update.
434 * alpha-bsd-nat.c: Update.
435 * amd64-fbsd-nat.c: Update.
436 * amd64-linux-nat.c: Update.
437 * arm-linux-nat.c: Update.
438 * arm-nbsd-nat.c: Update.
440 * break-catch-syscall.c: Update.
441 * breakpoint.c: Update.
442 * bsd-uthread.c: Update.
445 * darwin-nat.c: Update.
446 * fbsd-nat.c: Update.
447 * fbsd-tdep.c: Update.
450 * hppa-nbsd-nat.c: Update.
451 * hppa-obsd-nat.c: Update.
452 * i386-fbsd-nat.c: Update.
453 * ia64-linux-nat.c: Update.
454 * inf-ptrace.c: Update.
456 * inferior.c: Update.
457 * inferior.h: Update.
460 * linux-fork.c: Update.
461 * linux-nat.c: Update.
462 * linux-tdep.c: Update.
463 * linux-thread-db.c: Update.
464 * m68k-bsd-nat.c: Update.
465 * mi/mi-interp.c: Update.
466 * mi/mi-main.c: Update.
467 * mips-linux-nat.c: Update.
468 * mips-nbsd-nat.c: Update.
469 * mips64-obsd-nat.c: Update.
470 * nat/aarch64-linux-hw-point.c: Update.
471 * nat/aarch64-linux.c: Update.
472 * nat/linux-btrace.c: Update.
473 * nat/linux-osdata.c: Update.
474 * nat/linux-procfs.c: Update.
475 * nat/x86-linux-dregs.c: Update.
476 * nto-procfs.c: Update.
477 * obsd-nat.c: Update.
478 * ppc-linux-nat.c: Update.
479 * ppc-nbsd-nat.c: Update.
480 * ppc-obsd-nat.c: Update.
481 * proc-service.c: Update.
483 * python/py-inferior.c: Update.
484 * python/py-infthread.c: Update.
485 * ravenscar-thread.c: Update.
487 * remote-sim.c: Update.
489 * rs6000-nat.c: Update.
490 * s390-linux-nat.c: Update.
491 * sh-nbsd-nat.c: Update.
492 * sol-thread.c: Update.
493 * sparc-nat.c: Update.
494 * sparc64-tdep.c: Update.
495 * spu-linux-nat.c: Update.
496 * spu-tdep.c: Update.
497 * target-debug.h: Update.
500 * tid-parse.c: Update.
501 * tracefile-tfile.c: Update.
502 * vax-bsd-nat.c: Update.
503 * windows-nat.c: Update.
504 * x86-linux-nat.c: Update.
507 2018-07-03 Tom Tromey <tom@tromey.com>
509 * common/ptid.c (pid_to_ptid): Remove.
510 * common/ptid.h (pid_to_ptid): Don't declare.
511 * aix-thread.c: Update.
512 * arm-linux-nat.c: Update.
513 * common/ptid.c: Update.
514 * common/ptid.h: Update.
517 * darwin-nat.c: Update.
518 * fbsd-nat.c: Update.
519 * fork-child.c: Update.
521 * go32-nat.c: Update.
522 * inf-ptrace.c: Update.
524 * inferior.c: Update.
526 * linux-fork.c: Update.
527 * linux-nat.c: Update.
528 * nat/aarch64-linux-hw-point.c: Update.
529 * nat/fork-inferior.c: Update.
530 * nat/x86-linux-dregs.c: Update.
531 * nto-procfs.c: Update.
532 * obsd-nat.c: Update.
534 * progspace.c: Update.
536 * rs6000-nat.c: Update.
537 * s390-linux-nat.c: Update.
538 * sol-thread.c: Update.
539 * spu-linux-nat.c: Update.
542 * tracefile-tfile.c: Update.
543 * windows-nat.c: Update.
545 2018-07-03 Tom Tromey <tom@tromey.com>
547 * common/ptid.h (ptid_build): Don't declare.
548 * common/ptid.c (ptid_build): Remove.
549 * aix-thread.c: Update.
551 * bsd-uthread.c: Update.
552 * common/agent.c: Update.
553 * common/ptid.c: Update.
554 * common/ptid.h: Update.
556 * darwin-nat.c: Update.
557 * fbsd-nat.c: Update.
559 * linux-fork.c: Update.
560 * linux-nat.c: Update.
561 * linux-thread-db.c: Update.
562 * nat/linux-osdata.c: Update.
563 * nat/linux-procfs.c: Update.
564 * nto-procfs.c: Update.
565 * obsd-nat.c: Update.
566 * proc-service.c: Update.
568 * ravenscar-thread.c: Update.
569 * remote-sim.c: Update.
571 * sol-thread.c: Update.
573 * windows-nat.c: Update.
575 2018-07-03 Tom Tromey <tom@tromey.com>
577 * infrun.c (follow_exec): Use exit_inferior_silent.
578 * inferior.c (exit_inferior_num_silent): Remove.
579 * inferior.h (exit_inferior_num_silent): Don't declare.
581 2018-07-03 Tom Tromey <tom@tromey.com>
584 * darwin-nat.c (darwin_attach_pid): Reset inferior and
585 inferior_ptid on error.
587 2018-07-02 Maciej W. Rozycki <macro@mips.com>
588 Simon Marchi <simon.marchi@polymtl.ca>
591 * disasm.h (gdb_disassembler): Add
592 `m_disassembler_options_holder'. member
593 * disasm.c (get_all_disassembler_options): New function.
594 (gdb_disassembler::gdb_disassembler): Use it.
595 (gdb_buffered_insn_length_init_dis): Likewise.
596 (gdb_buffered_insn_length): Adjust accordingly.
597 (set_disassembler_options): Handle options with arguments.
598 (show_disassembler_options_sfunc): Likewise. Add a leading new
599 line if showing options with descriptions.
600 (disassembler_options_completer): Adapt to using the
601 `disasm_options_and_args_t' structure.
602 * mips-tdep.c (mips_disassembler_options): New variable.
603 (mips_disassembler_options_o32): Likewise.
604 (mips_disassembler_options_n32): Likewise.
605 (mips_disassembler_options_n64): Likewise.
606 (gdb_print_insn_mips): Don't set `disassembler_options'.
607 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
609 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
610 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
611 `gdbarch_disassembler_options_implicit' and
612 `gdbarch_valid_disassembler_options'.
613 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
614 `disasm_options_and_args_t' structure.
615 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
617 (valid_disassembler_options): Switch from `disasm_options_t' to
618 the `disasm_options_and_args_t' structure.
619 * NEWS: Document `set disassembler-options' support for the MIPS
621 * gdbarch.h: Regenerate.
622 * gdbarch.c: Regenerate.
624 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
626 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
628 2018-06-29 Joel Brobecker <brobecker@adacore.com>
630 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
631 parameter in call to amd64_target_description.
632 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
633 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
634 (amd64fbsd_init_abi): Likewise.
635 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
636 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
637 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
638 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
640 2018-06-29 Pedro Alves <palves@redhat.com>
642 * gdb/amd64-tdep.h (amd64_create_target_description): Add
643 "segments" parameter.
644 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
645 (_initialize_amd64_tdep): Update call to
646 amd64_create_target_description.
647 (amd64_target_description): Add "segments" parameter. Adjust
648 the implementation to use it.
649 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
650 call to amd64_create_target_description.
651 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
652 * gdb/arch/amd64.h (amd64_create_target_description): Add
654 * gdb/arch/amd64.c (amd64_create_target_description): Add
655 "segments" parameter. Call create_feature_i386_64bit_segments
656 only if SEGMENTS is true.
657 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
658 call to amd64_create_target_description.
660 2018-06-29 Pedro Alves <palves@redhat.com>
662 * thread.c (thread_target_id_str): New, factored out from ...
663 (print_thread_info_1): ... here. Use it to compute the max
664 "Target Id" column width.
666 2018-06-29 Pedro Alves <palves@redhat.com>
668 * remote.c (remote_target::extra_thread_info): Delete
669 'display_buf' and 'n' locals. from the cache, regardless of
670 packet mechanims is in use. Use cache for qThreadExtra and qP
673 2018-06-29 Pedro Alves <palves@redhat.com>
675 * blockframe.c (find_pc_sect_containing_function): New function.
676 * breakpoint.c (print_breakpoint_location): Don't call
677 find_pc_sect_function.
678 * linespec.c (create_sals_line_offset): Record the location's
680 * linespec.c (convert_address_location_to_sals): Fill in sal's
681 symbol with find_pc_sect_containing_function.
682 * symtab.c (find_function_start_sal): Rename to ...
683 (find_function_start_sal_1): ... this.
684 (find_function_start_sal): Reimplement as wrapper around
685 find_function_start_sal_1, and use
686 find_pc_sect_containing_function to fill in the sal's symbol.
687 (find_function_start_sal(symbol*, bool)): Adjust.
688 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
690 (find_pc_sect_containing_function): Declare.
692 2018-06-29 Pedro Alves <palves@redhat.com>
694 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
695 true if the the location has no symbol.
697 2018-06-28 Tom Tromey <tom@tromey.com>
699 * NEWS: Mention --enable-codesign.
700 * silent-rules.mk (ECHO_SIGN): New variable.
701 * configure.ac: Add --enable-codesign.
702 * configure: Rebuild.
703 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
704 (gdb$(EXEEXT)): Optionally invoke codesign.
706 2018-06-28 Pedro Alves <palves@redhat.com>
708 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
710 (switch_to_thread_no_regs): Adjust comment.
711 * infcmd.c (stop_pc): Delete.
712 (post_create_inferior, info_program_command): Replace references
713 to stop_pc with references to thread_info->suspend.stop_pc.
714 * inferior.h (stop_pc): Delete declaration.
715 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
716 (handle_inferior_event_1, handle_signal_stop)
717 (process_event_stop_test, keep_going_stepped_thread)
718 (handle_step_into_function, handle_step_into_function_backward)
719 (print_stop_location): Replace references to stop_pc with
720 references to thread_info->suspend.stop_pc.
721 (struct infcall_suspend_state) <stop_pc>: Delete field.
722 (save_infcall_suspend_state, restore_infcall_suspend_state):
723 Remove references to inf_stat->stop_pc.
724 * linux-fork.c (fork_load_infrun_state): Likewise.
725 * record-btrace.c (record_btrace_set_replay): Likewise.
726 * record-full.c (record_full_goto_entry): Likewise.
727 * remote.c (print_one_stopped_thread): Likewise.
728 * target.c (target_resume): Extend comment.
729 * thread.c (set_executing_thread): New.
730 (set_executing): Use it.
731 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
732 Remove references to stop_pc.
734 2018-06-28 Pedro Alves <palves@redhat.com>
736 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
737 Moving fetching stop_pc until after ecs->event_thread is refreshed.
739 2018-06-28 Tom Tromey <tom@tromey.com>
741 * coffread.c (coff_symfile_finish): Update.
742 * xcoffread.c (xcoff_symfile_finish): Update.
743 * elfread.c (elf_symfile_finish): Update.
744 * symfile.h (dwarf2_free_objfile): Don't declare.
745 * dwarf2read.c (_initialize_dwarf2_read): Use
746 register_objfile_data_with_cleanup.
747 (dwarf2_free_objfile): Now static. Change signature.
749 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
751 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
752 option "-o" to add-symbol-file-load to add an offset to each
753 section's load address.
754 * symfile.c (set_objfile_default_section_offset): New function.
756 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
758 * symfile.c (add_symbol_file_command): Make sure that sections
759 with the same name are sorted in the same order.
761 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
763 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
764 require the second argument. If omitted, load sections at the
765 addresses specified in the file.
767 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
769 * symfile.c (symbol_file_command, symbol_file_add_main_1)
770 (_initialize_symfile): Add option "-o" to symbol-file to add an
771 offset to each section of the symbol file.
773 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
775 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
777 2018-06-27 Tom Tromey <tom@tromey.com>
779 * stack.c (_initialize_stack): Update "func" help text.
781 2018-06-27 Tom Tromey <tom@tromey.com>
783 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
785 (unwind_infopy_str, pyuw_create_unwind_info)
786 (unwind_infopy_add_saved_register, pyuw_sniffer)
787 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
789 (struct saved_reg): Add constructor.
790 <value>: Now a gdbpy_ref<>.
792 2018-06-27 Tom Tromey <tom@tromey.com>
794 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
796 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
798 * gdb-gdb.py.in: Format using autopep8.
800 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
802 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
803 (type_lookup_function): Recognize CORE_ADDR values.
805 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
807 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
810 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
812 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
815 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
817 * gdb-gdb.py: Move to...
818 * gdb-gdb.py.in: ... here.
819 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
820 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
822 (distclean): Remove gdb-gdb.py when cleaning.
823 (gdb-gdb.py, gdb-gdb.gdb): New rules.
824 * configure: Re-generate.
826 2018-06-27 Pedro Alves <palves@redhat.com>
828 * proc-service.c (get_ps_regcache): New.
829 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
830 (ps_lsetfpregs): Use it.
832 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
835 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
836 (dwarf_decode_lines_1): Adjust.
838 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
840 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
842 <info_proc>: Likewise.
844 2018-06-26 Joel Brobecker <brobecker@adacore.com>
846 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
847 to windows_fetch_one_register, and only handle the case of
848 fetching one register. Move the code that reloads the context
849 and iterates over all registers if R is negative to...
850 (windows_nat_target::fetch_registers): ... here.
851 (do_windows_store_inferior_registers): Rename to
852 windows_store_one_register, and only handle the case of storing
853 one register. Move the code that handles the case where r is
855 (windows_nat_target::store_registers) ... here.
857 2018-06-26 Tom Tromey <tom@tromey.com>
860 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
861 * rust-lang.c (rust_print_struct_def): Add podata parameter.
863 (rust_internal_print_type): Add podata parameter.
864 (rust_print_type): Update.
866 2018-06-26 Tom Tromey <tom@tromey.com>
868 * typeprint.h (struct print_offset_data) <update, finish,
869 maybe_print_hole>: New methods.
870 <indentation>: New constant.
871 * typeprint.c (print_offset_data::indentation): Define.
872 (print_offset_data::maybe_print_hole, print_offset_data::update)
873 (print_offset_data::finish): Move from c-typeprint.c and rename.
874 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
875 (print_spaces_filtered_with_print_options): Update.
876 (c_print_type_union_field_offset, maybe_print_hole)
877 (c_print_type_struct_field_offset): Move to typeprint.c and
879 (c_type_print_base_struct_union): Update.
881 2018-06-25 Pedro Alves <palves@redhat.com>
883 * gdbthread.h (thread_info_ref, delete_thread)
884 (delete_thread_silent, first_thread_of_inferior)
885 (any_thread_of_inferior, switch_to_thread)
886 (enable_thread_stack_temporaries)
887 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
888 (get_last_thread_stack_temporary)
889 (value_in_thread_stack_temporaries, can_access_registers_thread):
890 Spell out "struct thread_info" instead of just "thread_info".
891 * inferior.h (notice_new_inferior): Likewise.
893 2018-06-25 Pedro Alves <palves@redhat.com>
895 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
896 pass thread_info pointer to delete_thread.
897 (windows_nat_target::detach): Pass inferior pointer to
899 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
901 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
902 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
903 and pass a thread_info pointer to delete_thread.
904 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
905 pass thread_info pointer to delete_thread.
906 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
907 delete_thread_silent call.
908 * procfs.c (procfs_target::detach): Pass inferior pointer to
910 (procfs_target::wait): Pass thread_info pointer to delete_thread.
911 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
912 delete_thread_silent call.
913 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
914 pass thread_info pointer to delete_thread.
915 (windows_nat_target::detach): Pass inferior pointer to
918 2018-06-22 Alan Hayward <alan.hayward@arm.com>
920 * regcache.c (readable_regcache::read_part): Fix asserts.
921 (reg_buffer::raw_collect_part): New function.
922 (regcache::write_part): Fix asserts.
923 (reg_buffer::raw_supply_part): New function.
924 (regcache::transfer_regset_register): New helper function.
925 (regcache::transfer_regset): Call new functions.
926 (regcache_supply_regset): Use gdb_byte*.
927 (regcache::supply_regset): Likewise.
928 (regcache_collect_regset): Likewise.
929 (regcache::collect_regset): Likewise.
930 * regcache.h (reg_buffer::raw_collect_part): New declaration.
931 (reg_buffer::raw_supply_part): Likewise.
932 (regcache::transfer_regset_register): Likewise.
933 (regcache::transfer_regset): Use gdb_byte*.
935 2018-06-22 Alan Hayward <alan.hayward@arm.com>
937 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
939 2018-06-21 Pedro Alves <palves@redhat.com>
941 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
942 instead of a ptid_t. All callers adjusted.
943 * ada-tasks.c (ada_get_task_number): Likewise. All callers
945 (print_ada_task_info, display_current_task_id, task_command_1):
947 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
949 (breakpoint_kind): Adjust.
950 (remove_breakpoints_pid): Rename to ...
951 (remove_breakpoints_inf): ... this. Adjust to take an inferior
952 pointer. All callers adjusted.
953 (bpstat_clear_actions): Use inferior_thread.
954 (get_bpstat_thread): New.
955 (bpstat_do_actions): Use it.
956 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
957 to take a thread_info pointer. All callers adjusted.
958 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
959 (breakpoint_re_set_thread): Use inferior_thread.
960 * breakpoint.h (struct inferior): Forward declare.
961 (bpstat_stop_status): Update.
962 (remove_breakpoints_pid): Delete.
963 (remove_breakpoints_inf): New.
964 * bsd-uthread.c (bsd_uthread_target::wait)
965 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
966 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
967 (maint_btrace_packet_history_cmd)
968 (maint_btrace_clear_packet_history_cmd): Adjust.
969 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
971 * cli/cli-interp.c: Include "inferior.h".
972 * common/refcounted-object.h (struct
973 refcounted_object_ref_policy): New.
974 * compile/compile-object-load.c: Include gdbthread.h.
975 (store_regs): Use inferior_thread.
976 * corelow.c (core_target::close): Use current_inferior.
977 (core_target_open): Adjust to use first_thread_of_inferior and use
978 the current inferior.
979 * ctf.c (ctf_target::close): Adjust to use current_inferior.
980 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
981 <thread>: ... this new field. All references adjusted.
982 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
983 Take a thread_info pointer instead of a ptid_t.
984 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
985 (dummy_frame_discard, register_dummy_frame_dtor): Take a
986 thread_info pointer instead of a ptid_t.
987 * elfread.c: Include "inferior.h".
988 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
990 * eval.c (evaluate_subexp): Likewise.
991 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
993 * gdb_proc_service.h (struct thread_info): Forward declare.
994 (struct ps_prochandle) <ptid>: Delete, replaced by ...
995 <thread>: ... this new field. All references adjusted.
996 * gdbarch.h, gdbarch.c: Regenerate.
997 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
998 'thread' parameter. All implementations and callers adjusted.
999 * gdbthread.h (thread_info) <set_running>: New method.
1000 (delete_thread, delete_thread_silent): Take a thread_info pointer
1002 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
1003 (first_thread_of_process): Delete, replaced by ...
1004 (first_thread_of_inferior): ... this new function. All callers
1006 (any_live_thread_of_process): Delete, replaced by ...
1007 (any_live_thread_of_inferior): ... this new function. All callers
1009 (switch_to_thread, switch_to_no_thread): Declare.
1010 (is_executing): Delete.
1011 (enable_thread_stack_temporaries): Update comment.
1012 <enable_thread_stack_temporaries>: Take a thread_info pointer
1013 instead of a ptid_t. Incref the thread.
1014 <~enable_thread_stack_temporaries>: Decref the thread.
1017 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1018 (get_last_thread_stack_temporary)
1019 (value_in_thread_stack_temporaries, can_access_registers_thread):
1020 Take a thread_info pointer instead of a ptid_t. All callers
1022 * infcall.c (get_call_return_value): Use inferior_thread.
1023 (run_inferior_call): Work with thread pointers instead of ptid_t.
1024 (call_function_by_hand_dummy): Work with thread pointers instead
1025 of ptid_t. Use thread_info_ref.
1026 * infcmd.c (proceed_thread_callback): Access thread's state
1028 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
1029 access thread's state directly.
1030 (continue_command): Use inferior_thread.
1031 (info_program_command): Use find_thread_ptid and access thread
1033 (proceed_after_attach_callback): Use thread state directly.
1034 (notice_new_inferior): Take a thread_info pointer instead of a
1035 ptid_t. All callers adjusted.
1036 (exit_inferior): Take an inferior pointer instead of a pid. All
1038 (exit_inferior_silent): New.
1039 (detach_inferior): Delete.
1040 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
1041 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
1042 (detach_inferior_command, kill_inferior_command): Use
1043 find_inferior_id instead of valid_gdb_inferior_id and
1044 gdb_inferior_id_to_pid.
1045 (inferior_command): Use inferior and thread pointers.
1046 * inferior.h (struct thread_info): Forward declare.
1047 (notice_new_inferior): Take a thread_info pointer instead of a
1048 ptid_t. All callers adjusted.
1049 (detach_inferior): Delete declaration.
1050 (exit_inferior, exit_inferior_silent): Take an inferior pointer
1051 instead of a pid. All callers adjusted.
1052 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
1053 (valid_gdb_inferior_id): Delete.
1054 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
1055 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
1056 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
1058 <inf>: ... this new field.
1059 <step_ptid>: Delete, replaced by ...
1060 <step_thread>: ... this new field.
1061 (get_displaced_stepping_state): Take an inferior pointer instead
1062 of a pid. All callers adjusted.
1063 (displaced_step_in_progress_any_inferior): Adjust.
1064 (displaced_step_in_progress_thread): Take a thread pointer instead
1065 of a ptid_t. All callers adjusted.
1066 (displaced_step_in_progress, add_displaced_stepping_state): Take
1067 an inferior pointer instead of a pid. All callers adjusted.
1068 (get_displaced_step_closure_by_addr): Adjust.
1069 (remove_displaced_stepping_state): Take an inferior pointer
1070 instead of a pid. All callers adjusted.
1071 (displaced_step_prepare_throw, displaced_step_prepare)
1072 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
1073 All callers adjusted.
1074 (start_step_over): Adjust.
1075 (infrun_thread_ptid_changed): Remove bit updating ptids in the
1076 displaced step queue.
1077 (do_target_resume): Adjust.
1078 (fetch_inferior_event): Use inferior_thread.
1079 (context_switch, get_inferior_stop_soon): Take an
1080 execution_control_state pointer instead of a ptid_t. All callers
1082 (switch_to_thread_cleanup): Delete.
1083 (stop_all_threads): Use scoped_restore_current_thread.
1084 * inline-frame.c: Include "gdbthread.h".
1085 (inline_state) <inline_state>: Take a thread pointer instead of a
1086 ptid_t. All callers adjusted.
1087 <ptid>: Delete, replaced by ...
1088 <thread>: ... this new field.
1089 (find_inline_frame_state): Take a thread pointer instead of a
1090 ptid_t. All callers adjusted.
1091 (skip_inline_frames, step_into_inline_frame)
1092 (inline_skipped_frames, inline_skipped_symbol): Take a thread
1093 pointer instead of a ptid_t. All callers adjusted.
1094 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
1095 (inline_skipped_frames, inline_skipped_symbol): Likewise.
1096 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
1098 * linux-nat.c (get_detach_signal): Likewise.
1099 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
1100 (thread_db_notice_clone): Adjust.
1101 (thread_db_find_new_threads_silently)
1102 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
1103 a thread pointer instead of a ptid_t. All callers adjusted.
1104 * mi/mi-cmd-var.c: Include "inferior.h".
1105 (mi_cmd_var_update_iter): Update to use thread pointers.
1106 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
1108 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
1110 (mi_output_running): ... this new function.
1111 (mi_on_resume_1): Adjust to use it.
1112 (mi_user_selected_context_changed): Adjust to use inferior_thread.
1113 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
1115 (interrupt_thread_callback): : Adjust to use thread and inferior
1117 * proc-service.c: Include "gdbthread.h".
1118 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
1119 * progspace-and-thread.c: Include "inferior.h".
1120 * progspace.c: Include "inferior.h".
1121 * python/py-exitedevent.c (create_exited_event_object): Adjust to
1122 hold a reference to an inferior_object.
1123 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
1125 * python/py-inferior.c (struct inferior_object): Give the type a
1126 tag name instead of a typedef.
1127 (python_on_normal_stop): No need to check if the current thread is
1129 (inferior_to_inferior_object): Change return type to
1130 inferior_object. All callers adjusted.
1131 (find_thread_object): Delete, bits factored out to ...
1132 (thread_to_thread_object): ... this new function.
1133 * python/py-infthread.c (create_thread_object): Use
1134 inferior_to_inferior_object.
1135 (thpy_is_stopped): Use thread pointer directly.
1136 (gdbpy_selected_thread): Use inferior_thread.
1137 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
1138 field, replaced with ...
1139 <thread>: ... this new field. All users adjusted.
1140 (btpy_insn_or_gap_new): Drop const.
1141 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
1143 * python/py-record.c: Include "gdbthread.h".
1144 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
1145 a ptid_t. All callers adjusted.
1146 (gdbpy_current_recording): Use inferior_thread.
1147 * python/py-record.h (recpy_record_object) <ptid>: Delete
1148 field, replaced with ...
1149 <thread>: ... this new field. All users adjusted.
1150 (recpy_element_object) <ptid>: Delete
1151 field, replaced with ...
1152 <thread>: ... this new field. All users adjusted.
1153 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
1154 a ptid_t. All callers adjusted.
1155 * python/py-threadevent.c: Include "gdbthread.h".
1156 (get_event_thread): Use thread_to_thread_object.
1157 * python/python-internal.h (struct inferior_object): Forward
1159 (find_thread_object, find_inferior_object): Delete declarations.
1160 (thread_to_thread_object, inferior_to_inferior_object): New
1162 * record-btrace.c: Include "inferior.h".
1163 (require_btrace_thread): Use inferior_thread.
1164 (record_btrace_frame_sniffer)
1165 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
1166 (get_thread_current_frame): Use scoped_restore_current_thread and
1168 (get_thread_current_frame): Use thread pointer directly.
1169 (record_btrace_replay_at_breakpoint): Use thread's inferior
1171 * record-full.c: Include "inferior.h".
1172 * regcache.c: Include "gdbthread.h".
1173 (get_thread_arch_regcache): Use the inferior's address space
1175 (get_thread_regcache, registers_changed_thread): New.
1176 * regcache.h (get_thread_regcache(thread_info *thread)): New
1178 (registers_changed_thread): New.
1179 (remote_target) <remote_detach_1>: Swap order of parameters.
1180 (remote_add_thread): <remote_add_thread>: Return the new thread.
1181 (get_remote_thread_info(ptid_t)): New overload.
1182 (remote_target::remote_notice_new_inferior): Use thread pointers
1184 (remote_target::process_initial_stop_replies): Use
1185 thread_info::set_running.
1186 (remote_target::remote_detach_1, remote_target::detach)
1187 (extended_remote_target::detach): Adjust.
1188 * stack.c (frame_show_address): Use inferior_thread.
1189 * target-debug.h (target_debug_print_thread_info_pp): New.
1190 * target-delegates.c: Regenerate.
1191 * target.c (default_thread_address_space): Delete.
1192 (memory_xfer_partial_1): Use current_inferior.
1193 (target_detach): Use current_inferior.
1194 (target_thread_address_space): Delete.
1195 (generic_mourn_inferior): Use current_inferior.
1196 * target.h (struct target_ops) <thread_address_space>: Delete.
1197 (target_thread_address_space): Delete.
1198 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
1200 (delete_thread_1, delete_thread, delete_thread_silent): Take a
1201 thread pointer instead of a ptid_t. Adjust all callers.
1202 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
1203 (first_thread_of_process): Delete, replaced by ...
1204 (first_thread_of_inferior): ... this new function. All callers
1206 (any_thread_of_process): Rename to ...
1207 (any_thread_of_inferior): ... this, and take an inferior pointer.
1208 (any_live_thread_of_process): Rename to ...
1209 (any_live_thread_of_inferior): ... this, and take an inferior
1211 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
1212 (value_in_thread_stack_temporaries)
1213 (get_last_thread_stack_temporary): Take a thread pointer instead
1214 of a ptid_t. Adjust all callers.
1215 (thread_info::set_running): New.
1216 (validate_registers_access): Use inferior_thread.
1217 (can_access_registers_ptid): Rename to ...
1218 (can_access_registers_thread): ... this, and take a thread
1220 (print_thread_info_1): Adjust to compare thread pointers instead
1222 (switch_to_no_thread, switch_to_thread): Make extern.
1223 (scoped_restore_current_thread::~scoped_restore_current_thread):
1224 Use m_thread pointer directly.
1225 (scoped_restore_current_thread::scoped_restore_current_thread):
1226 Use inferior_thread.
1227 (thread_command): Use thread pointer directly.
1228 (thread_num_make_value_helper): Use inferior_thread.
1229 * top.c (execute_command): Use inferior_thread.
1230 * tui/tui-interp.c: Include "inferior.h".
1231 * varobj.c (varobj_create): Use inferior_thread.
1232 (value_of_root_1): Use find_thread_global_id instead of
1233 global_thread_id_to_ptid.
1235 2018-06-21 Alan Hayward <alan.hayward@arm.com>
1237 * regcache.c (readable_regcache::read_part): Avoid memcpy when
1239 (regcache::write_part): Likewise.
1240 (readable_regcache::cooked_read_part): Update comment.
1241 (readable_regcache::cooked_write_part): Likewise.
1242 * regcache.h: (readable_regcache::read_part): Likewise.
1243 (regcache::write_part): Likewise.
1245 2018-06-21 Richard Bunt <richard.bunt@arm.com>
1246 Dirk Schubert <dirk.schubert@arm.com>
1248 * aarch64-linux-nat.c (post_attach): New.
1249 (aarch64_linux_nat_target::post_attach): Override post_attach to
1250 record the number of hardware debug registers.
1252 2018-06-20 Tom Tromey <tom@tromey.com>
1254 * python/py-param.c (add_setshow_generic): Make parameters const.
1255 (parmpy_init): Update.
1257 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
1259 * regcache.h (regcache_cooked_read_ftype): Rename to...
1260 (register_read_ftype): ...this, change type to function_view.
1261 (class reg_buffer) <save>: Remove src parameter.
1262 (readonly_detached_regcache) <readonly_detached_regcache>: Make
1263 parameter non-const in first overload. Remove src parameter in
1265 * regcache.c (do_cooked_read): Remove.
1266 (readonly_detached_regcache::readonly_detached_regcache): Make
1267 parameter non-const, adjust call to other constructor.
1268 (reg_buffer::save): Remove src parameter.
1269 * frame.c (do_frame_register_read): Remove.
1270 (frame_save_as_regcache): Use lambda function.
1271 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
1272 parameter to ppu2spu_data *.
1273 (ppu2spu_sniffer): Use lambda function.
1275 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
1277 * record-full.c (record_full_target::insert_breakpoint): Remove
1278 "struct" keyword, add const.
1280 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
1282 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
1283 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
1284 * configure.ac: Remove AC_PREREQ, add missing quoting.
1285 * gnulib/configure.ac: Modernize usage of
1286 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
1287 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
1288 (AUTOMAKE_VERSION): Bump to 1.15.1.
1289 * configure: Re-generate.
1290 * config.in: Re-generate.
1291 * aclocal.m4: Re-generate.
1292 * gnulib/aclocal.m4: Re-generate.
1293 * gnulib/config.in: Re-generate.
1294 * gnulib/configure: Re-generate.
1295 * gnulib/import/Makefile.in: Re-generate.
1297 2018-06-19 Pedro Alves <palves@redhat.com>
1299 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
1300 (lookup_minimal_symbol_by_pc_section): ... here with
1301 gdb_assert_not_reached added.
1303 2018-06-19 Pedro Alves <palves@redhat.com>
1305 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
1306 parameter with a block parameter. Compare location's block symbol
1307 with the frame's block instead of addresses.
1308 (skip_inline_frames): Pass the current block instead of the
1309 frame's address. Break out as soon as we determine the frame
1310 should not be skipped.
1312 2018-06-18 Tom Tromey <tom@tromey.com>
1314 * solib-aix.c (solib_aix_get_section_offsets): Return
1316 (solib_aix_solib_create_inferior_hook): Update.
1318 2018-06-18 Tom Tromey <tom@tromey.com>
1320 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
1322 2018-06-18 Tom Tromey <tom@tromey.com>
1324 * solib-frv.c (frv_relocate_main_executable): Use
1326 * solib-dsbt.c (dsbt_relocate_main_executable): Use
1329 2018-06-18 Tom Tromey <tom@tromey.com>
1331 * objfiles.h (inhibit_section_map_updates): Update.
1332 (resume_section_map_updates, resume_section_map_updates_cleanup):
1334 * solib-svr4.c (svr4_handle_solib_event): Update.
1335 * objfiles.c (inhibit_section_map_updates): Return
1336 scoped_restore_tmpl<int>.
1337 (resume_section_map_updates, resume_section_map_updates_cleanup):
1340 2018-06-18 Tom Tromey <tom@tromey.com>
1342 * valprint.h (read_string): Update.
1343 * valprint.c (read_string): Change type of "buffer".
1344 (val_print_string): Update.
1345 * python/py-value.c (valpy_string): Update.
1346 * language.h (struct language_defn) <la_get_string>: Change
1348 (default_get_string, c_get_string): Update.
1349 * language.c (default_get_string): Change type of "buffer".
1350 * guile/scm-value.c (gdbscm_value_to_string): Update.
1351 * c-lang.c (c_get_string): Change type of "buffer".
1353 2018-06-18 Tom Tromey <tom@tromey.com>
1355 * ser-mingw.c (struct pipe_state_destroyer): New.
1356 (pipe_state_up): New typedef.
1357 (cleanup_pipe_state): Remove.
1358 (pipe_windows_open): Use pipe_state_up. Don't release argv.
1360 2018-06-18 Tom Tromey <tom@tromey.com>
1362 * rust-lang.h (rust_yyerror): Don't declare.
1363 * rust-lang.c (rust_language_defn): Update.
1364 * rust-exp.y (yyerror): Now static.
1365 * parse.c (parse_exp_in_context_1): Update.
1366 * p-lang.h (p_yyerror): Don't declare.
1367 * p-lang.c (p_language_defn): Update.
1368 * p-exp.y (yyerror): Now static.
1369 * opencl-lang.c (opencl_language_defn): Update.
1370 * objc-lang.c (objc_language_defn): Update.
1371 * m2-lang.h (m2_yyerror): Don't declare.
1372 * m2-lang.c (m2_language_defn): Update.
1373 * m2-exp.y (yyerror): Now static.
1374 * language.h (struct language_defn) <la_error>: Remove.
1375 * language.c (unk_lang_error): Remove.
1376 (unknown_language_defn, auto_language_defn): Remove.
1377 * go-lang.h (go_yyerror): Don't declare.
1378 * go-lang.c (go_language_defn): Update.
1379 * go-exp.y (yyerror): Now static.
1380 * f-lang.h (f_yyerror): Don't declare.
1381 * f-lang.c (f_language_defn): Update.
1382 * f-exp.y (yyerror): Now static.
1383 * d-lang.h (d_yyerror): Don't declare.
1384 * d-lang.c (d_language_defn): Update.
1385 * d-exp.y (yyerror): Now static.
1386 * c-lang.h (c_yyerror): Don't declare.
1387 * c-lang.c (c_language_defn, cplus_language_defn)
1388 (asm_language_defn, minimal_language_defn): Update.
1389 * c-exp.y (yyerror): Now static.
1390 * ada-lang.h (ada_yyerror): Don't declare.
1391 * ada-lang.c (ada_language_defn): Update.
1392 * ada-exp.y (yyerror): Now static.
1394 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1396 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
1397 (store_sveregs_to_thread): Likewise.
1398 (aarch64_linux_fetch_inferior_registers): Check for SVE.
1399 (aarch64_linux_store_inferior_registers): Likewise.
1400 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
1402 (aarch64_sve_regs_copy_to_regcache): Likewise.
1403 (aarch64_sve_regs_copy_from_regcache): Likewise.
1404 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
1406 (aarch64_sve_regs_copy_to_regcache): Likewise.
1407 (aarch64_sve_regs_copy_from_regcache): Likewise.
1408 (sve_context): Structure from Linux headers.
1409 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
1410 (SVE_SIG_ZREG_SIZE): Likewise.
1411 (SVE_SIG_PREG_SIZE): Likewise.
1412 (SVE_SIG_FFR_SIZE): Likewise.
1413 (SVE_SIG_REGS_OFFSET): Likewise.
1414 (SVE_SIG_ZREGS_OFFSET): Likewise.
1415 (SVE_SIG_ZREG_OFFSET): Likewise.
1416 (SVE_SIG_ZREGS_SIZE): Likewise.
1417 (SVE_SIG_PREGS_OFFSET): Likewise.
1418 (SVE_SIG_PREG_OFFSET): Likewise.
1419 (SVE_SIG_PREGS_SIZE): Likewise.
1420 (SVE_SIG_FFR_OFFSET): Likewise.
1421 (SVE_SIG_REGS_SIZE): Likewise.
1422 (SVE_SIG_CONTEXT_SIZE): Likewise.
1423 (SVE_PT_REGS_MASK): Likewise.
1424 (SVE_PT_REGS_FPSIMD): Likewise.
1425 (SVE_PT_REGS_SVE): Likewise.
1426 (SVE_PT_VL_INHERIT): Likewise.
1427 (SVE_PT_VL_ONEXEC): Likewise.
1428 (SVE_PT_REGS_OFFSET): Likewise.
1429 (SVE_PT_FPSIMD_OFFSET): Likewise.
1430 (SVE_PT_FPSIMD_SIZE): Likewise.
1431 (SVE_PT_SVE_ZREG_SIZE): Likewise.
1432 (SVE_PT_SVE_PREG_SIZE): Likewise.
1433 (SVE_PT_SVE_FFR_SIZE): Likewise.
1434 (SVE_PT_SVE_FPSR_SIZE): Likewise.
1435 (SVE_PT_SVE_FPCR_SIZE): Likewise.
1436 (__SVE_SIG_TO_PT): Likewise.
1437 (SVE_PT_SVE_OFFSET): Likewise.
1438 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
1439 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
1440 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
1441 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
1442 (SVE_PT_SVE_PREG_OFFSET): Likewise.
1443 (SVE_PT_SVE_PREGS_SIZE): Likewise.
1444 (SVE_PT_SVE_FFR_OFFSET): Likewise.
1445 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
1446 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
1447 (SVE_PT_SVE_SIZE): Likewise.
1448 (SVE_PT_SIZE): Likewise.
1449 (HAS_SVE_STATE): New define.
1451 2018-06-18 Alan Hayward <alan.hayward@arm.com>
1453 * nat/aarch64-sve-linux-sigcontext.h: New file.
1454 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
1456 (SVE_VQ_MIN): Likewise.
1457 (SVE_VQ_MAX): Likewise.
1458 (SVE_VL_MIN): Likewise.
1459 (SVE_VL_MAX): Likewise.
1460 (SVE_NUM_ZREGS): Likewise.
1461 (SVE_NUM_PREGS): Likewise.
1462 (sve_vl_valid): Likewise.
1463 (struct user_sve_header): Likewise.
1465 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
1466 Richard Bunt <Richard.Bunt@arm.com>
1468 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
1469 was requested by GDB.
1471 2018-06-15 Tom de Vries <tdevries@suse.de>
1473 * MAINTAINERS (Write After Approval): Add Tom de Vries.
1475 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
1477 * gnulib/update-gnulib.sh: Print expected versions of
1480 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
1482 * arch-utils.c (default_type_align): Use type_length_units.
1483 * gdbtypes.c (type_align): Use type_length_units.
1485 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1487 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
1488 of 'define' command.
1490 2018-06-14 Tom de Vries <tdevries@suse.de>
1493 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
1494 get_no_prettyformat_print_options.
1496 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
1498 * sparc-nat.h: Include target.h.
1499 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
1500 <fetch_registers>: Remove this argument in function call.
1501 <store_registers>: Remove this argument in function call, remove
1503 <low_forget_process>: Call sparc64_forget_process instead of
1504 sparc_forget_process.
1506 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1508 * procfs.c (_initialize_procfs): Use add_inf_child_target.
1509 (procfs_target::make_corefile_notes): Adjust to new
1510 target_read_alloc return type.
1512 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1513 Stephen Roberts <stephen.roberts@arm.com>
1516 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
1517 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
1518 Move should_notify_stop local into more inner scope.
1520 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1521 Stephen Roberts <stephen.roberts@arm.com>
1524 * infrun.c (resume_1): Add call to mark_async_event_handler.
1526 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
1528 * infrun.c (do_target_wait): Change old version of $pc printed.
1530 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
1532 * dwarf2read.c (read_index_from_section): Rename to...
1533 (read_gdb_index_from_section): ... this, update all callers.
1534 (dwarf2_read_index): Rename to...
1535 (dwarf2_read_gdb_index): ... this, update all callers.
1537 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
1539 * gdb/hppa-linux-nat.c
1540 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
1541 hppa_linux_nat_target::fetch_registers.
1543 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1545 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
1546 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
1547 (AARCH64_DWARF_SVE_FFR): Likewise.
1548 (AARCH64_DWARF_SVE_P0): Likewise.
1549 (AARCH64_DWARF_SVE_Z0): Likewise.
1551 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1553 * common/common-regcache.h (raw_compare): New function.
1554 * regcache.c (regcache::raw_compare): Likewise.
1555 * regcache.h (regcache::raw_compare): New declaration.
1557 2018-06-11 Alan Hayward <alan.hayward@arm.com>
1559 * common/common-regcache.h (reg_buffer_common): New structure.
1560 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
1561 (reg_buffer::raw_supply): Likewise.
1562 (reg_buffer::raw_supply_integer): Likewise.
1563 (reg_buffer::raw_supply_zeroed): Likewise.
1564 (reg_buffer::raw_collect): Likewise.
1565 (reg_buffer::raw_collect_integer): Likewise.
1566 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
1567 (reg_buffer::raw_supply): Likewise.
1568 (reg_buffer::raw_supply_integer): Likewise.
1569 (reg_buffer::raw_supply_zeroed): Likewise.
1570 (reg_buffer::raw_collect): Likewise.
1571 (reg_buffer::raw_collect_integer): Likewise.
1573 2018-06-10 Tom Tromey <tom@tromey.com>
1575 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
1576 (class remote_state) <stop_reply_queue>: Now std::vector.
1577 (remote_state::~remote_state)
1578 (remote_target::stop_reply_queue_length): Update.
1579 (struct queue_iter_param, remove_child_of_pending_fork)
1580 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
1581 (check_pending_event_prevents_wildcard_vcont_callback)
1582 (remove_stop_reply_for_inferior)
1583 (remove_stop_reply_of_remote_state)
1584 (remote_notif_remove_once_on_match)
1585 (stop_reply_match_ptid_and_ws)
1586 (remote_kill_child_of_pending_fork): Remove.
1587 (remote_target::remove_new_fork_children)
1588 (remote_target::check_pending_events_prevent_wildcard_vcont)
1589 (remote_target::discard_pending_stop_replies)
1590 (remote_target::discard_pending_stop_replies_in_queue)
1591 (remote_target::remote_notif_remove_queued_reply)
1592 (remote_target::queued_stop_reply)
1593 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
1594 (remote_target::wait, remote_target::kill_new_fork_children)
1595 (remote_target::async): Update.
1597 2018-06-10 Tom Tromey <tom@tromey.com>
1599 * record-full.c (record_full_arch_list_cleanups): Remove.
1600 (record_full_message): Use try/catch.
1601 (record_full_wait_cleanups): Remove.
1602 (record_full_wait_1): Use try/catch.
1603 (record_full_restore): Likewise.
1605 2018-06-10 Tom Tromey <tom@tromey.com>
1607 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
1608 declare VEC. Add constructor.
1609 <in_target_beneath>: Now bool.
1610 (record_full_breakpoints): Now a std::vector, static.
1611 (record_full_sync_record_breakpoints)
1612 (record_full_init_record_breakpoints)
1613 (record_full_target::insert_breakpoint)
1614 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
1616 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
1618 * dwarf2read.c (process_cu_includes): Remove struct keyword.
1619 * serial.c (serial_interface_lookup): Remove struct keyword.
1621 2018-06-10 Tom Tromey <tom@tromey.com>
1623 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
1625 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
1627 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
1629 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
1630 "beneath" as a method.
1631 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
1632 Use "beneath" as a method.
1634 2018-06-10 Tom Tromey <tom@tromey.com>
1636 * tracefile.c (struct trace_file_writer_deleter): New.
1637 <operator()>: Rename from trace_file_writer_xfree.
1638 (trace_file_writer_up): New typedef.
1639 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
1641 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
1643 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
1644 <m_registers, m_register_status>: Change type to
1646 * regcache.c (reg_buffer::reg_buffer): Use new instead of
1649 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
1651 * common/common-regcache.h (enum register_status): Add
1652 underlying type "signed char".
1653 * regcache.h (reg_buffer) <m_register_status>: Change type to
1655 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
1656 register_status instead of signed char.
1657 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
1658 (reg_buffer::get_register_status): Remove cast.
1659 (readable_regcache::raw_read): Remove cast.
1660 (readable_regcache::cooked_read): Remove cast.
1662 2018-06-09 Tom Tromey <tom@tromey.com>
1664 * source.c (reverse_search_command, forward_search_command): Use
1667 2018-06-09 Tom Tromey <tom@tromey.com>
1669 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
1670 (serial_ops_list): Now static, std::vector.
1671 (serial_interface_lookup, serial_add_interface): Update.
1673 2018-06-09 Tom Tromey <tom@tromey.com>
1675 * dwarf2read.c (process_cu_includes): Update.
1676 (process_full_comp_unit): Update.
1677 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
1680 2018-06-08 Paul Koning <paul_koning@dell.com>
1684 * python/python.c (do_start_initialization):
1685 Avoid call to internal Python API.
1686 (init__gdb_module): New function.
1688 2018-06-08 Gary Benson <gbenson@redhat.com>
1690 * linux-thread-db.c (valprint.h): New include.
1691 (struct check_thread_db_info): New structure.
1692 (check_thread_db_on_load, tdb_testinfo): New static globals.
1693 (check_thread_db, check_thread_db_callback): New functions.
1694 (try_thread_db_load_1): Run integrity checks if requested.
1695 (maintenance_check_libthread_db): New function.
1696 (_initialize_thread_db): Register "maint check libthread-db"
1697 and "maint set/show check-libthread-db".
1698 * NEWS: Mention the above new commands.
1700 2018-06-08 Tom Tromey <tom@tromey.com>
1702 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
1705 2018-06-08 Tom Tromey <tom@tromey.com>
1707 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
1709 2018-06-08 Tom Tromey <tom@tromey.com>
1711 * common/btrace-common.h (struct btrace_data): Add constructor,
1712 destructor, move assignment operator.
1713 <empty, clear, fini>: New methods.
1714 <format>: Initialize.
1715 (btrace_data_init, btrace_data_fini, btrace_data_clear)
1716 (btrace_data_empty): Don't declare.
1717 * common/btrace-common.c (btrace_data_init): Remove.
1718 (btrace_data::fini): Rename from btrace_data_fini.
1719 (btrace_data::empty): Rename from btrace_data_empty.
1720 (btrace_data::clear): Rename from btrace_data_clear. Return
1722 * btrace.h (make_cleanup_btrace_data): Don't declare.
1723 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
1724 (parse_xml_btrace): Update.
1725 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
1726 (maint_btrace_clear_packet_history_cmd): Update.
1728 2018-06-07 Pedro Alves <palves@redhat.com>
1730 * target.h (target_ops) <beneath>: Now a method. All references
1732 (class target_stack): New.
1733 * target.c (g_target_stack): New.
1734 (g_current_top_target): Delete.
1735 (current_top_target): Get the top target out of g_target_stack.
1736 (target_stack::push, target_stack::unpush): New.
1737 (push_target, unpush_target): Reimplement.
1738 (target_is_pushed): Reimplement in terms of g_target_stack.
1739 (target_ops::beneath, target_stack::find_beneath): New.
1741 2018-06-07 Pedro Alves <palves@redhat.com>
1743 * target.h (find_target_beneath): Delete declaration.
1744 * target.c (find_target_beneath): Delete definition.
1745 * aix-thread.c: All callers of find_target_beneath adjusted to
1746 call target_ops::beneath instead.
1747 * bsd-uthread.c: Likewise.
1748 * linux-thread-db.c: Likewise.
1749 * ravenscar-thread.c: Likewise.
1750 * sol-thread.c: Likewise.
1751 * spu-multiarch.c: Likewise.
1753 2018-06-07 Pedro Alves <palves@redhat.com>
1755 * target.h (target_ops) <beneath>: Now a method. All references
1757 (target_ops) <m_beneath>: New.
1758 * target.c (target_ops::beneath): New.
1759 * corelow.c: Adjust all references to target_ops::beneath.
1760 * linux-thread-db.c: Likewise.
1761 * make-target-delegates: Likewise.
1762 * record-btrace.c: Likewise.
1763 * record-full.c: Likewise.
1764 * remote.c: Likewise.
1765 * target.c: Likewise.
1766 * target-delegates.c: Regenerate.
1768 2018-06-07 Pedro Alves <palves@redhat.com>
1770 * target.h (target_stack): Delete.
1771 (current_top_target): Declare function.
1772 * target.c (target_stack): Delete.
1773 (g_current_top_target): New.
1774 (current_top_target): New function.
1775 * auxv.c: Use current_top_target instead of target_stack
1777 * avr-tdep.c: Likewise.
1778 * breakpoint.c: Likewise.
1779 * corefile.c: Likewise.
1780 * elfread.c: Likewise.
1782 * exceptions.c: Likewise.
1783 * frame.c: Likewise.
1784 * gdbarch-selftests.c: Likewise.
1785 * gnu-v3-abi.c: Likewise.
1786 * ia64-tdep.c: Likewise.
1787 * ia64-vms-tdep.c: Likewise.
1788 * infcall.c: Likewise.
1789 * infcmd.c: Likewise.
1790 * infrun.c: Likewise.
1791 * linespec.c: Likewise.
1792 * linux-tdep.c: Likewise.
1793 * minsyms.c: Likewise.
1794 * ppc-linux-nat.c: Likewise.
1795 * ppc-linux-tdep.c: Likewise.
1796 * procfs.c: Likewise.
1797 * regcache.c: Likewise.
1798 * remote.c: Likewise.
1799 * rs6000-tdep.c: Likewise.
1800 * s390-linux-nat.c: Likewise.
1801 * s390-tdep.c: Likewise.
1802 * solib-aix.c: Likewise.
1803 * solib-darwin.c: Likewise.
1804 * solib-dsbt.c: Likewise.
1805 * solib-spu.c: Likewise.
1806 * solib-svr4.c: Likewise.
1807 * solib-target.c: Likewise.
1808 * sparc-tdep.c: Likewise.
1809 * sparc64-tdep.c: Likewise.
1810 * spu-tdep.c: Likewise.
1811 * symfile.c: Likewise.
1812 * symtab.c: Likewise.
1813 * target-descriptions.c: Likewise.
1814 * target-memory.c: Likewise.
1815 * target.c: Likewise.
1816 * target.h: Likewise.
1817 * tracefile-tfile.c: Likewise.
1818 * tracepoint.c: Likewise.
1819 * valops.c: Likewise.
1820 * valprint.c: Likewise.
1821 * value.c: Likewise.
1822 * windows-tdep.c: Likewise.
1823 * mi/mi-main.c: Likewise.
1825 2018-06-07 Tom Tromey <tom@tromey.com>
1827 * valprint.h (build_address_symbolic): Declare.
1828 * printcmd.c (print_address_symbolic): Update.
1829 (build_address_symbolic): Change "name" and "filename" to
1831 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
1833 * defs.h (build_address_symbolic): Remove declaration.
1835 2018-06-07 Alan Hayward <alan.hayward@arm.com>
1837 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
1838 (aarch64_vnv_type): Add function.
1839 (aarch64_pseudo_register_name): Add V regs for SVE.
1840 (aarch64_pseudo_register_type): Likewise.
1841 (aarch64_pseudo_register_reggroup_p): Likewise.
1842 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
1843 (aarch64_pseudo_read_value): Add V regs for SVE.
1844 (aarch64_pseudo_write_2): Use V0 offset for SVE
1845 (aarch64_pseudo_write): Add V regs for SVE.
1846 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
1848 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
1850 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
1851 (sve_vl_from_vq): Likewise.
1853 2018-06-05 Tom Tromey <tom@tromey.com>
1855 * cli/cli-cmds.c (show_version): Update.
1856 * top.c (print_gdb_version): Add "interactive" parameter.
1858 * main.c (captured_main_1): Update.
1859 * top.h (print_gdb_version): Add "interactive" parameter and a
1862 2018-06-05 David Malcolm <dmalcolm@redhat.com>
1864 * common/enum-flags.h: Add trailing semicolon to example in
1867 2018-06-05 Tom Tromey <tom@tromey.com>
1870 * NEWS: Add entry about pager.
1871 * utils.c (pagination_disabled_for_command): New global.
1872 (prompt_for_continue): Allow "c" response to prompt.
1873 (reinitialize_more_filter): Clear
1874 pagination_disabled_for_command.
1875 (fputs_maybe_filtered): Check pagination_disabled_for_command.
1877 2018-06-04 Tom Tromey <tom@tromey.com>
1879 * ada-lang.h (ada_lookup_symbol_list): Update.
1880 * ada-lang.c (resolve_subexp): Update.
1881 (symbols_are_identical_enums): Change type of syms. Remove nsyms
1883 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
1884 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
1885 results parameter to std::vector.
1886 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
1888 * ada-exp.y (block_lookup): Update.
1889 (select_possible_type_sym): Change type of syms. Remove nsyms
1891 (write_var_or_type, write_name_assoc): Update.
1893 2018-06-04 Joel Brobecker <brobecker@adacore.com>
1895 * windows-nat.c (windows_nat_target::xfer_partial): Return
1896 TARGET_XFER_E_IO if we need to delegate to the target beneath
1897 but BENEATH is NULL.
1899 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
1901 * Makefile.in (config.status): Add configure.nat as a
1904 2018-06-04 Tom Tromey <tom@tromey.com>
1906 * cp-name-parser.y (cpname_state): Add method declarations.
1907 (HANDLE_QUAL): Update.
1908 (cpname_state::d_grab, cpname_state::fill_comp)
1909 (cpname_state::make_operator, cpname_state::make_dtor)
1910 (cpname_state::make_builtin_type, cpname_state::make_name)
1911 (cpname_state::d_qualify, cpname_state::d_int_type)
1912 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
1913 (%union): Move earlier.
1915 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1917 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
1919 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1921 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
1922 (aarch64_pseudo_write_1): Likewise.
1923 (aarch64_pseudo_read_value): Use helper.
1924 (aarch64_pseudo_write): Likewise.
1926 2018-06-04 Pedro Alves <palves@redhat.com>
1928 * darwin-nat.c (darwin_ops): Delete.
1929 (darwin_attach_pid): Use get_native_target.
1931 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1933 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
1934 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
1936 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1938 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
1939 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
1940 (aarch64_gdbarch_init): Check for SVE.
1941 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
1943 2018-06-04 Alan Hayward <alan.hayward@arm.com>
1945 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
1946 * aarch64-tdep.h (aarch64_read_description): Likewise.
1947 * arch/aarch64.c (aarch64_create_target_description): Likewise.
1948 * arch/aarch64.h (aarch64_create_target_description): Likewise.
1949 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
1950 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
1951 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
1953 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
1955 * value.c (value_fetch_lazy_bitfield): New.
1956 (value_fetch_lazy_memory): New.
1957 (value_fetch_lazy_register): New.
1958 (value_fetch_lazy): Factor out to smaller functions.
1960 2018-06-01 Tom Tromey <tom@tromey.com>
1962 * cp-name-parser.y (backslashable, represented): Now const.
1964 2018-06-01 Tom Tromey <tom@tromey.com>
1966 * cp-name-parser.y: Include parser-defs.h.
1967 (parser_fprintf): Remove declaration.
1969 2018-06-01 Tom Tromey <tom@tromey.com>
1971 * cp-name-parser.y: Use %pure-parser, %lex-param, and
1973 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
1974 (global_result): Remove globals.
1975 (struct cpname_state): New.
1976 (yyparse): Don't declare.
1977 (yylex, yyerror): Move declarations after %union.
1978 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
1979 (make_name): Add state parameter.
1981 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
1983 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
1985 (yylex): Add lvalp, state parameters.
1986 (yyerror): Add state parameter.
1987 (cp_demangled_name_to_comp): Update.
1989 2018-06-01 Tom Tromey <tom@tromey.com>
1991 * cp-name-parser.y (parser_fprintf): Declare.
1992 (GDB_YY_REMAP_PREFIX): Define.
1993 Include yy-remap.h. Don't redefine yy* identifiers.
1995 2018-06-01 Tom Tromey <tom@tromey.com>
1997 * python/py-type.c (typy_legacy_template_argument): Update.
1998 * cp-support.h (cp_demangled_name_to_comp): Update.
1999 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
2000 parameter to be a "std::string *".
2003 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
2005 * ada-lex.l: Include "diagnostics.h" instead of
2006 "common/diagnostics.h".
2007 * unittests/environ-selftests.c: Likewise.
2008 * common/diagnostics.h: Moved to ../include.
2010 2018-06-01 Joel Brobecker <brobecker@adacore.com>
2012 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
2013 to language_mode_manual while calling breakpoint_re_set_one.
2015 2018-06-01 Tom Tromey <tom@tromey.com>
2017 * valops.c (value_cast_structs, destructor_name_p): Update.
2018 * symtab.c (gdb_mangle_name): Update.
2019 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
2021 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
2022 (pascal_object_print_value_fields, pascal_object_print_value):
2024 * p-typeprint.c (pascal_type_print_derivation_info): Update.
2025 * linespec.c (find_methods): Update.
2026 * gdbtypes.h (type_name_no_tag): Remove.
2027 (type_name_or_error): Rename from type_name_no_tag_or_error.
2028 * gdbtypes.c (type_name_no_tag): Remove.
2029 (type_name_or_error): Rename from type_name_no_tag_or_error.
2030 (lookup_struct_elt_type, check_typedef): Update.
2031 * expprint.c (print_subexp_standard): Update.
2032 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
2033 * d-namespace.c (d_lookup_nested_symbol): Update.
2034 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
2035 (cp_print_class_member): Update.
2036 * cp-namespace.c (cp_lookup_nested_symbol): Update.
2037 * completer.c (add_struct_fields): Update.
2038 * c-typeprint.c (cp_type_print_derivation_info)
2039 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
2041 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
2042 (ada_prefer_type, ada_is_exception_sym): Update.
2044 2018-06-01 Tom Tromey <tom@tromey.com>
2046 * valops.c (enum_constant_from_type, value_namespace_elt)
2047 (value_maybe_namespace_elt): Update.
2048 * valarith.c (find_size_for_pointer_math): Update.
2049 * target-descriptions.c (make_gdb_type): Update.
2050 * symmisc.c (print_symbol): Update.
2051 * stabsread.c (define_symbol, read_type)
2052 (complain_about_struct_wipeout, add_undefined_type)
2053 (cleanup_undefined_types_1): Update.
2054 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
2055 (rust_range_type_p, val_print_struct, rust_print_struct_def)
2056 (rust_internal_print_type, rust_composite_type)
2057 (rust_evaluate_funcall, rust_evaluate_subexp)
2058 (rust_inclusive_range_type_p): Update.
2059 * python/py-type.c (typy_get_tag): Update.
2060 * p-typeprint.c (pascal_type_print_base): Update.
2061 * mdebugread.c (parse_symbol, parse_type): Update.
2062 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
2064 * guile/scm-type.c (gdbscm_type_tag): Update.
2065 * go-lang.c (sixg_string_p): Update.
2066 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
2068 * gdbtypes.h (struct main_type) <tag_name>: Remove.
2069 (TYPE_TAG_NAME): Remove.
2070 * gdbtypes.c (type_name_no_tag): Simplify.
2071 (check_typedef, check_types_equal, recursive_dump_type)
2072 (copy_type_recursive, arch_composite_type): Update.
2073 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
2074 in summary mode when needed.
2075 * eval.c (evaluate_funcall): Update.
2076 * dwarf2read.c (fixup_go_packaging, read_structure_type)
2077 (process_structure_scope, read_enumeration_type)
2078 (read_namespace_type, read_module_type, determine_prefix): Update.
2079 * cp-support.c (inspect_type): Update.
2080 * coffread.c (process_coff_symbol, decode_base_type): Update.
2081 * c-varobj.c (c_is_path_expr_parent): Update.
2082 * c-typeprint.c (c_type_print_base_struct_union): Update.
2083 (c_type_print_base_1): Update. Print struct/class/union/enum in
2084 summary when using C language.
2085 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
2086 (gen_maybe_namespace_elt): Update.
2087 * ada-lang.c (ada_type_name): Simplify.
2088 (empty_record, ada_template_to_fixed_record_type_1)
2089 (template_to_static_fixed_type)
2090 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
2092 2018-06-01 Tom Tromey <tom@tromey.com>
2094 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
2096 * c-typeprint.c (c_print_type_1): Add "language" parameter.
2097 (c_print_type): Update.
2098 (c_print_type): New overload.
2099 (c_type_print_varspec_prefix, c_type_print_args)
2100 (c_type_print_varspec_suffix, c_print_type_no_offsets)
2101 (c_type_print_base_struct_union, c_type_print_base_1)
2102 (cp_type_print_method_args): Add "language" parameter.
2103 (c_type_print_base): Update.
2104 * c-lang.h (c_print_type): Add new overload.
2106 2018-06-01 Tom Tromey <tom@tromey.com>
2108 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
2109 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
2111 2018-06-01 Alan Hayward <alan.hayward@arm.com>
2113 * aarch64-tdep.c (aarch64_sve_register_names): New const
2115 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
2116 (AARCH64_SVE_Z_REGS_NUM): New define.
2117 (AARCH64_SVE_P_REGS_NUM): Likewise.
2118 (AARCH64_SVE_NUM_REGS): Likewise.
2120 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
2122 * nat/linux-ptrace.h [__alpha__]
2123 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
2126 2018-05-31 Maciej W. Rozycki <macro@mips.com>
2128 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
2129 the endianness selected.
2130 * NEWS: Document `set endian auto' mode operation update.
2132 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2134 * Makefile.in: Add new header.
2135 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
2136 (sve_vl_from_vg): Likewise.
2137 (sve_vq_from_vl): Likewise.
2138 (sve_vl_from_vq): Likewise.
2139 (sve_vq_from_vg): Likewise.
2140 (sve_vg_from_vq): Likewise.
2141 * configure.nat: Add new c file.
2142 * nat/aarch64-sve-linux-ptrace.c: New file.
2143 * nat/aarch64-sve-linux-ptrace.h: New file.
2145 2018-05-31 Alan Hayward <alan.hayward@arm.com>
2147 * aarch64-linux-nat.c (aarch64_linux_read_description):
2149 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
2151 * aarch64-tdep.c (tdesc_aarch64_list): Add.
2152 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
2153 (aarch64_gdbarch_init): Add parmeter zero.
2154 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
2155 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
2156 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
2158 * doc/gdb.texinfo: Describe SVE feature
2159 * features/aarch64-sve.c: New file.
2161 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
2164 * gdbarch.sh (significant_addr_bit): Default to zero when
2165 not set by target architecture.
2166 * gdbarch.c: Re-generated.
2167 * utils.c (address_significant): Update.
2169 2018-05-30 Joel Brobecker <brobecker@adacore.com>
2171 * stack.c (func_command): Remove trailing newline in call to error.
2173 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2175 * regcache.h (regcache_raw_collect): Remove, update callers to
2176 use regcache::raw_collect.
2177 * regcache.c (regcache_raw_collect): Remove.
2179 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2181 * regcache.h (regcache_raw_supply): Remove, update callers to
2182 use detached_regcache::raw_supply.
2183 * regcache.c (regcache_raw_supply): Remove.
2185 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2187 * regcache.h (regcache_cooked_write_part): Remove, update
2188 callers to use regcache::cooked_write_part.
2189 * regcache.c (regcache_cooked_write_part): Remove.
2191 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2193 * regcache.h (regcache_cooked_read_part): Remove, update callers
2194 to use readable_regcache::cooked_read_part.
2195 * regcache.c (regcache_cooked_read_part): Remove.
2197 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2199 * regcache.h (regcache_cooked_read_value): Remove, update
2200 callers to use readable_regcache::cooked_read_value.
2201 * regcache.c (regcache_cooked_read_value): Remove.
2203 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2205 * regcache.h (regcache_cooked_write): Remove, update callers to
2206 use regcache::cooked_write.
2207 * regcache.c (regcache_cooked_write): Remove.
2209 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2211 * regcache.h (regcache_invalidate): Remove, update callers to
2212 use detached_regcache::invalidate instead.
2213 * regcache.c (regcache_invalidate): Remove.
2215 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2217 * regcache.h (regcache_raw_write_part): Remove, update callers
2218 to use regcache::raw_write_part instead.
2219 * regcache.c (regcache_raw_write_part): Remove.
2221 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2223 * regcache.h (regcache_raw_read_part): Remove, update callers to
2224 use readable_regcache::raw_read_part instead.
2225 * regcache.c (regcache_raw_read_part): Remove.
2227 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2229 * regcache.h (regcache_cooked_read): Remove, update callers to
2230 use readable_regcache::cooked_read instead.
2231 * regcache.c (regcache_cooked_read): Remove.
2233 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2235 * regcache.h (regcache_raw_write): Remove, update callers to use
2236 regcache::raw_write instead.
2237 * regcache.c (regcache_raw_write): Remove.
2239 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2241 * regcache.h (regcache_raw_read): Remove, update callers to use
2242 readable_regcache::raw_read instead.
2243 * regcache.c (regcache_raw_read): Remove.
2245 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2247 * regcache.h (regcache_raw_update): Remove, update callers to
2248 use readable_regcache::raw_update instead.
2249 * regcache.c (regcache_raw_update): Remove.
2251 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2253 * regcache.h (regcache_register_status): Remove, update callers
2254 to use reg_buffer::get_register_status directly instead.
2255 * regcache.c (regcache_register_status): Remove.
2257 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2259 * regcache.h (regcache_get_ptid): Remove, update all callers to
2260 call regcache::ptid instead.
2261 * regcache.c (regcache_get_ptid): Remove.
2263 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
2265 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
2267 2018-05-30 Pedro Alves <palves@redhat.com>
2269 * common/common-exceptions.h (exception_rethrow): Use
2272 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
2274 * breakpoint.c (print_solib_event, check_status_catch_solib):
2275 Remove struct keyword in range-based for loops.
2276 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
2277 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
2279 * linespec.c (find_superclass_methods, search_minsyms_for_name):
2281 * symfile.c (addr_info_make_relative): Likewise.
2282 * thread.c (value_in_thread_stack_temporaries): Likewise.
2284 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
2287 * valops.c (value_struct_elt_for_reference): Call check_typedef on
2288 aggregate type to get its real type before accessing it.
2290 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
2292 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
2293 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
2294 * coff-pe-read.c (add_pe_forwarded_sym): Replace
2295 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
2296 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
2297 * jit.c (jit_breakpoint_re_set_internal): Likewise.
2298 * printcmd.c (info_address_command): Likewise.
2300 2018-05-29 Tom Tromey <tom@tromey.com>
2302 * windows-nat.c (handle_exception): Update fall-through comment.
2304 2018-05-29 Tom Tromey <tom@tromey.com>
2306 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
2307 (struct program_space) <added_solibs>: Now a std::vector.
2308 * breakpoint.c (print_solib_event): Update.
2309 (check_status_catch_solib): Update.
2310 * progspace.c (clear_program_space_solib_cache): Update.
2311 * solib.c (update_solib_list): Update.
2313 2018-05-29 Tom Tromey <tom@tromey.com>
2315 * python/py-type.c (typy_richcompare): Update.
2316 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
2317 * gdbtypes.h (types_deeply_equal): Return bool.
2318 (types_equal): Likewise.
2319 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
2321 (check_types_equal): Change worklist to std::vector. Return
2323 (struct type_equality_entry): Add constructor.
2324 (compare_maybe_null_strings): Return bool.
2325 (check_types_worklist): Return bool. Change worklist to
2327 (types_deeply_equal): Use std::vector.
2328 (types_equal): Return bool.
2329 (compare_maybe_null_strings): Simplify.
2331 2018-05-29 Tom Tromey <tom@tromey.com>
2333 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
2335 2018-05-29 Tom Tromey <tom@tromey.com>
2337 * objc-lang.h: Don't include cp-support.h.
2338 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
2341 2018-05-27 Tom Tromey <tom@tromey.com>
2343 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
2345 2018-05-25 Tom Tromey <tom@tromey.com>
2347 * value.c (value::location): Initialize.
2349 2018-05-25 Tom Tromey <tom@tromey.com>
2351 * dbxread.c (init_bincl_list): Remove.
2352 (bincl_list): Now a std::vector.
2353 (bincls_allocated, next_bincl): Remove.
2354 (free_bincl_list, do_free_bincl_list_cleanup)
2355 (make_cleanup_free_bincl_list): Remove.
2356 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
2358 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
2359 (struct header_file_location): Add constructor.
2360 (add_bincl_to_list): Remove.
2362 2018-05-25 Tom Tromey <tom@tromey.com>
2364 * tui/tui.c (tui_enable): Update.
2365 * mi/mi-interp.c (mi_interp::init): Update.
2366 * interps.h (class interp) <name>: New method.
2367 <m_name>: Rename from name.
2368 (~scoped_restore_interp): Update.
2369 * interps.c (interp::interp): Update.
2370 (interp_add, interp_set, interp_lookup_existing)
2371 (current_interp_named_p): Update.
2373 2018-05-25 Tom Tromey <tom@tromey.com>
2375 * interps.c (interp_name): Remove.
2376 * mi/mi-interp.c (mi_interp::init): Update.
2377 * interps.h (interp_name): Remove.
2378 (~scoped_restore_interp): Update.
2379 * tui/tui.c (tui_enable): Update.
2381 2018-05-25 Tom Tromey <tom@tromey.com>
2383 * utils.c (fputs_maybe_filtered): Update.
2384 * linespec.c (decode_line_full): Update.
2385 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
2386 (mi_print_breakpoint_for_event, mi_solib_loaded)
2387 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
2388 (mi_user_selected_context_changed): Update.
2389 * mi/mi-main.c (mi_execute_command): Update.
2390 * cli/cli-script.c (execute_control_command): Update.
2391 * python/python.c (execute_gdb_command): Update.
2392 * solib.c (info_sharedlibrary_command): Update.
2393 * interps.c (interp_ui_out): Remove.
2394 * interps.h (interp_ui_out): Remove.
2396 2018-05-25 Tom Tromey <tom@tromey.com>
2398 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
2399 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
2400 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
2402 2018-05-25 Tom Tromey <tom@tromey.com>
2404 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
2405 * interps.c (interp_exec): Use scoped_restore.
2407 2018-05-25 Tom Tromey <tom@tromey.com>
2409 * remote.c (remote_target::remote_file_get): Use
2411 (remote_target::remote_file_put): Likewise.
2413 2018-05-25 Tom Tromey <tom@tromey.com>
2415 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
2417 (get_pe_section_index, add_pe_exported_sym): Update.
2418 (read_pe_exported_syms): Use gdb::def_vector.
2420 2018-05-25 Tom Tromey <tom@tromey.com>
2422 * frame.c (remove_prev_frame): Remove.
2423 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
2425 2018-05-25 Maciej W. Rozycki <macro@mips.com>
2427 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
2429 * mips-linux-nat.c (supply_fpregset): Always call
2430 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
2431 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
2432 `mips_fill_fpregset'.
2433 * mips-linux-tdep.c (mips_supply_fpregset)
2434 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
2435 (mips_fill_fpregset_wrapper): Remove functions.
2436 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
2437 (mips_linux_fpregset): Remove variable.
2438 (mips_linux_iterate_over_regset_sections): Use
2439 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
2440 (mips_linux_o32_sigframe_init): Remove comment.
2442 2018-05-25 Pedro Alves <palves@redhat.com>
2444 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
2445 (struct readahead_cache, struct packet_reg, struct
2446 remote_arch_state, class remote_state): Move higher up in the
2448 (remote_target::m_remote_state): Now an object instead of a pointer.
2449 (remote_target::get_remote_state): Adjust.
2451 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
2453 * stack.c (select_and_print_frame): Delete.
2454 (struct function_bounds): Move struct within function.
2455 (func_command): Most content moved into new function
2456 find_frame_for_function, use new function, print result, add
2458 (find_frame_for_function): New function, now returns a result.
2460 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2462 * stack.c (iterate_over_block_arg_vars): Fix comment.
2463 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
2465 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
2469 (scoped_restore_selected_frame::scoped_restore_selected_frame):
2471 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
2473 * frame.h (class scoped_restore_selected_frame): New class.
2474 * stack.c (print_frame_local_vars): Remove catching and rethrowing
2475 of any exception, use scoped_restore_selected_frame to restore the
2478 2018-05-24 Pedro Alves <palves@redhat.com>
2480 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
2483 2018-05-23 Tom Tromey <tom@tromey.com>
2485 * complaints.c (struct complaints): Remove.
2486 (symfile_complaint_book): Remove.
2487 (series): New global.
2488 (complaint_internal): Update.
2489 (clear_complaints): Update.
2491 2018-05-23 Tom Tromey <tom@tromey.com>
2493 * complaints.c (counters): New global.
2494 (struct complain): Remove.
2495 (struct complaints) <root>: Remove.
2496 (complaint_sentinel): Remove.
2497 (symfile_complaint_book): Update.
2498 (find_complaint) Remove.
2499 (complaint_internal, clear_complaints): Update.
2501 2018-05-23 Tom Tromey <tom@tromey.com>
2503 * complaints.c (struct complain) <file, line>: Remove.
2504 (find_complaint): Remove file, line parameters.
2505 (complaint_internal): Update.
2507 2018-05-23 Tom Tromey <tom@tromey.com>
2509 * complaints.c (vcomplaint): Remove.
2510 (complaint_internal) Merge in contents of vcomplaint.
2512 2018-05-23 Tom Tromey <tom@tromey.com>
2514 * complaints.c (struct complaints) <explanation>: Remove.
2515 (symfile_explanations): Remove.
2516 (symfile_complaint_book): Update.
2517 (vcomplaint): Update.
2518 (struct explanation): Remove.
2520 2018-05-23 Tom Tromey <tom@tromey.com>
2522 * complaints.c (symfile_complaints): Remove.
2523 (complaint_internal): Remove "complaints" parameter.
2524 (clear_complaints, vcomplaint): Remove "c" parameter.
2525 (get_complaints): Remove.
2526 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
2527 (dwarf2_debug_line_missing_file_complaint)
2528 (dwarf2_debug_line_missing_end_sequence_complaint)
2529 (dwarf2_complex_location_expr_complaint)
2530 (dwarf2_const_value_length_mismatch_complaint)
2531 (dwarf2_section_buffer_overflow_complaint)
2532 (dwarf2_macro_malformed_definition_complaint)
2533 (dwarf2_invalid_attrib_class_complaint)
2534 (create_addrmap_from_index, dw2_symtab_iter_next)
2535 (dw2_expand_marked_cus)
2536 (dw2_debug_names_iterator::find_vec_in_debug_names)
2537 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
2538 (create_debug_type_hash_table, init_cutu_and_read_dies)
2539 (partial_die_parent_scope, add_partial_enumeration)
2540 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
2541 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
2542 (read_import_statement, read_file_scope, create_dwo_cu_reader)
2543 (create_cus_hash_table, create_dwp_hash_table)
2544 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
2545 (dwarf2_rnglists_process, dwarf2_ranges_process)
2546 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
2547 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
2548 (handle_struct_member_die, process_structure_scope)
2549 (read_array_type, read_common_block, read_module_type)
2550 (read_tag_pointer_type, read_typedef, read_base_type)
2551 (read_subrange_type, load_partial_dies, partial_die_info::read)
2552 (partial_die_info::read, partial_die_info::read)
2553 (partial_die_info::read, read_checked_initial_length_and_offset)
2554 (dwarf2_string_attr, read_formatted_entries)
2555 (dwarf_decode_line_header)
2556 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2557 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
2558 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
2559 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
2560 (get_signatured_type, get_DW_AT_signature_type)
2561 (decode_locdesc, file_file_name, consume_improper_spaces)
2562 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
2563 (dwarf_decode_macro_bytes, dwarf_decode_macros)
2564 (dwarf2_symbol_mark_computed, set_die_type)
2565 (read_attribute_value): Update.
2566 * stap-probe.c (handle_stap_probe, get_stap_base_address):
2568 * dbxread.c (unknown_symtype_complaint)
2569 (lbrac_mismatch_complaint, repeated_header_complaint)
2570 (set_namestring, function_outside_compilation_unit_complaint)
2571 (read_dbx_symtab, process_one_symbol): Update.
2572 * gdbtypes.c (stub_noname_complaint): Update.
2573 * windows-nat.c (handle_unload_dll): Update.
2574 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
2575 (decode_base_type): Update.
2576 * xcoffread.c (bf_notfound_complaint, ef_complaint)
2577 (eb_complaint, record_include_begin, record_include_end)
2578 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
2579 (process_xcoff_symbol, read_symbol)
2580 (function_outside_compilation_unit_complaint)
2581 (scan_xcoff_symtab): Update.
2582 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
2583 * buildsym.c (finish_block_internal, make_blockvector)
2584 (end_symtab_get_static_block, augment_type_symtab): Update.
2585 * dtrace-probe.c (dtrace_process_dof)
2586 (dtrace_static_probe_ops::get_probes): Update.
2587 * complaints.h (struct complaint): Don't declare.
2588 (symfile_complaints): Remove.
2589 (complaint_internal): Remove "complaints" parameter.
2590 (complaint): Likewise.
2591 (clear_complaints): Likewise.
2592 * symfile.c (syms_from_objfile_1, finish_new_objfile)
2593 (reread_symbols): Update.
2594 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
2595 (dwarf2_frame_cache, decode_frame_entry): Update.
2596 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
2597 * objc-lang.c (lookup_objc_class, lookup_child_selector)
2598 (info_selectors_command): Update.
2599 * macrotab.c (macro_include, check_for_redefinition)
2600 (macro_undef): Update.
2601 * objfiles.c (filter_overlapping_sections): Update.
2602 * stabsread.c (invalid_cpp_abbrev_complaint)
2603 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
2604 (define_symbol, error_type, read_type, rs6000_builtin_type)
2605 (stabs_method_name_from_physname, read_member_functions)
2606 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
2607 (attach_fields_to_type, complain_about_struct_wipeout)
2608 (read_range_type, read_args, common_block_start)
2609 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
2611 * mdebugread.c (index_complaint, unknown_ext_complaint)
2612 (basic_type_complaint, bad_tag_guess_complaint)
2613 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
2614 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
2615 (parse_procedure, parse_lines)
2616 (function_outside_compilation_unit_complaint)
2617 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
2618 (bad_tag_guess_complaint, reg_value_complaint): Update.
2619 * cp-support.c (demangled_name_complaint): Update.
2620 * macroscope.c (sal_macro_scope): Update.
2621 * dwarf-index-write.c (class debug_names): Update.
2623 2018-05-23 Tom Tromey <tom@tromey.com>
2625 * complaints.c (clear_complaints): Remove "noisy" parameter.
2626 * complaints.h (clear_complaints): Update.
2627 * symfile.c (syms_from_objfile_1, finish_new_objfile)
2628 (reread_symbols): Update.
2630 2018-05-23 Tom Tromey <tom@tromey.com>
2632 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
2634 (vcomplaint, clear_complaints): Update.
2635 (symfile_explanations): Remove some messages.
2637 2018-05-23 Tom Tromey <tom@tromey.com>
2639 * complaints.c (internal_complaint): Remove.
2640 * complaints.h (internal_complaint): Remove.
2642 2018-05-22 Maciej W. Rozycki <macro@mips.com>
2644 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
2646 2018-05-22 Pedro Alves <palves@redhat.com>
2648 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
2649 (remote_fileio_badfd, remote_fileio_return_errno)
2650 (remote_fileio_return_success, remote_fileio_func_open)
2651 (remote_fileio_func_open, remote_fileio_func_close)
2652 (remote_fileio_func_read, remote_fileio_func_write)
2653 (remote_fileio_func_lseek, remote_fileio_func_rename)
2654 (remote_fileio_func_unlink, remote_fileio_func_stat)
2655 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
2656 (remote_fileio_func_isatty, remote_fileio_func_system): Add
2657 remote_target parameter.
2658 (remote_fio_func_map) <func>: Add remote_target parameter.
2659 (do_remote_fileio_request, remote_fileio_request):
2660 * remote-fileio.h (remote_fileio_request):
2661 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
2662 remote_target parameter.
2663 (remote_notif_process, handle_notification): Adjust to pass down
2665 (remote_notif_state_allocate): Add remote_target parameter. Save
2667 * remote-notif.h (struct remote_target): Forward declare.
2668 (struct notif_client) <parse, ack, can_get_pending_events>: Add
2669 remote_target parameter.
2670 (struct remote_notif_state) <remote>: New field.
2671 (remote_notif_ack, remote_notif_parse): Add remote_target
2673 (remote_notif_state_allocate, remote_notif_state_allocate): Add
2674 remote_target parameter.
2675 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
2676 (threads_listing_context, rmt_thread_action, protocol_feature)
2677 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
2678 (packet_result, struct threads_listing_context, remote_state):
2679 Move definitions and declarations higher up.
2680 (remote_target) <~remote_target>: Declare.
2681 (remote_download_command_source, remote_file_put, remote_file_get)
2682 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
2683 (remote_hostio_pread_vFile, remote_hostio_send_command)
2684 (remote_hostio_set_filesystem, remote_hostio_open)
2685 (remote_hostio_close, remote_hostio_unlink, remote_state)
2686 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
2687 (get_memory_write_packet_size, get_memory_read_packet_size)
2688 (append_pending_thread_resumptions, remote_detach_1)
2689 (append_resumption, remote_resume_with_vcont)
2690 (add_current_inferior_and_thread, wait_ns, wait_as)
2691 (process_stop_reply, remote_notice_new_inferior)
2692 (process_initial_stop_replies, remote_add_thread)
2693 (btrace_sync_conf, remote_btrace_maybe_reopen)
2694 (remove_new_fork_children, kill_new_fork_children)
2695 (discard_pending_stop_replies, stop_reply_queue_length)
2696 (check_pending_events_prevent_wildcard_vcont)
2697 (discard_pending_stop_replies_in_queue, stop_reply)
2698 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
2699 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
2700 (remote_interrupt_as, remote_interrupt_ns)
2701 (remote_get_noisy_reply, remote_query_attached)
2702 (remote_add_inferior, remote_current_thread, get_current_thread)
2703 (set_thread, set_general_thread, set_continue_thread)
2704 (set_general_process, write_ptid)
2705 (remote_unpack_thread_info_response, remote_get_threadinfo)
2706 (parse_threadlist_response, remote_get_threadlist)
2707 (remote_threadlist_iterator, remote_get_threads_with_ql)
2708 (remote_get_threads_with_qxfer)
2709 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
2710 (get_offsets, remote_check_symbols, remote_supported_packet)
2711 (remote_query_supported, remote_packet_size)
2712 (remote_serial_quit_handler, remote_detach_pid)
2713 (remote_vcont_probe, remote_resume_with_hc)
2714 (send_interrupt_sequence, interrupt_query)
2715 (remote_notif_get_pending_events, fetch_register_using_p)
2716 (send_g_packet, process_g_packet, fetch_registers_using_g)
2717 (store_register_using_P, store_registers_using_G)
2718 (set_remote_traceframe, check_binary_download)
2719 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
2720 (remote_xfer_live_readonly_partial, remote_read_bytes)
2721 (remote_send_printf, remote_flash_write, readchar)
2722 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
2723 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
2724 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
2725 (extended_remote_disable_randomization, extended_remote_run)
2726 (send_environment_packet, extended_remote_environment_support)
2727 (extended_remote_set_inferior_cwd, remote_write_qxfer)
2728 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
2729 (packet_command): Now methods of ...
2730 (remote_target): ... this class.
2731 (m_remote_state) <remote_target>: New field.
2732 (struct remote_state) <stop_reply_queue,
2733 remote_async_inferior_event_token, wait_forever_enabled_p>: New
2735 (remote_state::remote_state): Allocate stop_reply_queue.
2736 (remote_state): Delete global.
2737 (get_remote_state_raw): Delete.
2738 (remote_target::get_remote_state): Allocate m_remote_state on
2740 (get_current_remote_target): New.
2741 (remote_ops, extended_remote_ops): Delete.
2742 (wait_forever_enabled_p, remote_async_inferior_event_token):
2743 Delete, moved to struct remote_state.
2744 (remote_target::close): Delete self. Destruction bits split to
2746 (remote_target::~remote_target): ... this.
2747 (show_memory_packet_size): Adjust to use
2748 get_current_remote_target.
2749 (struct protocol_feature) <func>: Add remote_target parameter.
2750 All callers adjusted.
2751 (curr_quit_handler_target): New.
2752 (remote_serial_quit_handler): Reimplement.
2753 (remote_target::open_1): Adjust to use get_current_remote_target.
2754 Heap-allocate remote_target/extended_remote_target instances.
2755 (vcont_builder::vcont_builder): Add remote_target parameter, and
2756 save it in m_remote. All callers adjusted.
2757 (vcont_builder::m_remote): New field.
2758 (vcont_builder::restart, vcont_builder::flush)
2759 (vcont_builder::push_action): Use it.
2760 (remote_target::commit_resume): Use it.
2761 (struct queue_iter_param) <remote>: New field.
2762 (remote_target::remove_new_fork_children): Fill in 'remote' field.
2763 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
2764 (check_pending_event_prevents_wildcard_vcont_callback)
2765 (remote_target::check_pending_events_prevent_wildcard_vcont)
2766 (remote_target::discard_pending_stop_replies)
2767 (remote_target::discard_pending_stop_replies_in_queue)
2768 (remote_target::remote_notif_remove_queued_reply): Fill in
2770 (remote_notif_get_pending_events): New.
2771 (remote_target::readchar, remote_target::remote_serial_write):
2772 Save/restore curr_quit_handler_target.
2774 (kill_new_fork_children): Fill in 'remote' field.
2775 (packet_command): Use get_current_remote_target, defer to
2776 remote_target method of same name.
2777 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
2778 parameter, and save it in m_remote. All callers adjusted.
2779 (scoped_remote_fd::release): Use m_remote.
2780 (scoped_remote_fd::m_remote): New field.
2781 (remote_file_put, remote_file_get, remote_file_delete): Use
2782 get_current_remote_target, defer to remote_target method of same
2784 (remote_btrace_reset): Add remote_state paremeter. Update all
2786 (remote_async_inferior_event_handler). Pass down 'data'.
2787 (remote_new_objfile): Use get_current_remote_target.
2788 (remote_target::vcont_r_supported): New.
2789 (set_range_stepping): Use get_current_remote_target and
2790 remote_target::vcont_r_supported.
2791 (_initialize_remote): Don't allocate 'remote_state' and
2792 'stop_reply_queue' globals.
2793 * remote.h (struct remote_target): Forward declare.
2794 (getpkt, putpkt, remote_notif_get_pending_events): Add
2795 'remote_target' parameter.
2797 2018-05-22 Pedro Alves <palves@redhat.com>
2799 * remote.c (vcont_builder): Now a class. Make all data members
2801 (vcont_builder) <vcont_builder, restart, flush, push_action>:
2803 (vcont_builder_restart): Rename to ...
2804 (vcont_builder::restart): ... this.
2805 (vcont_builder_flush): Rename to ...
2806 (vcont_builder::flush): ... this.
2807 (vcont_builder_push_action): Rename to ...
2808 (vcont_builder::push_action): ... this.
2809 (remote_target::commit_resume): Adjust.
2811 2018-05-22 Pedro Alves <palves@redhat.com>
2813 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
2814 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
2815 (get_fixed_memory_packet_size): New.
2816 (get_memory_packet_size): Use it.
2817 (set_memory_packet_size): Don't override the config size with
2818 DEFAULT_MAX_MEMORY_PACKET_SIZE.
2819 (show_memory_packet_size): Use get_fixed_memory_packet_size.
2820 Don't refer to get_memory_packet_size if not connected to a remote
2821 target. Show "(default)" if configured size is 0.
2823 2018-05-22 Pedro Alves <palves@redhat.com>
2825 * remote.c (remote_target::mourn_inferior): Move
2826 discard_pending_stop_replies call here from ...
2827 (_initialize_remote): ... here.
2829 2018-05-22 Pedro Alves <palves@redhat.com>
2831 * remote.c (compare_section_command): Remove set_general_process
2834 2018-05-22 Pedro Alves <palves@redhat.com>
2836 * remote.c (struct packet_reg, struct remote_arch_state):
2837 Move higher up in the file.
2838 (remote_state) <m_arch_states>: Store remote_arch_state values
2839 instead of remote_arch_state pointers.
2840 (remote_state::get_remote_arch_state): Adjust.
2842 2018-05-22 Pedro Alves <palves@redhat.com>
2844 * remote.c: Include <unordered_map>.
2845 (remote_state): Now a class.
2846 (remote_state) <get_remote_arch_state>: Declare method.
2847 <get_remote_arch_state>: New field.
2848 (remote_arch_state) <remote_arch_state>: Declare ctor.
2849 <regs>: Now a unique_ptr.
2850 (remote_gdbarch_data_handle): Delete.
2851 (get_remote_arch_state): Delete.
2852 (remote_state::get_remote_arch_state): New.
2853 (get_remote_state): Adjust to call remote_state's
2854 get_remote_arch_state method.
2855 (init_remote_state): Delete, bits factored out to ...
2856 (remote_arch_state::remote_arch_state): ... this new method.
2857 (get_remote_packet_size, get_memory_packet_size)
2858 (process_g_packet, remote_target::fetch_registers)
2859 (remote_target::prepare_to_store, store_registers_using_G)
2860 (remote_target::store_registers, remote_target::get_trace_status):
2861 Adjust to call remote_state's method.
2862 (_initialize_remote): Remove reference to
2863 remote_gdbarch_data_handle.
2865 2018-05-22 Pedro Alves <palves@redhat.com>
2867 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
2868 pread>: New method declarations.
2869 (remote_target::open_1): Adjust.
2870 (readahead_cache_invalidate): Rename to ...
2871 (readahead_cache::invalidate): ... this, and adjust to be a class
2873 (readahead_cache_invalidate_fd): Rename to ...
2874 (readahead_cache::invalidate_fd): ... this, and adjust to be a
2876 (remote_hostio_pwrite): Adjust.
2877 (remote_hostio_pread_from_cache): Rename to ...
2878 (readahead_cache::pread): ... this, and adjust to be a class
2880 (remote_hostio_close): Adjust.
2882 2018-05-22 Pedro Alves <palves@redhat.com>
2884 * remote.c (remote_hostio_close_cleanup): Delete.
2885 (class scoped_remote_fd): New.
2886 (remote_file_put, remote_file_get): Use it.
2888 2018-05-22 Pedro Alves <palves@redhat.com>
2890 (struct vCont_action_support): Use bool and initialize all fields.
2891 (struct readahead_cache): Initialize all fields.
2892 (remote_state): Use bool and initialize all fields.
2893 (remote_state::remote_state, remote_state::~remote_state): New.
2894 (new_remote_state): Delete.
2895 (_initialize_remote): Use new to allocate remote_state.
2897 2018-05-22 Pedro Alves <palves@redhat.com>
2901 * c-exp.y: Include "c-support.h".
2902 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
2903 of tolower. Use c_ident_is_alpha to scan names.
2904 * c-lang.c: Include "c-support.h".
2905 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
2906 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
2907 * c-support.h: New file, with bits factored out from ...
2908 * cp-name-parser.y: ... this file.
2909 Include "c-support.h".
2910 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
2911 c-support.h and renamed.
2912 (symbol_end, yylex): Adjust.
2914 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2916 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
2917 parameter type to CORE_ADDR.
2918 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
2919 parameter type in declaration to CORE_ADDR.
2920 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
2921 target_auxv_search to get AT_HWCAP and use the result to get the
2923 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
2924 to CORE_ADDR. Remove the cast of the return value to unsigned
2925 long. Fix error predicate of target_auxv_search.
2926 (ppc_linux_nat_target::read_description): Change the type of the
2927 hwcap variable to CORE_ADDR.
2929 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2931 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
2932 if the size of fpscr is larger than 32 bits.
2934 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2936 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
2937 (ppc32_linux_vsxregmap): New global.
2938 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
2939 regcache_supply_regset, and regcache_collect_regset.
2940 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
2941 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
2942 (fetch_vsx_register, store_vsx_register): Remove.
2943 (fetch_vsx_registers): Add regno parameter. Get regset using
2944 ppc_linux_vsxregset. Use regset to supply registers.
2945 (store_vsx_registers): Add regno parameter. Get regset using
2946 ppc_linux_vsxregset. Use regset to collect registers.
2947 (fetch_register): Call fetch_vsx_registers instead of
2949 (store_register): Call store_vsx_registers instead of
2951 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
2952 new regno parameter.
2953 (store_ppc_registers): Call store_vsx_registers with -1 for the
2954 new regno parameter.
2955 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
2956 (ppc_collect_vsxregset): Remove.
2958 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
2960 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
2962 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
2963 for vector register offset fields.
2964 (ppc64_fbsd_reg_offsets): Likewise.
2965 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
2966 to vector register offset fields.
2967 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
2968 to vector register offset fields.
2969 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
2970 vector register offset fields.
2971 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
2972 initializers for vector register offset fields.
2973 (rs6000_aix64_reg_offsets): Likewise.
2974 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
2975 (ppc_supply_vrregset): Remove.
2976 (ppc_collect_vrregset): Remove.
2977 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
2978 (ppc_linux_vrregset) : New function.
2979 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
2980 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
2981 (ppc32_linux_vrregset): Remove.
2982 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
2983 and use result instead of ppc32_linux_vrregset.
2984 (ppc32_linux_reg_offsets): Remove initializers for vector register
2986 (ppc64_linux_reg_offsets): Likewise.
2987 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
2988 * ppc-linux-nat.c: Include regset.h.
2989 (gdb_vrregset_t): Adjust comment to account for little-endian
2991 (supply_vrregset, fill_vrregset): Remove.
2992 (fetch_altivec_register, store_altivec_register): Remove.
2993 (fetch_altivec_registers): Add regno parameter. Get regset using
2994 ppc_linux_vrregset. Use regset to supply registers.
2995 (store_altivec_registers): Add regno parameter. Get regset using
2996 ppc_linux_vrregset. Use regset to collect registers.
2997 (fetch_register): Call fetch_altivec_registers instead of
2998 fetch_altivec_register.
2999 (store_register): Call store_altivec_registers instead of
3000 store_altivec_register.
3001 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
3002 the new regno parameter.
3003 (store_ppc_registers): Call store_altivec_registers with -1 for
3004 the new regno parameter.
3006 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3008 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
3009 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
3010 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
3011 (gdb_vrregset_t): Change array type size to
3012 PPC_LINUX_SIZEOF_VRREGSET.
3013 (gdb_vsxregset_t): Change array type size to
3014 PPC_LINUX_SIZEOF_VSXREGSET.
3015 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
3016 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
3017 PPC_LINUX_SIZEOF_VSXREGSET.
3019 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3021 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
3022 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
3024 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
3025 ppc_linux_target_wordsize with tid.
3026 (ppc_linux_nat_target::read_description): Call ppc_linux_target
3028 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
3029 (ppc64_64bit_inferior_p): Add static and inline specifiers.
3030 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
3031 tid parameter. Remove static specifier.
3032 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
3033 (ppc_linux_target_wordsize): New declaration.
3035 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
3037 * arch/ppc-linux-common.c: New file.
3038 * arch/ppc-linux-common.h: New file.
3039 * arch/ppc-linux-tdesc.h: New file.
3040 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
3041 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
3042 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
3043 arch/ppc-linux-tdesc.h.
3044 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
3045 arch/ppc-linux-tdesc.h.
3046 (ppc_linux_nat_target::read_description): Remove target
3047 description matching code. Fill a ppc_linux_features struct and
3048 call ppc_linux_match_description with it. Move comment about ISA
3049 2.05 to ppc-linux-common.c.
3050 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
3051 arch/ppc-linux-tdesc.h.
3052 (ppc_linux_core_read_description): Remove target description
3053 matching code. Fill a ppc_linux_features struct and call
3054 ppc_linux_match_description with it.
3055 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
3056 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
3057 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
3058 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
3059 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
3060 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
3061 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
3062 (tdesc_powerpc_e500l): Remove.
3064 2018-05-22 Joel Brobecker <brobecker@adacore.com>
3066 * ada-lang.c (catch_assert_command): Pass empty string instead
3067 of NULL for excep_string argument.
3069 2018-05-22 Maciej W. Rozycki <macro@mips.com>
3071 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
3072 the width of the requested register exceeds the width of the
3075 2018-05-21 Tom Tromey <tom@tromey.com>
3077 * printcmd.c (output_command): Remove.
3078 (output_command_const): Rename to output_command.
3079 * valprint.h (output_command): Rename from output_command_const.
3080 * tracepoint.c (trace_dump_actions): Call output_command.
3082 2018-05-21 Tom Tromey <tom@tromey.com>
3084 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
3085 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
3086 * ada-lang.h (create_ada_exception_catchpoint): Update.
3087 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
3089 (create_excep_cond_exprs, ~ada_catchpoint)
3090 (should_stop_exception, print_one_exception)
3091 (print_mention_exception, print_recreate_exception): Update.
3092 (ada_get_next_arg): Remove.
3093 (catch_ada_exception_command_split): Use std::string. Change type
3094 of "excep_string", "cond_string".
3095 (catch_ada_exception_command): Update.
3096 (create_ada_exception_catchpoint): Change type of excep_string.
3097 (ada_exception_sal): Remove excep_string parameter.
3098 (~ada_catchpoint): Remove.
3100 2018-05-21 Tom Tromey <tom@tromey.com>
3102 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
3105 2018-05-21 Tom Tromey <tom@tromey.com>
3107 * ada-lang.c (ada_exception_message_1, ada_exception_message):
3108 Return unique_xmalloc_ptr.
3109 (print_it_exception): Update.
3111 2018-05-21 Tom Tromey <tom@tromey.com>
3113 * tracepoint.c (trace_dump_actions): Use std::string.
3115 2018-05-21 Tom Tromey <tom@tromey.com>
3117 * symfile.c (reread_symbols): Use std::string for original_name.
3119 2018-05-21 Tom Tromey <tom@tromey.com>
3121 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
3122 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
3125 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
3127 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
3129 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
3130 * objfiles.c (get_objfile_bfd_data): Allocate
3131 objfile_per_bfd_storage with obstack_new when allocating on
3134 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
3136 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
3138 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
3139 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
3140 * mdebugread.c (mdebug_build_psymtabs): Likewise.
3141 (add_pending): Likewise.
3142 (parse_symbol): Likewise.
3143 (parse_partial_symbols): Likewise.
3144 (psymtab_to_symtab_1): Likewise.
3145 (new_psymtab): Likewise.
3146 (elfmdebug_build_psymtabs): Likewise.
3147 * minsyms.c (terminate_minimal_symbol_table): Likewise.
3148 * objfiles.c (get_objfile_bfd_data): Likewise.
3149 (objfile_register_static_link): Likewise.
3150 * psymtab.c (allocate_psymtab): Likewise.
3151 * stabsread.c (read_member_functions): Likewise.
3152 * xcoffread.c (xcoff_end_psymtab): Likewise.
3154 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
3156 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
3157 compiler supports std::is_trivially_constructible.
3158 * common/poison.h: Include obstack.h.
3159 (IsMallocable): Define to is_trivially_constructible if the
3160 compiler supports it, define to true_type otherwise.
3164 (XOBNEWVEC): Redefine.
3165 * gdb_obstack.h (obstack_zalloc): New.
3166 (OBSTACK_ZALLOC): Redefine.
3167 (obstack_calloc): New.
3168 (OBSTACK_CALLOC): Redefine.
3170 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
3171 (gdbarch_obstack): New declaration in gdbarch.h, definition in
3173 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
3174 obstack_calloc/obstack_zalloc.
3175 (gdbarch_obstack_zalloc): Remove.
3176 * target-descriptions.c (tdesc_data_init): Use obstack_new.
3178 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3180 * stack.c (backtrace_command_1): Remove useless variable int i.
3182 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3184 * stack.c (print_frame_info): Fix comment.
3186 2018-05-18 Tom Tromey <tom@tromey.com>
3188 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
3189 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
3190 (~dwarf2_per_objfile): Update
3191 (dwarf2_get_dwz_file): Use new.
3192 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
3195 2018-05-18 Tom Tromey <tom@tromey.com>
3197 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
3199 * dwarf2read.c (struct dwp_file): Add constructor and
3201 (open_and_init_dwp_file): Return a unique_ptr.
3202 (dwarf2_per_objfile, create_dwp_hash_table)
3203 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
3204 (lookup_dwo_unit_in_dwp): Update.
3205 (open_and_init_dwp_file, get_dwp_file): Update.
3207 2018-05-18 Tom Tromey <tom@tromey.com>
3209 * dwarf2read.c (dwarf2_per_objfile): Update.
3210 (struct mapped_index): Add initializers.
3211 (dwarf2_read_index): Use new.
3212 (dw2_symtab_iter_init): Update.
3213 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
3216 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
3218 * dwarf2read.c (mapped_index) <total_size>: Remove.
3220 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
3222 * unittests/format_pieces-selftests.c (test_format_specifier):
3225 2018-05-18 Tom Tromey <tom@tromey.com>
3227 * c-typeprint.c (maybe_print_hole): New function.
3228 (c_print_type_struct_field_offset): Update.
3229 (c_type_print_base_struct_union): Call maybe_print_hole.
3231 2018-05-17 Keith Seitz <keiths@redhat.com>
3233 * breakpoint.c (build_bpstat_chain): New function, moved from
3235 (bpstat_stop_status): Add optional parameter, `stop_chain'.
3236 If no stop chain is passed, call build_bpstat_chain to build it.
3237 * breakpoint.h (build_bpstat_chain): Declare.
3238 (bpstat_stop_status): Move documentation here from breakpoint.c.
3239 * infrun.c (handle_signal_stop): Before eliding inlined frames,
3240 build the stop chain and pass it to skip_inline_frames.
3241 Pass this stop chain to bpstat_stop_status.
3242 * inline-frame.c: Include breakpoint.h.
3243 (stopped_by_user_bp_inline_frame): New function.
3244 (skip_inline_frames): Add parameter `stop_chain'.
3245 Move documention to inline-frame.h.
3246 If non-NULL, use stopped_by_user_bp_inline_frame to determine
3247 whether the frame should be elided.
3248 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
3249 Add moved documentation and update for new parameter.
3251 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
3254 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3255 unittests/format_pieces-selftests.c.
3256 * common/format.h (format_piece) <operator==>: New.
3257 (format_pieces) <operator[]>: Remove.
3258 * common/format.c (format_pieces::format_pieces): Handle \e.
3259 * unittests/format_pieces-selftests.c: New.
3261 2018-05-17 Tom Tromey <tom@tromey.com>
3264 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
3265 (dw2_instantiate_symtab): Add skip_partial parameter.
3266 (dw2_find_last_source_symtab, dw2_map_expand_apply)
3267 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
3268 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
3269 (dw2_expand_symtabs_matching_one)
3270 (dw2_find_pc_sect_compunit_symtab)
3271 (dw2_debug_names_lookup_symbol)
3272 (dw2_debug_names_expand_symtabs_for_function): Update.
3273 (init_cutu_and_read_dies): Add skip_partial parameter.
3274 (process_psymtab_comp_unit, build_type_psymtabs_1)
3275 (process_skeletonless_type_unit, load_partial_comp_unit)
3276 (psymtab_to_symtab_1): Update.
3277 (load_full_comp_unit): Add skip_partial parameter.
3278 (process_imported_unit_die, dwarf2_read_addr_index)
3279 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
3280 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
3281 (read_signatured_type): Update.
3283 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
3285 * value.c (release_value): Remove unused variable.
3286 (record_latest_value): Likewise.
3287 (access_value_history): Likewise.
3288 (preserve_values): Likewise.
3290 2018-05-17 Tom Tromey <tom@tromey.com>
3292 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
3295 2018-05-16 Maciej W. Rozycki <macro@mips.com>
3298 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
3299 Also handle registers whose width is not a multiple of
3301 (linux_nat_trad_target::store_register): Likewise.
3303 2018-05-16 Tom Tromey <tom@tromey.com>
3305 * gdbcore.h (core_bfd): Redefine.
3306 * corelow.c (core_target::close): Update.
3307 (core_target_open): Update.
3308 * progspace.h (struct program_space) <cbfd>: Now a
3311 2018-05-16 Tom Tromey <tom@tromey.com>
3314 * symfile-add-flags.h (enum symfile_add_flags)
3315 <SYMFILE_NOT_FILENAME>: New constant.
3316 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
3317 objfile name from BFD.
3318 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
3319 * minidebug.c (find_separate_debug_file_in_section): Put
3320 ".gnu_debugdata" into BFD's file name.
3322 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
3324 * regcache.c (regcache_read_ftype, regcache_write_ftype):
3327 2018-05-15 Tamar Christina <tamar.christina@arm.com>
3330 * aarch64-tdep.c (aarch64_analyze_prologue,
3331 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
3332 Indicate not interested in errors.
3334 2018-05-15 Maciej W. Rozycki <macro@mips.com>
3336 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
3337 Supply the MIPS_ZERO_REGNUM register.
3339 2018-05-15 Maciej W. Rozycki <macro@mips.com>
3341 * mips-tdep.c (mask_address_var): Make variable static.
3343 2018-05-14 Tom Tromey <tom@tromey.com>
3345 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
3347 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
3349 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
3350 FXSAVE_ADDR for the mxcsr register.
3352 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
3354 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
3356 2018-05-11 Pedro Alves <palves@redhat.com>
3358 * corelow.c (core_target) <core_target>: No longer inline.
3359 Initialize m_core_gdbarch, m_core_vec and build the section table
3361 <~core_target>: New.
3362 <core_gdbarch, get_core_register_section>: New methods.
3363 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
3364 factored out from ...
3365 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
3367 (sniff_core_bfd): Add gdbarch parameter.
3368 (core_close): Delete, merged into ...
3369 (core_target::close): ... here. Delete self.
3370 (core_close_cleanup): Delete.
3371 (core_target_open): Allocate a core_target on the heap. Use a
3372 unique_ptr instead of a cleanup. Bits moved into the core_target
3373 ctor. Adjust to use core_target methods instead of globals.
3374 (get_core_register_section): Rename to ...
3375 (core_target::get_core_register_section): ... this and adjust.
3376 (struct get_core_registers_cb_data): New.
3377 (get_core_registers_cb): Use it. Use bool.
3378 (core_target::fetch_registers, core_target::files_info)
3379 (core_target::xfer_partial, core_target::read_description)
3380 (core_target::pid_to, core_target::thread_name): Adjust to
3381 reference class fields instead of globals.
3382 * target.h (struct target_ops_deleter, target_ops_up): New.
3384 2018-05-11 Pedro Alves <palves@redhat.com>
3386 * corefile.c (core_file_command): Move to corelow.c.
3387 * corelow.c (the_core_target): Delete.
3388 (core_file_command): Moved from corefile.c. Check exec_bfd
3389 instead of the_core_target. Use target_detach instead of calling
3390 into the_core_target directly.
3391 (maybe_say_no_core_file_now): New.
3392 (core_target::detach): Use it.
3393 (_initialize_corelow): Remove references to the_core_target.
3394 * gdbcore.h (the_core_target): Delete.
3396 2018-05-11 Tom Tromey <tromey@redhat.com>
3397 Pedro Alves <palves@redhat.com>
3399 * corefile.c (core_bfd): Remove.
3400 * gdbcore.h (core_bfd): Now a macro.
3401 * progspace.h (struct program_space) <cbfd>: New field.
3403 2018-05-11 Tom Tromey <tom@tromey.com>
3405 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
3408 2018-05-10 Tom Tromey <tom@tromey.com>
3410 * configure: Rebuild.
3411 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
3413 2018-05-10 Joel Brobecker <brobecker@adacore.com>
3416 * regformats/regdat.sh: Adjust script, following the addition
3417 of the new expedite_regs parameter to init_target_desc.
3419 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
3422 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
3423 set_gdbarch_significant_addr_bit.
3424 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
3425 set_gdbarch_significant_addr_bit.
3426 * utils.c (address_significant): Update to sign extend addr.
3428 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
3430 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
3431 (xtensa_linux_init_abi): Limit tdep->num_regs by
3432 tdep->num_nopriv_regs.
3433 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
3434 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
3437 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
3439 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
3441 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
3443 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
3444 (I387_MXCSR_INIT_VAL): New constant.
3445 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
3446 buffer if it was supplied by the inferior.
3447 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
3448 (i387_xsave_get_clear_bv): New function.
3449 (i387_supply_xsave): Only read x87 control registers from the
3450 xsave buffer if the feature is enabled, and the state will have
3451 been written, otherwise, provide a suitable default.
3452 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
3453 including x87 control registers. Update control registers if they
3454 have changed from the default value, and mark features as enabled
3456 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
3458 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
3460 * spu-tdep.c (info_spu_event_command): Fix output formatting.
3462 2018-05-07 Tom Tromey <tom@tromey.com>
3464 * configure: Rebuild.
3465 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
3467 2018-05-07 Tom Tromey <tom@tromey.com>
3470 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
3471 bit. Use correct value for VDIV.
3473 2018-05-04 Tom Tromey <tom@tromey.com>
3475 * configure: Rebuild.
3476 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
3478 2018-05-04 Tom Tromey <tom@tromey.com>
3480 * linux-record.c (record_linux_system_call) <case
3481 RECORD_SYS_RECVFROM>: Add "break".
3483 2018-05-04 Tom Tromey <tom@tromey.com>
3485 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
3486 Add missing "break".
3487 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
3488 Add missing "break".
3490 2018-05-04 Tom Tromey <tom@tromey.com>
3492 * rs6000-tdep.c (ppc_process_record_op4)
3493 (ppc_process_record_op63): Add fall-through comment.
3495 2018-05-04 Tom Tromey <tom@tromey.com>
3497 * i386-tdep.c (i386_process_record): Add fall-through comment.
3499 2018-05-04 Tom Tromey <tom@tromey.com>
3501 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
3504 2018-05-04 Tom Tromey <tom@tromey.com>
3506 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
3507 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
3508 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
3510 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
3512 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
3515 2018-05-04 Tom Tromey <tom@tromey.com>
3517 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
3519 2018-05-04 Tom Tromey <tom@tromey.com>
3521 * s390-tdep.c (s390_process_record): Fix fall-through comments.
3522 * xcoffread.c (scan_xcoff_symtab): Move comment later.
3523 * symfile.c (section_is_mapped): Fix fall-through comment.
3524 * stabsread.c (define_symbol, read_member_functions): Fix
3525 fall-through comment.
3526 * s390-linux-tdep.c (s390_process_record): Fix fall-through
3528 * remote.c (remote_wait_as): Fix fall-through comment.
3529 * p-exp.y (yylex): Fix fall-through comment.
3530 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
3532 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
3533 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
3534 * jv-exp.y (yylex): Fix fall-through comment.
3535 * go-exp.y (lex_one_token): Fix fall-through comment.
3536 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
3537 fall-through comment.
3538 * f-exp.y (yylex): Fix fall-through comment.
3539 * dwarf2read.c (process_die): Fix fall-through comments.
3540 * dbxread.c (process_one_symbol): Fix fall-through comment.
3541 * d-exp.y (lex_one_token): Fix fall-through comment.
3542 * cp-name-parser.y (yylex): Fix fall-through comment.
3543 * coffread.c (coff_symtab_read): Fix fall-through comment.
3544 * c-exp.y (lex_one_token): Fix fall-through comment.
3545 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
3547 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
3550 2018-05-04 Tom Tromey <tom@tromey.com>
3553 * NEWS: Mention gdb.execute change.
3554 * gdbcmd.h (execute_control_command): Don't declare.
3555 * python/python.c (execute_gdb_command): Use read_command_lines_1,
3556 execute_control_commands, execute_control_commands_to_string.
3557 * cli/cli-script.h (execute_control_commands)
3558 (execute_control_commands_to_string): Declare.
3559 (execute_control_command): Add from_tty parameter.
3560 * cli/cli-script.c (execute_control_commands)
3561 (execute_control_commands_to_string): New functions.
3562 (execute_user_command): Use execute_control_commands.
3563 (execute_control_command_1): Add "from_tty" parameter. Update.
3564 (execute_control_command): Likewise.
3566 2018-05-04 Tom Tromey <tom@tromey.com>
3569 * NEWS: Mention that breakpoint commands are writable.
3570 * python/py-breakpoint.c (bppy_set_commands): New function.
3571 (breakpoint_object_getset) <"commands">: Use it.
3573 2018-05-04 Tom Tromey <tom@tromey.com>
3575 * tracepoint.c (actions_command): Update.
3576 * mi/mi-cmd-break.c (mi_command_line_array)
3577 (mi_command_line_array_cnt, mi_command_line_array_ptr)
3578 (mi_read_next_line): Remove.
3579 (mi_cmd_break_commands): Update.
3580 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
3582 * cli/cli-script.c (get_command_line): Update.
3583 (process_next_line): Use function_view. Constify.
3584 (recurse_read_control_structure, read_command_lines)
3585 (read_command_lines_1): Change argument types to function_view.
3586 (do_define_command, document_command): Update.
3587 * breakpoint.h (check_tracepoint_command): Don't declare.
3588 * breakpoint.c (check_tracepoint_command): Remove.
3589 (commands_command_1, create_tracepoint_from_upload): Update.
3591 2018-05-04 Tom Tromey <tom@tromey.com>
3594 * cli/cli-script.h (enum command_control_type) <define_control>:
3596 * cli/cli-script.c (multi_line_command_p): Handle define_control.
3597 (build_command_line, execute_control_command_1)
3598 (process_next_line): Likewise.
3599 (do_define_command): New function, extracted from define_command.
3600 (define_command): Use it.
3602 2018-05-04 Tom Tromey <tom@tromey.com>
3604 * tracepoint.c (actions_command): Update.
3605 * cli/cli-script.h (read_command_lines): Update.
3606 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
3607 (MAX_TMPBUF): Remove define.
3608 (define_command): Use string_printf.
3609 (document_command): Likewise.
3610 * breakpoint.c (commands_command_1): Update.
3612 2018-05-04 Tom Tromey <tom@tromey.com>
3614 * top.c (execute_command): Update.
3615 * cli/cli-script.h (print_command_lines): Now varargs.
3616 * cli/cli-script.c (print_command_lines): Now varargs.
3617 (execute_control_command_1) <case while_control, case if_control>:
3620 2018-05-04 Tom Tromey <tom@tromey.com>
3622 * tracepoint.c (all_tracepoint_actions): Rename from
3623 all_tracepoint_actions_and_cleanup. Change return type.
3624 (actions_command, encode_actions_1, encode_actions)
3625 (trace_dump_actions, tdump_command): Update.
3626 * remote.c (remote_download_command_source): Update.
3627 * python/python.c (gdbpy_eval_from_control_command)
3628 (python_command, python_interactive_command): Update.
3629 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
3630 * guile/guile.c (guile_command)
3631 (gdbscm_eval_from_control_command, guile_command): Update.
3632 * compile/compile.c (compile_code_command)
3633 (compile_print_command, compile_to_object): Update.
3634 * cli/cli-script.h (struct command_lines_deleter): New.
3635 (counted_command_line): New typedef.
3636 (struct command_line): Add constructor, destructor.
3637 <body_list>: Remove.
3638 <body_list_0, body_list_1>: New members.
3639 (command_line_up): Remove typedef.
3640 (read_command_lines, read_command_lines_1, get_command_line):
3642 (copy_command_lines): Don't declare.
3643 * cli/cli-script.c (build_command_line): Use "new".
3644 (get_command_line): Return counted_command_line.
3645 (print_command_lines, execute_user_command)
3646 (execute_control_command_1, while_command, if_command): Update.
3647 (realloc_body_list): Remove.
3648 (process_next_line, recurse_read_control_structure): Update.
3649 (read_command_lines, read_command_lines_1): Return counted_command_line.
3650 (free_command_lines): Use "delete".
3651 (copy_command_lines): Remove.
3652 (define_command, document_command, show_user_1): Update.
3653 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
3654 a counted_command_line.
3655 * breakpoint.h (counted_command_line): Remove typedef.
3656 (breakpoint_set_commands): Update.
3657 * breakpoint.c (check_no_tracepoint_commands)
3658 (validate_commands_for_breakpoint): Update.
3659 (breakpoint_set_commands): Change commands to be a
3660 counted_command_line.
3661 (commands_command_1, update_dprintf_command_list)
3662 (create_tracepoint_from_upload): Update.
3664 2018-05-04 Tom Tromey <tom@tromey.com>
3666 * cli/cli-decode.h (cmd_list_element): New constructor.
3667 (~cmd_list_element): New destructor.
3668 (struct cmd_list_element): Add initializers.
3669 * cli/cli-decode.c (do_add_cmd): Use "new".
3670 (delete_cmd): Use "delete".
3672 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
3673 Pedro Alves <palves@redhat.com>
3675 PR breakpoints/19806 and support for PR external/20207.
3676 * NEWS: Mention Aarch64 watchpoint improvements.
3677 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
3678 watchpoints and PR external/20207 watchpoints.
3679 * nat/aarch64-linux-hw-point.c
3680 (kernel_supports_any_contiguous_range): New.
3681 (aarch64_watchpoint_offset): New.
3682 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
3683 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
3684 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
3685 (aarch64_align_watchpoint): New parameters aligned_offset_p and
3686 next_addr_orig_p. Support PR external/20207 watchpoints.
3687 (aarch64_downgrade_regs): New.
3688 (aarch64_dr_state_insert_one_point): New parameters offset and
3690 (aarch64_dr_state_remove_one_point): Likewise.
3691 (aarch64_handle_breakpoint): Update caller.
3692 (aarch64_handle_aligned_watchpoint): Likewise.
3693 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
3695 (aarch64_linux_set_debug_regs): Remove const from state. Call
3696 aarch64_downgrade_regs.
3697 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
3698 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
3699 (DR_CONTROL_MASK): ... this.
3700 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
3701 (unsigned int aarch64_watchpoint_offset): New prototype.
3702 (aarch64_linux_set_debug_regs): Remove const from state.
3703 * utils.c (align_up, align_down): Move to ...
3704 * common/common-utils.c (align_up, align_down): ... here.
3705 * utils.h (align_up, align_down): Move to ...
3706 * common/common-utils.h (align_up, align_down): ... here.
3708 2018-05-04 Joel Brobecker <brobecker@adacore.com>
3710 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
3711 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
3712 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
3713 Re-implement to match the ABI as summarized in GCC's
3714 gcc/config/sparc/sparc.c. All callers updated.
3715 (sparc32_store_arguments): Remove assertion.
3717 2018-05-04 Tom Tromey <tom@tromey.com>
3719 * printcmd.c: Don't include tui.h.
3720 (decode_format): Use skip_spaces.
3722 2018-05-04 Tom Tromey <tom@tromey.com>
3725 * printcmd.c (last_count): New global.
3726 (x_command): Use saved count when repeating.
3728 2018-05-04 Tom Tromey <tom@tromey.com>
3730 * nto-procfs.c (do_closedir_cleanup): Remove.
3731 (procfs_pidlist): Use gdb_dir_up.
3732 * procfs.c (do_closedir_cleanup): Remove.
3733 (proc_update_threads): Use gdb_dir_up.
3734 * common/filestuff.h (struct gdb_dir_deleter): New.
3735 (gdb_dir_up): New typedef.
3737 2018-05-04 Tom Tromey <tom@tromey.com>
3739 * ada-lang.c (print_mention_exception): Use std::string.
3741 2018-05-04 Tom Tromey <tom@tromey.com>
3743 * ada-lang.c (create_excep_cond_exprs): Update.
3744 (ada_exception_catchpoint_cond_string): Use std::string.
3746 2018-05-04 Tom Tromey <tom@tromey.com>
3748 * ada-lang.c (xget_renaming_scope): Return std::string.
3749 (old_renaming_is_invisible): Update.
3751 2018-05-04 Tom Tromey <tom@tromey.com>
3753 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
3754 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
3756 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
3758 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
3760 2018-05-04 Tom Tromey <tom@tromey.com>
3762 * remote.c (remote_query_supported_append): Change type.
3763 (remote_check_symbols): Update.
3765 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
3768 * configure.ac: Prepend libpython.
3769 * python/python-config.py: Likewise.
3770 * configure: Regenerate.
3772 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
3774 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
3776 2018-05-03 Pedro Alves <palves@redhat.com>
3779 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
3780 override. Write 'true' instead of '1'.
3781 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
3784 2018-05-02 Pedro Alves <palves@redhat.com>
3786 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
3787 add_inf_child_target.
3788 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
3789 add_inf_child_target.
3790 * aix-thread.c (aix_thread_target_info): New.
3791 (aix_thread_target) <shortname, longname, doc>: Delete.
3793 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
3794 add_inf_child_target.
3795 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
3796 add_inf_child_target.
3797 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
3798 add_inf_child_target.
3799 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
3800 add_inf_child_target.
3801 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
3802 add_inf_child_target.
3803 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
3804 add_inf_child_target.
3805 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
3806 add_inf_child_target.
3807 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
3808 add_inf_child_target.
3809 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
3810 add_inf_child_target.
3811 * bfd-target.c (target_bfd_target_info): New.
3812 (target_bfd) <shortname, longname, doc>: Delete.
3814 * bsd-kvm.c (bsd_kvm_target_info): New.
3815 (bsd_kvm_target) <shortname, longname, doc>: Delete.
3817 (bsd_kvm_target::open): Rename to ...
3818 (bsd_kvm_target_open): ... this. Adjust.
3819 * bsd-uthread.c (bsd_uthread_target_info): New.
3820 (bsd_uthread_target) <shortname, longname, doc>: Delete.
3822 * corefile.c (core_file_command): Adjust.
3823 * corelow.c (core_target_info): New.
3824 (core_target) <shortname, longname, doc>: Delete.
3826 (core_target::open): Rename to ...
3827 (core_target_open): ... this. Adjust.
3828 * ctf.c (ctf_target_info): New.
3829 (ctf_target) <shortname, longname, doc>: Delete.
3831 (ctf_target::open): Rename to ...
3832 (ctf_target_open): ... this.
3833 (_initialize_ctf): Adjust.
3834 * exec.c (exec_target_info): New.
3835 (exec_target) <shortname, longname, doc>: Delete.
3837 (exec_target::open): Rename to ...
3838 (exec_target_open): ... this.
3839 * gdbcore.h (core_target_open): Declare.
3840 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
3841 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
3842 add_inf_child_target.
3843 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
3844 add_inf_child_target.
3845 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
3846 add_inf_child_target.
3847 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
3848 add_inf_child_target.
3849 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
3850 add_inf_child_target.
3851 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
3852 add_inf_child_target.
3853 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
3854 add_inf_child_target.
3855 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
3856 add_inf_child_target.
3857 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
3858 add_inf_child_target.
3859 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
3860 add_inf_child_target.
3861 * inf-child.c (inf_child_target_info): New.
3862 (inf_child_target::info): New.
3863 (inf_child_open_target): Remove 'target' parameter. Use
3864 get_native_target instead.
3865 (inf_child_target::open): Delete.
3866 (add_inf_child_target): New.
3867 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
3870 (add_inf_child_target): Declare.
3871 (inf_child_open_target): Declare.
3872 * linux-thread-db.c (thread_db_target_info): New.
3873 (thread_db_target) <shortname, longname, doc>: Delete.
3875 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
3876 add_inf_child_target.
3877 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
3878 add_inf_child_target.
3879 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
3880 add_inf_child_target.
3881 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
3882 add_inf_child_target.
3883 * make-target-delegates (print_class): Adjust.
3884 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
3885 add_inf_child_target.
3886 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
3887 add_inf_child_target.
3888 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
3889 add_inf_child_target.
3890 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
3891 add_inf_child_target.
3892 * nto-procfs.c (nto_native_target_info): New.
3893 (nto_procfs_target_native) <shortname, longname, doc>:
3896 (nto_procfs_target_info): New.
3897 (nto_procfs_target_procfs) <shortname, longname, doc>:
3900 (init_procfs_targets): Adjust.
3901 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
3902 add_inf_child_target.
3903 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
3904 add_inf_child_target.
3905 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
3906 add_inf_child_target.
3907 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
3908 add_inf_child_target.
3909 * ravenscar-thread.c (ravenscar_target_info): New.
3910 (ravenscar_thread_target) <shortname, longname, doc>:
3913 * record-btrace.c (record_btrace_target_info):
3914 (record_btrace_target) <shortname, longname, doc>: Delete.
3916 (record_btrace_target::open): Rename to ...
3917 (record_btrace_target_open): ... this. Adjust.
3918 * record-full.c (record_longname, record_doc): New.
3919 (record_full_base_target) <shortname, longname, doc>: Delete.
3921 (record_full_target_info): New.
3922 (record_full_target): <shortname>: Delete.
3924 (record_full_core_open_1, record_full_open_1): Update comments.
3925 (record_full_base_target::open): Rename to ...
3926 (record_full_open): ... this.
3927 (cmd_record_full_restore): Update.
3928 (_initialize_record_full): Update.
3929 * remote-sim.c (remote_sim_target_info): New.
3930 (gdbsim_target) <shortname, longname, doc>: Delete.
3932 (gdbsim_target::open): Rename to ...
3933 (gdbsim_target_open): ... this.
3934 (_initialize_remote_sim): Adjust.
3935 * remote.c (remote_doc): New.
3936 (remote_target_info): New.
3937 (remote_target) <shortname, longname, doc>: Delete.
3939 (extended_remote_target_info): New.
3940 (extended_remote_target) <shortname, longname, doc>: Delete.
3942 (remote_target::open_1): Make static. Adjust.
3943 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
3944 * s390-linux-nat.c (_initialize_s390_nat): Use
3945 add_inf_child_target.
3946 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
3947 add_inf_child_target.
3948 * sol-thread.c (thread_db_target_info): New.
3949 (sol_thread_target) <shortname, longname, doc>: Delete.
3951 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
3952 add_inf_child_target.
3953 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
3954 add_inf_child_target.
3955 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
3956 add_inf_child_target.
3957 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
3958 add_inf_child_target.
3959 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
3960 add_inf_child_target.
3961 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
3962 add_inf_child_target.
3963 * spu-linux-nat.c (_initialize_spu_nat): Use
3964 add_inf_child_target.
3965 * spu-multiarch.c (spu_multiarch_target_info): New.
3966 (spu_multiarch_target) <shortname, longname, doc>: Delete.
3968 * target-delegates.c: Regenerate.
3969 * target.c: Include <unordered_map>.
3970 (target_ops_p): Delete.
3971 (DEF_VEC_P(target_ops_p)): Delete.
3972 (target_factories): New.
3973 (test_target_info): New.
3974 (test_target_ops::info): New.
3975 (open_target): Adjust to use target_factories.
3976 (add_target_with_completer): Rename to ...
3977 (add_target): ... this. Change prototype. Register target_info
3978 and open callback in target_factories. Register target_info in
3979 command context instead of target_ops.
3980 (add_target): Delete old implementation.
3981 (add_deprecated_target_alias): Change prototype. Adjust.
3982 (the_native_target): New.
3983 (set_native_target, get_native_target): New.
3984 (find_default_run_target): Use the_native_target.
3985 (find_attach_target, find_run_target): Simplify.
3986 (target_ops::open): Delete.
3987 (dummy_target_info): New.
3988 (dummy_target::shortname, dummy_target::longname)
3989 (dummy_target::doc): Delete.
3990 (dummy_target::info): New.
3991 (debug_target::shortname, debug_target::longname)
3992 (debug_target::doc): Delete.
3993 (debug_target::info): New.
3994 * target.h (struct target_info): New.
3995 (target_ops::~target_ops): Add comment.
3996 (target_ops::info): New.
3997 (target_ops::shortname, target_ops::longname, target_ops::doc): No
3998 longer virtual. Implement in terms of target_info.
3999 (set_native_target, get_native_target): Declare.
4000 (target_open_ftype): New.
4001 (add_target, add_target_with_completer)
4002 (add_deprecated_target_alias): Change prototype.
4003 (test_target) <shortname, longname, doc>: Delete.
4005 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
4006 add_inf_child_target.
4007 * tracefile-tfile.c (tfile_target_info): New.
4008 (tfile_target) <shortname, longname, doc>: Delete.
4010 (tfile_target::open): Rename to ...
4011 (tfile_target_open): ... this.
4012 (_initialize_tracefile_tfile): Adjust.
4013 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
4014 add_inf_child_target.
4015 * windows-nat.c (_initialize_windows_nat): Use
4016 add_inf_child_target.
4017 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
4018 add_inf_child_target.
4020 2018-05-02 Pedro Alves <palves@redhat.com>
4022 * linux-nat.h (linux_nat_target) <low_new_thread,
4023 low_delete_thread, low_new_fork, low_forget_process,
4024 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
4025 New virtual methods.
4026 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
4027 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
4028 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
4029 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
4030 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
4032 * linux-fork.c (delete_fork): Adjust to call low method.
4033 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
4034 (linux_nat_new_fork, linux_nat_forget_process_hook)
4035 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
4036 (linux_nat_status_is_event):
4037 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
4038 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
4040 (sigtrap_is_event): Rename to ...
4041 (linux_nat_target::low_status_is_event): ... this.
4042 (linux_nat_set_status_is_event): Delete.
4043 (save_stop_reason, linux_nat_wait_1)
4044 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
4046 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
4047 (linux_nat_set_new_fork, linux_nat_set_forget_process)
4048 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
4049 (linux_nat_set_prepare_to_resume): Delete.
4050 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
4051 low virtual methods.
4052 * amd64-linux-nat.c: Likewise.
4053 * arm-linux-nat.c: Likewise.
4054 * i386-linux-nat.c: Likewise.
4055 * ia64-linux-nat.c: Likewise.
4056 * mips-linux-nat.c: Likewise.
4057 * ppc-linux-nat.c: Likewise.
4058 * s390-linux-nat.c: Likewise.
4059 * sparc64-linux-nat.c: Likewise.
4060 * x86-linux-nat.c: Likewise.
4061 * x86-linux-nat.h: Include "nat/x86-linux.h".
4062 (x86_linux_nat_target) <low_new_fork, low_forget_process,
4063 low_prepare_to_resume, low_new_thread, low_delete_thread>:
4066 2018-05-02 Pedro Alves <palves@redhat.com>
4068 * target.h (target_ops)
4069 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4070 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
4071 stopped_by_watchpoint, have_continuable_watchpoint,
4072 stopped_data_address, watchpoint_addr_within_range,
4073 can_accel_watchpoint_condition, can_run, thread_alive,
4074 has_all_memory, has_memory, has_stack, has_registers,
4075 has_execution, can_async_p, is_async_p, supports_non_stop,
4076 always_non_stop_p, can_execute_reverse, supports_multi_process,
4077 supports_enable_disable_tracepoint,
4078 supports_disable_randomization, supports_string_tracing,
4079 supports_evaluation_of_breakpoint_conditions,
4080 can_run_breakpoint_commands, filesystem_is_local,
4081 can_download_tracepoint, get_trace_state_variable_value,
4082 set_trace_notes, get_tib_address, use_agent, can_use_agent,
4083 record_is_replaying, record_will_replay,
4084 augmented_libraries_svr4_read>: Adjust to return bool.
4085 * aarch64-linux-nat.c: All implementations adjusted.
4086 * aix-thread.c: All implementations adjusted.
4087 * arm-linux-nat.c: All implementations adjusted.
4088 * breakpoint.c: All implementations adjusted.
4089 * bsd-kvm.c: All implementations adjusted.
4090 * bsd-uthread.c: All implementations adjusted.
4091 * corelow.c: All implementations adjusted.
4092 * ctf.c: All implementations adjusted.
4093 * darwin-nat.c: All implementations adjusted.
4094 * darwin-nat.h: All implementations adjusted.
4095 * exec.c: All implementations adjusted.
4096 * fbsd-nat.c: All implementations adjusted.
4097 * fbsd-nat.h: All implementations adjusted.
4098 * gnu-nat.c: All implementations adjusted.
4099 * gnu-nat.h: All implementations adjusted.
4100 * go32-nat.c: All implementations adjusted.
4101 * ia64-linux-nat.c: All implementations adjusted.
4102 * inf-child.c: All implementations adjusted.
4103 * inf-child.h: All implementations adjusted.
4104 * inf-ptrace.c: All implementations adjusted.
4105 * inf-ptrace.h: All implementations adjusted.
4106 * linux-nat.c: All implementations adjusted.
4107 * linux-nat.h: All implementations adjusted.
4108 * mips-linux-nat.c: All implementations adjusted.
4109 * nto-procfs.c: All implementations adjusted.
4110 * ppc-linux-nat.c: All implementations adjusted.
4111 * procfs.c: All implementations adjusted.
4112 * ravenscar-thread.c: All implementations adjusted.
4113 * record-btrace.c: All implementations adjusted.
4114 * record-full.c: All implementations adjusted.
4115 * remote-sim.c: All implementations adjusted.
4116 * remote.c: All implementations adjusted.
4117 * s390-linux-nat.c: All implementations adjusted.
4118 * sol-thread.c: All implementations adjusted.
4119 * spu-multiarch.c: All implementations adjusted.
4120 * target-delegates.c: All implementations adjusted.
4121 * target.c: All implementations adjusted.
4122 * target.h: All implementations adjusted.
4123 * tracefile-tfile.c: All implementations adjusted.
4124 * tracefile.c: All implementations adjusted.
4125 * tracefile.h: All implementations adjusted.
4126 * windows-nat.c: All implementations adjusted.
4127 * x86-linux-nat.h: All implementations adjusted.
4128 * x86-nat.h: All implementations adjusted.
4130 2018-05-02 Pedro Alves <palves@redhat.com>
4132 * make-target-delegates (scan_target_h): Don't trim lines here.
4133 Replace sequences of tabs and/or whitespace with a single
4135 (top level, parsing methods): Trim each line before processing it
4138 2018-05-02 Pedro Alves <palves@redhat.com>
4139 John Baldwin <jhb@freebsd.org>
4141 * target.h (enum strata) <debug_stratum>: New.
4142 (struct target_ops) <all delegation methods>: Replace by C++
4143 virtual methods, and drop "to_" prefix. All references updated
4145 <to_shortname, to_longname, to_doc, to_data,
4146 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
4147 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
4148 virtual methods. All references updated throughout.
4149 <can_attach, supports_terminal_ours, can_create_inferior,
4150 get_thread_control_capabilities, attach_no_wait>: New
4152 <insert_breakpoint, remove_breakpoint>: Now
4153 TARGET_DEFAULT_NORETURN methods.
4154 <info_proc>: Now returns bool.
4156 (OPS_MAGIC): Delete.
4157 (current_target): Delete. All references replaced by references
4159 (target_stack): ... this. New.
4160 (target_shortname, target_longname): Adjust.
4161 (target_can_run): Now a function declaration.
4162 (default_child_has_all_memory, default_child_has_memory)
4163 (default_child_has_stack, default_child_has_registers)
4164 (default_child_has_execution): Remove target_ops parameter.
4165 (complete_target_initialization): Delete.
4166 (memory_breakpoint_target): New template class.
4167 (test_target_ops): Refactor as a C++ class with virtual methods.
4168 * make-target-delegates (NAME_PART): Tighten.
4169 (POINTER_PART, CP_SYMBOL): New.
4170 (SIMPLE_RETURN_PART): Reimplement.
4171 (VEC_RETURN_PART): Expect less.
4172 (RETURN_PART, VIRTUAL_PART): New.
4173 (METHOD): Adjust to C++ virtual methods.
4174 (scan_target_h): Remove reference to C99.
4175 (dname): Output "target_ops::" prefix.
4176 (write_function_header): Adjust to output a C++ class method.
4177 (write_declaration): New.
4178 (write_delegator): Adjust to output a C++ class method.
4179 (tdname): Output "dummy_target::" prefix.
4180 (write_tdefault, write_debugmethod): Adjust to output a C++ class
4182 (tdefault_names, debug_names): Delete.
4183 (return_types, tdefaults, styles, argtypes_array): New.
4184 (top level): All methods are delegators.
4186 (top level): Print dummy_target and debug_target classes.
4187 * target-delegates.c: Regenerate.
4188 * target-debug.h (target_debug_print_enum_info_proc_what)
4189 (target_debug_print_thread_control_capabilities)
4190 (target_debug_print_thread_info_p): New.
4191 * target.c (dummy_target): Delete.
4192 (the_dummy_target, the_debug_target): New.
4193 (target_stack): Now extern.
4194 (set_targetdebug): Push/unpush debug target.
4195 (default_child_has_all_memory, default_child_has_memory)
4196 (default_child_has_stack, default_child_has_registers)
4197 (default_child_has_execution): Remove target_ops parameter.
4198 (complete_target_initialization): Delete.
4199 (add_target_with_completer): No longer call
4200 complete_target_initialization.
4201 (target_supports_terminal_ours): Use regular delegation.
4202 (update_current_target): Delete.
4203 (push_target): No longer check magic number. Don't call
4204 update_current_target.
4205 (unpush_target): Don't call update_current_target.
4206 (target_is_pushed): No longer check magic number.
4207 (target_require_runnable): Skip for all stratums over
4209 (target_ops::info_proc): New.
4210 (target_info_proc): Use find_target_at and
4211 find_default_run_target.
4212 (target_supports_disable_randomization): Use regular delegation.
4213 (target_get_osdata): Use find_target_at.
4214 (target_ops::open, target_ops::close, target_ops::can_attach)
4215 (target_ops::attach, target_ops::can_create_inferior)
4216 (target_ops::create_inferior, target_ops::can_run)
4217 (target_can_run): New.
4218 (default_fileio_target): Use regular delegation.
4219 (target_ops::fileio_open, target_ops::fileio_pwrite)
4220 (target_ops::fileio_pread, target_ops::fileio_fstat)
4221 (target_ops::fileio_close, target_ops::fileio_unlink)
4222 (target_ops::fileio_readlink): New.
4223 (target_fileio_open_1, target_fileio_unlink)
4224 (target_fileio_readlink): Always call the target method. Handle
4226 (return_zero, return_zero_has_execution): Delete.
4227 (init_dummy_target): Delete.
4228 (dummy_target::dummy_target, dummy_target::shortname)
4229 (dummy_target::longname, dummy_target::doc)
4230 (debug_target::debug_target, debug_target::shortname)
4231 (debug_target::longname, debug_target::doc): New.
4232 (target_supports_delete_record): Use regular delegation.
4233 (setup_target_debug): Delete.
4234 (maintenance_print_target_stack): Skip debug_stratum.
4235 (initialize_targets): Instantiate the_dummy_target and
4237 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
4239 (target_auxv_search, fprint_target_auxv): Adjust.
4240 (info_auxv_command): Adjust to use target_stack.
4241 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
4242 * exceptions.c (print_flush): Handle a NULL target_stack.
4243 * regcache.c (target_ops_no_register): Refactor as class with
4246 * exec.c (exec_target): New class.
4247 (exec_ops): Now an exec_target.
4248 (exec_open, exec_close_1, exec_get_section_table)
4249 (exec_xfer_partial, exec_files_info, exec_has_memory)
4250 (exec_make_note_section): Refactor as exec_target methods.
4251 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
4253 (exec_target::find_memory_regions): New.
4254 (_initialize_exec): Don't call init_exec_ops.
4255 * gdbcore.h (exec_file_clear): Delete.
4257 * corefile.c (core_target): Delete.
4258 (core_file_command): Adjust.
4259 * corelow.c (core_target): New class.
4260 (the_core_target): New.
4261 (core_close): Remove target_ops parameter.
4262 (core_close_cleanup): Adjust.
4263 (core_target::close): New.
4264 (core_open, core_detach, get_core_registers, core_files_info)
4265 (core_xfer_partial, core_thread_alive, core_read_description)
4266 (core_pid_to_str, core_thread_name, core_has_memory)
4267 (core_has_stack, core_has_registers, core_info_proc): Rework as
4268 core_target methods.
4269 (ignore, core_remove_breakpoint, init_core_ops): Delete.
4270 (_initialize_corelow): Initialize the_core_target.
4271 * gdbcore.h (core_target): Delete.
4272 (the_core_target): New.
4274 * ctf.c: (ctf_target): New class.
4275 (ctf_ops): Now a ctf_target.
4276 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
4277 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
4278 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
4280 (init_ctf_ops): Delete.
4281 (_initialize_ctf): Don't call it.
4282 * tracefile-tfile.c (tfile_target): New class.
4283 (tfile_ops): Now a tfile_target.
4284 (tfile_open, tfile_close, tfile_files_info)
4285 (tfile_get_tracepoint_status, tfile_trace_find)
4286 (tfile_fetch_registers, tfile_xfer_partial)
4287 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
4288 Refactor as tfile_target methods.
4289 (tfile_xfer_partial_features): Remove target_ops parameter.
4290 (init_tfile_ops): Delete.
4291 (_initialize_tracefile_tfile): Don't call it.
4292 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
4293 (tracefile_has_stack, tracefile_has_registers)
4294 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
4295 tracefile_target methods.
4296 (init_tracefile_ops): Delete.
4297 (tracefile_target::tracefile_target): New.
4298 * tracefile.h: Include "target.h".
4299 (tracefile_target): New class.
4300 (init_tracefile_ops): Delete.
4302 * spu-multiarch.c (spu_multiarch_target): New class.
4303 (spu_ops): Now a spu_multiarch_target.
4304 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
4305 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
4306 (spu_search_memory, spu_mourn_inferior): Refactor as
4307 spu_multiarch_target methods.
4308 (init_spu_ops): Delete.
4309 (_initialize_spu_multiarch): Remove references to init_spu_ops,
4310 complete_target_initialization.
4312 * ravenscar-thread.c (ravenscar_thread_target): New class.
4313 (ravenscar_ops): Now a ravenscar_thread_target.
4314 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
4315 (ravenscar_thread_alive, ravenscar_pid_to_str)
4316 (ravenscar_fetch_registers, ravenscar_store_registers)
4317 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
4318 (ravenscar_stopped_by_hw_breakpoint)
4319 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
4320 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
4321 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
4323 (init_ravenscar_thread_ops): Delete.
4324 (_initialize_ravenscar): Remove references to
4325 init_ravenscar_thread_ops and complete_target_initialization.
4327 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
4328 (bsd_uthread_target): New class.
4329 (bsd_uthread_ops): Now a bsd_uthread_target.
4330 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
4331 (bsd_uthread_close, bsd_uthread_mourn_inferior)
4332 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
4333 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
4334 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
4335 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
4336 (bsd_uthread_target): Delete function.
4337 (_initialize_bsd_uthread): Remove reference to
4338 complete_target_initialization.
4340 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
4341 (target_bfd): ... this new class.
4342 (target_bfd_xfer_partial, target_bfd_get_section_table)
4343 (target_bfd_close): Refactor as target_bfd methods.
4344 (target_bfd::~target_bfd): New.
4345 (target_bfd_reopen): Adjust.
4346 (target_bfd::close): New.
4348 * record-btrace.c (record_btrace_target): New class.
4349 (record_btrace_ops): Now a record_btrace_target.
4350 (record_btrace_open, record_btrace_stop_recording)
4351 (record_btrace_disconnect, record_btrace_close)
4352 (record_btrace_async, record_btrace_info)
4353 (record_btrace_insn_history, record_btrace_insn_history_range)
4354 (record_btrace_insn_history_from, record_btrace_call_history)
4355 (record_btrace_call_history_range)
4356 (record_btrace_call_history_from, record_btrace_record_method)
4357 (record_btrace_is_replaying, record_btrace_will_replay)
4358 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
4359 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
4360 (record_btrace_store_registers, record_btrace_prepare_to_store)
4361 (record_btrace_to_get_unwinder)
4362 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
4363 (record_btrace_commit_resume, record_btrace_wait)
4364 (record_btrace_stop, record_btrace_can_execute_reverse)
4365 (record_btrace_stopped_by_sw_breakpoint)
4366 (record_btrace_supports_stopped_by_sw_breakpoint)
4367 (record_btrace_stopped_by_hw_breakpoint)
4368 (record_btrace_supports_stopped_by_hw_breakpoint)
4369 (record_btrace_update_thread_list, record_btrace_thread_alive)
4370 (record_btrace_goto_begin, record_btrace_goto_end)
4371 (record_btrace_goto, record_btrace_stop_replaying_all)
4372 (record_btrace_execution_direction)
4373 (record_btrace_prepare_to_generate_core)
4374 (record_btrace_done_generating_core): Refactor as
4375 record_btrace_target methods.
4376 (init_record_btrace_ops): Delete.
4377 (_initialize_record_btrace): Remove reference to
4378 init_record_btrace_ops.
4379 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
4380 the execution_direction global.
4381 (record_full_base_target, record_full_target)
4382 (record_full_core_target): New classes.
4383 (record_full_ops): Now a record_full_target.
4384 (record_full_core_ops): Now a record_full_core_target.
4385 (record_full_target::detach, record_full_target::disconnect)
4386 (record_full_core_target::disconnect)
4387 (record_full_target::mourn_inferior, record_full_target::kill):
4389 (record_full_open, record_full_close, record_full_async): Refactor
4390 as methods of the record_full_base_target class.
4391 (record_full_resume, record_full_commit_resume): Refactor
4392 as methods of the record_full_target class.
4393 (record_full_wait, record_full_stopped_by_watchpoint)
4394 (record_full_stopped_data_address)
4395 (record_full_stopped_by_sw_breakpoint)
4396 (record_full_supports_stopped_by_sw_breakpoint)
4397 (record_full_stopped_by_hw_breakpoint)
4398 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
4399 methods of the record_full_base_target class.
4400 (record_full_store_registers, record_full_xfer_partial)
4401 (record_full_insert_breakpoint, record_full_remove_breakpoint):
4402 Refactor as methods of the record_full_target class.
4403 (record_full_can_execute_reverse, record_full_get_bookmark)
4404 (record_full_goto_bookmark, record_full_execution_direction)
4405 (record_full_record_method, record_full_info, record_full_delete)
4406 (record_full_is_replaying, record_full_will_replay)
4407 (record_full_goto_begin, record_full_goto_end, record_full_goto)
4408 (record_full_stop_replaying): Refactor as methods of the
4409 record_full_base_target class.
4410 (record_full_core_resume, record_full_core_kill)
4411 (record_full_core_fetch_registers)
4412 (record_full_core_prepare_to_store)
4413 (record_full_core_store_registers, record_full_core_xfer_partial)
4414 (record_full_core_insert_breakpoint)
4415 (record_full_core_remove_breakpoint)
4416 (record_full_core_has_execution): Refactor
4417 as methods of the record_full_core_target class.
4418 (record_full_base_target::supports_delete_record): New.
4419 (init_record_full_ops): Delete.
4420 (init_record_full_core_ops): Delete.
4421 (record_full_save): Refactor as method of the
4422 record_full_base_target class.
4423 (_initialize_record_full): Remove references to
4424 init_record_full_ops and init_record_full_core_ops.
4426 * remote.c (remote_target, extended_remote_target): New classes.
4427 (remote_ops): Now a remote_target.
4428 (extended_remote_ops): Now an extended_remote_target.
4429 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
4430 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
4431 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
4432 (remote_pass_signals, remote_set_syscall_catchpoint)
4433 (remote_program_signals, )
4434 (remote_thread_always_alive): Remove target_ops parameter.
4435 (remote_thread_alive, remote_thread_name)
4436 (remote_update_thread_list, remote_threads_extra_info)
4437 (remote_static_tracepoint_marker_at)
4438 (remote_static_tracepoint_markers_by_strid)
4439 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
4440 (remote_open): Refactor as methods of remote_target.
4441 (extended_remote_open, extended_remote_detach)
4442 (extended_remote_attach, extended_remote_post_attach):
4443 (extended_remote_supports_disable_randomization)
4444 (extended_remote_create_inferior): : Refactor as method of
4445 extended_remote_target.
4446 (remote_set_permissions, remote_open_1, remote_detach)
4447 (remote_follow_fork, remote_follow_exec, remote_disconnect)
4448 (remote_resume, remote_commit_resume, remote_stop)
4449 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
4450 (remote_terminal_ours, remote_wait, remote_fetch_registers)
4451 (remote_prepare_to_store, remote_store_registers)
4452 (remote_flash_erase, remote_flash_done, remote_files_info)
4453 (remote_kill, remote_mourn, remote_insert_breakpoint)
4454 (remote_remove_breakpoint, remote_insert_watchpoint)
4455 (remote_watchpoint_addr_within_range)
4456 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
4457 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
4458 (remote_supports_stopped_by_sw_breakpoint)
4459 (remote_stopped_by_hw_breakpoint)
4460 (remote_supports_stopped_by_hw_breakpoint)
4461 (remote_stopped_by_watchpoint, remote_stopped_data_address)
4462 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
4463 (remote_verify_memory): Refactor as methods of remote_target.
4464 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
4466 (remote_xfer_partial, remote_get_memory_xfer_limit)
4467 (remote_search_memory, remote_rcmd, remote_memory_map)
4468 (remote_pid_to_str, remote_get_thread_local_address)
4469 (remote_get_tib_address, remote_read_description): Refactor as
4470 methods of remote_target.
4471 (remote_target::fileio_open, remote_target::fileio_pwrite)
4472 (remote_target::fileio_pread, remote_target::fileio_close): New.
4473 (remote_hostio_readlink, remote_hostio_fstat)
4474 (remote_filesystem_is_local, remote_can_execute_reverse)
4475 (remote_supports_non_stop, remote_supports_disable_randomization)
4476 (remote_supports_multi_process, remote_supports_cond_breakpoints)
4477 (remote_supports_enable_disable_tracepoint)
4478 (remote_supports_string_tracing)
4479 (remote_can_run_breakpoint_commands, remote_trace_init)
4480 (remote_download_tracepoint, remote_can_download_tracepoint)
4481 (remote_download_trace_state_variable, remote_enable_tracepoint)
4482 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
4483 (remote_trace_start, remote_get_trace_status)
4484 (remote_get_tracepoint_status, remote_trace_stop)
4485 (remote_trace_find, remote_get_trace_state_variable_value)
4486 (remote_save_trace_data, remote_get_raw_trace_data)
4487 (remote_set_disconnected_tracing, remote_core_of_thread)
4488 (remote_set_circular_trace_buffer, remote_traceframe_info)
4489 (remote_get_min_fast_tracepoint_insn_len)
4490 (remote_set_trace_buffer_size, remote_set_trace_notes)
4491 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
4492 (remote_disable_btrace, remote_teardown_btrace)
4493 (remote_read_btrace, remote_btrace_conf)
4494 (remote_augmented_libraries_svr4_read, remote_load)
4495 (remote_pid_to_exec_file, remote_can_do_single_step)
4496 (remote_execution_direction, remote_thread_handle_to_thread_info):
4497 Refactor as methods of remote_target.
4498 (init_remote_ops, init_extended_remote_ops): Delete.
4499 (remote_can_async_p, remote_is_async_p, remote_async)
4500 (remote_thread_events, remote_upload_tracepoints)
4501 (remote_upload_trace_state_variables): Refactor as methods of
4503 (_initialize_remote): Remove references to init_remote_ops and
4504 init_extended_remote_ops.
4506 * remote-sim.c (gdbsim_target): New class.
4507 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
4508 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
4509 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
4510 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
4511 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
4512 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
4513 Refactor as methods of gdbsim_target.
4514 (gdbsim_ops): Now a gdbsim_target.
4515 (init_gdbsim_ops): Delete.
4516 (gdbsim_cntrl_c): Adjust.
4517 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
4519 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
4520 (the_amd64_linux_nat_target): New.
4521 (amd64_linux_fetch_inferior_registers)
4522 (amd64_linux_store_inferior_registers): Refactor as methods of
4523 amd64_linux_nat_target.
4524 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
4525 * i386-linux-nat.c: Don't include "linux-nat.h".
4526 (i386_linux_nat_target): New class.
4527 (the_i386_linux_nat_target): New.
4528 (i386_linux_fetch_inferior_registers)
4529 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
4530 as methods of i386_linux_nat_target.
4531 (_initialize_i386_linux_nat): Adjust. Set linux_target.
4532 * inf-child.c (inf_child_ops): Delete.
4533 (inf_child_fetch_inferior_registers)
4534 (inf_child_store_inferior_registers): Delete.
4535 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
4536 methods of inf_child_target.
4537 (inf_child_target::supports_terminal_ours)
4538 (inf_child_target::terminal_init)
4539 (inf_child_target::terminal_inferior)
4540 (inf_child_target::terminal_ours_for_output)
4541 (inf_child_target::terminal_ours, inf_child_target::interrupt)
4542 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
4544 (inf_child_open, inf_child_disconnect, inf_child_close)
4545 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
4546 (inf_child_post_startup_inferior, inf_child_can_run)
4547 (inf_child_pid_to_exec_file): Refactor as methods of
4549 (inf_child_follow_fork): Delete.
4550 (inf_child_target::can_create_inferior)
4551 (inf_child_target::can_attach): New.
4552 (inf_child_target::has_all_memory, inf_child_target::has_memory)
4553 (inf_child_target::has_stack, inf_child_target::has_registers)
4554 (inf_child_target::has_execution): New.
4555 (inf_child_fileio_open, inf_child_fileio_pwrite)
4556 (inf_child_fileio_pread, inf_child_fileio_fstat)
4557 (inf_child_fileio_close, inf_child_fileio_unlink)
4558 (inf_child_fileio_readlink, inf_child_use_agent)
4559 (inf_child_can_use_agent): Refactor as methods of
4561 (return_zero, inf_child_target): Delete.
4562 (inf_child_target::inf_child_target): New.
4563 * inf-child.h: Include "target.h".
4564 (inf_child_target): Delete function prototype.
4565 (inf_child_target): New class.
4566 (inf_child_open_target, inf_child_mourn_inferior)
4567 (inf_child_maybe_unpush_target): Delete.
4568 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
4569 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
4570 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
4571 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
4572 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
4573 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
4574 (inf_ptrace_wait, inf_ptrace_xfer_partial)
4575 (inf_ptrace_thread_alive, inf_ptrace_files_info)
4576 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
4577 methods of inf_ptrace_target.
4578 (inf_ptrace_target): Delete function.
4579 * inf-ptrace.h: Include "inf-child.h".
4580 (inf_ptrace_target): Delete function declaration.
4581 (inf_ptrace_target): New class.
4582 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
4583 * linux-nat.c (linux_target): New.
4584 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
4585 (linux_nat_target::~linux_nat_target): New.
4586 (linux_child_post_attach, linux_child_post_startup_inferior)
4587 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
4588 (linux_child_remove_fork_catchpoint)
4589 (linux_child_insert_vfork_catchpoint)
4590 (linux_child_remove_vfork_catchpoint)
4591 (linux_child_insert_exec_catchpoint)
4592 (linux_child_remove_exec_catchpoint)
4593 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
4594 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
4595 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
4596 (linux_nat_stopped_data_address)
4597 (linux_nat_stopped_by_sw_breakpoint)
4598 (linux_nat_supports_stopped_by_sw_breakpoint)
4599 (linux_nat_stopped_by_hw_breakpoint)
4600 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
4601 (linux_nat_kill, linux_nat_mourn_inferior)
4602 (linux_nat_xfer_partial, linux_nat_thread_alive)
4603 (linux_nat_update_thread_list, linux_nat_pid_to_str)
4604 (linux_nat_thread_name, linux_child_pid_to_exec_file)
4605 (linux_child_static_tracepoint_markers_by_strid)
4606 (linux_nat_is_async_p, linux_nat_can_async_p)
4607 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
4608 (linux_nat_supports_multi_process)
4609 (linux_nat_supports_disable_randomization, linux_nat_async)
4610 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
4611 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
4612 (linux_nat_fileio_open, linux_nat_fileio_readlink)
4613 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
4614 methods of linux_nat_target.
4615 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
4616 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
4618 (check_stopped_by_watchpoint): Adjust.
4619 (linux_xfer_partial): Delete.
4620 (linux_target_install_ops, linux_target, linux_nat_add_target):
4622 (linux_nat_target::linux_nat_target): New.
4623 * linux-nat.h: Include "inf-ptrace.h".
4624 (linux_nat_target): New.
4625 (linux_target, linux_target_install_ops, linux_nat_add_target):
4626 Delete function declarations.
4627 (linux_target): Declare global.
4628 * linux-thread-db.c (thread_db_target): New.
4629 (thread_db_target::thread_db_target): New.
4630 (thread_db_ops): Delete.
4631 (the_thread_db_target): New.
4632 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
4633 (thread_db_update_thread_list, thread_db_pid_to_str)
4634 (thread_db_extra_thread_info)
4635 (thread_db_thread_handle_to_thread_info)
4636 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
4637 (thread_db_resume): Refactor as methods of thread_db_target.
4638 (init_thread_db_ops): Delete.
4639 (_initialize_thread_db): Remove reference to init_thread_db_ops.
4640 * x86-linux-nat.c: Don't include "linux-nat.h".
4641 (super_post_startup_inferior): Delete.
4642 (x86_linux_nat_target::~x86_linux_nat_target): New.
4643 (x86_linux_child_post_startup_inferior)
4644 (x86_linux_read_description, x86_linux_enable_btrace)
4645 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
4646 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
4647 methods of x86_linux_nat_target.
4648 (x86_linux_create_target): Delete. Bits folded ...
4649 (x86_linux_add_target): ... here. Now takes a linux_nat_target
4651 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
4652 (x86_linux_nat_target): New class.
4653 (x86_linux_create_target): Delete.
4654 (x86_linux_add_target): Now takes a linux_nat_target pointer.
4655 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
4656 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
4657 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
4658 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
4659 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
4661 (x86_use_watchpoints): Delete.
4662 * x86-nat.h: Include "breakpoint.h" and "target.h".
4663 (x86_use_watchpoints): Delete.
4664 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
4665 (x86_stopped_by_watchpoint, x86_stopped_data_address)
4666 (x86_insert_watchpoint, x86_remove_watchpoint)
4667 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
4668 (x86_stopped_by_hw_breakpoint): New declarations.
4669 (x86_nat_target): New template class.
4671 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
4672 (the_ppc_linux_nat_target): New.
4673 (ppc_linux_fetch_inferior_registers)
4674 (ppc_linux_can_use_hw_breakpoint)
4675 (ppc_linux_region_ok_for_hw_watchpoint)
4676 (ppc_linux_ranged_break_num_registers)
4677 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
4678 (ppc_linux_insert_mask_watchpoint)
4679 (ppc_linux_remove_mask_watchpoint)
4680 (ppc_linux_can_accel_watchpoint_condition)
4681 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
4682 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
4683 (ppc_linux_watchpoint_addr_within_range)
4684 (ppc_linux_masked_watch_num_registers)
4685 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
4686 (ppc_linux_read_description): Refactor as methods of
4687 ppc_linux_nat_target.
4688 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
4690 * procfs.c (procfs_xfer_partial): Delete forward declaration.
4691 (procfs_target): New class.
4692 (the_procfs_target): New.
4693 (procfs_target): Delete function.
4694 (procfs_auxv_parse, procfs_attach, procfs_detach)
4695 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
4696 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
4697 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
4698 (procfs_create_inferior, procfs_update_thread_list)
4699 (procfs_thread_alive, procfs_pid_to_str)
4700 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
4701 (procfs_stopped_data_address, procfs_insert_watchpoint)
4702 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
4703 (proc_find_memory_regions, procfs_info_proc)
4704 (procfs_make_note_section): Refactor as methods of procfs_target.
4705 (_initialize_procfs): Adjust.
4706 * sol-thread.c (sol_thread_target): New class.
4707 (sol_thread_ops): Now a sol_thread_target.
4708 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
4709 (sol_thread_fetch_registers, sol_thread_store_registers)
4710 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
4711 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
4712 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
4713 (init_sol_thread_ops): Delete.
4714 (_initialize_sol_thread): Adjust. Remove references to
4715 init_sol_thread_ops and complete_target_initialization.
4717 * windows-nat.c (windows_nat_target): New class.
4718 (windows_fetch_inferior_registers)
4719 (windows_store_inferior_registers, windows_resume, windows_wait)
4720 (windows_attach, windows_detach, windows_pid_to_exec_file)
4721 (windows_files_info, windows_create_inferior)
4722 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
4723 (windows_close, windows_pid_to_str, windows_xfer_partial)
4724 (windows_get_tib_address, windows_get_ada_task_ptid)
4725 (windows_thread_name, windows_thread_alive): Refactor as
4726 windows_nat_target methods.
4727 (do_initial_windows_stuff): Adjust.
4728 (windows_target): Delete function.
4729 (_initialize_windows_nat): Adjust.
4731 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
4732 (darwin_mourn_inferior, darwin_kill_inferior)
4733 (darwin_create_inferior, darwin_attach, darwin_detach)
4734 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
4735 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
4736 (darwin_supports_multi_process): Refactor as darwin_nat_target
4738 (darwin_resume_to, darwin_files_info): Delete.
4739 (_initialize_darwin_inferior): Rename to ...
4740 (_initialize_darwin_nat): ... this. Adjust to C++ification.
4741 * darwin-nat.h: Include "inf-child.h".
4742 (darwin_nat_target): New class.
4743 (darwin_complete_target): Delete.
4744 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
4745 (darwin_target): New.
4746 (i386_darwin_fetch_inferior_registers)
4747 (i386_darwin_store_inferior_registers): Refactor as methods of
4749 (darwin_complete_target): Delete, with ...
4750 (_initialize_i386_darwin_nat): ... bits factored out here.
4752 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
4753 (the_alpha_linux_nat_target): New.
4754 (alpha_linux_register_u_offset): Refactor as
4755 alpha_linux_nat_target method.
4756 (_initialize_alpha_linux_nat): Adjust.
4757 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
4758 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
4759 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
4760 methods of linux_nat_trad_target.
4761 (linux_trad_target): Delete.
4762 * linux-nat-trad.h (linux_trad_target): Delete function.
4763 (linux_nat_trad_target): New class.
4764 * mips-linux-nat.c (mips_linux_nat_target): New class.
4765 (super_fetch_registers, super_store_registers, super_close):
4767 (the_mips_linux_nat_target): New.
4768 (mips64_linux_regsets_fetch_registers)
4769 (mips64_linux_regsets_store_registers)
4770 (mips64_linux_fetch_registers, mips64_linux_store_registers)
4771 (mips_linux_register_u_offset, mips_linux_read_description)
4772 (mips_linux_can_use_hw_breakpoint)
4773 (mips_linux_stopped_by_watchpoint)
4774 (mips_linux_stopped_data_address)
4775 (mips_linux_region_ok_for_hw_watchpoint)
4776 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
4777 (mips_linux_close): Refactor as methods of mips_linux_nat.
4778 (_initialize_mips_linux_nat): Adjust to C++ification.
4780 * aix-thread.c (aix_thread_target): New class.
4781 (aix_thread_ops): Now an aix_thread_target.
4782 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
4783 (aix_thread_fetch_registers, aix_thread_store_registers)
4784 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
4785 (aix_thread_thread_alive, aix_thread_pid_to_str)
4786 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
4787 Refactor as methods of aix_thread_target.
4788 (init_aix_thread_ops): Delete.
4789 (_initialize_aix_thread): Remove references to init_aix_thread_ops
4790 and complete_target_initialization.
4791 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
4792 (rs6000_nat_target): New class.
4793 (the_rs6000_nat_target): New.
4794 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
4795 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
4796 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
4797 (super_create_inferior): Delete.
4798 (_initialize_rs6000_nat): Adjust to C++ification.
4800 * arm-linux-nat.c (arm_linux_nat_target): New class.
4801 (the_arm_linux_nat_target): New.
4802 (arm_linux_fetch_inferior_registers)
4803 (arm_linux_store_inferior_registers, arm_linux_read_description)
4804 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
4805 (arm_linux_remove_hw_breakpoint)
4806 (arm_linux_region_ok_for_hw_watchpoint)
4807 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
4808 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
4809 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
4810 arm_linux_nat_target.
4811 (_initialize_arm_linux_nat): Adjust to C++ification.
4813 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
4814 (the_aarch64_linux_nat_target): New.
4815 (aarch64_linux_fetch_inferior_registers)
4816 (aarch64_linux_store_inferior_registers)
4817 (aarch64_linux_child_post_startup_inferior)
4818 (aarch64_linux_read_description)
4819 (aarch64_linux_can_use_hw_breakpoint)
4820 (aarch64_linux_insert_hw_breakpoint)
4821 (aarch64_linux_remove_hw_breakpoint)
4822 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
4823 (aarch64_linux_region_ok_for_hw_watchpoint)
4824 (aarch64_linux_stopped_data_address)
4825 (aarch64_linux_stopped_by_watchpoint)
4826 (aarch64_linux_watchpoint_addr_within_range)
4827 (aarch64_linux_can_do_single_step): Refactor as methods of
4828 aarch64_linux_nat_target.
4829 (super_post_startup_inferior): Delete.
4830 (_initialize_aarch64_linux_nat): Adjust to C++ification.
4832 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
4833 (the_hppa_linux_nat_target): New.
4834 (hppa_linux_fetch_inferior_registers)
4835 (hppa_linux_store_inferior_registers): Refactor as methods of
4836 hppa_linux_nat_target.
4837 (_initialize_hppa_linux_nat): Adjust to C++ification.
4839 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
4840 (the_ia64_linux_nat_target): New.
4841 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
4842 (ia64_linux_stopped_data_address)
4843 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
4844 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
4845 ia64_linux_nat_target methods.
4846 (super_xfer_partial): Delete.
4847 (_initialize_ia64_linux_nat): Adjust to C++ification.
4849 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
4850 (the_m32r_linux_nat_target): New.
4851 (m32r_linux_fetch_inferior_registers)
4852 (m32r_linux_store_inferior_registers): Refactor as
4853 m32r_linux_nat_target methods.
4854 (_initialize_m32r_linux_nat): Adjust to C++ification.
4856 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
4857 (the_m68k_linux_nat_target): New.
4858 (m68k_linux_fetch_inferior_registers)
4859 (m68k_linux_store_inferior_registers): Refactor as
4860 m68k_linux_nat_target methods.
4861 (_initialize_m68k_linux_nat): Adjust to C++ification.
4863 * s390-linux-nat.c (s390_linux_nat_target): New class.
4864 (the_s390_linux_nat_target): New.
4865 (s390_linux_fetch_inferior_registers)
4866 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
4867 (s390_insert_watchpoint, s390_remove_watchpoint)
4868 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
4869 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
4870 (s390_auxv_parse, s390_read_description): Refactor as methods of
4871 s390_linux_nat_target.
4872 (_initialize_s390_nat): Adjust to C++ification.
4874 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
4875 (the_sparc_linux_nat_target): New.
4876 (_initialize_sparc_linux_nat): Adjust to C++ification.
4877 * sparc-nat.c (sparc_fetch_inferior_registers)
4878 (sparc_store_inferior_registers): Remove target_ops parameter.
4879 * sparc-nat.h (sparc_fetch_inferior_registers)
4880 (sparc_store_inferior_registers): Remove target_ops parameter.
4881 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
4882 (the_sparc64_linux_nat_target): New.
4883 (_initialize_sparc64_linux_nat): Adjust to C++ification.
4885 * spu-linux-nat.c (spu_linux_nat_target): New class.
4886 (the_spu_linux_nat_target): New.
4887 (spu_child_post_startup_inferior, spu_child_post_attach)
4888 (spu_child_wait, spu_fetch_inferior_registers)
4889 (spu_store_inferior_registers, spu_xfer_partial)
4890 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
4892 (_initialize_spu_nat): Adjust to C++ification.
4894 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
4895 (the_tilegx_linux_nat_target): New.
4896 (fetch_inferior_registers, store_inferior_registers):
4897 Refactor as methods.
4898 (_initialize_tile_linux_nat): Adjust to C++ification.
4900 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
4901 (the_xtensa_linux_nat_target): New.
4902 (xtensa_linux_fetch_inferior_registers)
4903 (xtensa_linux_store_inferior_registers): Refactor as
4904 xtensa_linux_nat_target methods.
4905 (_initialize_xtensa_linux_nat): Adjust to C++ification.
4907 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
4908 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
4909 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
4910 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
4911 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
4912 (fbsd_stopped_by_sw_breakpoint)
4913 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
4914 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
4915 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
4916 (fbsd_post_startup_inferior, fbsd_post_attach)
4917 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
4918 (fbsd_set_syscall_catchpoint)
4919 (super_xfer_partial, super_resume, super_wait)
4920 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
4921 (fbsd_handle_debug_trap): Remove target_ops parameter.
4922 (fbsd_nat_add_target): Delete.
4923 * fbsd-nat.h: Include "inf-ptrace.h".
4924 (fbsd_nat_add_target): Delete.
4925 (USE_SIGTRAP_SIGINFO): Define.
4926 (fbsd_nat_target): New class.
4928 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
4929 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
4930 (amd64bsd_target): Delete.
4931 * amd64-bsd-nat.h: New file.
4932 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
4934 (amd64_fbsd_nat_target): New class.
4935 (the_amd64_fbsd_nat_target): New.
4936 (amd64fbsd_read_description): Refactor as method of
4937 amd64_fbsd_nat_target.
4938 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
4939 (_initialize_amd64fbsd_nat): Adjust to C++ification.
4940 * amd64-nat.h (amd64bsd_target): Delete function declaration.
4941 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
4942 (i386bsd_store_inferior_registers): Remove target_ops parameter.
4943 (i386bsd_target): Delete.
4944 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
4945 (i386bsd_fetch_inferior_registers)
4946 (i386bsd_store_inferior_registers): Declare.
4947 (i386_bsd_nat_target): New class.
4948 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
4949 (the_i386_fbsd_nat_target): New.
4950 (i386fbsd_resume, i386fbsd_read_description): Refactor as
4951 i386_fbsd_nat_target methods.
4952 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
4953 (_initialize_i386fbsd_nat): Adjust to C++ification.
4954 * x86-bsd-nat.c (super_mourn_inferior): Delete.
4955 (x86bsd_mourn_inferior, x86bsd_target): Delete.
4956 (_initialize_x86_bsd_nat): Adjust to C++ification.
4957 * x86-bsd-nat.h: Include "x86-nat.h".
4958 (x86bsd_target): Delete declaration.
4959 (x86bsd_nat_target): New class.
4961 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
4962 (the_aarch64_fbsd_nat_target): New.
4963 (aarch64_fbsd_fetch_inferior_registers)
4964 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
4965 aarch64_fbsd_nat_target.
4966 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
4967 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
4968 (the_alpha_bsd_nat_target): New.
4969 (alphabsd_fetch_inferior_registers)
4970 (alphabsd_store_inferior_registers): Refactor as
4971 alpha_bsd_nat_target methods.
4972 (_initialize_alphabsd_nat): Refactor as methods of
4973 alpha_bsd_nat_target.
4974 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
4975 (the_amd64_nbsd_nat_target): New.
4976 (_initialize_amd64nbsd_nat): Adjust to C++ification.
4977 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
4978 (the_amd64_obsd_nat_target): New.
4979 (_initialize_amd64obsd_nat): Adjust to C++ification.
4980 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
4981 (the_arm_fbsd_nat_target): New.
4982 (arm_fbsd_fetch_inferior_registers)
4983 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
4984 (_initialize_arm_fbsd_nat): Refactor as methods of
4985 arm_fbsd_nat_target.
4986 (_initialize_arm_fbsd_nat): Adjust to C++ification.
4987 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
4988 (the_arm_netbsd_nat_target): New.
4989 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
4990 arm_netbsd_nat_target.
4991 (_initialize_arm_netbsd_nat): Adjust to C++ification.
4992 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
4993 (the_hppa_nbsd_nat_target): New.
4994 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
4995 hppa_nbsd_nat_target methods.
4996 (_initialize_hppanbsd_nat): Adjust to C++ification.
4997 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
4998 (the_hppa_obsd_nat_target): New.
4999 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
5000 methods of hppa_obsd_nat_target.
5001 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
5003 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
5004 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
5006 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
5007 (_initialize_i386obsd_nat): Use add_target.
5008 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
5009 (the_m68k_bsd_nat_target): New.
5010 (m68kbsd_fetch_inferior_registers)
5011 (m68kbsd_store_inferior_registers): Refactor as methods of
5012 m68k_bsd_nat_target.
5013 (_initialize_m68kbsd_nat): Adjust to C++ification.
5014 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
5015 (the_mips_fbsd_nat_target): New.
5016 (mips_fbsd_fetch_inferior_registers)
5017 (mips_fbsd_store_inferior_registers): Refactor as methods of
5018 mips_fbsd_nat_target.
5019 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
5021 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
5022 (the_mips_nbsd_nat_target): New.
5023 (mipsnbsd_fetch_inferior_registers)
5024 (mipsnbsd_store_inferior_registers): Refactor as methods of
5025 mips_nbsd_nat_target.
5026 (_initialize_mipsnbsd_nat): Adjust to C++ification.
5027 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
5028 (the_mips64_obsd_nat_target): New.
5029 (mips64obsd_fetch_inferior_registers)
5030 (mips64obsd_store_inferior_registers): Refactor as methods of
5031 mips64_obsd_nat_target.
5032 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
5034 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
5036 * nbsd-nat.h: Include "inf-ptrace.h".
5037 (nbsd_nat_target): New class.
5038 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
5039 (obsd_wait): Refactor as methods of obsd_nat_target.
5040 (obsd_add_target): Delete.
5041 * obsd-nat.h: Include "inf-ptrace.h".
5042 (obsd_nat_target): New class.
5043 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
5044 (the_ppc_fbsd_nat_target): New.
5045 (ppcfbsd_fetch_inferior_registers)
5046 (ppcfbsd_store_inferior_registers): Refactor as methods of
5047 ppc_fbsd_nat_target.
5048 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
5050 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
5051 (the_ppc_nbsd_nat_target): New.
5052 (ppcnbsd_fetch_inferior_registers)
5053 (ppcnbsd_store_inferior_registers): Refactor as methods of
5054 ppc_nbsd_nat_target.
5055 (_initialize_ppcnbsd_nat): Adjust to C++ification.
5056 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
5057 (the_ppc_obsd_nat_target): New.
5058 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
5059 methods of ppc_obsd_nat_target.
5060 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
5062 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
5063 (the_sh_nbsd_nat_target): New.
5064 (shnbsd_fetch_inferior_registers)
5065 (shnbsd_store_inferior_registers): Refactor as methods of
5067 (_initialize_shnbsd_nat): Adjust to C++ification.
5068 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
5069 (inf_ptrace_xfer_partial): Delete.
5070 (sparc_xfer_partial, sparc_target): Delete.
5071 * sparc-nat.h (sparc_fetch_inferior_registers)
5072 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
5073 (sparc_target): Delete function declaration.
5074 (sparc_target): New template class.
5075 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
5076 (_initialize_sparcnbsd_nat): Adjust to C++ification.
5077 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
5078 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
5080 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
5081 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
5082 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
5083 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
5085 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
5086 (the_vax_bsd_nat_target): New.
5087 (vaxbsd_fetch_inferior_registers)
5088 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
5090 (_initialize_vaxbsd_nat): Adjust to C++ification.
5092 * bsd-kvm.c (bsd_kvm_target): New class.
5093 (bsd_kvm_ops): Now a bsd_kvm_target.
5094 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
5095 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
5096 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
5098 (bsd_kvm_return_one): Delete.
5099 (bsd_kvm_add_target): Adjust to C++ification.
5101 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
5102 (nto_procfs_target_procfs): New classes.
5103 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
5104 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
5105 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
5106 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
5107 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
5108 (procfs_remove_hw_breakpoint, procfs_resume)
5109 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
5110 (procfs_kill_inferior, procfs_store_registers)
5111 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
5112 as methods of nto_procfs_target.
5113 (nto_procfs_ops): Now an nto_procfs_target_procfs.
5114 (nto_native_ops): Delete.
5115 (procfs_open, procfs_native_open): Delete.
5116 (nto_native_ops): Now an nto_procfs_target_native.
5117 (init_procfs_targets): Adjust to C++ification.
5118 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
5119 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
5120 Refactor as methods of nto_procfs_target.
5122 * go32-nat.c (go32_nat_target): New class.
5123 (the_go32_nat_target): New.
5124 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
5125 (go32_store_registers, go32_xfer_partial, go32_files_info)
5126 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
5127 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
5128 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
5129 (go32_pid_to_str): Refactor as methods of go32_nat_target.
5130 (go32_target): Delete.
5131 (_initialize_go32_nat): Adjust to C++ification.
5133 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
5134 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
5135 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
5136 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
5138 (gnu_target): Delete.
5139 * gnu-nat.h (gnu_target): Delete.
5140 (gnu_nat_target): New class.
5141 * i386-gnu-nat.c (gnu_base_target): New.
5142 (i386_gnu_nat_target): New class.
5143 (the_i386_gnu_nat_target): New.
5144 (_initialize_i386gnu_nat): Adjust to C++ification.
5146 2018-05-02 Pedro Alves <palves@redhat.com>
5148 * bfd-target.c (target_bfd_xclose): Rename to ...
5149 (target_bfd_close): ... this.
5150 (target_bfd_reopen): Adjust.
5151 * target.c (target_close): Remove references to to_xclose.
5152 * target.h (target_ops::to_xclose): Delete.
5153 (target_ops::to_close): Update comments.
5155 2018-05-02 Pedro Alves <palves@redhat.com>
5157 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
5159 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
5160 * inf-ptrace.c (inf_ptrace_register_u_offset)
5161 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
5162 (inf_ptrace_store_register, inf_ptrace_store_registers)
5163 (inf_ptrace_trad_target): Move to ...
5164 * linux-nat-trad.c: ... this new file.
5165 * linux-nat-trad.h: New file.
5166 * linux-nat.c (linux_target_install_ops): Make extern.
5167 (linux_trad_target): Delete.
5168 * linux-nat.h (linux_trad_target): Delete declaration.
5169 (linux_target_install_ops): Declare.
5170 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
5173 2018-05-02 Pedro Alves <palves@redhat.com>
5175 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
5176 procfs_target/add_target here.
5177 * procfs.c (procfs_target): Make static.
5178 (_initialize_procfs): Call add_target here.
5179 * procfs.h (struct target_ops): Remove forward declaration.
5180 (procfs_target): Remove declaration.
5181 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
5183 2018-05-02 Pedro Alves <palves@redhat.com>
5185 * procfs.c (procfs_stopped_by_watchpoint)
5186 (procfs_insert_watchpoint, procfs_remove_watchpoint)
5187 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
5189 (procfs_use_watchpoints): Delete, move contents...
5190 (procfs_target): ... here.
5191 * procfs.h (procfs_use_watchpoints): Delete declaration.
5192 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
5193 procfs_use_watchpoints.
5194 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
5195 procfs_use_watchpoints.
5197 2018-05-02 Tom Tromey <tom@tromey.com>
5200 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
5201 and var_zuinteger_unlimited.
5202 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
5203 and PARAM_ZUINTEGER_UNLIMITED.
5204 (set_parameter_value): Handle var_zuinteger and
5205 var_zuinteger_unlimited.
5206 (add_setshow_generic): Likewise.
5207 (parmpy_init): Likewise.
5209 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
5212 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
5213 pointer is not null before dereferencing it.
5215 2018-04-30 Tom Tromey <tom@tromey.com>
5217 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
5220 2018-04-30 Tom Tromey <tom@tromey.com>
5222 * breakpoint.c (mention): Remove use of is_mi_like_p.
5223 (print_mention_ranged_breakpoint): Likewise.
5224 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
5227 2018-04-30 Tom Tromey <tom@tromey.com>
5229 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
5231 2018-04-30 Tom Tromey <tom@tromey.com>
5233 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
5234 (info_spu_event_command): Remove some uses of is_mi_like_p.
5236 2018-04-30 Tom Tromey <tom@tromey.com>
5238 * python/py-framefilter.c (py_print_single_arg)
5239 (enumerate_locals, py_print_args, py_print_frame): Remove some
5240 uses of is_mi_like_p.
5242 2018-04-30 Tom Tromey <tom@tromey.com>
5245 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
5246 * ui-out.h (ui_out::is_mi_like_p): Now const.
5247 (ui_out::do_is_mi_like_p): Now const.
5248 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
5250 2018-04-30 Tom Tromey <tom@tromey.com>
5252 * varobj.c (varobj_set_visualizer): Use new_reference.
5253 * python/python.c (gdbpy_decode_line): Use new_reference.
5254 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
5257 2018-04-30 Tom Tromey <tom@tromey.com>
5259 * varobj.c (install_new_value): Use new_reference.
5260 * value.h (value_incref): Return void. Swap intro comment with
5262 * value.c (set_value_parent): Use new_reference.
5263 (value_incref): Return void. Update intro comment.
5264 (release_value): Use new_reference.
5265 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
5267 2018-04-30 Tom Tromey <tom@tromey.com>
5269 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
5270 * gdb_bfd.h (new_bfd_ref): Remove.
5271 (gdb_bfd_open): Update comment.
5272 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
5273 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
5274 (gdb_bfd_fdopenr): Use new_reference.
5275 * exec.c (exec_file_attach): Use new_reference.
5277 2018-04-30 Tom Tromey <tom@tromey.com>
5279 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
5282 2018-04-30 Tom Tromey <tom@tromey.com>
5284 * jit.c (jit_read_code_entry): Use type_align.
5285 * i386-tdep.c (i386_gdbarch_init): Don't call
5286 set_gdbarch_long_long_align_bit.
5287 * gdbarch.sh: Remove long_long_align_bit.
5288 * gdbarch.c, gdbarch.h: Rebuild.
5289 * arc-tdep.c (arc_type_align): New function.
5290 (arc_gdbarch_init): Use arc_type_align. Don't call
5291 set_gdbarch_long_long_align_bit.
5293 2018-04-30 Tom Tromey <tom@tromey.com>
5295 * rust-lang.c (rust_type_alignment): Remove.
5296 (rust_composite_type): Use type_align.
5298 2018-04-30 Tom Tromey <tom@tromey.com>
5300 * NEWS: Mention Type.align.
5301 * python/py-type.c (typy_get_alignof): New function.
5302 (type_object_getset): Add "alignof".
5304 2018-04-30 Tom Tromey <tom@tromey.com>
5308 * std-operator.def (UNOP_ALIGNOF): New operator.
5309 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
5311 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
5312 * c-lang.c (c_op_print_tab): Add alignof.
5313 * c-exp.y (ALIGNOF): New token.
5314 (exp): Add "ALIGNOF" production.
5315 (ident_tokens): Add _Alignof and alignof.
5317 2018-04-30 Tom Tromey <tom@tromey.com>
5319 * i386-tdep.c (i386_type_align): New function.
5320 (i386_gdbarch_init): Update.
5321 * gdbarch.sh (type_align): New method.
5322 * gdbarch.c, gdbarch.h: Rebuild.
5323 * arch-utils.h (default_type_align): Declare.
5324 * arch-utils.c (default_type_align): New function.
5325 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
5326 (struct type) <align_log2>: New field.
5327 <instance_flags>: Now a bitfield.
5328 (TYPE_RAW_ALIGN): New macro.
5329 (type_align, type_raw_align, set_type_align): Declare.
5330 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
5332 * dwarf2read.c (quirk_rust_enum): Set type alignment.
5333 (get_alignment, maybe_set_alignment): New functions.
5334 (read_structure_type, read_enumeration_type, read_array_type)
5335 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
5336 (read_subrange_type, read_base_type): Set type alignment.
5338 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
5340 * dwarf2read.c (read_index_from_section): Use bool.
5342 2018-04-29 Fabian Groffen <grobian@gentoo.org>
5345 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
5348 2018-04-29 John Reiser <jreiser@BitWagon.com>
5351 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
5352 last step, and do it atomically.
5354 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
5356 * compile/compile-c-types.c (convert_int, convert_float):
5359 2018-04-27 Tom Tromey <tom@tromey.com>
5362 * rust-lang.c (rust_inclusive_range_type_p): New function.
5363 (rust_range): Handle inclusive ranges.
5364 (rust_compute_range): Likewise.
5365 * rust-exp.y (struct rust_op) <inclusive>: New field.
5366 (DOTDOTEQ): New constant.
5367 (range_expr): Add "..=" productions.
5368 (operator_tokens): Add "..=" token.
5369 (ast_range): Add "inclusive" parameter.
5370 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
5372 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
5374 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
5375 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
5377 * expprint.c (print_subexp_standard): Handle new bounds values.
5378 (dump_subexp_body_standard): Likewise.
5380 2018-04-27 Tom Tromey <tom@tromey.com>
5382 * configure: Rebuild.
5383 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
5384 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
5386 (class symbol_needs_eval_context): Likewise.
5387 * dwarf2read.c (mock_mapped_index::symbol_name_count)
5388 (mock_mapped_index::symbol_name_at): Use "override". Remove
5390 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
5392 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
5393 * aarch64-tdep.c (instruction_reader::read): Use "override".
5394 (instruction_reader_test::read): Likewise.
5395 * arm-tdep.c (instruction_reader::read): Use "override".
5396 (instruction_reader_thumb::read): Likewise.
5398 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
5401 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
5402 instead of remote_send.
5403 (remote_send): Remove.
5405 2018-04-26 Pedro Alves <palves@redhat.com>
5407 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
5408 find_function_start_sal instead of find_pc_line.
5410 2018-04-26 Pedro Alves <palves@redhat.com>
5412 * breakpoint.c (set_breakpoint_location_function): Handle
5414 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
5415 * elfread.c (elf_symtab_read): Give data symbols with
5416 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
5417 (elf_rel_plt_read): Update comment.
5418 * linespec.c (convert_linespec_to_sals): Handle
5420 (minsym_found): Handle mst_data_gnu_ifunc.
5421 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
5422 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
5423 * parse.c (find_minsym_type_and_address): Handle
5425 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
5426 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
5427 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
5429 <mst_data_gnu_ifunc>: New enumerator.
5431 2018-04-26 Pedro Alves <palves@redhat.com>
5433 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
5434 (lookup_minimal_symbol_by_pc_section): ... this. Replace
5435 'want_trampoline' parameter by a lookup_msym_prefer parameter.
5437 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
5438 (lookup_minimal_symbol_by_pc): Adjust.
5439 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
5440 (lookup_solib_trampoline_symbol_by_pc): Adjust.
5441 * minsyms.h (lookup_msym_prefer): New enum.
5442 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
5443 parameter by a lookup_msym_prefer parameter.
5445 2018-04-26 Pedro Alves <palves@redhat.com>
5447 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
5448 ends in "@plt" instead of looking at the symbol's section.
5450 2018-04-26 Pedro Alves <palves@redhat.com>
5452 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
5454 (find_pc_partial_function_gnu_ifunc): Rename to ...
5455 (find_pc_partial_function): ... this, and remove references to
5457 (find_pc_partial_function): Delete old implementation.
5458 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
5460 2018-04-26 Pedro Alves <palves@redhat.com>
5462 * linespec.c (struct bound_minimal_symbol_search_key): New.
5463 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
5464 skip first line if we found a GNU ifunc minimal symbol by name.
5465 (compare_msymbols): Change parameters to work with a destructured
5467 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
5470 2018-04-26 Pedro Alves <palves@redhat.com>
5472 * breakpoint.c (set_breakpoint_location_function): Don't resolve
5473 ifunc targets here. Instead, if we have an ifunc minsym, use its
5475 (add_location_to_breakpoint): Store the minsym and the objfile in
5476 the breakpoint location.
5477 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
5478 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
5479 Record the minsym in the sal.
5480 * symtab.h (symtab_and_line) <msymbol>: New field.
5482 2018-04-26 Pedro Alves <palves@redhat.com>
5484 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
5485 unless we actually resolved the ifunc.
5487 2018-04-26 Pedro Alves <palves@redhat.com>
5489 * c-exp.y (variable production): Prefer ifunc minsyms over
5490 regular function symbols.
5491 * symtab.c (find_gnu_ifunc): New function.
5492 * minsyms.h (lookup_msym_prefer): New enum.
5493 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
5494 parameter by a lookup_msym_prefer parameter.
5495 * symtab.h (find_gnu_ifunc): New declaration.
5497 2018-04-26 Pedro Alves <palves@redhat.com>
5499 * blockframe.c (find_gnu_ifunc_target_type): New function.
5500 (find_function_type): New.
5501 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
5502 return a value with a memory address.
5503 (eval_call): For calls to GNU ifunc functions, try to find the
5504 type of the target function from the type that the resolver
5506 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
5508 * infcall.c (find_function_return_type): Delete.
5509 (find_function_addr): Add 'function_type' parameter. For calls to
5510 GNU ifunc functions, try to find the type of the target function
5511 from the type that the resolver returns, and return it via
5513 (call_function_by_hand_dummy): Adjust to use the function type
5514 returned by find_function_addr.
5515 (find_function_addr): Add 'function_type' parameter and move
5517 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
5520 2018-04-26 Pedro Alves <palves@redhat.com>
5522 * c-exp.y (variable production): Skip finding an alias for ifunc
5525 2018-04-26 Pedro Alves <palves@redhat.com>
5527 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
5529 2018-04-25 Pedro Alves <palves@redhat.com>
5531 * infcmd.c (kill_command): Print the pid as string, not the whole
5532 thread's ptid. Add comment. s/has been killed/killed/ in output
5534 * remote.c (remote_detach_1): Print the pid as string, not the
5535 whole thread's ptid.
5537 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
5538 Sergio Durigan Junior <sergiodj@redhat.com>
5539 Pedro Alves <palves@redhat.com>
5541 * infcmd.c (kill_command): Print message when inferior has
5543 * inferior.c (print_inferior_events): Remove 'static'. Set as
5545 (add_inferior): Improve message printed when
5546 'print_inferior_events' is on.
5547 (exit_inferior): Remove message printed when
5548 'print_inferior_events' is on.
5549 (detach_inferior): Improve message printed when
5550 'print_inferior_events' is on.
5551 (initialize_inferiors): Use 'add_inferior_silent' to set
5552 'current_inferior_'.
5553 * inferior.h (print_inferior_events): Declare here as
5555 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
5556 '[Detaching...]' messages when 'print_inferior_events' is on.
5557 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
5558 as prefix/suffix for messages. Remove periods. Fix erroneous
5559 'Detaching after fork from child...', replace it by '... from
5561 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
5562 prefix/suffix when printing 'Detaching...' messages. Print
5563 them when 'print_inferior_events' is on.
5564 * remote.c (remote_detach_1): Print message when detaching
5565 from inferior and '!is_fork_parent'.
5567 2018-04-24 Tom Tromey <tom@tromey.com>
5569 * cli-out.h: Reindent.
5571 2018-04-24 Tom Tromey <tom@tromey.com>
5573 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
5574 (cli_ui_out::do_field_string): Use fputs_filtered.
5575 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
5577 2018-04-23 Tom Tromey <tom@tromey.com>
5579 * guile/scm-frame.c (gdbscm_frame_read_var): Use
5580 gdb::unique_xmalloc_ptr.
5582 2018-04-23 Tom Tromey <tom@tromey.com>
5584 * configure: Rebuild.
5586 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
5589 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
5590 prepare_for_testing. Set normal_bp to r_debug_state if target
5593 2018-04-21 Pedro Alves <palves@redhat.com>
5594 Rajendra SY <rajendra.sy@gmail.com>
5596 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
5597 * remote.c (extended_remote_attach): In all-stop mode, mark the
5598 thread as executing.
5600 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5602 * thread.c (thread_apply_all_command): Fix comment.
5603 (thread_command): Fix comment.
5605 2018-04-10 Alan Hayward <alan.hayward@arm.com>
5607 * common/tdesc.h (tdesc_create_feature): Remove xml filename
5609 * features/aarch64-core.c (create_feature_aarch64_core):
5611 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
5613 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
5615 * features/i386/32bit-avx512.c
5616 (create_feature_i386_32bit_avx512): Likewise.
5617 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
5619 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
5621 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
5623 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
5625 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
5627 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
5629 * features/i386/64bit-avx512.c
5630 (create_feature_i386_64bit_avx512): Likewise.
5631 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
5633 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
5635 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
5637 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
5639 * features/i386/64bit-segments.c
5640 (create_feature_i386_64bit_segments): Likewise.
5641 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
5643 * features/i386/x32-core.c
5644 (create_feature_i386_x32_core): Likewise.
5645 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
5646 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
5647 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
5648 * target-descriptions.c: In generated code, don't pass xml
5651 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5653 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
5654 (print_xml_feature::visit_post): Likewise.
5655 (print_xml_feature::visit): Likewise.
5656 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
5657 (print_xml_feature): Add new class.
5658 * regformats/regdat.sh: Null xmltarget on feature targets.
5659 * target-descriptions.c (struct target_desc): Add xmltarget.
5660 (maintenance_check_tdesc_xml_convert): Add unittest function.
5661 (tdesc_get_features_xml): Add function to get xml.
5662 (maintenance_check_xml_descriptions): Test xml generation.
5663 * xml-tdesc.c (string_read_description_xml): Add function.
5664 * xml-tdesc.h (string_read_description_xml): Add declaration.
5666 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5668 * features/Makefile: Add feature marker to targets with new style
5669 target descriptions.
5670 * regformats/aarch64.dat: Regenerate.
5671 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
5672 * regformats/i386/amd64-avx-linux.dat: Likewise.
5673 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
5674 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
5675 * regformats/i386/amd64-linux.dat: Likewise.
5676 * regformats/i386/amd64-mpx-linux.dat: Likewise.
5677 * regformats/i386/amd64.dat: Likewise.
5678 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
5679 * regformats/i386/i386-avx-linux.dat: Likewise.
5680 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
5681 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
5682 * regformats/i386/i386-linux.dat: Likewise.
5683 * regformats/i386/i386-mmx-linux.dat: Likewise.
5684 * regformats/i386/i386-mpx-linux.dat: Likewise.
5685 * regformats/i386/i386.dat: Likewise.
5686 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
5687 * regformats/i386/x32-avx-linux.dat: Likewise.
5688 * regformats/i386/x32-linux.dat: Likewise.
5689 * regformats/tic6x-c62x-linux.dat: Likewise.
5690 * regformats/tic6x-c64x-linux.dat: Likewise.
5691 * regformats/tic6x-c64xp-linux.dat: Likewise.
5692 * regformats/regdat.sh: Parse feature marker.
5694 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5696 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
5697 (tdesc_osabi_name): Likewise.
5698 * target-descriptions.c (tdesc_architecture_name): Add new
5700 (tdesc_osabi_name): Likewise.
5702 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5704 * common/tdesc.c (tdesc_predefined_type): Move to here.
5705 (tdesc_named_type): Likewise.
5706 (tdesc_create_vector): Likewise.
5707 (tdesc_create_struct): Likewise.
5708 (tdesc_set_struct_size): Likewise.
5709 (tdesc_create_union): Likewise.
5710 (tdesc_create_flags): Likewise.
5711 (tdesc_create_enum): Likewise.
5712 (tdesc_add_field): Likewise.
5713 (tdesc_add_typed_bitfield): Likewise.
5714 (tdesc_add_bitfield): Likewise.
5715 (tdesc_add_flag): Likewise.
5716 (tdesc_add_enum_value): Likewise.
5717 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
5718 (struct tdesc_type_vector): Likewise.
5719 (struct tdesc_type_field): Likewise.
5720 (struct tdesc_type_with_fields): Likewise.
5721 (tdesc_create_enum): Add declaration.
5722 (tdesc_add_typed_bitfield): Likewise.
5723 (tdesc_add_enum_value): Likewise.
5724 * target-descriptions.c (tdesc_type_field): Move from here.
5725 (tdesc_type_builtin): Likewise.
5726 (tdesc_type_vector): Likewise.
5727 (tdesc_type_with_fields): Likewise.
5728 (tdesc_predefined_types): Likewise.
5729 (tdesc_named_type): Likewise.
5730 (tdesc_create_vector): Likewise.
5731 (tdesc_create_struct): Likewise.
5732 (tdesc_set_struct_size): Likewise.
5733 (tdesc_create_union): Likewise.
5734 (tdesc_create_flags): Likewise.
5735 (tdesc_create_enum): Likewise.
5736 (tdesc_add_field): Likewise.
5737 (tdesc_add_typed_bitfield): Likewise.
5738 (tdesc_add_bitfield): Likewise.
5739 (tdesc_add_flag): Likewise.
5740 (tdesc_add_enum_value): Likewise.
5741 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
5742 (tdesc_add_typed_bitfield): Likewise.
5743 (tdesc_add_enum_value): Likewise.
5745 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5747 * common/tdesc.c (tdesc_feature::accept): Move to here.
5748 (tdesc_feature::operator==): Likewise.
5749 (tdesc_create_reg): Likewise.
5750 * common/tdesc.h (tdesc_type_kind): Likewise.
5751 (struct tdesc_type): Likewise.
5752 (struct tdesc_feature): Likewise.
5753 * regformats/regdat.sh: Create a feature.
5754 * target-descriptions.c (tdesc_type_kind): Move from here.
5755 (tdesc_type): Likewise.
5756 (tdesc_type_up): Likewise.
5757 (tdesc_feature): Likewise.
5758 (tdesc_create_reg): Likewise.
5760 2018-04-18 Alan Hayward <alan.hayward@arm.com>
5762 * Makefile.in: Add arch/tdesc.c
5763 * common/tdesc.c: New file.
5764 * common/tdesc.h (tdesc_element_visitor): Move to here.
5765 (tdesc_element): Likewise.
5766 (tdesc_reg): Likewise.
5767 (tdesc_reg_up): Likewise.
5768 * regformats/regdef.h (reg): Add offset to constructors.
5769 * target-descriptions.c (tdesc_element_visitor): Move from here.
5770 (tdesc_element): Likewise.
5771 (tdesc_reg): Likewise.
5772 (tdesc_reg_up): Likewise.
5774 2018-04-17 Tom Tromey <tom@tromey.com>
5776 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
5779 2018-04-17 Tom Tromey <tom@tromey.com>
5781 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
5783 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
5785 * symtab.c (print_symbol_info): Skip printing filename and line
5786 number when `last' is NULL.
5787 (symtab_symbol_info): Use empty string instead of NULL for first
5788 invocation of print_symbol_info.
5789 (rbreak_command): Pass NULL to `last' parameter of
5792 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
5794 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
5797 2018-04-16 Pedro Alves <palves@redhat.com>
5799 * MAINTAINERS (sh): Remove.
5800 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
5801 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
5802 (ALLDEPFILES): Remove sh64-tdep.c.
5803 * NEWS: Mentions that support for SH-5/SH64 is removed.
5804 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
5805 (sh*-*-openbsd*): Ditto.
5806 (sh64-*-elf*): Remove.
5808 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
5809 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
5810 * sh-tdep.c: No longer include "sh64-tdep.h".
5811 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
5812 * sh64-tdep.c, sh64-tdep.h: Remove files.
5814 2018-04-16 Pedro Alves <palves@redhat.com>
5816 * MAINTAINERS: Remove m88k.
5817 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
5818 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
5819 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
5820 * NEWS: Mention that support for m88k was removed.
5821 * configure.host (m88*-*-*): Remove support.
5822 * configure.nat (m88k-*-*): Remove support.
5823 * configure.tgt (m88*-*-openbsd*): Remove.
5824 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
5826 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
5828 * configure.tgt (x86_tobjs): New variable.
5829 (amd64_tobjs, i386_tobjs): Use it.
5831 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
5833 * symtab.c (print_symbol_info): Precede the symbol definition by
5834 the line number when available.
5835 * NEWS: Advertise this enhancement.
5837 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5839 * NEWS (New options): announce set/show record btrace cpu.
5840 * btrace.c: Include record-btrace.h.
5841 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
5842 the vendor is unknown.
5843 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
5844 Maybe overwrite the btrace configuration's cpu.
5845 (btrace_compute_ftrace): Add cpu parameter. Update callers.
5846 (btrace_fetch): Add cpu parameter. Update callers.
5847 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
5848 Maybe overwrite the btrace configuration's cpu. Skip enabling
5849 errata workarounds if the vendor is unknown.
5850 * python/py-record-btrace.c: Include record-btrace.h.
5851 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
5852 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
5853 * record-btrace.c (record_btrace_cpu_state_kind): New.
5854 (record_btrace_cpu): New.
5855 (set_record_btrace_cpu_cmdlist): New.
5856 (record_btrace_get_cpu): New.
5857 (require_btrace_thread, record_btrace_info)
5858 (record_btrace_resume_thread): Call record_btrace_get_cpu.
5859 (cmd_set_record_btrace_cpu_none): New.
5860 (cmd_set_record_btrace_cpu_auto): New.
5861 (cmd_set_record_btrace_cpu): New.
5862 (cmd_show_record_btrace_cpu): New.
5863 (_initialize_record_btrace): Initialize set/show record btrace cpu
5865 * record-btrace.h (record_btrace_get_cpu): New.
5867 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5869 * record.c (set_record_command): Fix typo in message.
5871 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5873 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
5875 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
5877 * infrun.c (process_event_stop_test): Call
5878 gdbarch_in_indirect_branch_thunk.
5879 * gdbarch.sh (in_indirect_branch_thunk): New.
5880 * gdbarch.c: Regenerated.
5881 * gdbarch.h: Regenerated.
5884 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
5885 (HFILES_NO_SRCDIR): Add x86-tdep.h.
5886 (ALLDEPFILES): Add x86-tdep.c.
5887 * arch-utils.h (default_in_indirect_branch_thunk): New.
5888 * arch-utils.c (default_in_indirect_branch_thunk): New.
5889 * i386-tdep: Include x86-tdep.h.
5890 (i386_in_indirect_branch_thunk): New.
5891 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
5893 * amd64-tdep: Include x86-tdep.h.
5894 (amd64_in_indirect_branch_thunk): New.
5895 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
5897 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
5900 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
5901 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
5902 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
5905 2018-04-12 Tom Tromey <tom@tromey.com>
5907 * rust-lang.c (rust_print_struct_def): Remove univariant code.
5908 (rust_evaluate_subexp): Likewise.
5910 2018-04-12 Pedro Alves <palves@redhat.com>
5912 * procfs.c (procfs_detach): Make forward declaration's prototype
5913 match definition's protototype.
5914 (proc_get_LDT_entry): Remove stale do_cleanups call.
5916 2018-04-12 Pedro Alves <palves@redhat.com>
5918 * target.h (target_ops::to_has_exited): Delete.
5919 (target_has_exited): Delete.
5920 * target-delegates.c: Regenerate.
5922 2018-04-11 Pedro Alves <palves@redhat.com>
5924 * target.c (fileio_fh_t::t): Add comment.
5925 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
5926 (target_fileio_close): Handle a NULL target.
5927 (invalidate_fileio_fh): New.
5928 (target_close): Call it.
5929 * remote.c (remote_hostio_send_command): No longer check whether
5930 remote_desc is open.
5932 2018-04-11 Pedro Alves <palves@redhat.com>
5934 * target.c (fileio_fh_t): Make it a named struct instead of a
5936 (fileio_fh_t::is_closed): New method.
5937 (DEF_VEC_O (fileio_fh_t)): Remove.
5938 (fileio_fhandles): Now a std::vector.
5939 (is_closed_fileio_fh): Delete.
5940 (acquire_fileio_fd): Adjust. Rename parameters.
5941 (release_fileio_fd): Adjust.
5942 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
5943 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
5944 (target_fileio_close): Adjust.
5946 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
5948 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
5951 2018-04-10 Pedro Alves <palves@redhat.com>
5953 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
5954 (scoped_finish_thread_state): New class.
5955 * infcmd.c (run_command_1): Use it instead of finish_thread_state
5957 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
5958 (fetch_inferior_event, normal_stop): Likewise.
5959 * thread.c (finish_thread_state_cleanup): Delete.
5961 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5962 Pedro Alves <palves@redhat.com>
5964 * value.c: Include "selftest.h" and "common/array-view.h".
5965 (struct range) <operator ==>: New.
5966 (test_ranges_contain): New.
5967 (check_ranges_vector): New.
5968 (test_insert_into_bit_range_vector): New.
5969 (_initialize_values): Register selftests.
5970 * common/array-view.h (operator==, operator!=): New.
5972 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5974 * common/gdb_vecs.h (unordered_remove): Add overload that takes
5976 * inline-frame.c: Include <algorithm>.
5977 (struct inline_state): Add constructor.
5978 (inline_state_s): Remove.
5979 (DEF_VEC_O(inline_state_s)): Remove.
5980 (inline_states): Change type to std::vector.
5981 (find_inline_frame_state): Adjust to std::vector.
5982 (allocate_inline_frame_state): Remove.
5983 (clear_inline_frame_state): Adjust to std::vector.
5984 (skip_inline_frames): Adjust to std::vector.
5986 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
5988 * tracepoint.h (struct trace_state_variable): Add constructor.
5989 <name>: Change type to std::string.
5990 * tracepoint.c (tsv_s): Remove.
5991 (DEF_VEC_O(tsv_s)): Remove.
5992 (tvariables): Change to std::vector.
5993 (create_trace_state_variable): Adjust to std::vector.
5994 (find_trace_state_variable): Likewise.
5995 (find_trace_state_variable_by_number): Likewise.
5996 (delete_trace_state_variable): Likewise.
5997 (trace_variable_command): Adjust to std::string.
5998 (delete_trace_variable_command): Likewise.
5999 (tvariables_info_1): Adjust to std::vector.
6000 (save_trace_state_variables): Likewise.
6001 (start_tracing): Likewise.
6002 (merge_uploaded_trace_state_variables): Adjust to std::vector
6004 * target.h (struct target_ops)
6005 <to_download_trace_state_variable>: Pass reference to
6006 trace_state_variable.
6007 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
6008 * target-delegates.c: Re-generate.
6009 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
6010 (mi_tsv_deleted): Likewise.
6011 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
6012 * remote.c (remote_download_trace_state_variable): Change
6013 pointer to reference and adjust.
6014 * make-target-delegates (parse_argtypes): Handle references.
6015 (write_function_header): Likewise.
6016 (munge_type): Likewise.
6018 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6020 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6021 string_view-selftests.c.
6022 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
6024 * unittests/basic_string_view/cons/char/1.cc: Likewise.
6025 * unittests/basic_string_view/cons/char/2.cc: Likewise.
6026 * unittests/basic_string_view/cons/char/3.cc: Likewise.
6027 * unittests/basic_string_view/element_access/char/1.cc:
6029 * unittests/basic_string_view/element_access/char/empty.cc:
6031 * unittests/basic_string_view/element_access/char/front_back.cc:
6033 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
6034 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
6036 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
6038 * unittests/basic_string_view/modifiers/swap/char/1.cc:
6040 * unittests/basic_string_view/operations/compare/char/1.cc:
6042 * unittests/basic_string_view/operations/compare/char/13650.cc:
6044 * unittests/basic_string_view/operations/copy/char/1.cc:
6046 * unittests/basic_string_view/operations/data/char/1.cc:
6048 * unittests/basic_string_view/operations/find/char/1.cc:
6050 * unittests/basic_string_view/operations/find/char/2.cc:
6052 * unittests/basic_string_view/operations/find/char/3.cc:
6054 * unittests/basic_string_view/operations/find/char/4.cc:
6056 * unittests/basic_string_view/operations/rfind/char/1.cc:
6058 * unittests/basic_string_view/operations/rfind/char/2.cc:
6060 * unittests/basic_string_view/operations/rfind/char/3.cc:
6062 * unittests/basic_string_view/operations/substr/char/1.cc:
6064 * unittests/basic_string_view/operators/char/2.cc: Likewise.
6065 * unittests/string_view-selftests.c: New file.
6067 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6069 * unittests/basic_string_view/capacity/1.cc: New file.
6070 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
6071 * unittests/basic_string_view/cons/char/1.cc: New file.
6072 * unittests/basic_string_view/cons/char/2.cc: New file.
6073 * unittests/basic_string_view/cons/char/3.cc: New file.
6074 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
6075 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
6076 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
6077 * unittests/basic_string_view/element_access/char/1.cc: New file.
6078 * unittests/basic_string_view/element_access/char/2.cc: New file.
6079 * unittests/basic_string_view/element_access/char/empty.cc: New file.
6080 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
6081 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
6082 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
6083 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
6084 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
6085 * unittests/basic_string_view/include.cc: New file.
6086 * unittests/basic_string_view/inserters/char/1.cc: New file.
6087 * unittests/basic_string_view/inserters/char/2.cc: New file.
6088 * unittests/basic_string_view/inserters/char/3.cc: New file.
6089 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
6090 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
6091 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
6092 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
6093 * unittests/basic_string_view/literals/types.cc: New file.
6094 * unittests/basic_string_view/literals/values.cc: New file.
6095 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
6096 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
6097 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
6098 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
6099 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
6100 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
6101 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
6102 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
6103 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
6104 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
6105 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
6106 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
6107 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
6108 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
6109 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
6110 * unittests/basic_string_view/operations/data/char/1.cc: New file.
6111 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
6112 * unittests/basic_string_view/operations/find/char/1.cc: New file.
6113 * unittests/basic_string_view/operations/find/char/2.cc: New file.
6114 * unittests/basic_string_view/operations/find/char/3.cc: New file.
6115 * unittests/basic_string_view/operations/find/char/4.cc: New file.
6116 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
6117 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
6118 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
6119 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
6120 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
6121 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
6122 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
6123 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
6124 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
6125 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
6126 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
6127 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
6128 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
6129 * unittests/basic_string_view/operators/char/2.cc: New file.
6130 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
6131 * unittests/basic_string_view/range_access/char/1.cc: New file.
6132 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
6133 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
6134 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
6135 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
6136 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
6137 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
6138 * unittests/basic_string_view/requirements/typedefs.cc: New file.
6139 * unittests/basic_string_view/typedefs.cc: New file.
6140 * unittests/basic_string_view/types/1.cc: New file.
6142 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6144 * common/gdb_string_view.h: Remove libstdc++ implementation
6145 details, adjust to gdb reality.
6146 * common/gdb_string_view.tcc: Likewise.
6147 * cli/cli-script.c (struct string_view): Remove.
6148 (user_args) <m_args>: Change element type to gdb::string_view.
6149 (user_args::insert_args): Adjust.
6151 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6153 * common/gdb_string_view.h: New file.
6154 * common/gdb_string_view.tcc: New file.
6156 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
6158 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
6159 * configure: Re-generate.
6161 2018-04-09 Pedro Alves <palves@redhat.com>
6163 * gdbarch.sh: Include "observable.h" instead of "observer.h".
6164 (set_target_gdbarch): Call
6165 gdb::observers::architecture_changed.notify instead of
6166 observer_notify_architecture_changed.
6168 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6170 * tracepoint.c (struct current_traceframe_cleanup): Remove.
6171 (do_restore_current_traceframe_cleanup): Remove.
6172 (restore_current_traceframe_cleanup_dtor): Remove.
6173 (make_cleanup_restore_current_traceframe): Remove.
6174 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
6176 * tracepoint.h (struct scoped_restore_current_traceframe): New.
6177 * infrun.c (fetch_inferior_event): Use
6178 scoped_restore_current_traceframe.
6180 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6182 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
6184 <n_allocated_type_units>: Remove.
6185 <all_type_units>: Change to std::vector.
6186 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
6187 to std::vector change.
6188 (dwarf2_per_objfile::get_cutu): Likewise.
6189 (dwarf2_per_objfile::get_tu): Likewise.
6190 (create_signatured_type_table_from_index): Likewise.
6191 (create_signatured_type_table_from_debug_names): Likewise.
6192 (dw2_symtab_iter_next): Likewise.
6193 (dw2_print_stats): Likewise.
6194 (dw2_expand_all_symtabs): Likewise.
6195 (dw2_expand_marked_cus): Likewise.
6196 (dw2_debug_names_iterator::next): Likewise.
6197 (dwarf2_initialize_objfile): Likewise.
6198 (add_signatured_type_cu_to_table): Likewise.
6199 (create_all_type_units): Likewise.
6200 (add_type_unit): Likewise.
6201 (struct tu_abbrev_offset): Add constructor.
6202 (build_type_psymtabs_1): Adjust to std::vector change.
6203 (print_tu_stats): Likewise.
6204 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
6205 (write_debug_names): Likewise.
6207 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6209 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
6210 Make an std::vector.
6211 <n_comp_units>: Remove.
6212 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
6213 to std::vector change.
6214 (dwarf2_per_objfile::get_cutu): Likewise.
6215 (dwarf2_per_objfile::get_cu): Likewise.
6216 (create_cus_from_index): Likewise.
6217 (create_addrmap_from_index): Likewise.
6218 (create_addrmap_from_aranges): Likewise.
6219 (dwarf2_read_index): Likewise.
6220 (dw2_find_last_source_symtab): Likewise.
6221 (dw2_map_symtabs_matching_filename): Likewise.
6222 (dw2_symtab_iter_next): Likewise.
6223 (dw2_print_stats): Likewise.
6224 (dw2_expand_all_symtabs): Likewise.
6225 (dw2_expand_symtabs_with_fullname): Likewise.
6226 (dw2_expand_marked_cus): Likewise.
6227 (dw2_map_symbol_filenames): Likewise.
6228 (create_cus_from_debug_names): Likewise.
6229 (dwarf2_read_debug_names): Likewise.
6230 (dw2_debug_names_iterator::next): Likewise.
6231 (dwarf2_initialize_objfile): Likewise.
6232 (set_partial_user): Likewise.
6233 (dwarf2_build_psymtabs_hard): Likewise.
6234 (read_comp_units_from_section): Remove arguments, adjust to
6236 (create_all_comp_units): Adjust to std::vector and
6237 read_comp_units_from_section changes.
6238 (dwarf2_find_containing_comp_unit): Adjust to std::vector
6240 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
6241 (psyms_seen_size): Likewise.
6242 (write_gdbindex): Likewise.
6243 (write_debug_names): Likewise.
6245 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6247 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
6248 with dwarf2_per_objfile.
6249 (create_cus_from_index): Likewise.
6250 (create_signatured_type_table_from_index): Likewise.
6251 (dwarf2_read_index): Likewise.
6252 (dwarf2_initialize_objfile): Likewise.
6253 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
6254 per_cu rather than get_dwarf2_per_objfile.
6256 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6258 * dwarf2read.h (struct signatured_type): Forward declare.
6259 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
6261 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
6262 (dw2_get_cutu): ...this.
6263 (dwarf2_per_objfile::get_cu): Rename from...
6264 (dw2_get_cu): ...this.
6265 (dwarf2_per_objfile::get_tu): New.
6266 (create_addrmap_from_index): Adjust.
6267 (create_addrmap_from_aranges): Adjust.
6268 (dw2_find_last_source_symtab): Adjust.
6269 (dw2_map_symtabs_matching_filename): Adjust.
6270 (dw2_symtab_iter_next): Adjust.
6271 (dw2_print_stats): Adjust.
6272 (dw2_expand_all_symtabs): Adjust.
6273 (dw2_expand_symtabs_with_fullname): Adjust.
6274 (dw2_expand_marked_cus): Adjust.
6275 (dw_expand_symtabs_matching_file_matcher): Adjust.
6276 (dw2_map_symbol_filenames): Adjust.
6277 (dw2_debug_names_iterator::next): Adjust.
6278 (dwarf2_initialize_objfile): Adjust.
6279 (set_partial_user): Adjust.
6280 (dwarf2_build_psymtabs_hard): Adjust.
6282 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6284 * dwarf2read.c (create_signatured_type_table_from_debug_names):
6285 Remove unused variables.
6286 (dw2_map_symtabs_matching_filename): Likewise.
6287 (dwarf2_record_block_ranges): Likewise.
6288 (dwarf2_read_addr_index): Likewise.
6289 (follow_die_offset): Likewise.
6291 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6293 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
6294 to symbol_file_add_main.
6296 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6299 * mi/mi-console.c (do_fputc_async_safe): New.
6300 (mi_console_file::write_async_safe): New.
6301 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
6302 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
6304 * ui-file.c (ui_file::putstrn): Adjust call to
6305 fputstrn_unfiltered.
6306 * utils.c (printchar): Replace do_fputs and do_fprintf
6307 parameters by do_fputc.
6308 (fputstr_filtered): Adjust call to printchar.
6309 (fputstr_unfiltered): Likewise.
6310 (fputstrn_filtered): Likewise.
6311 (fputstrn_unfiltered): Add do_fputc parameter, pass to
6313 * utils.h (do_fputc_ftype): New typedef.
6314 (fputstrn_unfiltered): Add do_fputc parameter.
6316 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
6318 * regformats/i386/i386-avx.dat: Remove.
6320 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6323 * amd64-tdep.c (amd64_none_init_abi): New function.
6324 (amd64_x32_none_init_abi): New function.
6325 (_initialize_amd64_tdep): Register handlers for x86-64 and
6326 x64_32 with GDB_OSABI_NONE.
6327 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
6328 GDB_OSABI_NONE osabi.
6330 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6333 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
6335 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
6336 * osabi.c (gdb_osabi_names): Add "unknown" entry.
6338 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
6340 * common/byte-vector.h (char_vector): New type.
6341 * target.h (target_read_alloc): Return
6342 gdb::optional<byte_vector>.
6343 (target_read_stralloc): Return gdb::optional<char_vector>.
6344 (target_get_osdata): Return gdb::optional<char_vector>.
6345 * target.c (target_read_alloc_1): Templatize. Replacement
6346 manual memory management with vector.
6347 (target_read_alloc): Change return type, adjust.
6348 (target_read_stralloc): Change return type, adjust.
6349 (target_get_osdata): Change return type, adjust.
6350 * auxv.c (struct auxv_info) <length>: Remove.
6351 <data>: Change type to gdb::optional<byte_vector>.
6352 (auxv_inferior_data_cleanup): Free auxv_info with delete.
6353 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
6354 (target_auxv_search): Adjust.
6355 (fprint_target_auxv): Adjust.
6356 * avr-tdep.c (avr_io_reg_read_command): Adjust.
6357 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
6358 (linux_make_corefile_notes): Adjust.
6359 * osdata.c (get_osdata): Adjust.
6360 * remote.c (remote_get_threads_with_qxfer): Adjust.
6361 (remote_memory_map): Adjust.
6362 (remote_traceframe_info): Adjust.
6363 (btrace_read_config): Adjust.
6364 (remote_read_btrace): Adjust.
6365 (remote_pid_to_exec_file): Adjust.
6366 * solib-aix.c (solib_aix_get_library_list): Adjust.
6367 * solib-dsbt.c (decode_loadmap): Don't free buf.
6368 (dsbt_get_initial_loadmaps): Adjust.
6369 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
6370 * solib-target.c (solib_target_current_sos): Adjust.
6371 * tracepoint.c (sdata_make_value): Adjust.
6372 * xml-support.c (xinclude_start_include): Adjust.
6373 (xml_fetch_content_from_file): Adjust.
6374 * xml-support.h (xml_fetch_another): Change return type.
6375 (xml_fetch_content_from_file): Change return type.
6376 * xml-syscall.c (xml_init_syscalls_info): Adjust.
6377 * xml-tdesc.c (file_read_description_xml): Adjust.
6378 (fetch_available_features_from_target): Change return type.
6379 (target_fetch_description_xml): Adjust.
6380 (target_read_description_xml): Adjust.
6382 2018-04-06 Tom Tromey <tom@tromey.com>
6384 * value.c (~value): Update.
6385 (struct value) <contents>: Now unique_xmalloc_ptr.
6386 (value_contents_bits_eq, allocate_value_contents)
6387 (value_contents_raw, value_contents_all_raw)
6388 (value_contents_for_printing, value_contents_for_printing_const)
6389 (set_value_enclosing_type): Update.
6391 2018-04-06 Tom Tromey <tom@tromey.com>
6393 * value.c (range_s): Remove typedef, VEC.
6394 (struct range): Add operator<.
6395 (range_lessthan): Remove.
6396 (ranges_contain): Change type.
6398 (struct value) <unavailable, optimized_out>: Now std::vector.
6399 (value_entirely_available)
6400 (value_entirely_covered_by_range_vector)
6401 (value_entirely_unavailable, value_entirely_optimized_out):
6403 (insert_into_bit_range_vector): Change argument type.
6404 (find_first_range_overlap): Likewise.
6405 (struct ranges_and_idx, value_contents_bits_eq)
6406 (require_not_optimized_out, require_available): Update.
6407 (ranges_copy_adjusted): Change argument types.
6408 (value_optimized_out, value_copy, value_fetch_lazy): Update.
6410 2018-04-06 Tom Tromey <tom@tromey.com>
6412 * value.c (~value): Update.
6413 (struct value) <parent>: Now a value_ref_ptr.
6414 (value_parent, set_value_parent, value_address, value_copy):
6417 2018-04-06 Tom Tromey <tom@tromey.com>
6419 * value.c (struct value): Add constructor, destructor, and member
6421 (allocate_value_lazy, value_decref): Update.
6423 2018-04-06 Tom Tromey <tom@tromey.com>
6425 * value.c (struct value) <released, next>: Remove.
6426 (all_values): Now a std::vector.
6427 (allocate_value_lazy): Update.
6428 (value_next): Remove.
6429 (value_mark, value_free_to_mark, release_value)
6430 (value_release_to_mark): Update.
6432 2018-04-06 Tom Tromey <tom@tromey.com>
6434 * value.h (fetch_subexp_value, value_release_to_mark): Update.
6435 (free_value_chain): Remove.
6436 * value.c (free_value_chain): Remove.
6437 (value_release_to_mark): Return a std::vector.
6438 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
6440 (check_condition): Update.
6441 * eval.c (fetch_subexp_value): Change "val_chain" to a
6443 * breakpoint.c (update_watchpoint): Update.
6444 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
6446 2018-04-06 Tom Tromey <tom@tromey.com>
6448 * value.h (free_all_values): Remove.
6449 * value.c (free_all_values): Remove.
6451 2018-04-06 Tom Tromey <tom@tromey.com>
6453 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
6454 (value_history_chain, value_history_count): Remove.
6455 (value_history): New global.
6456 (record_latest_value, access_value_history, show_values)
6457 (preserve_values): Update.
6459 2018-04-06 Tom Tromey <tom@tromey.com>
6461 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
6462 * varobj.c (varobj_set_display_format, varobj_set_value)
6463 (install_default_visualizer, construct_visualizer)
6464 (install_new_value, ~varobj, varobj_get_value_type)
6465 (my_value_of_variable, varobj_editable_p): Update.
6466 * c-varobj.c (c_describe_child, c_value_of_variable)
6467 (cplus_number_of_children, cplus_describe_child): Update.
6468 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
6469 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
6470 (ada_value_of_variable, ada_value_is_changeable_p): Update.
6472 2018-04-06 Tom Tromey <tom@tromey.com>
6474 * printcmd.c (last_examine_address): Change type to
6476 (do_examine, x_command): Update.
6478 2018-04-06 Tom Tromey <tom@tromey.com>
6480 * value.c (release_value): Update.
6481 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
6482 (struct bpstats) <val>: Now a value_ref_ptr.
6483 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
6484 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
6485 (~watchpoint, print_it_watchpoint, watch_command_1)
6486 (invalidate_bp_value_on_memory_change): Update.
6488 2018-04-06 Tom Tromey <tom@tromey.com>
6490 * varobj.c (varobj_clear_saved_item)
6491 (update_dynamic_varobj_children, install_new_value, ~varobj):
6493 * value.h (value_incref): Move declaration earlier.
6494 (value_decref): Rename from value_free.
6495 (struct value_ref_policy): New.
6496 (value_ref_ptr): New typedef.
6497 (struct value_deleter): Remove.
6498 (gdb_value_up): Remove typedef.
6499 (release_value): Change return type.
6500 (release_value_or_incref): Remove.
6501 * value.c (set_value_parent): Update.
6502 (value_incref): Change return type.
6503 (value_decref): Rename from value_free.
6504 (value_free_to_mark, free_all_values, free_value_chain): Update.
6505 (release_value): Return value_ref_ptr.
6506 (release_value_or_incref): Remove.
6507 (record_latest_value, set_internalvar, clear_internalvar):
6509 * stack.c (info_frame_command): Don't call value_free.
6510 * python/py-value.c (valpy_dealloc, valpy_new)
6511 (value_to_value_object): Update.
6512 * printcmd.c (do_examine): Update.
6513 * opencl-lang.c (lval_func_free_closure): Update.
6514 * mi/mi-main.c (register_changed_p): Don't call value_free.
6515 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
6516 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
6517 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
6519 * guile/scm-value.c (vlscm_free_value_smob)
6520 (vlscm_scm_from_value): Update.
6521 * frame.c (frame_register_unwind, frame_unwind_register_signed)
6522 (frame_unwind_register_unsigned, get_frame_register_bytes)
6523 (put_frame_register_bytes): Don't call value_free.
6524 * findvar.c (address_from_register): Don't call value_free.
6525 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
6526 * dwarf2loc.c (entry_data_value_free_closure)
6527 (value_of_dwarf_reg_entry, free_pieced_value_closure)
6528 (dwarf2_evaluate_loc_desc_full): Update.
6529 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
6530 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
6531 (~watchpoint, watch_command_1)
6532 (invalidate_bp_value_on_memory_change): Update.
6533 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
6535 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
6538 * warning.m4: Add -Wno-error=deprecated-register.
6539 * configure: Re-generate.
6541 2018-04-05 Tom Tromey <tom@tromey.com>
6543 * linespec.h: Remove include of "vec.h".
6545 2018-04-05 Tom Tromey <tom@tromey.com>
6547 * linespec.c (typep): Remove typedef.
6548 (find_methods, find_superclass_methods): Take a std::vector.
6549 (find_method): Use std::vector.
6551 2018-04-05 Tom Tromey <tom@tromey.com>
6553 * utils.c (compare_strings): Remove.
6554 * utils.h (compare_strings): Remove.
6555 * objc-lang.h (find_imps): Update.
6556 * objc-lang.c (find_methods): Take a std::vector.
6557 (uniquify_strings, find_imps): Likewise.
6558 * linespec.c (find_methods): Take a std::vector.
6559 (decode_objc): Use std::vector.
6560 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
6562 (find_method, find_function_symbols): Use std::vector.
6564 2018-04-05 Tom Tromey <tom@tromey.com>
6566 * completer.c (completion_tracker::completion_tracker): Remove
6568 (completion_tracker::discard_completions): Likewise.
6569 * breakpoint.c (ambiguous_names_p): Remove cast.
6570 * ada-lang.c (_initialize_ada_language): Remove cast.
6571 * utils.h (streq): Update.
6572 (streq_hash): Add new declaration.
6573 * utils.c (streq): Return bool.
6574 (streq_hash): New function.
6576 2018-04-05 Tom Tromey <tom@tromey.com>
6578 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
6579 Remove a string copy.
6581 2018-04-05 Tom Tromey <tom@tromey.com>
6583 * linespec.c (filter_results): Use std::vector.
6584 (decode_line_2, decode_line_full): Update.
6586 2018-04-05 Tom Tromey <tom@tromey.com>
6588 * linespec.c (canonical_to_fullform): Return std::string.
6589 (filter_results): Update.
6590 (struct decode_line_2_item): Add constructor.
6591 <fullform, displayform>: Now std::string.
6592 (decode_line_2_compare_items): Now a std::sort comparator.
6593 (decode_line_2): Update.
6595 2018-04-05 Tom Tromey <tom@tromey.com>
6597 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
6598 (unexpected_linespec_error): Update.
6599 (linespec_parse_basic, parse_linespec): Update.
6601 2018-04-05 Tom Tromey <tom@tromey.com>
6603 * linespec.c (linespec_parse_basic): Reindent.
6605 2018-04-05 Tom Tromey <tom@tromey.com>
6607 * minsyms.h (iterate_over_minimal_symbols): Update.
6608 * minsyms.c (iterate_over_minimal_symbols): Take a
6610 * linespec.c (struct collect_minsyms): Remove.
6611 (compare_msyms): Now a std::sort comparator.
6612 (add_minsym): Add parameters.
6613 (search_minsyms_for_name): Update. Use std::vector.
6615 2018-04-03 Tom Tromey <tom@tromey.com>
6617 * mipsread.c (read_alphacoff_dynamic_symtab): Use
6620 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
6622 * MAINTAINERS (Write After Approval): Add Weimin Pan.
6624 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
6627 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
6628 printing static type.
6630 2018-04-01 Tom Tromey <tom@tromey.com>
6632 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
6633 (rs6000_xfer_shared_libraries): Update.
6635 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
6637 * common/gdb_vecs.h (char_ptr): Remove.
6638 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
6640 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
6642 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
6644 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
6646 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
6648 * tracepoint.h (struct uploaded_tp): Initialize fields.
6649 <actions, step_actions, cmd_strings>: Change type to
6650 std::vector<char *>.
6651 * tracepoint.c (get_uploaded_tp): Allocate with new.
6652 (free_uploaded_tps): Free with delete.
6653 (parse_tracepoint_definition): Adjust to std::vector change.
6654 * breakpoint.c (read_uploaded_action): Likewise.
6655 (create_tracepoint_from_upload): Likewise.
6656 * ctf.c (ctf_write_uploaded_tp): Likewise.
6657 (SET_ARRAY_FIELD): Likewise.
6658 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
6660 2018-03-30 Tom Tromey <tom@tromey.com>
6662 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
6664 (svr4_keep_data_in_core): Update.
6665 (svr4_read_so_list): Update.
6667 2018-03-30 Tom Tromey <tom@tromey.com>
6669 * windows-nat.c (handle_output_debug_string, handle_exception):
6671 * target.h (target_read_string): Update.
6672 * target.c (target_read_string): Change "string" to
6674 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
6676 * solib-frv.c (frv_current_sos): Update.
6677 * solib-dsbt.c (dsbt_current_sos): Update.
6678 * solib-darwin.c (darwin_current_sos): Update.
6679 * linux-thread-db.c (inferior_has_bug): Update.
6680 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
6681 Update. Remove alloca.
6682 * ada-lang.c (ada_main_name): Update.
6684 2018-03-30 Tom Tromey <tom@tromey.com>
6686 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
6687 (struct dwo_file_deleter): New.
6688 (dwo_file_up): New typedef.
6689 (open_and_init_dwo_file): Use dwo_file_up.
6690 (free_dwo_file_cleanup): Remove.
6692 2018-03-30 Tom Tromey <tom@tromey.com>
6694 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
6695 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
6697 2018-03-30 Tom Tromey <tom@tromey.com>
6699 * dwarf2read.c (class free_cached_comp_units): New class.
6700 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
6701 (free_cached_comp_units): Remove function.
6703 2018-03-30 Tom Tromey <tom@tromey.com>
6705 * utils.h (make_cleanup_unpush_target): Remove.
6706 * inf-ptrace.c (struct target_unpusher): New.
6707 (target_unpush_up) New typedef.
6708 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
6710 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
6712 2018-03-27 Tom Tromey <tom@tromey.com>
6714 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
6716 2018-03-27 Pedro Alves <palves@redhat.com>
6717 Tom Tromey <tom@tromey.com>
6719 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
6720 destructor. Now a class.
6721 (gdb_readline_wrapper_cleanup): Remove function.
6722 (gdb_readline_wrapper): Remove cleanups.
6724 2018-03-27 Tom Tromey <tom@tromey.com>
6726 * typeprint.h (struct type_print_options) <local_typedefs,
6727 global_typedefs>: Remove "struct" keyword.
6728 (class typedef_hash_table): New class.
6729 (recursively_update_typedef_hash, add_template_parameters)
6730 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
6731 (find_typedef_in_hash): Don't declare.
6732 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
6733 (typedef_hash_table::recursively_update): Rename from
6734 recursively_update_typedef_hash. Now a member.
6735 (typedef_hash_table::add_template_parameters): Rename from
6736 add_template_parameters. Now a member.
6737 (typedef_hash_table::typedef_hash_table): Now a constructor;
6738 rename from create_typedef_hash.
6739 (typedef_hash_table::~typedef_hash_table): Now a destructor;
6740 rename from free_typedef_hash.
6741 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
6742 (do_free_global_table): Remove.
6743 (typedef_hash_table::typedef_hash_table): New constructor; renamed
6744 from copy_type_recursive.
6745 (create_global_typedef_table): Remove.
6746 (typedef_hash_table::find_global_typedef): Now a member of
6748 (typedef_hash_table::find_typedef): Rename from
6749 find_typedef_in_hash; now a member.
6750 (whatis_exp): Update.
6751 * extension.h (struct ext_lang_type_printers): Add constructor and
6753 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
6755 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
6756 Now a constructor; rename from start_ext_lang_type_printers.
6757 (ext_lang_type_printers): Now a destructor; rename from
6758 free_ext_lang_type_printers.
6759 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
6761 (c_type_print_base_struct_union): Update. Remove cleanups.
6763 2018-03-27 Tom Tromey <tom@tromey.com>
6765 * dwarf-index-write.c: Include <cmath>.
6767 2018-03-27 Joel Brobecker <brobecker@adacore.com>
6769 * NEWS: Add entry describing new "set|show varsize-limit" command.
6770 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
6772 * printcmd.c (_initialize_printcmd): Add "set var" alias of
6775 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
6777 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
6779 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
6780 * dwarf-index-common.c: New file.
6781 * dwarf-index-common.h: New file.
6782 * dwarf-index-write.c: New file.
6783 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
6784 (struct dwarf2_section_info): Move from here.
6785 (dwarf2_section_info_def): Likewise.
6786 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
6787 (offset_type): Likewise.
6788 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
6789 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
6790 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
6791 (byte_swap): Likewise.
6792 (MAYBE_SWAP): Likewise.
6793 (dwarf2_per_cu_ptr): Likewise.
6794 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
6795 (struct tu_stats): Likewise.
6796 (struct dwarf2_per_objfile): Likewise.
6797 (struct dwarf2_per_cu_data): Likewise.
6798 (struct signatured_type): Likewise.
6799 (sig_type_ptr): Likewise.
6800 (DEF_VEC_P (sig_type_ptr)): Likewise.
6801 (INDEX4_SUFFIX): Likewise.
6802 (INDEX5_SUFFIX): Likewise.
6803 (DEBUG_STR_SUFFIX): Likewise.
6804 (dwarf2_read_section): Make non-static.
6805 (mapped_index_string_hash): Move from here.
6806 (dwarf5_djb_hash): Likewise.
6807 (file_write): Likewise.
6808 (class data_buf): Likewise.
6809 (struct symtab_index_entry): Likewise.
6810 (struct mapped_symtab): Likewise.
6811 (find_slot): Likewise.
6812 (hash_expand): Likewise.
6813 (add_index_entry): Likewise.
6814 (uniquify_cu_indices): Likewise.
6815 (class c_str_view): Likewise.
6816 (class c_str_view_hasher): Likewise.
6817 (class vector_hasher): Likewise.
6818 (write_hash_table): Likewise.
6819 (psym_index_map): Likewise.
6820 (struct addrmap_index_data): Likewise.
6821 (add_address_entry): Likewise.
6822 (add_address_entry_worker): Likewise.
6823 (write_address_map): Likewise.
6824 (symbol_kind): Likewise.
6825 (write_psymbols): Likewise.
6826 (struct signatured_type_index_data): Likewise.
6827 (write_one_signatured_type): Likewise.
6828 (recursively_count_psymbols): Likewise.
6829 (recursively_write_psymbols): Likewise.
6830 (class debug_names): Likewise.
6831 (check_dwarf64_offsets): Likewise.
6832 (psyms_seen_size): Likewise.
6833 (write_gdbindex): Likewise.
6834 (write_debug_names): Likewise.
6835 (assert_file_size): Likewise.
6836 (write_psymtabs_to_index): Likewise.
6837 (save_gdb_index_command): Likewise.
6838 (_initialize_dwarf2_read): Don't register the "save gdb-index"
6840 * dwarf2read.h: New file.
6842 2018-03-27 Joel Brobecker <brobecker@adacore.com>
6845 * dwarf2read.c (dwarf2_physname): Do not return the demangled
6846 symbol name if the CU's language stores symbol names in linkage
6848 * language.h (struct language_defn)
6849 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
6850 all instances of this struct.
6852 2018-03-26 Tom Tromey <tom@tromey.com>
6854 * stack.c (backtrace_command_1): Remove verbose code.
6856 2018-03-26 Tom Tromey <tom@tromey.com>
6858 * python/py-framefilter.c (py_print_type): Don't catch
6859 exceptions. Return void.
6860 (py_print_value): Likewise.
6861 (py_print_single_arg): Likewise.
6862 (enumerate_args): Don't catch exceptions.
6863 (py_print_args): Likewise.
6864 (py_print_frame): Likewise.
6865 (gdbpy_apply_frame_filter): Catch exceptions here.
6867 2018-03-26 Tom Tromey <tom@tromey.com>
6869 * stack.c (_initialize_stack): Remove trailing newlines from help
6870 text. Add "Usage" line to "backtrace" help.
6872 2018-03-26 Tom Tromey <tom@tromey.com>
6875 * python/py-framefilter.c (py_print_args): Call wrap_hint.
6877 2018-03-26 Tom Tromey <tom@tromey.com>
6879 * python/py-framefilter.c (py_print_single_arg): Return
6880 EXT_LANG_BT_ERROR from catch.
6882 2018-03-26 Tom Tromey <tom@tromey.com>
6885 * stack.c (backtrace_command_1): Move some code into no-filters
6888 2018-03-26 Tom Tromey <tom@tromey.com>
6890 * python/py-framefilter.c (throw_quit_or_print_exception): New
6892 (gdbpy_apply_frame_filter): Use it.
6894 2018-03-26 Tom Tromey <tom@tromey.com>
6897 * python/py-framefilter.c (py_print_type, py_print_value)
6898 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
6901 2018-03-26 Tom Tromey <tom@tromey.com>
6903 * python/py-framefilter.c (enumerate_args): Use
6904 gdb::unique_xmalloc_ptr.
6906 2018-03-26 Tom Tromey <tom@tromey.com>
6908 * python/py-framefilter.c (py_print_frame): Return
6910 (gdbpy_apply_frame_filter): Update comment.
6911 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
6913 <EXT_LANG_BT_NO_FILTERS>: Change value.
6915 2018-03-26 Tom Tromey <tom@tromey.com>
6918 * stack.c (backtrace_command): Parse "hide" argument.
6919 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
6920 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
6923 2018-03-26 Tom Tromey <tom@tromey.com>
6925 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
6927 (backtrace_command): Remove "fulltrace", add "flags".
6929 2018-03-26 Tom Tromey <tom@tromey.com>
6931 * stack.c (backtrace_command): Rewrite command line parsing.
6933 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
6935 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
6937 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
6939 * filename-seen-cache.h: Add include guard.
6941 2018-03-26 Keith Seitz <keiths@redhat.com>
6943 * symfile.c (place_section): Remove "struct" from section_addr_info
6945 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
6946 "struct" keyword from section_addr_info.
6948 2018-03-26 Alan Hayward <alan.hayward@arm.com>
6950 * regformats/regdef.h (reg): Add constructors.
6952 2018-03-25 Pedro Alves <palves@redhat.com>
6954 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
6955 if then/else bodies in var_func_name extraction.
6957 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
6959 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
6960 lookup_minimal_symbol() to find symbol entry.
6961 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
6963 2018-03-23 Keith Seitz <keiths@redhat.com>
6966 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
6967 nested type definitions for C++, too.
6969 2018-03-23 Tom Tromey <tom@tromey.com>
6971 * machoread.c (struct oso_el): Add a constructor. Don't define as
6973 (macho_register_oso): Remove.
6974 (macho_symtab_read): Take a std::vector.
6975 (oso_el_compare_name): Now a std::sort comparator.
6976 (macho_symfile_read_all_oso): Take a std::vector.
6977 (macho_symfile_read): Use std::vector. Remove cleanups.
6979 2018-03-22 Tom Tromey <tom@tromey.com>
6981 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
6982 (record_full_goto_bookmark): Use std::string.
6984 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6987 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
6990 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
6992 * rs6000-tdep.c (store_insn_p): New function.
6993 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
6994 and cr_reg to their unshifted values. Use store_insn_p to
6995 match LR saves using either R1 or fdata->alloca_reg. Use
6996 store_insn_p to match CR saves. Set alloca_reg_offset
6997 when alloca_reg and framep are set. Remove lr_reg shift
6998 when assigning to fdata->lr_register.
7000 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
7002 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
7003 command line args instead of emitting a warning.
7005 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
7007 * tracepoint.h (struct static_tracepoint_marker): Initialize
7008 fields, define default constructor, move constructor and move
7009 assignment, disable the rest.
7010 <str_id, extra>: Make std::string.
7011 (release_static_tracepoint_marker): Remove.
7012 (free_current_marker): Remove.
7013 * tracepoint.c (free_current_marker): Remove.
7014 (parse_static_tracepoint_marker_definition): Adjust to
7015 std::string, use new hex2str overload.
7016 (release_static_tracepoint_marker): Remove.
7017 (print_one_static_tracepoint_marker): Get marker by reference
7018 and adjust to std::string.
7019 (info_static_tracepoint_markers_command): Adjust to std::vector
7021 * target.h (static_tracepoint_marker_p): Remove typedef.
7022 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
7023 (struct target_ops) <to_static_tracepoint_marker_at>: Return
7025 <to_static_tracepoint_markers_by_strid>: Return std::vector.
7027 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
7028 (target_debug_print_std_vector_static_tracepoint_marker): New.
7029 (target_debug_print_struct_static_tracepoint_marker_p): Rename
7031 (target_debug_print_static_tracepoint_marker_p): ... this.
7032 * target-delegates.c: Re-generate.
7033 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
7035 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
7036 (decode_static_tracepoint_spec): Adjust to std::vector.
7037 (tracepoint_print_one_detail): Adjust to std::string.
7038 (strace_marker_decode_location): Adjust to std::string.
7039 (update_static_tracepoint): Adjust to std::string, remove call
7040 to release_static_tracepoint_marker.
7041 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
7042 Adjust to std::vector.
7043 * remote.c (remote_static_tracepoint_marker_at): Return bool.
7044 (remote_static_tracepoint_markers_by_strid): Adjust to
7046 * common/rsp-low.h (hex2str): New overload with explicit count
7048 * common/rsp-low.c (hex2str): New overload with explicit count
7050 * unittests/rsp-low-selftests.c (test_hex2str): New function.
7051 (_initialize_rsp_low_selftests): Add test_hex2str test.
7052 * unittests/tracepoint-selftests.c
7053 (test_parse_static_tracepoint_marker_definition): Adjust to
7056 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
7058 * tracepoint.c (parse_static_tracepoint_marker_definition):
7059 Consider case where the definition is followed by more
7061 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7062 tracepoint-selftests.c.
7063 * unittests/tracepoint-selftests.c: New.
7065 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
7067 * MAINTAINERS (Write After Approval): Add Pedro Franco de
7070 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
7072 * symtab.c (find_pc_sect_line): fixed indentation.
7074 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
7076 * symtab.c (find_pc_sect_line): now uses binary search.
7078 2018-03-19 Tom Tromey <tom@tromey.com>
7080 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
7083 2018-03-19 Pedro Alves <palves@redhat.com>
7084 Tom Tromey <tom@tromey.com>
7086 * unittests/observable-selftests.c: New file.
7087 * common/observable.h: New file.
7088 * observable.h: New file.
7089 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
7090 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
7091 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
7092 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
7093 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
7094 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
7095 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
7096 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
7097 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
7098 python/py-breakpoint.c, python/py-finishbreakpoint.c,
7099 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
7100 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
7101 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
7102 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
7103 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
7104 tui/tui-interp.c, valops.c: Update all users.
7105 * tui/tui-hooks.c (tui_bp_created_observer)
7106 (tui_bp_deleted_observer, tui_bp_modified_observer)
7107 (tui_inferior_exit_observer, tui_before_prompt_observer)
7108 (tui_normal_stop_observer, tui_register_changed_observer):
7110 (tui_observers_token): New global.
7111 (attach_or_detach, tui_attach_detach_observers): New functions.
7112 (tui_install_hooks, tui_remove_hooks): Use
7113 tui_attach_detach_observers.
7114 * record-btrace.c (record_btrace_thread_observer): Remove.
7115 (record_btrace_thread_observer_token): New global.
7116 * observer.sh: Remove.
7117 * observer.c: Rename to observable.c.
7118 * observable.c (namespace gdb_observers): Define new objects.
7119 (observer_debug): Move into gdb_observers namespace.
7120 (struct observer, struct observer_list, xalloc_observer_list_node)
7121 (xfree_observer_list_node, generic_observer_attach)
7122 (generic_observer_detach, generic_observer_notify): Remove.
7123 (_initialize_observer): Update.
7124 Don't include observer.inc.
7125 * Makefile.in (generated_files): Remove observer.h, observer.inc.
7126 (clean mostlyclean): Likewise.
7127 (observer.h, observer.inc): Remove targets.
7128 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
7129 (COMMON_SFILES): Use observable.c, not observer.c.
7130 * .gitignore: Remove observer.h.
7132 2018-03-18 Tom Tromey <tom@tromey.com>
7134 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
7136 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
7138 2018-03-17 Tom Tromey <tom@tromey.com>
7140 * auto-load.c (auto_load_objfile_script_1): Use std::string.
7142 2018-03-17 Tom Tromey <tom@tromey.com>
7144 * target.c (class scoped_target_fd): New.
7145 (target_fileio_close_cleanup): Remove.
7146 (target_fileio_read_alloc_1): Use scoped_target_fd.
7148 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
7150 * silent-rules.mk: New.
7151 * Makefile.in: Include silent-rules.mk
7152 (srcdir, VPATH, top_srcdir): Move up.
7153 (COMPILE): Add ECHO_CXX.
7154 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
7155 (init.c): Add ECHO_INIT_C.
7156 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
7157 (version.c): Add ECHO_GEN.
7158 (printcmd.o): Add ECHO_CXX.
7159 (target-float.o): Add ECHO_CXX.
7160 (ada-exp.o): Add ECHO_CXX.
7161 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
7162 (insight$(EXEEXT)): Add ECHO_CXXLD.
7163 * gnulib/configure.ac: Add AM_SILENT_RULES.
7164 * gnulib/aclocal.m4: Re-generate.
7165 * gnulib/configure: Re-generate.
7166 * gnulib/import/Makefile.in: Re-generate.
7168 2018-03-16 Tom Tromey <tom@tromey.com>
7170 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
7171 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
7172 * utils.c (do_free_section_addr_info)
7173 (make_cleanup_free_section_addr_info): Remove.
7174 * symfile.h (struct other_sections): Add constructor.
7175 (struct section_addr_info): Remove.
7176 (section_addr_info): New typedef.
7177 (struct sym_fns) <sym_offsets>: Change type of parameter.
7178 (build_section_addr_info_from_objfile)
7179 (relative_addr_info_to_section_offsets, addr_info_make_relative)
7180 (default_symfile_offsets, symbol_file_add)
7181 (symbol_file_add_from_bfd)
7182 (build_section_addr_info_from_section_table): Update.
7183 (alloc_section_addr_info, free_section_addr_info): Don't declare.
7184 * symfile.c (alloc_section_addr_info): Remove.
7185 (build_section_addr_info_from_section_table): Change return type.
7187 (build_section_addr_info_from_bfd)
7188 (build_section_addr_info_from_objfile): Likewise.
7189 (free_section_addr_info): Remove.
7190 (relative_addr_info_to_section_offsets): Change type of "addrs".
7191 (addrs_section_compar): Now a std::sort comparator.
7192 (addrs_section_sort): Change return type.
7193 (addr_info_make_relative): Change type of "addrs". Update.
7194 (default_symfile_offsets, syms_from_objfile_1)
7195 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
7196 (symbol_file_add_separate): Update.
7197 (symbol_file_add): Change type of "addrs". Update.
7198 (add_symbol_file_command): Update. Remove cleanups.
7199 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
7201 * symfile-debug.c (debug_sym_offsets): Change type of "info".
7202 * solib.c (solib_read_symbols): Update.
7203 * objfiles.c (objfile_relocate): Update. Remove cleanups.
7204 * machoread.c (macho_symfile_offsets): Update.
7205 * jit.c (jit_bfd_try_read_symtab): Update.
7207 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
7209 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7210 unittests/utils-selftests.c.
7211 * unittests/utils-selftests.c: New file.
7213 2018-03-14 Tom Tromey <tom@tromey.com>
7216 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
7219 2018-03-14 Tom Tromey <tom@tromey.com>
7222 * printcmd.c (printf_pointer): Allow "-" in format.
7224 2018-03-14 Tom Tromey <tom@tromey.com>
7226 * printcmd.c (_initialize_printcmd): Add usage to printf.
7228 2018-03-14 Yao Qi <qiyao@sourceware.org>
7230 * MAINTAINERS: Update my email address.
7232 2018-03-13 Tom Tromey <tom@tromey.com>
7234 * machoread.c (macho_check_dsym): Change filenamep to a
7236 (macho_symfile_read): Update.
7237 * symfile.c (load_command): Use std::string.
7239 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
7241 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
7242 to error message string.
7243 (riscv_register_name): Use xsnprintf instead of sprintf.
7244 (riscv_insn::fetch_instruction): Use gdb_assert instead of
7246 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
7248 (riscv_push_dummy_call): Likewise.
7250 2018-03-12 Tom Tromey <tom@tromey.com>
7252 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
7253 Use gdb::byte_vector.
7254 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
7256 2018-03-12 Yao Qi <yao.qi@linaro.org>
7258 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
7259 parameter type to readable_regcache.
7260 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
7263 2018-03-11 Tom Tromey <tom@tromey.com>
7265 * dwarf2read.c (struct nextfield): Add initializers.
7266 (struct nextfnfield): Remove.
7267 (struct fnfieldlist): Add initializers. Remove "length" and
7268 "head", use std::vector.
7269 (struct decl_field_list): Remove.
7270 (struct field_info): Add initializers.
7271 <fields, baseclasses>: Now std::vector.
7272 <nbaseclasses, nfnfields, typedef_field_list_count,
7273 nested_types_list_count>: Remove.
7274 (dwarf2_add_field, dwarf2_add_type_defn)
7275 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
7276 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
7277 (process_structure_scope): Update.
7279 2018-03-11 Tom Tromey <tom@tromey.com>
7281 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
7282 for use by std::sort.
7283 (build_type_psymtabs_1): Use std::vector.
7285 2018-03-09 Eli Zaretskii <eliz@gnu.org>
7287 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
7288 and LIBMPFR in the printed configuration.
7290 2018-03-08 Tom Tromey <tom@tromey.com>
7292 * source.c (get_filename_and_charpos): Use scoped_fd.
7293 * nto-procfs.c (procfs_open_1): Use scoped_fd.
7294 (procfs_pidlist): Likewise.
7295 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
7296 (iterate_over_mappings): Likewise.
7298 2018-03-08 Tom Tromey <tom@tromey.com>
7300 * infcall.c (struct call_return_meta_info)
7301 <stack_temporaries_enabled>: Remove.
7302 (get_call_return_value, call_function_by_hand_dummy): Update.
7303 * thread.c (disable_thread_stack_temporaries): Remove.
7304 (enable_thread_stack_temporaries): Remove.
7305 (thread_stack_temporaries_enabled_p): Return bool.
7306 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
7307 (get_last_thread_stack_temporary): Update.
7308 * eval.c (evaluate_subexp): Update.
7309 * gdbthread.h (class enable_thread_stack_temporaries): Now a
7310 class, not a function.
7311 (value_ptr, value_vec): Remove typedefs.
7312 (class thread_info) <stack_temporaries_enabled>: Now bool.
7313 <stack_temporaries>: Now a std::vector.
7314 (thread_stack_temporaries_enabled_p)
7315 (value_in_thread_stack_temporaries): Return bool.
7317 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
7319 * remote.c (putpkt_binary): Fix omitted bytes reporting.
7320 (getpkt_or_notif_sane_1): Likewise.
7322 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7324 * build-id.c (build_id_to_debug_bfd): Use std::string.
7326 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7328 * build-id.c (find_separate_debug_file_by_buildid): Return
7330 * build-id.h (find_separate_debug_file_by_buildid): Return
7332 * coffread.c (coff_symfile_read): Adjust to std::string.
7333 * elfread.c (elf_symfile_read): Adjust to std::string.
7334 * symfile.c (separate_debug_file_exists): Change parameter to
7336 (find_separate_debug_file): Return std::string.
7337 (find_separate_debug_file_by_debuglink): Return std::string.
7338 * symfile.h (find_separate_debug_file_by_debuglink): Return
7341 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
7343 * common/xml-utils.c (xml_escape_text): Move code to...
7344 (xml_escape_text_append): ... this new function.
7345 * common/xml-utils.h (xml_escape_text_append): New declaration.
7346 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
7348 (_initialize_xml_utils): register test_xml_escape_text_append as
7351 2018-03-07 Alan Hayward <alan.hayward@arm.com>
7353 * defs.h: Remove MAX_REGISTER_SIZE.
7354 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
7356 * python/py-unwind.c (pyuw_sniffer): Likewise.
7358 2018-03-07 Tom Tromey <tom@tromey.com>
7360 * linux-tdep.c (linux_info_proc): Update.
7361 * target.h (struct target_ops) <to_fileio_readlink>: Return
7363 (target_fileio_readlink): Return optional<string>.
7364 * remote.c (remote_hostio_readlink): Return optional<string>.
7365 * inf-child.c (inf_child_fileio_readlink): Return
7367 * target.c (target_fileio_readlink): Return optional<string>.
7369 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
7371 * regcache.c (cooked_read_test): Add riscv to the list of
7372 architectures that have a save_reggroup.
7374 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
7376 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
7377 value is not a dynamic class object.
7379 2018-03-06 Tom Tromey <tom@tromey.com>
7381 * rust-exp.y: Formatting fixes.
7383 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7385 * riscv-tdep.c (riscv_register_name): Remove target description
7387 (riscv_gdbarch_init): Remove target description check.
7389 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7391 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
7393 * riscv-tdep.h: Likewise.
7395 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7397 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
7398 (riscv_pseudo_register_write): Delete.
7399 (riscv_gdbarch_init): Remove all use of pseudo registers.
7401 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7403 * record-btrace.c (btrace_print_lines): Replace cleanup
7404 parameter with RAII equivalents.
7405 (btrace_insn_history): Replace cleanup with RAII equivalents.
7406 * ui-out.h (make_cleanup_ui_out_list_begin_end,
7407 make_cleanup_ui_out_tuple_begin_end): Remove.
7408 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
7409 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
7410 make_cleanup_ui_out_list_begin_end): Remove.
7412 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7414 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
7415 parameter types to std::vector. Use bool.
7416 (record_btrace_wait): Replace VEC(tp_t) with
7417 std::vector<thread_info *>.
7418 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
7420 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
7422 * record-btrace.c (record_btrace_disable_callback): Remove.
7423 (struct scoped_btrace_disable): New.
7424 (record_btrace_open): Use scoped_btrace_disable.
7426 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7428 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
7429 reading values from registers.
7431 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7433 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
7436 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7438 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
7439 change parameter type. Use GDB's print functions, and use
7440 core_addr_to_string where appropriate.
7441 (riscv_push_dummy_call): Use core_addr_to_string where
7442 appropriate, update call to riscv_print_arg_location, and reindent
7444 (riscv_return_value): Update call to riscv_print_arg_location.
7446 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7447 Tim Newsome <tim@sifive.com>
7448 Albert Ou <a0u@eecs.berkeley.edu>
7449 Darius Rad <darius@bluespec.com>
7451 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
7452 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
7453 (ALLDEPFILES): Add riscv-tdep.c
7454 * configure.tgt: Add riscv support.
7455 * riscv-tdep.c: New file.
7456 * riscv-tdep.h: New file.
7457 * NEWS: Mention new target.
7458 * MAINTAINERS: Add entry for riscv.
7460 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
7462 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
7463 fields within aggregates.
7465 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
7467 * record-btrace.c (btrace_print_lines): Change type of flags to
7468 gdb_disassembly_flags.
7470 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7472 * fbsd-nat.c: Include "inf-ptrace.h".
7473 (USE_SIGTRAP_SIGINFO): Conditionally define.
7474 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
7475 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
7476 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
7478 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
7480 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
7482 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
7483 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
7484 "supports_stopped_by_hw_breakpoint" target methods.
7486 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7488 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
7489 * fbsd-nat.c (debug_fbsd_nat): New variable.
7490 (show_fbsd_nat_debug): New function.
7491 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
7492 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
7494 2018-03-04 John Baldwin <jhb@FreeBSD.org>
7496 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
7497 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
7499 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
7500 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
7503 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7505 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
7506 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
7508 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7510 * charset.c (struct charset_vector): New.
7511 (charsets): Change type to charset_vector.
7512 (find_charset_names): Adjust.
7514 (_initialize_charset): Adjust.
7516 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7518 * progspace.h (struct program_space) <deleted_solibs>: Change
7519 type to std::vector<std::string>.
7520 * progspace.c (clear_program_space_solib_cache): Adjust.
7521 * breakpoint.c (print_solib_event): Adjust.
7522 (check_status_catch_solib): Adjust.
7523 * solib.c (update_solib_list): Adjust.
7524 * ui-out.h (class ui_out) <field_string>: New overload.
7525 * ui-out.c (ui_out::field_string): New overload.
7527 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7529 * progspace.h (struct program_space): Add constructor and
7530 destructor, initialize fields.
7531 (add_program_space): Remove.
7532 * progspace.c (add_program_space): Rename to...
7533 (program_space::program_space): ... this.
7534 (release_program_space): Rename to...
7535 (program_space::~program_space): ... this.
7536 (delete_program_space): Use delete to delete program_space.
7537 (initialize_progspace): Use new to allocate program_space.
7538 * inferior.c (add_inferior_with_spaces): Likewise.
7539 (clone_inferior_command): Likewise.
7540 * infrun.c (follow_fork_inferior): Likewise.
7541 (handle_vfork_child_exec_or_exit): Likewise.
7543 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
7545 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
7546 (delim_string_to_char_ptr_vec): Return std::vector of
7547 gdb::unique_xmalloc_ptr.
7548 (dirnames_to_char_ptr_vec_append): Take std::vector of
7549 gdb::unique_xmalloc_ptr.
7550 (dirnames_to_char_ptr_vec): Return std::vector of
7551 gdb::unique_xmalloc_ptr.
7552 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
7553 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
7554 (delim_string_to_char_ptr_vec): Return an std::vector of
7555 gdb::unique_xmalloc_ptr, adjust the code.
7556 (dirnames_to_char_ptr_vec_append): Take an std::vector of
7557 gdb::unique_xmalloc_ptr, adjust the code.
7558 (dirnames_to_char_ptr_vec): Return an std::vector of
7559 gdb::unique_xmalloc_ptr, adjust the code.
7560 * auto-load.c (auto_load_safe_path_vec): Change type to
7561 std::vector of gdb::unique_xmalloc_ptr.
7562 (auto_load_expand_dir_vars): Return an std::vector of
7563 gdb::unique_xmalloc_ptr, adjust the code.
7564 (auto_load_safe_path_vec_update): Adjust.
7565 (filename_is_in_auto_load_safe_path_vec): Adjust.
7566 (auto_load_objfile_script_1): Adjust.
7567 * build-id.c (build_id_to_debug_bfd): Adjust.
7568 * linux-thread-db.c (thread_db_load_search): Adjust.
7569 * source.c (add_path): Adjust.
7571 * symfile.c (find_separate_debug_file): Adjust.
7572 * utils.c (do_free_char_ptr_vec): Remove.
7573 (make_cleanup_free_char_ptr_vec): Remove.
7575 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
7578 * common/pathstuff.c: Conditionally include "<windows.h>".
7580 2018-03-01 Georg Sauthoff <mail@georg.so>
7583 * gcore.in: Quote variables and switch interpreter to bash.
7585 2018-03-01 Tom Tromey <tom@tromey.com>
7587 * dwarf2read.c (alloc_discriminant_info): Fix default_index
7588 assertion. Add assertion for discriminant_index.
7589 (quirk_rust_enum): Use correct base type name in univariant case.
7591 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
7593 * record.c (get_call_history_modifiers): Return a
7595 (cmd_record_call_history): Adjust.
7596 * record-btrace.c (record_btrace_call_history): Adjust.
7597 (record_btrace_call_history_range): Adjust.
7598 (record_btrace_call_history_from): Adjust.
7599 * target-debug.h (target_debug_print_record_print_flags): New.
7600 * target-delegates.c: Re-generate.
7601 * target.c (target_call_history): Change flags type.
7602 (target_call_history_from): Likewise.
7603 (target_call_history_range): Likewise.
7604 * target.h (struct target_ops) <target_call_history>: Likewise.
7605 (target_call_history_from): Likewise.
7606 (target_call_history_range): Likewise.
7608 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
7609 Simon Marchi <simon.marchi@polymtl.ca>
7611 * common/common-utils.c: Include "sys/stat.h".
7612 (is_regular_file): Move here from "source.c"; change return
7614 * common/common-utils.h (is_regular_file): New prototype.
7615 * common/pathstuff.c (contains_dir_separator): New function.
7616 * common/pathstuff.h (contains_dir_separator): New prototype.
7617 * source.c: Don't include "sys/stat.h".
7618 (is_regular_file): Move to "common/common-utils.c".
7620 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
7622 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
7623 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
7624 * auto-load.c: Include "common/pathstuff.h".
7625 * common/common-def.h (current_directory): Move here.
7626 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
7628 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
7630 * common/pathstuff.c: New file.
7631 * common/pathstuff.h: New file.
7632 * compile/compile.c: Include "common/pathstuff.h".
7633 * defs.h (current_directory): Move to "common/common-defs.h".
7634 * dwarf2read.c: Include "common/pathstuff.h".
7636 * guile/scm-safe-call.c: Likewise.
7637 * linux-thread-db.c: Likewise.
7639 * nto-tdep.c: Likewise.
7640 * objfiles.c: Likewise.
7641 * source.c: Likewise.
7642 * symtab.c: Likewise.
7643 * utils.c: Include "common/pathstuff.h".
7644 (gdb_realpath): Move to "common/pathstuff.c".
7645 (gdb_realpath_keepfile): Likewise.
7646 (gdb_abspath): Likewise.
7647 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
7648 (gdb_realpath_keepfile): Likewise.
7649 (gdb_abspath): Likewise.
7651 2018-02-28 John Baldwin <jhb@FreeBSD.org>
7653 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
7654 wildcard process pid for super_resume for kernels with a
7657 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
7659 * compile/compile.c (get_args): Add additional comments
7660 explaining function.
7662 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
7663 Tom Tromey <tom@tromey.com>
7665 * target.h (memory_write_request_s): Remove typedef. Don't define
7667 (target_write_memory_blocks): Change argument to std::vector.
7668 (struct memory_write_request): Add constructor.
7669 * target-memory.c (compare_block_starting_address): Return bool.
7670 Change argument types.
7671 (claim_memory): Change arguments to use std::vector.
7672 (split_regular_and_flash_blocks, blocks_to_erase)
7673 (compute_garbled_blocks): Likewise.
7674 (cleanup_request_data, cleanup_write_requests_vector): Remove.
7675 (target_write_memory_blocks): Change argument to std::vector.
7676 * symfile.c (struct load_section_data): Add constructor and
7677 destructor. Use std::vector for "requests".
7678 (struct load_progress_data): Add initializers.
7679 (load_section_callback): Update. Use "new".
7680 (clear_memory_write_data): Remove.
7681 (generic_load): Update.
7683 2018-02-27 Alan Hayward <alan.hayward@arm.com>
7685 * arch/aarch64.h: Use common/tdesc.h.
7687 2018-02-26 Maciej W. Rozycki <macro@mips.com>
7689 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
7690 architecture with a 64-bit ABI.
7692 2018-02-26 Maciej W. Rozycki <macro@mips.com>
7694 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
7695 ahead of target description loading.
7697 2018-02-26 Tom Tromey <tom@tromey.com>
7699 * stack.c (backtrace_command_1): Update.
7700 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
7702 * python/py-framefilter.c (py_print_frame)
7703 (gdbpy_apply_frame_filter): Change type of "flags".
7704 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
7706 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
7707 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
7708 * extension.h (enum frame_filter_flag): Rename from
7710 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
7711 (apply_ext_lang_frame_filter): Change type of "flags".
7712 * extension.c (apply_ext_lang_frame_filter): Change type of
7714 * extension-priv.h (struct extension_language_ops)
7715 <apply_frame_filter>: Change type of "flags".
7717 2018-02-26 Tom Tromey <tom@tromey.com>
7720 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
7721 off-by-one in py_end computation.
7722 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
7724 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
7727 2018-02-26 Tom Tromey <tom@tromey.com>
7729 * dwarf2read.c (struct variant_field): New.
7730 (struct nextfield) <variant>: New field.
7731 (dwarf2_add_field): Handle DW_TAG_variant_part.
7732 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
7733 discriminated union.
7734 (read_structure_type): Handle DW_TAG_variant_part.
7735 (handle_struct_member_die): New function, extracted from
7736 process_structure_scope. Handle DW_TAG_variant.
7737 (process_structure_scope): Handle discriminated unions. Call
7738 handle_struct_member_die.
7740 2018-02-26 Tom Tromey <tom@tromey.com>
7742 * rust-lang.h (rust_last_path_segment): Declare.
7743 * rust-lang.c (rust_last_path_segment): Now public. Change
7745 (struct disr_info): Remove.
7746 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
7747 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
7748 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
7749 (rust_enum_p, rust_enum_variant): New function.
7750 (rust_underscore_fields): Remove "offset" parameter.
7751 (rust_print_enum): New function.
7752 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
7753 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
7754 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
7756 (rust_internal_print_type): New function, from rust_print_type.
7758 (rust_print_type): Call rust_internal_print_type.
7759 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
7760 Update enum handling.
7761 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
7762 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
7763 (rust_union_quirks): New functions.
7764 (process_full_comp_unit, process_full_type_unit): Call
7766 (process_structure_scope): Update rust_unions if necessary.
7768 2018-02-26 Tom Tromey <tom@tromey.com>
7770 * value.h (value_union_variant): Declare.
7771 * valops.c (value_union_variant): New function.
7772 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
7773 (struct discriminant_info): New.
7774 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
7776 (struct main_type) <flag_discriminated_union>: New field.
7778 2018-02-26 Tom Tromey <tom@tromey.com>
7780 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7781 unittests/unpack-selftests.c.
7782 * unittests/unpack-selftests.c: New file.
7783 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
7785 2018-02-26 Yao Qi <yao.qi@linaro.org>
7787 * dwarf2read.c (struct partial_die_info) <read>: New method.
7788 (read_partial_die): Remove the declaration.
7789 (load_partial_dies): Update.
7790 (partial_die_info::partial_die_info):
7791 (read_partial_die): Change it to partial_die_info::read.
7793 2018-02-26 Yao Qi <yao.qi@linaro.org>
7795 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
7796 (fixup_partial_die): Remove declaration.
7797 (scan_partial_symbols): Update.
7798 (partial_die_parent_scope): Likewise.
7799 (partial_die_full_name): Likewise.
7800 (fixup_partial_die): Change it to partial_die_info::fixup.
7802 2018-02-26 Yao Qi <yao.qi@linaro.org>
7804 * dwarf2read.c (read_partial_die): Update the declaration.
7805 (load_partial_dies): Caller update.
7806 (read_partial_die): Remove one argument abbrev_len.
7808 2018-02-26 Yao Qi <yao.qi@linaro.org>
7810 * dwarf2read.c (struct partial_die_info): Add ctor, delete
7811 assignment operator.
7812 (load_partial_dies): Use ctor and copy ctor.
7813 (read_partial_die): Update.
7814 (dwarf2_cu::find_partial_die): Use ctor.
7816 2018-02-26 Yao Qi <yao.qi@linaro.org>
7818 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
7819 (find_partial_die_in_comp_unit): Change it to
7820 dwarf2_cu::find_partial_die.
7821 (find_partial_die): Update.
7823 2018-02-26 Yao Qi <yao.qi@linaro.org>
7825 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
7828 2018-02-26 Yao Qi <yao.qi@linaro.org>
7830 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
7832 2018-02-26 Alan Hayward <alan.hayward@arm.com>
7834 * arch/amd64.h: Use common/tdesc.h.
7835 * arch/i386.c: Likewise.
7836 * arch/i386.h: Likewise.
7837 * arch/tic6x.c: Likewise.
7838 * arch/tdesc.h: Move file from here...
7839 * common/tdesc.h: ...to here.
7840 * features/aarch64-core.c: Regenerate.
7841 * features/aarch64-fpu.c: Regenerate.
7842 * features/i386/32bit-avx.c: Regenerate.
7843 * features/i386/32bit-avx512.c: Regenerate.
7844 * features/i386/32bit-core.c: Regenerate.
7845 * features/i386/32bit-linux.c: Regenerate.
7846 * features/i386/32bit-mpx.c: Regenerate.
7847 * features/i386/32bit-pkeys.c: Regenerate.
7848 * features/i386/32bit-sse.c: Regenerate.
7849 * features/i386/64bit-avx.c: Regenerate.
7850 * features/i386/64bit-avx512.c: Regenerate.
7851 * features/i386/64bit-core.c: Regenerate.
7852 * features/i386/64bit-linux.c: Regenerate.
7853 * features/i386/64bit-mpx.c: Regenerate.
7854 * features/i386/64bit-pkeys.c: Regenerate.
7855 * features/i386/64bit-segments.c: Regenerate.
7856 * features/i386/64bit-sse.c: Regenerate.
7857 * features/i386/x32-core.c: Regenerate.
7858 * features/tic6x-c6xp.c: Regenerate.
7859 * features/tic6x-core.c: Regenerate.
7860 * features/tic6x-gp.c: Regenerate.
7861 * target-descriptions.c: Use common/tdesc.h.
7862 * target-descriptions.h: Likewise.
7864 2018-02-24 Tom Tromey <tom@tromey.com>
7866 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
7867 (try_thread_db_load_from_dir, thread_db_load_search): Use
7869 (info_auto_load_libthread_db_compare): Return bool. Change
7871 (info_auto_load_libthread_db): Use std::vector, std::string.
7874 2018-02-24 Tom Tromey <tom@tromey.com>
7876 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
7878 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
7880 * gdbarch.c: Rebuild.
7881 * gdbarch.h: Rebuild.
7882 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
7883 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
7884 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
7887 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
7889 * gdbtypes.h (sect_offset): Change type to uint64_t.
7890 (sect_offset_str): New function.
7891 * dwarf2read.c (create_addrmap_from_aranges): Use
7893 (error_check_comp_unit_head): Likewise.
7894 (create_debug_type_hash_table): Likewise.
7895 (read_cutu_die_from_dwo): Likewise.
7896 (init_cutu_and_read_dies): Likewise.
7897 (init_cutu_and_read_dies_no_follow): Likewise.
7898 (process_psymtab_comp_unit_reader): Likewise.
7899 (partial_die_parent_scope): Likewise.
7900 (peek_die_abbrev): Likewise.
7901 (process_queue): Likewise.
7902 (dwarf2_physname): Likewise.
7903 (read_namespace_alias): Likewise.
7904 (read_import_statement): Likewise.
7905 (create_dwo_cu_reader): Likewise.
7906 (create_cus_hash_table): Likewise.
7907 (lookup_dwo_cutu): Likewise.
7908 (inherit_abstract_dies): Likewise.
7909 (read_func_scope): Likewise.
7910 (read_call_site_scope): Likewise.
7911 (dwarf2_add_member_fn): Likewise.
7912 (read_common_block): Likewise.
7913 (read_module_type): Likewise.
7914 (read_typedef): Likewise.
7915 (read_subrange_type): Likewise.
7916 (load_partial_dies): Likewise.
7917 (read_partial_die): Likewise.
7918 (find_partial_die): Likewise.
7919 (read_str_index): Likewise.
7920 (dwarf2_string_attr): Likewise.
7921 (build_error_marker_type): Likewise.
7922 (lookup_die_type): Likewise.
7923 (dump_die_shallow): Likewise.
7924 (follow_die_ref): Likewise.
7925 (dwarf2_fetch_die_loc_sect_off): Likewise.
7926 (dwarf2_fetch_constant_bytes): Likewise.
7927 (follow_die_sig): Likewise.
7928 (get_signatured_type): Likewise.
7929 (get_DW_AT_signature_type): Likewise.
7930 (dwarf2_find_containing_comp_unit): Likewise.
7931 (set_die_type): Likewise.
7933 2018-02-21 John Baldwin <jhb@FreeBSD.org>
7935 * arch/aarch64.c: Include "common-defs.h".
7936 * arch/amd64.c: Likewise.
7937 * arch/i386.c: Likewise.
7939 2018-02-21 Tom Tromey <tom@tromey.com>
7941 * value.h: (extract_field_op): Update.
7942 * eval.c (extract_field_op): Return a const char *.
7943 * expression.h (parse_expression_for_completion): Update.
7944 * completer.c (complete_expression): Update.
7945 (add_struct_fields): Make fieldname const.
7946 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
7947 (mark_completion_tag, parse_exp_in_context_1): Update.
7948 (parse_expression_for_completion): Change "name" to
7949 unique_xmalloc_ptr*.
7951 2018-02-21 Tom Tromey <tom@tromey.com>
7953 * infcall.c (call_function_by_hand_dummy): Use std::vector.
7955 2018-02-21 Yao Qi <yao.qi@linaro.org>
7957 * avr-tdep.c (avr_read_pc): Change parameter type to
7959 * gdbarch.sh (read_pc): Likewise.
7960 * gdbarch.c: Re-generated.
7961 * gdbarch.h: Re-generated.
7962 * hppa-tdep.c (hppa_read_pc): Change parameter type to
7964 * ia64-tdep.c (ia64_read_pc): Likewise.
7965 * mips-tdep.c (mips_read_pc): Likewise.
7966 * spu-tdep.c (spu_read_pc): Likewise.
7968 2018-02-21 Yao Qi <yao.qi@linaro.org>
7970 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
7971 * regcache-dump.c: New file.
7972 * regcache.c: Move register_dump to regcache-dump.c.
7973 (maintenance_print_registers): Likewise.
7974 (maintenance_print_raw_registers): Likewise.
7975 (maintenance_print_cooked_registers): Likewise.
7976 (maintenance_print_register_groups): Likewise.
7977 (maintenance_print_remote_registers): Likewise.
7978 (_initialize_regcache): Likewise.
7979 * regcache.h (register_dump): Moved from regcache.c.
7981 2018-02-21 Yao Qi <yao.qi@linaro.org>
7983 * regcache.c (regcache::regcache): Update.
7984 (regcache::invalidate): Move it to detached_regcache::invalidate.
7985 (get_thread_arch_aspace_regcache): Update.
7986 (regcache::raw_update): Update.
7987 (regcache::cooked_read): Remove some code.
7988 (regcache::cooked_read_value): Likewise.
7989 (regcache::raw_write): Remove assert on m_readonly_p.
7990 (regcache::raw_supply_integer): Move it to
7991 detached_regcache::raw_supply_integer.
7992 (regcache::raw_supply_zeroed): Likewise.
7993 * regcache.h (detached_regcache) <raw_supply_integer>: New
7995 <raw_supply_zeroed, invalidate>: Likewise.
7996 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
7997 <invalidate>: Likewise.
7998 <m_readonly_p>: Removed.
8000 2018-02-21 Yao Qi <yao.qi@linaro.org>
8002 * infcmd.c (get_return_value): Let stop_regs point to
8003 get_current_regcache.
8004 * regcache.c (regcache::regcache): Remove.
8005 (register_dump_reg_buffer): New class.
8006 (regcache_print): Adjust.
8007 * regcache.h (regcache): Remove constructors.
8009 2018-02-21 Yao Qi <yao.qi@linaro.org>
8011 * regcache.c (class register_dump): New class.
8012 (register_dump_regcache, register_dump_none): New class.
8013 (register_dump_remote, register_dump_groups): New class.
8014 (regcache_print): Update.
8015 * regcache.h (regcache_dump_what): Move it to regcache.c.
8016 (regcache) <dump>: Remove.
8018 2018-02-21 Yao Qi <yao.qi@linaro.org>
8020 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
8022 (jit_unwind_reg_set_impl): Call raw_supply.
8023 (jit_frame_sniffer): Use reg_buffer_rw.
8024 * record-full.c (record_full_core_regbuf): Change its type.
8025 (record_full_core_open_1): Use reg_buffer_rw.
8026 (record_full_close): Likewise.
8027 (record_full_core_fetch_registers): Use regcache->raw_supply.
8028 (record_full_core_store_registers): Likewise.
8029 * regcache.c (regcache::get_register_status): Move it to
8031 (regcache_raw_set_cached_value): Remove.
8032 (regcache::raw_set_cached_value): Remove.
8033 (regcache::raw_write): Call raw_supply.
8034 (regcache::raw_supply): Move it to reg_buffer_rw.
8035 * regcache.h (regcache_raw_set_cached_value): Remove.
8036 (reg_buffer_rw): New class.
8038 2018-02-21 Yao Qi <yao.qi@linaro.org>
8040 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
8041 readonly_detached_regcache.
8042 (dummy_frame_prev_register): Use regcache->cooked_read.
8043 * frame.c (frame_save_as_regcache): Change return type.
8044 (frame_pop): Update.
8045 * frame.h (frame_save_as_regcache): Update declaration.
8046 * inferior.h (get_infcall_suspend_state_regcache): Update
8048 * infrun.c (infcall_suspend_state) <registers>: use
8049 readonly_detached_regcache.
8050 (save_infcall_suspend_state): Don't use regcache_dup.
8051 (get_infcall_suspend_state_regcache): Change return type.
8052 * linux-fork.c (struct fork_info) <savedregs>: Change to
8053 readonly_detached_regcache.
8055 (fork_save_infrun_state): Don't use regcache_dup.
8056 (info_checkpoints_command): Adjust.
8057 * mi/mi-main.c (register_changed_p): Update declaration.
8058 (mi_cmd_data_list_changed_registers): Use
8059 readonly_detached_regcache.
8060 (register_changed_p): Change parameter type to
8061 readonly_detached_regcache.
8062 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
8063 readonly_detached_regcache.
8064 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
8065 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
8067 (regcache::save): Move it to reg_buffer.
8068 (regcache::restore): Change parameter type.
8069 (regcache_dup): Remove.
8070 * regcache.h (reg_buffer) <save>: New method.
8071 (readonly_detached_regcache): New class.
8072 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
8073 readonly_detached_regcache.
8074 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
8076 2018-02-21 Yao Qi <yao.qi@linaro.org>
8078 * frame.c (frame_save_as_regcache): Use regcache method save.
8079 (frame_pop): Use regcache method restore.
8080 * infrun.c (restore_infcall_suspend_state): Likewise.
8081 * linux-fork.c (fork_load_infrun_state): Likewise.
8082 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
8084 * regcache.c (regcache_save): Remove.
8085 (regcache::restore): More asserts.
8086 (regcache_cpy): Remove.
8087 * regcache.h (regcache_save): Remove the declaration.
8088 (regcache::restore): Move from private to public.
8089 Remove the friend declaration of regcache_cpy.
8090 (regcache_cpy): Remove declaration.
8092 2018-02-21 Yao Qi <yao.qi@linaro.org>
8094 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
8095 parameter type to 'readable_regcache *'.
8096 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
8097 * arm-tdep.c (arm_neon_quad_read): Likewise.
8098 (arm_pseudo_read): Likewise.
8099 * avr-tdep.c (avr_pseudo_register_read): Likewise.
8100 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
8101 * frv-tdep.c (frv_pseudo_register_read): Likewise.
8102 * gdbarch.c: Re-generated.
8103 * gdbarch.h: Re-generated.
8104 * gdbarch.sh (pseudo_register_read): Change parameter type to
8105 'readable_regcache *'.
8106 (pseudo_register_read_value): Likewise.
8107 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
8108 (h8300_pseudo_register_read): Likewise.
8109 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
8110 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
8111 (i386_pseudo_register_read_into_value): Likewise.
8112 (i386_pseudo_register_read_value): Likewise.
8113 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
8115 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
8116 * m32c-tdep.c (m32c_raw_read): Likewise.
8117 (m32c_read_flg): Likewise.
8118 (m32c_banked_register): Likewise.
8119 (m32c_banked_read): Likewise.
8120 (m32c_sb_read): Likewise.
8121 (m32c_part_read): Likewise.
8122 (m32c_cat_read): Likewise.
8123 (m32c_r3r2r1r0_read): Likewise.
8124 (m32c_pseudo_register_read): Likewise.
8125 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
8126 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
8127 (mep_pseudo_cr64_read): Likewise.
8128 (mep_pseudo_register_read): Likewise.
8129 * mips-tdep.c (mips_pseudo_register_read): Likewise.
8130 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
8131 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
8132 * regcache.c (regcache::raw_read): Move it to readable_regcache.
8133 (regcache::cooked_read): Likewise.
8134 (regcache::cooked_read_value): Likewise.
8135 (regcache_cooked_read_signed):
8136 (regcache::cooked_read): Likewise.
8137 * regcache.h (readable_regcache): New class.
8138 (regcache): Inherit readable_regcache. Move some methods to
8140 * rl78-tdep.c (rl78_pseudo_register_read): Change
8141 parameter type to 'readable_regcache *'.
8142 * rs6000-tdep.c (do_regcache_raw_read): Remove.
8143 (e500_pseudo_register_read): Change parameter type to
8144 'readable_regcache *'.
8145 (dfp_pseudo_register_read): Likewise.
8146 (vsx_pseudo_register_read): Likewise.
8147 (efpr_pseudo_register_read): Likewise.
8148 * s390-tdep.c (s390_pseudo_register_read): Likewise.
8149 * sh-tdep.c (sh_pseudo_register_read): Likewise.
8150 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
8151 (sh64_pseudo_register_read): Likewise.
8152 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
8153 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
8154 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
8155 (spu_pseudo_register_read): Likewise.
8156 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
8157 (xtensa_pseudo_register_read): Likewise.
8159 2018-02-21 Yao Qi <yao.qi@linaro.org>
8161 * regcache.c (regcache::regcache): Call reg_buffer ctor.
8162 (regcache::arch): Move it to reg_buffer::arch.
8163 (regcache::register_buffer): Likewise.
8164 (regcache::assert_regnum): Likewise.
8165 (regcache::num_raw_registers): Likewise.
8166 * regcache.h (reg_buffer): New class.
8167 (regcache): Inherit reg_buffer.
8169 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
8171 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
8172 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
8174 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
8176 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
8178 2018-02-19 Alan Hayward <alan.hayward@arm.com>
8180 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
8181 (SFILES): Remove common/*.c files.
8182 (COMMON_OBS): Remove some *.o files built from common/*.c files.
8183 * common/common.host: Add common reference.
8184 * configure.ac: Likewise.
8185 * configure: Regenerate.
8187 2018-02-16 Yao Qi <yao.qi@linaro.org>
8189 * block.c (block_namespace_info): Inherit allocate_on_obstack.
8190 (block_initialize_namespace): Use new.
8191 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
8192 (dwarf2_free_objfile): Use delete.
8193 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
8194 (copy_type_recursive): Use new.
8195 * gdb_obstack.h (allocate_on_obstack): New.
8197 2018-02-15 Yao Qi <yao.qi@linaro.org>
8200 * inferior.c (exit_inferior_1): Reset inf->control.
8202 2018-02-15 Joel Brobecker <brobecker@adacore.com>
8204 * ada-lang.c (ada_to_fixed_value_create): Delete advance
8207 2018-02-14 Pedro Alves <palves@redhat.com>
8209 * frame-unwind.c (frame_unwind_try_unwinder): Always call
8210 frame_cleanup_after_sniffer on exception.
8212 2018-02-14 Tom Tromey <tom@tromey.com>
8214 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
8216 (solib_bfd_open): Make pathname const.
8217 * solib.c (solib_bfd_open): Make pathname const.
8218 * solib-spu.c (spu_bfd_fopen): Make name const.
8219 (spu_bfd_open): Make pathname const.
8220 * solib-darwin.c (darwin_bfd_open): Make pathname const.
8221 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
8223 2018-02-14 Tom Tromey <tom@tromey.com>
8225 * symfile.c (symfile_bfd_open): Update.
8226 * source.h (openp, source_full_path_of, find_and_open_source):
8227 Change argument type to unique_xmalloc_ptr.
8228 * source.c (openp): Take a unique_xmalloc_ptr.
8229 (source_full_path_of, find_and_open_source): Likewise.
8230 (open_source_file, symtab_to_fullname): Update.
8231 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
8233 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
8234 (exec_file_find): Update.
8235 * psymtab.c (psymtab_to_fullname): Update.
8236 * nto-tdep.h (nto_find_and_open_solib): Update.
8237 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
8239 * exec.c (exec_file_attach): Update.
8240 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
8241 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
8243 2018-02-14 Tom Tromey <tom@tromey.com>
8245 * solib.c: Include source.h.
8246 * nto-tdep.c: Include source.h.
8247 * mi/mi-cmd-env.c: Include source.h.
8248 * infcmd.c: Include source.h.
8249 * exec.c: Include source.h.
8250 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
8251 (add_path, directory_switch, source_path, init_source_path): Move
8253 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
8254 (add_path, directory_switch, source_path, init_source_path):
8257 2018-02-14 Tom Tromey <tom@tromey.com>
8259 * solist.h (exec_file_find, solib_find): Return
8261 (solib_bfd_fopen): Take a const char *.
8262 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
8263 (exec_file_find, solib_find): Likewise.
8264 (solib_bfd_fopen): Do not take ownership of "pathname".
8265 (solib_bfd_open): Use unique_xmalloc_ptr.
8266 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
8267 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
8268 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
8269 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
8271 2018-02-14 Joel Brobecker <brobecker@adacore.com>
8273 * ada-lang.c (name_match_type_from_name): Remove reference to
8274 ada_name_for_lookup in function's documentation.
8275 * ada-lang.h (ada_name_for_lookup): Delete declaration.
8277 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
8279 * defs.h (enum openp_flags): New enum.
8280 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
8281 Move to enum openp_flags.
8282 (openp_flags): New enum flags.
8283 (openp): Change parameter type to openp_flags.
8284 * source.c (openp): Change parameter type to openp_flags.
8285 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
8286 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
8288 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
8290 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
8293 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
8295 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
8297 (class dwarf2_queue_guard): ...the destructor of this new class.
8298 (dw2_do_instantiate_symtab): Create instance of the new class
8299 dwarf2_queue_guard, remove cleanup.
8301 2018-02-09 Tom Tromey <tom@tromey.com>
8303 * source.c (find_source_lines): Don't reference past the end of
8306 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8308 * remote.c (remote_btrace_maybe_reopen): Change error message.
8309 * btrace.c (btrace_enable): Likewise.
8310 (parse_xml_btrace): Likewise.
8311 (parse_xml_btrace_conf): Likewise.
8313 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8315 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
8316 (linux_enable_pt, linux_enable_bts): Call
8317 diagnose_perf_event_open_fail.
8319 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8321 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
8322 Remove parameter and change return type. Update callers. Move it.
8323 (linux_enable_bts, linux_enable_pt): Improve error message.
8324 (linux_enable_pt): Remove zero buffer size check.
8325 (linux_enable_btrace): Improve error messages. Remove NULL return
8328 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8330 * btrace.c (btrace_enable): Remove target_supports_btrace call.
8331 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
8332 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
8333 (linux_supports_pt, linux_supports_btrace): Remove.
8334 (linux_enable_bts): Call cpu_supports_bts.
8335 * nat/linux-btrace.h (linux_supports_btrace): Remove.
8336 * remote.c (remote_supports_btrace): Remove.
8337 (init_remote_ops): Remove remote_supports_btrace.
8338 * target-delegates.c: Regenerated.
8339 * target.c (target_supports_btrace): Remove.
8340 * target.h (target_ops) <to_supports_btrace>: Remove
8341 (target_supports_btrace): Remove.
8342 * x86-linux-nat.c (x86_linux_create_target): Remove
8343 linux_supports_btrace.
8345 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8347 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
8349 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
8350 exception and use message in own exception.
8352 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8354 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
8355 (perf_event_pt_event_type): Use gdb_file_up.
8356 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
8357 scoped_fd, and scoped_mmap.
8359 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8361 * common/scoped_mmap.h: New.
8362 * unittests/scoped_mmap-selftest.c: New.
8363 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8364 unittests/scoped_mmap-selftest.c.
8366 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
8368 * common/scoped_fd.h: New.
8369 * unittests/scoped_fd-selftest.c: New.
8370 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8371 unittests/scoped_fd-selftest.c.
8373 2018-02-09 Tom Tromey <tom@tromey.com>
8375 * auto-load.c (auto_load_section_scripts): Use
8376 gdb::unique_xmalloc_ptr.
8378 2018-02-09 Tom Tromey <tom@tromey.com>
8380 * auto-load.c (execute_script_contents): Use std::string.
8382 2018-02-09 Joel Brobecker <brobecker@adacore.com>
8384 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
8385 Python function, rather than a new command.
8387 2018-02-08 Tom Tromey <tom@tromey.com>
8389 * solib.c (solib_find_1): Use std::string.
8390 (solib_bfd_fopen): Use unique_xmalloc_ptr.
8392 2018-02-08 Tom Tromey <tom@tromey.com>
8394 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
8396 2018-02-08 Tom Tromey <tom@tromey.com>
8398 * source.c (find_source_lines): Use gdb::def_vector.
8400 2018-02-08 Tom Tromey <tom@tromey.com>
8402 * macrocmd.c (struct temporary_macro_definition): New.
8403 (macro_define_command): Use temporary_macro_definition. Remove
8405 (free_macro_definition_ptr): Remove.
8407 2018-02-08 Tom Tromey <tom@tromey.com>
8409 * macroexp.c (maybe_expand): Use std::string.
8411 2018-02-08 Tom Tromey <tom@tromey.com>
8413 * macroexp.c (struct macro_buffer): Add initializers for some
8415 (init_buffer, init_shared_buffer, free_buffer)
8416 (free_buffer_return_text): Remove.
8417 (macro_buffer): New constructors.
8418 (~macro_buffer): New destructor.
8419 (macro_buffer::set_shared): New method.
8420 (macro_buffer::resize_buffer, macro_buffer::appendc)
8421 (macro_buffer::appendmem): Now methods, not free functions.
8422 (set_token, append_tokens_without_splicing, stringify)
8423 (macro_stringify): Update.
8424 (gather_arguments): Change return type. Remove argc_p argument,
8425 add args_ptr argument. Use std::vector.
8426 (substitute_args): Remove argc argument. Accept std::vector.
8427 (expand): Update. Use std::vector.
8428 (scan, macro_expand, macro_expand_next): Update.
8430 2018-02-08 Tom Tromey <tom@tromey.com>
8432 * symtab.c (default_collect_symbol_completion_matches_break_on):
8433 Use unique_xmalloc_ptr.
8434 * macroscope.h: (sal_macro_scope, user_macro_scope)
8435 (default_macro_scope): Return unique_xmalloc_ptr.
8436 * macroscope.c (sal_macro_scope, user_macro_scope)
8437 (default_macro_scope): Return unique_xmalloc_ptr.
8438 * macroexp.h (macro_expand, macro_expand_once): Return
8440 * macroexp.c (macro_expand, macro_expand_once): Return
8442 * macrocmd.c (macro_expand_command, macro_expand_once_command)
8443 (info_macro_command, info_macros_command): Use
8445 * compile/compile-c-support.c (write_macro_definitions): Use
8447 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
8449 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
8451 * value.c (value_static_field): Assign field type instead of
8452 containing type when returning an optimized out value.
8454 2018-02-06 Yao Qi <yao.qi@linaro.org>
8456 * ft32-tdep.c (ft32_read_pc): Remove.
8457 (ft32_write_pc): Remove.
8458 (ft32_gdbarch_init): Update.
8459 * m32r-tdep.c (m32r_read_pc): Remove.
8460 (m32r_gdbarch_init): Update.
8461 * mep-tdep.c (mep_read_pc): Remove.
8462 (mep_gdbarch_init): Update.
8463 * microblaze-tdep.c (microblaze_write_pc): Remove.
8464 (microblaze_gdbarch_init): Update.
8465 * mn10300-tdep.c (mn10300_read_pc): Remove.
8466 (mn10300_write_pc): Remove.
8467 (mn10300_gdbarch_init): Update.
8468 * moxie-tdep.c (moxie_read_pc): Remove.
8469 (moxie_write_pc): Remove.
8470 (moxie_gdbarch_init): Update.
8472 2018-02-06 Yao Qi <yao.qi@linaro.org>
8474 * expprint.c (print_subexp_standard): Handle
8475 OP_F77_UNDETERMINED_ARGLIST.
8476 (dump_subexp_body_standard): Likewise.
8478 2018-02-05 Alan Hayward <alan.hayward@arm.com>
8480 * target-descriptions.c (tdesc_element_visitor) Add empty
8482 (tdesc_type): Move make_gdb_type from here.
8483 (tdesc_type_builtin): Likewise.
8484 (tdesc_type_vector): Likewise.
8485 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
8486 (make_gdb_type_struct): Move from tdesc_type_with_fields.
8487 (make_gdb_type_union): Likewise.
8488 (make_gdb_type_flags): Likewise.
8489 (make_gdb_type_enum): Likewise.
8490 (make_gdb_type): New function.
8491 (tdesc_register_type): Use static make_gdb_type.
8493 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
8495 * infcmd.c (default_print_one_register_info): Align natural-format
8496 column values consistently one under another.
8497 (pad_to_column): New function.
8499 2018-02-05 Joel Brobecker <brobecker@adacore.com>
8501 * dwarf2read.c (dwarf2_physname): Move commment.
8503 2018-02-01 Leszek Swirski <leszeks@google.com>
8505 * varobj.c (varobj_formatted_print_options): Allow recursive
8506 pretty printing if pretty printing is enabled.
8508 2018-02-01 Leszek Swirski <leszeks@google.com>
8510 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
8511 names after a structop as a filename.
8513 2018-02-01 Yao Qi <yao.qi@linaro.org>
8515 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
8516 (arm_record_coproc_data_proc): Likewise.
8518 2018-02-01 Yao Qi <yao.qi@linaro.org>
8520 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
8522 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
8524 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
8525 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
8527 2018-01-31 Pedro Alves <palves@redhat.com>
8529 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
8530 * inflow.c (child_terminal_save_inferior): Wrap reference to
8531 tcgetpgrp in HAVE_TERMIOS_H.
8532 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
8534 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
8535 always iterate over all inferiors.
8536 (gdbsim_cntrl_c): Adjust.
8537 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
8539 2018-01-31 Joel Brobecker <brobecker@adacore.com>
8541 * gdbtypes.c (lookup_array_range_type): Make sure the array's
8542 index type is objfile-owned if the element type is as well.
8544 2018-01-31 Joel Brobecker <brobecker@adacore.com>
8548 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
8550 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
8551 "features/s390x-linux64.c".
8552 (_initialize_s390_linux_tdep): Remove initialization of tdescs
8553 s390_linux32 and s390x_linux64.
8554 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
8556 * s390-tdep.c: Include "features/s390-linux32.c" and
8557 "features/s390x-linux64.c".
8558 (s390_tdesc_valid): Add check for tdesc_has_registers.
8559 (s390_gdbarch_init): Make sure there is always a valid tdesc.
8560 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
8561 tdesc_s390x_linux64.
8562 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
8563 tdesc_s390x_linux64 to...
8564 * s390-tdep.h: ...here.
8566 2018-01-30 Pedro Alves <palves@redhat.com>
8569 * config.in, configure: Regenerate.
8570 * configure.ac: Check for getpgid.
8571 * go32-nat.c (go32_pass_ctrlc): New.
8572 (go32_target): Install it.
8573 * inf-child.c (inf_child_target): Install
8574 child_terminal_save_inferior, child_pass_ctrlc and
8576 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
8577 (inf_ptrace_target): No longer install it.
8578 * infcmd.c (interrupt_target_1): Adjust.
8579 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
8580 (child_interrupt): Declare.
8581 (inferior::terminal_state): New.
8582 * inflow.c (struct terminal_info): Update comments.
8583 (inferior_process_group): Delete.
8584 (terminal_is_ours): Delete.
8585 (gdb_tty_state): New.
8586 (child_terminal_init): Adjust.
8587 (is_gdb_terminal, sharing_input_terminal_1)
8588 (sharing_input_terminal): New functions.
8589 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
8590 Set the process's actual process group in the foreground if
8591 possible. Handle is_ours_for_output/is_ours distinction. Don't
8592 mark terminal as the inferior's if not sharing GDB's terminal.
8593 Don't check attach_flag.
8594 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
8595 pass down a target_terminal_state.
8596 (child_terminal_save_inferior): New, factored out from ...
8597 (child_terminal_ours_1): ... this. Handle
8598 target_terminal_state::is_ours_for_output.
8599 (child_interrupt, child_pass_ctrlc): New.
8600 (inflow_inferior_exit): Clear the inferior's terminal_state.
8601 (copy_terminal_info): Copy the inferior's terminal state.
8602 (_initialize_inflow): Remove reference to terminal_is_ours.
8603 * inflow.h (inferior_process_group): Delete.
8604 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
8605 * procfs.c (procfs_target): Don't install procfs_interrupt.
8606 (procfs_interrupt): Delete.
8607 * remote.c (remote_serial_quit_handler): Adjust.
8608 (remote_interrupt): Remove ptid parameter. Adjust.
8609 * target-delegates.c: Regenerate.
8610 * target.c: Include "terminal.h".
8611 (target_terminal::terminal_state): Rename to ...
8612 (target_terminal::m_terminal_state): ... this.
8613 (target_terminal::init): Adjust.
8614 (target_terminal::inferior): Adjust to per-inferior
8616 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
8617 (target_terminal::ours, target_terminal::ours_for_output): Use
8618 target_terminal_is_ours_kind.
8619 (target_interrupt): Remove ptid parameter. Adjust.
8620 (default_target_pass_ctrlc): Adjust.
8621 * target.h (target_ops::to_terminal_save_inferior): New field.
8622 (target_ops::to_interrupt): Remove ptid_t parameter.
8623 (target_interrupt): Remove ptid_t parameter. Update comment.
8624 (target_pass_ctrlc): Update comment.
8625 * target/target.h (target_terminal_state): New scoped enum,
8627 (target_terminal::terminal_state): ... here.
8628 (target_terminal::inferior): Update comments.
8629 (target_terminal::restore_inferior): New.
8630 (target_terminal::is_inferior, target_terminal::is_ours)
8631 (target_terminal::is_ours_for_output): Adjust.
8632 (target_terminal::scoped_restore_terminal_state): Adjust to
8633 rename, and call restore_inferior() instead of inferior().
8634 (target_terminal::scoped_restore_terminal_state::m_state): Change
8636 (target_terminal::terminal_state): Rename to ...
8637 (target_terminal::m_terminal_state): ... this and change type.
8639 2018-01-30 Pedro Alves <palves@redhat.com>
8641 * linux-nat.c (wait_for_signal): New function.
8642 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
8644 (async_terminal_is_ours)
8645 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
8646 (linux_nat_add_target): Don't override
8647 to_terminal_inferior/to_terminal_ours.
8649 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
8651 * remote.c (remote_follow_fork): Don't call "detach_inferior".
8653 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
8655 * dwarf2read.c (free_dwo_files): Add forward-declaration.
8656 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
8657 dwarf2_per_objfile_free here.
8658 (dwarf2_per_objfile_free): Remove.
8659 (_initialize_dwarf2_read): Don't register
8660 dwarf2_per_objfile_free as a registry cleanup.
8662 2018-01-27 Eli Zaretskii <eliz@gnu.org>
8664 Avoid compilation errors in MinGW native builds
8666 The error is triggered by including python-internal.h, and the
8669 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
8670 from build-gnulib/import/math.h:27,
8671 from d:/usr/Python26/include/pyport.h:235,
8672 from d:/usr/Python26/include/Python.h:58,
8673 from python/python-internal.h:94,
8674 from python/py-arch.c:24:
8675 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
8679 This happens because Python headers define 'hypot' to expand t
8680 '_hypot' in the Windows builds.
8681 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
8682 'hypoth'. This avoids a compilation error.
8684 2018-01-26 Alan Hayward <alan.hayward@arm.com>
8686 * MAINTAINERS (Write After Approval): Fix ordering.
8688 2018-01-26 Alan Hayward <alan.hayward@arm.com>
8690 * MAINTAINERS (Write After Approval): Add Alan Hayward.
8692 2018-01-26 Alan Modra <amodra@gmail.com>
8694 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
8695 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
8696 Remove nop. Make const. Comment.
8697 (powerpc32_plt_stub_so_2): New.
8698 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
8699 Correct count. Update uses.
8700 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
8701 Move common code reading PLT entry word. Correct
8702 powerpc32_plt_stub PLT address calculation.
8703 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
8704 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
8705 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
8706 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
8707 (ppc64_standard_linkage8): Likewise.
8708 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
8709 Correct insns description.
8710 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
8712 2018-01-24 Pedro Alves <palves@redhat.com>
8714 GCC PR libstdc++/83906
8715 * gdbtypes.c (operator==(const dynamic_prop &,
8716 const dynamic_prop &)): New.
8717 (operator==(const range_bounds &, const range_bounds &)): New.
8718 (check_types_equal): Use them instead of memcmp.
8719 * gdbtypes.h (operator==(const dynamic_prop &,
8720 const dynamic_prop &)): Declare.
8721 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
8722 (operator==(const range_bounds &, const range_bounds &)): Declare.
8723 (operator!=(const range_bounds &, const range_bounds &)): Declare.
8725 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8727 * s390-linux-tdep.c (s390_record_address_mask)
8728 (s390_record_calc_disp_common, s390_record_calc_disp)
8729 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
8730 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
8731 (s390_process_record): Move to s390-tdep.c.
8732 (s390_linux_init_abi_any): Adjust.
8733 * s390-tdep.c (s390_record_address_mask)
8734 (s390_record_calc_disp_common, s390_record_calc_disp)
8735 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
8736 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
8737 (s390_process_record): Moved from s390-linux-tdep.c
8738 (s390_gdbarch_init): Adjust.
8740 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8742 * s390-linux-nat.c (s390-tdep.h): New include.
8743 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
8744 (HFILES_NO_SRCDIR): Add s390-tdep.h.
8745 (ALLDEPFILES): Add s390-tdep.c.
8746 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
8747 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
8748 * s390-tdep.h: ...this. New file.
8749 * s390-linux-tdep.c (s390-tdep.h): New include.
8750 (_initialize_s390_tdep): Rename to...
8751 (_initialize_s390_linux_tdep): ...this and adjust.
8752 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
8753 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
8755 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
8756 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
8757 (s390_is_partial_instruction, s390_software_single_step)
8758 (is_non_branch_ril, s390_displaced_step_copy_insn)
8759 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
8760 (s390_prologue_data, s390_addr, s390_store, s390_load)
8761 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
8762 (s390_register_call_saved, s390_guess_tracepoint_registers)
8763 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
8764 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
8765 (s390_pseudo_register_name, s390_pseudo_register_type)
8766 (s390_pseudo_register_read, s390_pseudo_register_write)
8767 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
8768 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
8769 (s390_addr_bits_remove, s390_address_class_type_flags)
8770 (s390_address_class_type_flags_to_name)
8771 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
8772 (s390_function_arg_float, s390_function_arg_vector)
8773 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
8774 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
8775 (s390_frame_align, s390_register_return_value, s390_return_value)
8776 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
8777 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
8778 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
8779 (s390_trad_frame_prev_register, s390_unwind_cache)
8780 (s390_prologue_frame_unwind_cache)
8781 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
8782 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
8783 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
8784 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
8785 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
8786 (s390_frame_base_address, s390_local_base_address)
8787 (s390_frame_base, s390_gcc_target_options)
8788 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
8789 (s390_validate_reg_range, s390_tdesc_valid)
8790 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
8791 * s390-tdep.c: ...this. New file.
8793 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8795 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
8796 (s390_process_record, s390_gdbarch_tdep_alloc)
8797 (s390_linux_init_abi_any): Use/set new hook.
8799 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8801 * s390-linux-tdep.c (osabi.h): New include.
8802 (s390_linux_init_abi_31, s390_linux_init_abi_64)
8803 (s390_linux_init_abi_any): New functions.
8804 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
8806 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8808 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
8809 tdesc_has_registers check
8811 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8813 * s390-linux-tdep.c (s390_tdesc_valid): New function.
8814 (s390_validate_reg_range): New macro.
8815 (s390_gdbarch_init): Adjust.
8817 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8819 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
8820 (s390_gdbarch_tdep_alloc): Adjust.
8821 (s390_gdbarch_init): Adjust.
8823 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8825 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
8826 <have_tdb>: Change type to bool.
8827 (s390_gdbarch_tdep_alloc): Adjust.
8828 (s390_gdbarch_init): Adjust.
8830 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8832 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
8833 (gdbarch_tdep) <have_upper, have_vx>: New fields.
8834 (s390_gdbarch_tdep_alloc): New function.
8835 (s390_gdbarch_init): Allocate tdep at start and use its fields
8836 instead of separate variables.
8838 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
8840 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
8841 when looking for cached gdbarch and add comment for remaining.
8843 2018-01-22 Pedro Alves <palves@redhat.com>
8844 Sergio Durigan Junior <sergiodj@redhat.com>
8846 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
8849 2018-01-22 Maciej W. Rozycki <macro@mips.com>
8851 * MAINTAINERS: Update my company e-mail address.
8853 2018-01-22 Yao Qi <yao.qi@linaro.org>
8855 * regcache.c (cooked_write_test): New function.
8856 (_initialize_regcache): Register the test.
8858 2018-01-22 Yao Qi <yao.qi@linaro.org>
8860 * ia64-tdep.c (ia64_pseudo_register_read): Call
8861 regcache->cooked_read instead of regcache_cooked_read_unsigned.
8862 * m32c-tdep.c (m32c_cat_read): Likewise.
8863 (m32c_r3r2r1r0_read): Likewise.
8864 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
8865 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
8867 2018-01-22 Yao Qi <yao.qi@linaro.org>
8869 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
8870 method raw_read instead of regcache_raw_read.
8871 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
8872 * arm-tdep.c (arm_neon_quad_read): Likewise.
8873 * avr-tdep.c (avr_pseudo_register_read): Likewise.
8874 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
8875 * frv-tdep.c (frv_pseudo_register_read): Likewise.
8876 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
8877 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
8878 (i386_pseudo_register_read_into_value): Likewise.
8879 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
8880 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
8881 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
8882 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
8883 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
8884 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
8885 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
8886 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
8887 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
8889 2018-01-22 Yao Qi <yao.qi@linaro.org>
8891 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
8892 * configure.tgt: Remove target mt.
8893 * mt-tdep.c: Remove.
8894 * regcache.c (cooked_read_test): Remove the check for mt.
8896 2018-01-22 Yao Qi <yao.qi@linaro.org>
8898 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
8899 instead of gdbarch_pseudo_register_read_value.
8901 2018-01-22 Joel Brobecker <brobecker@adacore.com>
8903 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
8906 2018-01-22 Joel Brobecker <brobecker@adacore.com>
8908 * linespec.c (create_sals_line_offset): Remove code that preserved
8909 the symtab_and_line's line number.
8911 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8913 * varobj.c (varobj_create): Don't set valid_block when creating a
8916 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8918 * varobj.c (varobj_create): Remove out of date comment.
8920 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8923 * ada-exp.y (write_var_from_sym): Pass extra parameter when
8924 updating innermost block.
8925 * parse.c (innermost_block_tracker::update): Take extra type
8926 parameter, and check types match before updating innermost block.
8927 (write_dollar_variable): Update innermost block for registers.
8928 * parser-defs.h (enum innermost_block_tracker_type): New enum.
8929 (innermost_block_tracker::innermost_block_tracker): Initialise
8931 (innermost_block_tracker::reset): Take type parameter.
8932 (innermost_block_tracker::update): Take type parameter, and pass
8933 type through as needed.
8934 (innermost_block_tracker::m_types): New member.
8935 * varobj.c (varobj_create): Pass type when reseting innermost
8938 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8940 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
8941 * ada-lang.c (resolve_subexp): Likewise.
8942 * breakpoint.c (set_breakpoint_condition) Likewise.
8943 (watch_command_1) Likewise.
8944 * c-exp.y (variable): Likewise.
8945 * d-exp.y (PrimaryExpression): Likewise.
8946 * f-exp.y (variable): Likewise.
8947 * go-exp.y (variable): Likewise.
8948 * m2-exp.y (variable): Likewise.
8949 * objfiles.c (objfile::~objfile): Likewise.
8950 * p-exp.y (variable): Likewise.
8951 * parse.c (innermost_block): Change type.
8952 * parser-defs.h (class innermost_block_tracker): New.
8953 (innermost_block): Change to innermost_block_tracker.
8954 * printcmd.c (display_command): Switch to innermost_block API.
8955 (do_one_display): Likewise.
8956 * rust-exp.y (do_one_display): Likewise.
8957 * symfile.c (clear_symtab_users): Likewise.
8958 * varobj.c (varobj_create): Switch to innermost_block API, replace
8959 use of innermost_block with block stored on varobj object.
8961 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
8963 * expression.h (innermost_block): Remove declaration.
8964 * varobj.c: Add 'parser-defs.h' include.
8966 2018-01-19 Tom Tromey <tom@tromey.com>
8968 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
8969 symbols in the static and global blocks.
8971 2018-01-19 James Clarke <jrtc27@jrtc27.com>
8973 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
8974 gdb_ptrace.h, and move including gdb_wait.h ...
8975 * nat/linux-ptrace.h: ... to here.
8977 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
8979 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
8980 inf_ptrace_detach_success.
8981 (inf_ptrace_detach_success): Add inferior parameter, use it
8982 instead of inferior_ptid, pass it to detach_inferior.
8983 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
8985 * inferior.c (detach_inferior): Add overload that takes an
8987 * inferior.h (detach_inferior): Likewise.
8988 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
8989 use inferior_ptid, adjust call to inf_ptrace_detach_success.
8990 * linux-thread-db.c (thread_db_detach): Use inf parameter.
8992 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
8994 * target.h (struct target_ops) <to_detach>: Add inferior
8996 (target_detach): Likewise.
8997 * target.c (dispose_inferior): Pass inferior down.
8998 (target_detach): Pass inferior down. Assert that it is equal to
8999 the current inferior.
9000 * aix-thread.c (aix_thread_detach): Pass inferior down.
9001 * corefile.c (core_file_command): Pass current_inferior() down.
9002 * corelow.c (core_detach): Add inferior parameter.
9003 * darwin-nat.c (darwin_detach): Likewise.
9004 * gnu-nat.c (gnu_detach): Likewise.
9005 * inf-ptrace.c (inf_ptrace_detach): Likewise.
9006 * infcmd.c (detach_command): Pass current_inferior() down to
9008 * infrun.c (follow_fork_inferior): Pass parent_inf to
9010 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
9012 * linux-nat.c (linux_nat_detach): Add inferior parameter.
9013 * linux-thread-db.c (thread_db_detach): Likewise.
9014 * nto-procfs.c (procfs_detach): Likewise.
9015 * procfs.c (procfs_detach): Likewise.
9016 * record.c (record_detach): Likewise.
9017 * record.h (struct inferior): Forward-declare.
9018 (record_detach): Add inferior parameter.
9019 * remote-sim.c (gdbsim_detach): Likewise.
9020 * remote.c (remote_detach_1): Likewise.
9021 (remote_detach): Likewise.
9022 (extended_remote_detach): Likewise.
9023 * sol-thread.c (sol_thread_detach): Likewise.
9024 * target-debug.h (target_debug_print_inferior_p): New macro.
9025 * target-delegates.c: Re-generate.
9026 * top.c (kill_or_detach): Pass inferior down to target_detach.
9027 * windows-nat.c (windows_detach): Add inferior parameter.
9029 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
9031 * target.h (struct target_ops) <to_detach>: Remove args
9033 (target_detach): Likewise.
9034 * target.c (dispose_inferior): Adjust.
9035 (target_detach): Remove args parameter, adjust.
9036 * aix-thread.c (aix_thread_detach): Adjust.
9037 * corefile.c (core_file_command): Adjust.
9038 * corelow.c (core_detach): Adjust.
9039 * darwin-nat.c (darwin_detach): Adjust.
9040 * gnu-nat.c (gnu_detach): Adjust.
9041 * inf-ptrace.c (inf_ptrace_detach): Adjust.
9042 * infcmd.c (detach_command): Adjust
9043 * infrun.c (follow_fork_inferior): Adjust.
9044 (handle_vfork_child_exec_or_exit): Adjust.
9045 * linux-fork.c (linux_fork_detach): Remove args parameter.
9046 * linux-fork.h (linux_fork_detach): Likewise.
9047 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
9048 * linux-thread-db.c (thread_db_detach): Likewise.
9049 * nto-procfs.c (procfs_detach): Likewise.
9050 * procfs.c (procfs_detach): Likewise.
9051 (do_detach): Remove signo parameter.
9052 * record.c (record_detach): Remove args parameter.
9053 * record.h (record_detach): Likewise.
9054 * remote-sim.c (gdbsim_detach): Likewise.
9055 * remote.c (remote_detach_1): Likewise.
9056 (remote_detach): Likewise.
9057 (extended_remote_detach): Likewise.
9058 * sol-thread.c (sol_thread_detach): Likewise.
9059 * target-delegates.c: Re-generate.
9060 * top.c (struct qt_args) <args>: Remove field.
9061 (kill_or_detach): Don't pass args.
9062 (quit_force): Don't set args.
9063 * windows-nat.c (windows_detach): Remove args parameter.
9065 2018-01-19 Yao Qi <yao.qi@linaro.org>
9067 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
9068 (arm_linux_init_abi): Install it.
9070 2018-01-19 Yao Qi <yao.qi@linaro.org>
9072 * osabi.c (gdb_osabi_names): Extend the regexp for
9073 arm-linux-gnueabihf.
9075 2018-01-18 Yao Qi <yao.qi@linaro.org>
9077 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
9079 (abbrev_table::add_abbrev): Update.
9080 (abbrev_table::lookup_abbrev): Update.
9082 2018-01-18 Yao Qi <yao.qi@linaro.org>
9084 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
9086 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
9088 * compile/compile.c (compile_to_object): Convert "triplet_rx"
9091 2018-01-17 Tom Tromey <tom@tromey.com>
9093 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
9095 2018-01-17 Tom Tromey <tom@tromey.com>
9097 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
9098 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
9099 (create_array_type_with_stride): Update.
9100 * dwarf2read.c (set_die_type): Update.
9102 2018-01-17 Tom Tromey <tom@tromey.com>
9104 * dwarf2read.c (delayed_method_info): Remove typedef.
9105 (dwarf2_cu::method_info): Now a std::vector.
9106 (add_to_method_list): Update.
9107 (free_delayed_list): Remove.
9108 (compute_delayed_physnames): Update.
9109 (process_full_comp_unit, process_full_type_unit): Clear the method
9110 list. Remove cleanups.
9111 (psymtab_include_file_name): Add name_holder parameter. Use
9113 (dwarf_decode_lines): Update.
9115 2018-01-17 Tom Tromey <tom@tromey.com>
9116 Simon Marchi <simon.marchi@ericsson.com>
9118 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
9119 (dwarf2_per_objfile::free_cached_comp_units)
9120 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
9121 (init_cutu_and_read_dies_no_follow): Update.
9122 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
9123 (dwarf2_cu::~dwarf2_cu): New.
9124 (free_heap_comp_unit, free_stack_comp_unit): Remove.
9125 (age_cached_comp_units, free_one_cached_comp_unit): Update.
9127 2018-01-17 Tom Tromey <tom@tromey.com>
9128 Simon Marchi <simon.marchi@ericsson.com>
9130 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
9131 (struct die_reader_specs) <abbrev_table>: New member.
9132 (struct abbrev_table): Add constructor.
9133 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
9134 <abbrev_obstack>: Now an auto_obstack.
9135 (abbrev_table_up): New typedef.
9136 (init_cu_die_reader): Add abbrev_table parameter.
9137 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
9138 Add result_dwo_abbrev_table.
9139 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
9140 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
9142 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
9144 (skip_children): Update.
9145 (abbrev_table::alloc_abbrev): Rename from
9146 abbrev_table_alloc_abbrev.
9147 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
9148 (abbrev_table::lookup_abbrev): Rename from
9149 abbrev_table_lookup_abbrev.
9150 (abbrev_table_read_table): Return abbrev_table_up.
9151 (abbrev_table_free, abbrev_table_free_cleanup)
9152 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
9153 (load_partial_dies): Update.
9155 2018-01-17 Tom Tromey <tom@tromey.com>
9157 * dwarf2read.c (dwarf2_compute_name): Update comment.
9158 (read_func_scope, read_variable): Update.
9159 (new_symbol): Remove.
9160 (new_symbol_full): Rename to new_symbol.
9162 2018-01-17 Mike Gulick <mgulick@mathworks.com>
9165 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
9166 a warning instead of throwing an error, set section size to 0 and return
9168 * gdb_bfd.h (gdb_bfd_map_section): Update description.
9170 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
9172 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
9174 (linux_ptrace_attach_fail_reason_string): Likewise.
9175 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
9177 (linux_ptrace_attach_fail_reason_string): Likewise.
9178 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
9180 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
9182 * linux-nat.c (linux_nat_attach): Remove xstrdup.
9184 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
9187 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
9188 checking for fs_base/gs_base fields in struct user_regs_struct.
9189 * configure: Regenerate.
9191 2018-01-17 Yao Qi <yao.qi@linaro.org>
9193 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
9195 (aarch64_linux_init_abi): Install it to gdbarch hook
9198 2018-01-15 Pedro Alves <palves@redhat.com>
9200 * common/signals-state-save-restore.c
9201 (save_original_signals_state): Fix typos.
9203 2017-01-12 Tom Tromey <tom@tromey.com>
9204 Sergio Durigan Junior <sergiodj@redhat.com>
9206 * Makefile.in (install-only): Install gdb-add-index.
9208 2018-01-12 John Baldwin <jhb@FreeBSD.org>
9210 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
9212 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
9214 * infrun.c (keep_going_pass_signal): Clear step-over info when
9215 insert_breakpoints fails.
9217 2018-01-11 Pedro Alves <palves@redhat.com>
9220 * infrun.c (resume): Rename to ...
9221 (resume_1): ... this.
9222 (resume): Reimplement as wrapper around resume_1.
9224 2018-01-11 Pedro Alves <palves@redhat.com>
9227 * remote.c (remote_parse_stop_reply): Default to the last-set
9228 general thread instead of to 'magic_null_ptid'.
9230 2018-01-10 Pedro Alves <palves@redhat.com>
9232 * language.h (language_get_symbol_name_matcher): Rename ...
9233 (get_symbol_name_matcher): ... this.
9234 * language.c (language_get_symbol_name_matcher): Ditto.
9235 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
9238 2018-01-10 Pedro Alves <palves@redhat.com>
9242 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
9243 Adjust to use language_get_symbol_name_matcher instead of
9244 language_defn::la_get_symbol_name_matcher.
9245 * language.c (language_get_symbol_name_matcher): If in Ada mode
9246 and the lookup name is a verbatim match, return Ada's matcher.
9247 * language.h (language_get_symbol_name_matcher): Adjust comment.
9248 (ada_lookup_name_info::verbatim_p):: New method.
9250 2018-01-10 Pedro Alves <palves@redhat.com>
9253 * ada-lang.c (ada_collect_symbol_completion_matches): If the
9254 minsym's language is language_auto or language_cplus, pass down
9255 language_ada instead.
9256 * symtab.c (compare_symbol_name): Don't frob symbol language here.
9258 2018-01-10 Pedro Alves <palves@redhat.com>
9261 * minsyms.c (linkage_name_str): New function.
9262 (iterate_over_minimal_symbols): Use it.
9264 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9266 * NEWS: Document that 'info proc' now works on FreeBSD.
9268 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9270 * configure.ac: Check for kinfo_getfile in libutil.
9271 * configure: Regenerate.
9272 * config.in: Regenerate.
9273 * fbsd-nat.c: Include "fbsd-tdep.h".
9274 (fbsd_fetch_cmdline): New.
9275 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
9276 rather than calling error.
9277 (fbsd_info_proc): New.
9278 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
9279 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
9280 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
9282 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9284 * fbsd-nat.c (struct free_deleter): Remove.
9285 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
9287 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9289 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
9290 NULL for an empty pathname.
9292 2018-01-09 John Baldwin <jhb@FreeBSD.org>
9294 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
9295 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
9296 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
9297 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
9298 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
9299 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
9300 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
9301 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
9302 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
9303 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
9304 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
9305 (fbsd_core_fetch_timeval, fbsd_print_sigset)
9306 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
9307 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
9308 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
9310 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
9312 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
9313 (gnu_xfer_auxv): New function.
9314 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
9317 2018-01-08 Yao Qi <yao.qi@linaro.org>
9318 Simon Marchi <simon.marchi@ericsson.com>
9320 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
9322 (COMMON_OBS): Remove selftest.o.
9323 * configure.ac: Append selftest-arch.c and common/selftest.c to
9324 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
9325 * configure: Re-generated.
9326 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
9328 (maintenance_info_selftests): Likewise.
9330 2018-01-08 Xavier Roirand <roirand@adacore.com>
9332 * ada-valprint.c (val_print_packed_array_elements): Use
9333 proper number of elements when printing an array indexed
9334 by an enumeration type.
9336 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9338 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
9339 (dw2_get_file_names_reader): Adjust.
9340 (lookup_dwo_signatured_type): Adjust.
9341 (lookup_dwp_signatured_type): Adjust.
9342 (lookup_signatured_type): Adjust.
9343 (create_type_unit_group): Adjust.
9344 (get_type_unit_group): Adjust.
9345 (process_psymtab_comp_unit_reader): Adjust.
9346 (build_type_psymtabs_reader): Adjust.
9347 (scan_partial_symbols): Adjust.
9348 (add_partial_symbol): Adjust.
9349 (add_partial_subprogram): Adjust.
9350 (peek_die_abbrev): Adjust.
9351 (fixup_go_packaging): Adjust.
9352 (process_imported_unit_die): Adjust.
9353 (dwarf2_compute_name): Adjust.
9354 (dwarf2_physname): Adjust.
9355 (read_import_statement): Adjust.
9356 (handle_DW_AT_stmt_list): Adjust.
9357 (read_file_scope): Adjust.
9358 (read_func_scope): Adjust.
9359 (read_lexical_block_scope): Adjust.
9360 (read_call_site_scope): Adjust.
9361 (read_variable): Adjust.
9362 (dwarf2_rnglists_process): Adjust.
9363 (dwarf2_ranges_process): Adjust.
9364 (dwarf2_ranges_read): Adjust.
9365 (dwarf2_get_pc_bounds): Adjust.
9366 (dwarf2_record_block_ranges): Adjust.
9367 (dwarf2_add_field): Adjust.
9368 (dwarf2_add_member_fn): Adjust.
9369 (read_structure_type): Adjust.
9370 (process_structure_scope): Adjust.
9371 (read_enumeration_type): Adjust.
9372 (read_array_type): Adjust.
9373 (mark_common_block_symbol_computed): Adjust.
9374 (read_common_block): Adjust.
9375 (read_namespace_type): Adjust.
9376 (read_namespace): Adjust.
9377 (read_module_type): Adjust.
9378 (read_tag_pointer_type): Adjust.
9379 (read_tag_ptr_to_member_type): Adjust.
9380 (read_tag_string_type): Adjust.
9381 (read_subroutine_type): Adjust.
9382 (read_typedef): Adjust.
9383 (read_base_type): Adjust.
9384 (attr_to_dynamic_prop): Adjust.
9385 (read_subrange_type): Adjust.
9386 (read_unspecified_type): Adjust.
9387 (dwarf2_read_abbrevs): Adjust.
9388 (load_partial_dies): Adjust.
9389 (read_partial_die): Adjust.
9390 (find_partial_die): Adjust.
9391 (guess_partial_die_structure_name): Adjust.
9392 (fixup_partial_die): Adjust.
9393 (read_attribute_value): Adjust.
9394 (read_addr_index): Adjust.
9395 (read_addr_index_from_leb128): Adjust.
9396 (read_str_index): Adjust.
9397 (dwarf2_string_attr): Adjust.
9398 (get_debug_line_section): Adjust.
9399 (dwarf_decode_line_header): Adjust.
9400 (lnp_state_machine::check_line_address): Adjust.
9401 (dwarf_decode_lines_1): Adjust.
9402 (dwarf_decode_lines): Adjust.
9403 (dwarf2_start_symtab): Adjust.
9404 (var_decode_location): Adjust.
9405 (new_symbol_full): Adjust.
9406 (dwarf2_const_value_data): Adjust.
9407 (dwarf2_const_value_attr): Adjust.
9408 (dwarf2_const_value): Adjust.
9410 (die_containing_type): Adjust.
9411 (build_error_marker_type): Adjust.
9412 (lookup_die_type): Adjust.
9413 (guess_full_die_structure_name): Adjust.
9414 (anonymous_struct_prefix): Adjust.
9415 (determine_prefix): Adjust.
9416 (dwarf2_name): Adjust.
9417 (follow_die_ref_or_sig): Adjust.
9418 (follow_die_offset): Adjust.
9419 (follow_die_ref): Adjust.
9420 (follow_die_sig_1): Adjust.
9421 (follow_die_sig): Adjust.
9422 (get_signatured_type): Adjust.
9423 (get_DW_AT_signature_type): Adjust.
9424 (decode_locdesc): Adjust.
9425 (dwarf_decode_macros): Adjust.
9426 (cu_debug_loc_section): Adjust.
9427 (fill_in_loclist_baton): Adjust.
9428 (dwarf2_symbol_mark_computed): Adjust.
9429 (init_one_comp_unit): Don't assign
9430 dwarf2_cu::dwarf2_per_objfile.
9431 (set_die_type): Adjust.
9433 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9435 * dwarf2read.c (struct mapped_debug_names): Add constructor.
9436 <dwarf2_per_objfile>: New field.
9437 (dwarf2_per_objfile): Remove global.
9438 (get_dwarf2_per_objfile): New function.
9439 (set_dwarf2_per_objfile): New function.
9440 (dwarf2_build_psymtabs_hard): Change objfile parameter to
9442 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
9443 (read_abbrev_offset): Likewise.
9444 (read_indirect_string): Likewise.
9445 (read_indirect_line_string): Likewise.
9446 (read_indirect_string_at_offset): Likewise.
9447 (read_indirect_string_from_dwz): Likewise.
9448 (dwarf2_find_containing_comp_unit): Change objfile parameter to
9450 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
9451 (create_all_comp_units): Change objfile parameter to
9453 (create_all_type_units): Likewise.
9454 (process_queue): Add dwarf2_per_objfile parameter.
9455 (read_and_check_comp_unit_head): Likewise.
9456 (lookup_dwo_unit_in_dwp): Likewise.
9457 (get_dwp_file): Likewise.
9458 (process_cu_includes): Likewise.
9459 (struct free_dwo_file_cleanup_data): New struct.
9460 (dwarf2_has_info): Use get_dwarf2_per_objfile and
9461 set_dwarf2_per_objfile.
9462 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
9463 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
9464 context, adjust calls.
9465 (dw2_instantiate_symtab): Likewise.
9466 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
9467 (dw2_get_cu): Likewise.
9468 (create_cu_from_index_list): Change objfile parameter to
9470 (create_cus_from_index_list): Get dwarf2_per_objfile from
9471 context, adjust calls.
9472 (create_cus_from_index): Likewise.
9473 (create_signatured_type_table_from_index): Change objfile
9474 parameter to dwarf2_per_objfile.
9475 (create_signatured_type_table_from_debug_names): Change objfile
9476 parameter to dwarf2_per_objfile.
9477 (create_addrmap_from_index): Likewise.
9478 (create_addrmap_from_aranges): Likewise.
9479 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
9480 (dw2_setup): Remove.
9481 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
9483 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
9484 get_dwarf2_per_objfile.
9485 (dw2_forget_cached_source_info): Likewise.
9486 (dw2_map_symtabs_matching_filename): Likewise.
9487 (struct dw2_symtab_iterator) <index>: Remove.
9488 <dwarf2_per_objfile>: New field.
9489 (dw2_symtab_iter_init): Replace index parameter with
9491 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
9492 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
9493 (dw2_print_stats): Likewise.
9494 (dw2_dump): Likewise.
9495 (dw2_expand_symtabs_for_function): Likewise.
9496 (dw2_expand_all_symtabs): Likewise.
9497 (dw2_expand_symtabs_with_fullname): Likewise.
9498 (dw2_expand_marked_cus): Replace index and objfile parameters
9499 with dwarf2_per_objfile.
9500 (dw_expand_symtabs_matching_file_matcher): Add
9501 dwarf2_per_objfile parameter and adjust calls.
9502 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
9504 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
9505 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
9507 (create_cus_from_debug_names_list): Replace objfile parameter
9508 with dwarf2_per_objfile and adjust calls.
9509 (create_cus_from_debug_names): Likewise.
9510 (dwarf2_read_debug_names): Likewise.
9511 (mapped_debug_names::namei_to_name): Adjust call.
9512 (dw2_debug_names_iterator::next): Likewise.
9513 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
9514 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
9515 (dw2_debug_names_dump): Likewise.
9516 (dw2_debug_names_expand_symtabs_for_function): Likewise.
9517 (dw2_debug_names_expand_symtabs_matching): Likewise.
9518 (dwarf2_initialize_objfile): Likewise.
9519 (dwarf2_build_psymtabs): Likewise.
9520 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
9522 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
9523 (read_and_check_comp_unit_head): Likewise.
9524 (read_abbrev_offset): Likewise.
9525 (create_debug_type_hash_table): Likewise.
9526 (create_debug_types_hash_table): Likewise.
9527 (create_all_type_units): Replace objfile parameter with
9529 (add_type_unit): Add dwarf2_per_objfile parameter.
9530 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
9531 with dwarf2_per_objfile.
9532 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
9533 (lookup_dwp_signatured_type): Likewise.
9534 (lookup_signatured_type): Likewise.
9535 (read_cutu_die_from_dwo): Likewise.
9536 (init_tu_and_read_dwo_dies): Likewise.
9537 (init_cutu_and_read_dies): Likewise.
9538 (init_cutu_and_read_dies_no_follow): Likewise.
9539 (allocate_type_unit_groups_table): Add objfile parameter.
9540 (create_type_unit_group): Use dwarf2_per_objfile from cu.
9541 (get_type_unit_group): Likewise.
9542 (process_psymtab_comp_unit): Update call.
9543 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
9544 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
9545 (print_tu_stats): Likewise.
9546 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
9548 (build_type_psymtabs): Change objfile parameter to
9550 (process_skeletonless_type_unit): Use dwarf2_per_objfile
9551 passed in void* parameter.
9552 (process_skeletonless_type_units): Change objfile parameter to
9554 (set_partial_user): Likewise.
9555 (dwarf2_build_psymtabs_hard): Likewise.
9556 (read_comp_units_from_section): Likewise.
9557 (create_all_comp_units): Likewise.
9558 (scan_partial_symbols): Update calls.
9559 (add_partial_symbol): Likewise.
9560 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
9561 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
9562 (process_queue): Add dwarf2_per_objfile parameter.
9563 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
9564 (compute_compunit_symtab_includes): Likewise.
9565 (process_cu_includes): Add dwarf2_per_objfile parameter.
9566 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
9567 (process_full_type_unit): Likewise.
9568 (process_imported_unit_die): Update call.
9569 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
9570 (read_file_scope): Likewise.
9571 (allocate_dwo_file_hash_table): Add objfile parameter.
9572 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
9573 (create_cus_hash_table): Likewise.
9574 (create_dwp_hash_table): Likewise.
9575 (create_dwo_unit_in_dwp_v1): Likewise.
9576 (create_dwp_v2_section): Likewise.
9577 (create_dwo_unit_in_dwp_v2): Likewise.
9578 (lookup_dwo_unit_in_dwp): Likewise.
9579 (try_open_dwop_file): Likewise.
9580 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
9581 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
9582 cleanup to include a reference to dwarf2_per_objfile.
9583 (open_dwp_file): Add dwarf2_per_objfile parameter.
9584 (open_and_init_dwp_file): Likewise.
9585 (get_dwp_file): Likewise.
9586 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
9587 (queue_and_load_all_dwo_tus): Update call.
9588 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
9590 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
9591 (dwarf2_ranges_process): Likewise.
9592 (dwarf2_get_pc_bounds): Likewise.
9593 (mark_common_block_symbol_computed): Likewise.
9594 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
9595 (dwarf2_read_abbrevs): Update call.
9596 (read_partial_die): Use dwarf2_per_objfile from cu.
9597 (find_partial_die): Likewise.
9598 (fixup_partial_die): Likewise.
9599 (read_attribute_value): Likewise.
9600 (read_indirect_string_at_offset_from): Add objfile parameter.
9601 (read_indirect_string_at_offset): Add dwarf2_per_objfile
9603 (read_indirect_string_from_dwz): Add objfile parameter.
9604 (read_indirect_string): Add objfile parameter.
9605 (read_addr_index_1): Add dwarf2_per_objfile parameter.
9606 (read_addr_index): Use dwarf2_per_objfile from cu.
9607 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
9609 (read_str_index): Use dwarf2_per_objfile from cu.
9610 (get_debug_line_section): Likewise.
9611 (read_formatted_entries): Add dwarf2_per_objfile parameter.
9612 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
9613 (new_symbol_full): Use dwarf2_per_objfile from cu.
9614 (build_error_marker_type): Likewise.
9615 (lookup_die_type): Likewise.
9616 (determine_prefix): Likewise.
9617 (follow_die_offset): Likewise.
9618 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
9619 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
9620 (dwarf2_fetch_die_type_sect_off): Likewise.
9621 (dwarf2_get_die_type): Likewise.
9622 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
9623 (get_signatured_type): Likewise.
9624 (get_DW_AT_signature_type): Likewise.
9625 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
9626 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
9627 (cu_debug_loc_section): Likewise.
9628 (fill_in_loclist_baton): Likewise.
9629 (dwarf2_symbol_mark_computed): Likewise.
9630 (dwarf2_find_containing_comp_unit): Change objfile parameter to
9632 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
9634 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
9635 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
9636 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
9637 (set_die_type): Use dwarf2_free_objfile from cu.
9638 (get_die_type_at_offset): Likewise.
9639 (dwarf2_per_objfile_free): Don't assign global variable.
9640 (debug_names) <constructor>: Add dwarf2_per_objfile
9641 parameter, update m_debugstrlookup construction.
9642 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
9644 <m_dwarf2_per_objfile>: New field.
9645 <lookup>: Use m_dwarf2_per_objfile.
9646 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
9647 (psyms_seen_size): Likewise.
9648 (write_gdbindex): Replace objfile parameter with
9650 (write_debug_names): Likewise.
9651 (write_psymtabs_to_index): Likewise.
9652 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
9655 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9657 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
9658 <dwarf2_per_objfile>: New field.
9659 (struct dwarf2_per_cu_data) <objfile>: Remove.
9660 <dwarf2_per_objfile>: New field.
9661 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
9663 (create_signatured_type_table_from_index): Likewise.
9664 (create_debug_type_hash_table): Likewise.
9665 (fill_in_sig_entry_from_dwo_entry): Likewise.
9666 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
9667 (create_type_unit_group): Assign dwarf2_per_objfile instead of
9669 (create_partial_symtab): Access objfile through
9671 (process_psymtab_comp_unit_reader): Likewise.
9672 (read_comp_units_from_section): Likewise.
9673 (scan_partial_symbols): Likewise.
9674 (add_partial_symbol): Likewise.
9675 (add_partial_subprogram): Likewise.
9676 (peek_die_abbrev): Likewise.
9677 (fixup_go_packaging): Likewise.
9678 (process_full_comp_unit): Likewise.
9679 (process_full_type_unit): Likewise.
9680 (process_imported_unit_die): Likewise.
9681 (dwarf2_compute_name): Likewise.
9682 (dwarf2_physname): Likewise.
9683 (read_import_statement): Likewise.
9684 (create_cus_hash_table): Assign dwarf2_physname instead of
9686 (read_func_scope): Access objfile through dwarf2_per_objfile.
9687 (read_lexical_block_scope): Likewise.
9688 (read_call_site_scope): Likewise.
9689 (read_variable): Likewise.
9690 (dwarf2_rnglists_process): Likewise.
9691 (dwarf2_ranges_process): Likewise.
9692 (dwarf2_ranges_read): Likewise.
9693 (dwarf2_record_block_ranges): Likewise.
9694 (dwarf2_add_field): Likewise.
9695 (dwarf2_add_member_fn): Likewise.
9696 (read_structure_type): Likewise.
9697 (process_structure_scope): Likewise.
9698 (read_enumeration_type): Likewise.
9699 (read_array_type): Likewise.
9700 (read_common_block): Likewise.
9701 (read_namespace_type): Likewise.
9702 (read_namespace): Likewise.
9703 (read_module_type): Likewise.
9704 (read_tag_pointer_type): Likewise.
9705 (read_tag_ptr_to_member_type): Likewise.
9706 (read_tag_string_type): Likewise.
9707 (read_subroutine_type): Likewise.
9708 (read_typedef): Likewise.
9709 (read_base_type): Likewise.
9710 (attr_to_dynamic_prop): Likewise.
9711 (read_subrange_type): Likewise.
9712 (read_unspecified_type): Likewise.
9713 (load_partial_dies): Likewise.
9714 (read_partial_die): Likewise.
9715 (find_partial_die): Likewise.
9716 (guess_partial_die_structure_name): Likewise.
9717 (fixup_partial_die): Likewise.
9718 (read_attribute_value): Likewise.
9719 (read_addr_index_from_leb128): Likewise.
9720 (dwarf2_read_addr_index): Likewise.
9721 (dwarf2_string_attr): Likewise.
9722 (lnp_state_machine::check_line_address): Likewise.
9723 (dwarf_decode_lines_1): Likewise.
9724 (dwarf_decode_lines): Likewise.
9725 (dwarf2_start_symtab): Likewise.
9726 (var_decode_location): Likewise.
9727 (new_symbol_full): Likewise.
9728 (dwarf2_const_value_data): Likewise.
9729 (dwarf2_const_value_attr): Likewise.
9730 (dwarf2_const_value): Likewise.
9731 (die_type): Likewise.
9732 (die_containing_type): Likewise.
9733 (lookup_die_type): Likewise.
9734 (guess_full_die_structure_name): Likewise.
9735 (anonymous_struct_prefix): Likewise.
9736 (dwarf2_name): Likewise.
9737 (follow_die_ref_or_sig): Likewise.
9738 (follow_die_offset): Likewise.
9739 (follow_die_ref): Likewise.
9740 (dwarf2_fetch_die_loc_sect_off): Likewise.
9741 (dwarf2_fetch_constant_bytes): Likewise.
9742 (dwarf2_fetch_die_type_sect_off): Likewise.
9743 (dwarf2_get_die_type): Likewise.
9744 (follow_die_sig): Likewise.
9745 (decode_locdesc): Likewise.
9746 (dwarf2_per_cu_objfile): Likewise.
9747 (dwarf2_per_cu_text_offset): Likewise.
9748 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
9750 (set_die_type): Access objfile through
9753 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
9755 * valprint.c (converted_character_d): Remove typedef.
9756 (DEF_VEC_O (converted_character_d)): Remove.
9757 (count_next_character): Use std::vector.
9758 (print_converted_chars_to_obstack): Likewise.
9759 (generic_printstr): Likewise.
9761 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9763 * xml-support.h (struct gdb_xml_value): Add constructor.
9764 <value>: Change type to unique_xmalloc_ptr.
9765 (gdb_xml_value_s): Remove typedef.
9766 (DEF_VEC_O (gdb_xml_value_s)): Remove.
9767 (gdb_xml_element_start_handler): Change parameter type to
9769 (xml_find_attribute): Likewise.
9770 * xml-support.c (xml_find_attribute): Change parameter type to
9771 std::vector and adjust.
9772 (gdb_xml_values_cleanup): Remove.
9773 (gdb_xml_parser::start_element): Adjust to std::vector.
9774 (xinclude_start_include): Change paraeter type to std::vector
9776 * btrace.c (check_xml_btrace_version): Likewise.
9777 (parse_xml_btrace_block): Likewise.
9778 (parse_xml_btrace_pt_config_cpu): Likewise.
9779 (parse_xml_btrace_pt): Likewise.
9780 (parse_xml_btrace_conf_bts): Likewise.
9781 (parse_xml_btrace_conf_pt): Likewise.
9782 * memory-map.c (memory_map_start_memory): Likewise.
9783 (memory_map_start_property): Likewise.
9784 * osdata.c (osdata_start_osdata): Likewise.
9785 (osdata_start_item): Likewise.
9786 (osdata_start_column): Likewise.
9787 * remote.c (start_thread): Likewise.
9788 * solib-aix.c (library_list_start_library): Likewise.
9789 (library_list_start_list): Likewise.
9790 * solib-svr4.c (library_list_start_library): Likewise.
9791 (svr4_library_list_start_list): Likewise.
9792 * solib-target.c (library_list_start_segment): Likewise.
9793 (library_list_start_section): Likewise.
9794 (library_list_start_library): Likewise.
9795 (library_list_start_list): Likewise.
9796 * tracepoint.c (traceframe_info_start_memory): Likewise.
9797 (traceframe_info_start_tvar): Likewise.
9798 * xml-syscall.c (syscall_start_syscall): Likewise.
9799 * xml-tdesc.c (tdesc_start_target): Likewise.
9800 (tdesc_start_feature): Likewise.
9801 (tdesc_start_reg): Likewise.
9802 (tdesc_start_union): Likewise.
9803 (tdesc_start_struct): Likewise.
9804 (tdesc_start_flags): Likewise.
9805 (tdesc_start_enum): Likewise.
9806 (tdesc_start_field): Likewise.
9807 (tdesc_start_enum_value): Likewise.
9808 (tdesc_start_vector): Likewise.
9810 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9812 * extension.h (struct xmethod_worker) <clone>: Remove.
9813 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
9815 (python_xmethod_worker::clone): Remove.
9816 * valops.c (find_overload_match): Use std::move instead of
9819 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
9821 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
9822 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
9823 <free_xmethod_worker_data>: Remove.
9824 <get_matching_xmethod_workers>: Chance VEC to std::vector.
9825 <get_xmethod_arg_types>: Remove.
9826 <get_xmethod_result_type>: Remove.
9827 <invoke_xmethod>: Remove.
9828 * extension.c (new_xmethod_worker): Remove.
9829 (clone_xmethod_worker): Remove.
9830 (get_matching_xmethod_workers): Return void, pass std::vector by
9832 (get_xmethod_arg_types): Rename to...
9833 (xmethod_worker::get_arg_types): ... this, and adjust.
9834 (get_xmethod_result_type): Rename to...
9835 (xmethod_worker::get_result_type): ... this, and adjust.
9836 (invoke_xmethod): Remove.
9837 (free_xmethod_worker): Remove.
9838 (free_xmethod_worker_vec): Remove.
9839 * extension.h (enum ext_lang_rc): Move here from
9841 (struct xmethod_worker): Add constructor and destructor.
9844 <invoke, clone, do_get_result_type, do_get_arg_types>: New
9845 virtual pure methods.
9846 <get_arg_types, get_result_type>: New methods.
9847 (xmethod_worker_ptr): Remove typedef.
9848 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
9849 (xmethod_worker_vec): Remove typedef.
9850 (xmethod_worker_up): New typedef.
9851 (invoke_xmethod): Remove.
9852 (clone_xmethod_worker): Remove.
9853 (free_xmethod_worker): Remove.
9854 (free_xmethod_worker_vec): Remove.
9855 (get_xmethod_arg_types): Remove.
9856 (get_xmethod_result_type): Remove.
9857 * valops.c (find_method_list): Use std::vector, don't use
9858 intermediate vector.
9859 (value_find_oload_method_list): Use std::vector.
9860 (find_overload_match): Use std::vector.
9861 (find_oload_champ): Use std::vector.
9862 * value.c (value_free): Use operator delete.
9863 (value_of_xmethod): Rename to...
9864 (value_from_xmethod): ... this. Don't assign
9865 xmethod_worker::value, take rvalue-reference.
9866 (result_type_of_xmethod): Adjust.
9867 (call_xmethod): Adjust.
9868 * value.h: Include extension.h.
9869 (struct xmethod_worker): Don't forward-declare.
9870 (value_of_xmethod): Rename to...
9871 (value_from_xmethod): ... this, take rvalue-reference.
9872 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
9873 (struct python_xmethod_worker): ... this, add constructor and
9875 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
9876 (gdbpy_free_xmethod_worker_data): Rename to...
9877 (python_xmethod_worker::~python_xmethod_worker): ... this and
9879 (gdbpy_clone_xmethod_worker_data): Rename to...
9880 (python_xmethod_worker::clone): ... this and adjust.
9881 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
9883 (gdbpy_get_xmethod_arg_types): Rename to...
9884 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
9885 (gdbpy_get_xmethod_result_type): Rename to...
9886 (python_xmethod_worker::do_get_result_type): ... this and
9888 (gdbpy_invoke_xmethod): Rename to...
9889 (python_xmethod_worker::invoke): ... this and adjust.
9890 (new_python_xmethod_worker): Rename to...
9891 (python_xmethod_worker::python_xmethod_worker): ... this and
9893 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
9895 (gdbpy_free_xmethod_worker_data): Remove.
9896 (gdbpy_get_matching_xmethod_workers): Use std::vector.
9897 (gdbpy_get_xmethod_arg_types): Remove.
9898 (gdbpy_get_xmethod_result_type): Remove.
9899 (gdbpy_invoke_xmethod): Remove.
9900 * python/python.c (python_extension_ops): Remove obsolete
9903 2018-01-05 Pedro Alves <palves@redhat.com>
9906 * common/signals-state-save-restore.c
9907 (save_original_signals_state): New parameter 'quiet'. Warn if we
9908 find a custom handler preinstalled, instead of internal erroring.
9909 But only warn if !quiet.
9910 * common/signals-state-save-restore.h
9911 (save_original_signals_state): New parameter 'quiet'.
9912 * main.c (captured_main_1): Move save_original_signals_state call
9913 after option handling, and pass QUIET.
9915 2018-01-05 Pedro Alves <palves@redhat.com>
9917 * spu-tdep.c (spu_catch_start): Pass
9918 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
9920 2018-01-05 Pedro Alves <palves@redhat.com>
9923 * ada-lang.c (literal_symbol_name_matcher): New function.
9924 (ada_get_symbol_name_matcher): Use it for
9925 symbol_name_match_type::SEARCH_NAME.
9926 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
9927 it down instead of assuming symbol_name_match_type::FULL.
9928 * block.h (block_lookup_symbol): New parameter 'match_type'.
9929 * c-valprint.c (print_unpacked_pointer): Use
9930 lookup_symbol_search_name instead of lookup_symbol.
9931 * compile/compile-object-load.c (get_out_value_type): Pass down
9932 symbol_name_match_type::SEARCH_NAME.
9933 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
9934 symbol_name_match_type::FULL.
9935 * cp-support.c (cp_get_symbol_name_matcher): Handle
9936 symbol_name_match_type::SEARCH_NAME.
9937 * infrun.c (insert_exception_resume_breakpoint): Use
9938 lookup_symbol_search_name.
9939 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
9940 * psymtab.c (maintenance_check_psymtabs): Use
9941 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
9942 * stack.c (print_frame_args): Use lookup_symbol_search_name and
9944 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
9945 if symbol_name_match_type::SEARCH_NAME.
9946 (lookup_symbol_in_language): Pass down
9947 symbol_name_match_type::FULL.
9948 (lookup_symbol_search_name): New.
9949 (lookup_language_this): Pass down
9950 symbol_name_match_type::SEARCH_NAME.
9951 (lookup_symbol_aux, lookup_local_symbol): New parameter
9952 'match_type'. Pass it down.
9953 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
9954 (lookup_symbol_search_name): New declaration.
9955 (lookup_symbol_in_block): New 'match_type' parameter.
9957 2018-01-05 Pedro Alves <palves@redhat.com>
9960 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
9962 (ada_lookup_symbol): Reimplement in terms of
9963 ada_lookup_symbol_list, bits factored out from
9964 ada_lookup_encoded_symbol.
9966 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9968 * ada-exp.y (write_object_renaming): When subscripting an array
9969 using a symbol as the index, pass the block in call to
9970 ada_lookup_encoded_symbol when looking that symbol up.
9972 2018-01-05 Jerome Guitton <guitton@adacore.com>
9974 * ada-lang.c (ada_array_length): Use ada_index_type instead of
9977 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9979 * ada-lang.c (ada_to_fixed_value_create): Add handling of
9980 the case where VALUE_LVAL (val0) is not lval_memory.
9982 2018-01-05 Xavier Roirand <roirand@adacore.com>
9984 * ada-valprint.c (print_optional_low_bound): Handle
9985 character-indexed array printing like boolean-indexed array
9988 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9990 * NEWS: Create a new section for the next release branch.
9991 Rename the section of the current branch, now that it has
9994 2018-01-05 Joel Brobecker <brobecker@adacore.com>
9996 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
9997 * version.in: Bump version to 8.1.50.DATE-git.
9999 2018-01-03 Xavier Roirand <roirand@adacore.com>
10001 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
10003 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
10005 (default_exception_support_info) <catch_handlers_sym>: Add field.
10006 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
10007 (ada_exception_name_addr_1): Add "catch handlers" handling.
10008 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
10009 Update all callers.
10010 (create_excep_cond_exprs) <ex>: Add parameter.
10011 (re_set_exception): Update create_excep_cond_exprs call.
10012 (print_it_exception, print_one_exception, print_mention_exception)
10013 (print_recreate_exception): Add "catch handler" handling.
10014 (allocate_location_catch_handlers, re_set_catch_handlers)
10015 (check_status_catch_handlers, print_it_catch_handlers)
10016 (print_one_catch_handlers, print_mention_catch_handlers)
10017 (print_recreate_catch_handlers): New function.
10018 (catch_handlers_breakpoint_ops): New variable.
10019 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
10020 Add parameter. Add "catch handler" handling.
10021 (ada_exception_sym_name, ada_exception_breakpoint_ops):
10022 Add "catch handler" handling.
10023 (ada_exception_catchpoint_cond_string): Add "catch handler"
10025 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
10027 (catch_ada_handlers_command): New function.
10028 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
10029 operations structure.
10030 (_initialize_ada_language): Add "catch handlers" command entry.
10031 * NEWS: Document "catch handlers" feature.
10033 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10035 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
10036 account when creating the array type of the slice.
10037 (ada_value_slice): Likewise.
10039 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10041 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
10043 (create_array_type_with_stride): Add byte_stride_prop parameter.
10044 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
10045 New parameter. Update all callers in this file.
10046 (array_type_has_dynamic_stride): New function.
10047 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
10048 of arrays with dynamic byte strides.
10049 * dwarf2read.c (read_array_type): Add support for dynamic
10050 DW_AT_byte_stride attributes.
10052 2018-01-02 Joel Brobecker <brobecker@adacore.com>
10054 * dwarf2read.c (read_unspecified_type): Treat
10055 DW_TAG_enumeration_type DIEs from Ada units as stubs.
10057 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10059 Update copyright year range in all GDB files.
10061 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10063 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
10064 and gdb/testsuite/gdb.base/step-line.c.
10066 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10068 * copyright.py (main): Dump the contents of
10069 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
10070 even if BY_HAND is empty.
10072 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10074 * top.c (print_gdb_version): Update Copyright year in version
10077 2018-01-01 Joel Brobecker <brobecker@adacore.com>
10079 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
10081 For older changes see ChangeLog-2017.
10087 version-control: never