diff options
author | Petr Machata <pmachata@redhat.com> | 2012-03-27 03:09:29 +0200 |
---|---|---|
committer | Petr Machata <pmachata@redhat.com> | 2012-04-19 01:22:33 +0200 |
commit | 56a9ea6b41470d5a0590f23baaff7dff99f277d5 (patch) | |
tree | fd338f3b7d2f5793076b75514aaad0f27cf7a6ac | |
parent | 55ac932f2802f85c53792153ac909dcd8a690c5c (diff) | |
download | ltrace-56a9ea6b41470d5a0590f23baaff7dff99f277d5.tar.gz |
Add a new breakpoint callback: on_continue
- called instead of continue_after_breakpoint, which remains the default
action if the callback is not defined
-rw-r--r-- | breakpoint.h | 5 | ||||
-rw-r--r-- | handle_event.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/breakpoint.h b/breakpoint.h index ae4a2b8..c156d91 100644 --- a/breakpoint.h +++ b/breakpoint.h @@ -64,6 +64,7 @@ struct breakpoint; struct bp_callbacks { void (*on_hit) (struct breakpoint *bp, struct Process *proc); + void (*on_continue) (struct breakpoint *bp, struct Process *proc); void (*on_destroy) (struct breakpoint *bp); }; @@ -79,6 +80,10 @@ struct breakpoint { /* Call on-hit handler of BP, if any is set. */ void breakpoint_on_hit(struct breakpoint *bp, struct Process *proc); +/* Call on-reenable handler of BP. If none is set, call + * continue_after_breakpoint. */ +void breakpoint_on_continue(struct breakpoint *bp, struct Process *proc); + /* Initialize a breakpoint structure. That doesn't actually realize * the breakpoint. The breakpoint is initially assumed to be * disabled. orig_value has to be set separately. CBS may be diff --git a/handle_event.c b/handle_event.c index 8e315d0..b9e5a1e 100644 --- a/handle_event.c +++ b/handle_event.c @@ -695,7 +695,7 @@ handle_breakpoint(Event *event) output_left(LT_TOF_FUNCTION, event->proc, sbp->libsym); } - continue_after_breakpoint(event->proc, sbp); + breakpoint_on_continue(sbp, event->proc); return; } |