This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v9 20/29] target, breakpoint: allow insert/remove breakpoint to be forwarded


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]