This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH v9 20/29] target, breakpoint: allow insert/remove breakpoint to be forwarded
- From: Pedro Alves <palves at redhat dot com>
- To: Markus Metzger <markus dot t dot metzger at intel dot com>
- Cc: jan dot kratochvil at redhat dot com, gdb-patches at sourceware dot org
- Date: Thu, 19 Dec 2013 19:08:34 +0000
- Subject: Re: [PATCH v9 20/29] target, breakpoint: allow insert/remove breakpoint to be forwarded
- Authentication-results: sourceware.org; auth=none
- References: <1387471499-29444-1-git-send-email-markus dot t dot metzger at intel dot com> <1387471499-29444-21-git-send-email-markus dot t dot metzger at intel dot com>
On 12/19/2013 04:44 PM, Markus Metzger wrote:
> static int
> -record_full_insert_breakpoint (struct gdbarch *gdbarch,
> +record_full_insert_breakpoint (struct target_ops *ops,
> + struct gdbarch *gdbarch,
> struct bp_target_info *bp_tgt)
> {
> struct record_full_breakpoint *bp;
> @@ -1762,7 +1765,8 @@ record_full_insert_breakpoint (struct gdbarch *gdbarch,
> int ret;
>
> old_cleanups = record_full_gdb_operation_disable_set ();
> - ret = record_full_beneath_to_insert_breakpoint (gdbarch, bp_tgt);
> + ret = record_full_beneath_to_insert_breakpoint (ops->beneath, gdbarch,
Pedantically, this shouldn't be ops->beneath (until Tromey's series is done).
You'll need to record the right ops in record_full_open
(like e.g., tmp_to_resume_ops).
> +int
> +forward_target_remove_breakpoint (struct target_ops *ops,
> + struct gdbarch *gdbarch,
> + struct bp_target_info *bp_tgt)
> +{
This is quite like Tromey's original target_delegate_... functions
in the target-async series. Oh well, let's proceed, and it'll
end up redone when Tromey's done. Please leave the may_insert_breakpoint
checks not in the forward function, but still in
target_remote|insert_breakpoint. No need to redo that check at
each forward while traversing the target stack.
--
Pedro Alves