aboutsummaryrefslogtreecommitdiff
path: root/handle_event.c
diff options
context:
space:
mode:
authorPetr Machata <pmachata@redhat.com>2010-10-25 14:47:55 +0200
committerJoe Damato <ice799@gmail.com>2010-11-28 20:08:01 -0800
commit067322dc1737817000d646440a2b061fdf1c9f40 (patch)
treec28fd1aca43b0e59fe07224aa95849c01cbfefa1 /handle_event.c
parent87e1a5cc080cdab488a6c7076aa5c86dfe1c26f0 (diff)
downloadltrace-067322dc1737817000d646440a2b061fdf1c9f40.tar.gz
Fix tracing on ppc
Diffstat (limited to 'handle_event.c')
-rw-r--r--handle_event.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/handle_event.c b/handle_event.c
index b6ea172..213d0fa 100644
--- a/handle_event.c
+++ b/handle_event.c
@@ -495,6 +495,10 @@ handle_arch_sysret(Event *event) {
continue_process(event->proc->pid);
}
+#ifdef __powerpc__
+void *get_count_register (Process *proc);
+#endif
+
static void
handle_breakpoint(Event *event) {
int i, j;
@@ -561,9 +565,13 @@ handle_breakpoint(Event *event) {
libsym);
}
} else {
- sbp = dict_find_entry(event->proc->breakpoints, sym2addr(event->proc, libsym));
- assert(sbp);
- if (addr != sbp->addr) {
+ sbp = dict_find_entry(event->proc->breakpoints, addr);
+ /* On powerpc, the breakpoint address
+ may end up being actual entry point
+ of the library symbol, not the PLT
+ address we computed. In that case,
+ sbp is NULL. */
+ if (sbp == NULL || addr != sbp->addr) {
insert_breakpoint(event->proc, addr,
libsym);
}