|
1 | 1 | /*
|
2 | 2 | * This file is part of ltrace.
|
3 |
| - * Copyright (C) 2012, 2013 Petr Machata, Red Hat Inc. |
| 3 | + * Copyright (C) 2012,2013,2014 Petr Machata, Red Hat Inc. |
4 | 4 | * Copyright (C) 2009 Juan Cespedes
|
5 | 5 | *
|
6 | 6 | * This program is free software; you can redistribute it and/or
|
|
46 | 46 | struct bp_callbacks {
|
47 | 47 | void (*on_hit)(struct breakpoint *bp, struct process *proc);
|
48 | 48 | void (*on_continue)(struct breakpoint *bp, struct process *proc);
|
| 49 | + void (*on_install)(struct breakpoint *bp, struct process *proc); |
49 | 50 | void (*on_retract)(struct breakpoint *bp, struct process *proc);
|
50 | 51 |
|
51 | 52 | /* Create a new breakpoint that should handle return from the
|
@@ -84,6 +85,12 @@ void breakpoint_on_continue(struct breakpoint *bp, struct process *proc);
|
84 | 85 | * the instruction underneath it). */
|
85 | 86 | void breakpoint_on_retract(struct breakpoint *bp, struct process *proc);
|
86 | 87 |
|
| 88 | +/* Call ON_INSTALL handler of BP, if any is set. This should be |
| 89 | + * called after the breakpoint is enabled for the first time, not |
| 90 | + * every time it's enabled (such as after stepping over a site of a |
| 91 | + * temporarily disabled breakpoint). */ |
| 92 | +void breakpoint_on_install(struct breakpoint *bp, struct process *proc); |
| 93 | + |
87 | 94 | /* Call GET_RETURN_BP handler of BP, if any is set. If none is set,
|
88 | 95 | * call CREATE_DEFAULT_RETURN_BP to obtain one. */
|
89 | 96 | int breakpoint_get_return_bp(struct breakpoint **ret,
|
|
0 commit comments