diff options
author | Petr Machata <pmachata@redhat.com> | 2014-01-10 20:05:15 +0100 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-08-22 20:38:24 +0900 |
commit | e63b77105301a29d8a4929205849007b5ffb789d (patch) | |
tree | 35613c0c42df75b8d8b8f464b6f5f46b2dbfd14a /breakpoint.h | |
parent | 0e9ae1679f41d6b2be49933907725a1dc4a7dfee (diff) | |
download | ltrace-e63b77105301a29d8a4929205849007b5ffb789d.tar.gz ltrace-e63b77105301a29d8a4929205849007b5ffb789d.tar.bz2 ltrace-e63b77105301a29d8a4929205849007b5ffb789d.zip |
Add a new per-breakpoint callback on_install
Diffstat (limited to 'breakpoint.h')
-rw-r--r-- | breakpoint.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/breakpoint.h b/breakpoint.h index 95964a8..c36f673 100644 --- a/breakpoint.h +++ b/breakpoint.h @@ -1,6 +1,6 @@ /* * This file is part of ltrace. - * Copyright (C) 2012, 2013 Petr Machata, Red Hat Inc. + * Copyright (C) 2012,2013,2014 Petr Machata, Red Hat Inc. * Copyright (C) 2009 Juan Cespedes * * This program is free software; you can redistribute it and/or @@ -46,6 +46,7 @@ struct bp_callbacks { void (*on_hit)(struct breakpoint *bp, struct process *proc); void (*on_continue)(struct breakpoint *bp, struct process *proc); + void (*on_install)(struct breakpoint *bp, struct process *proc); void (*on_retract)(struct breakpoint *bp, struct process *proc); /* Create a new breakpoint that should handle return from the @@ -84,6 +85,12 @@ void breakpoint_on_continue(struct breakpoint *bp, struct process *proc); * the instruction underneath it). */ void breakpoint_on_retract(struct breakpoint *bp, struct process *proc); +/* Call ON_INSTALL handler of BP, if any is set. This should be + * called after the breakpoint is enabled for the first time, not + * every time it's enabled (such as after stepping over a site of a + * temporarily disabled breakpoint). */ +void breakpoint_on_install(struct breakpoint *bp, struct process *proc); + /* Call GET_RETURN_BP handler of BP, if any is set. If none is set, * call CREATE_DEFAULT_RETURN_BP to obtain one. */ int breakpoint_get_return_bp(struct breakpoint **ret, |