aboutsummaryrefslogtreecommitdiff
path: root/breakpoint.h
diff options
context:
space:
mode:
authorPetr Machata <pmachata@redhat.com>2012-02-18 11:17:29 +0100
committerPetr Machata <pmachata@redhat.com>2012-04-19 00:57:35 +0200
commit2b46cfc1127d390eddd9593fe5ce5399c1f68130 (patch)
treebe4ce983280d64681bc3eaa295fc0837eac0b833 /breakpoint.h
parenta7db59c355cef464073496221ad27519a48466f9 (diff)
downloadltrace-2b46cfc1127d390eddd9593fe5ce5399c1f68130.tar.gz
The first crude version of tracing across libraries
- the patch will be sliced later
Diffstat (limited to 'breakpoint.h')
-rw-r--r--breakpoint.h21
1 files changed, 15 insertions, 6 deletions
diff --git a/breakpoint.h b/breakpoint.h
index ce6f501..53cdbf2 100644
--- a/breakpoint.h
+++ b/breakpoint.h
@@ -57,6 +57,7 @@
*/
#include "arch.h"
+#include "library.h"
struct Process;
struct breakpoint;
@@ -66,15 +67,18 @@ struct bp_callbacks {
void (*on_destroy) (struct breakpoint *bp);
};
+#ifndef ARCH_HAVE_BREAKPOINT_DATA
+struct arch_breakpoint_data {
+};
+#endif
+
struct breakpoint {
struct bp_callbacks *cbs;
void *addr;
unsigned char orig_value[BREAKPOINT_LENGTH];
int enabled;
struct library_symbol *libsym;
-#ifdef __arm__
- int thumb_mode;
-#endif
+ struct arch_breakpoint_data arch;
};
/* Call on-hit handler of BP, if any is set. */
@@ -83,6 +87,14 @@ void breakpoint_on_hit(struct breakpoint *bp, struct Process *proc);
/* Call on-destroy handler of BP, if any is set. */
void breakpoint_on_destroy(struct breakpoint *bp);
+/* 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
+ * NULL. */
+int breakpoint_init(struct breakpoint *bp, struct Process *proc,
+ target_address_t addr, struct library_symbol *libsym,
+ struct bp_callbacks *cbs);
+
/* This is actually three functions rolled in one:
* - breakpoint_init
* - proc_insert_breakpoint
@@ -100,7 +112,4 @@ void enable_all_breakpoints(struct Process *proc);
void disable_all_breakpoints(struct Process *proc);
int breakpoints_init(struct Process *proc, int enable);
-void reinitialize_breakpoints(struct Process *proc);
-
-
#endif /* BREAKPOINT_H */