diff options
author | Petr Machata <pmachata@redhat.com> | 2012-04-06 13:25:37 +0200 |
---|---|---|
committer | Petr Machata <pmachata@redhat.com> | 2012-04-19 01:38:00 +0200 |
commit | d09d9ce83ba2c369d06de5a308b5122a04322ba3 (patch) | |
tree | 8292b75b9c88a3f95d83978fcae91cdfdbb79880 | |
parent | a24163658be2cc9249621701e6d056df0063f52f (diff) | |
download | ltrace-d09d9ce83ba2c369d06de5a308b5122a04322ba3.tar.gz |
Drop a piece of PPC64 crud
- Breakpoints on PPC64 are newly handled as proper PLT breakpoints
-rw-r--r-- | handle_event.c | 38 |
1 files changed, 1 insertions, 37 deletions
diff --git a/handle_event.c b/handle_event.c index 57695af..dcb4c81 100644 --- a/handle_event.c +++ b/handle_event.c @@ -591,43 +591,7 @@ handle_breakpoint(Event *event) for (i = event->proc->callstack_depth - 1; i >= 0; i--) { if (brk_addr == event->proc->callstack[i].return_addr) { -#ifdef __powerpc__ - /* - * PPC HACK! (XXX FIXME TODO) - * The PLT gets modified during the first call, - * so be sure to re-enable the breakpoint. - */ - unsigned long a; - struct library_symbol *libsym = - event->proc->callstack[i].c_un.libfunc; - void *addr = sym2addr(event->proc, libsym); - - if (libsym->plt_type != LS_TOPLT_POINT) { - unsigned char break_insn[] = BREAKPOINT_VALUE; - - sbp = address2bpstruct(leader, addr); - assert(sbp); - a = ptrace(PTRACE_PEEKTEXT, event->proc->pid, - addr); - - if (memcmp(&a, break_insn, BREAKPOINT_LENGTH)) { - sbp->enabled--; - insert_breakpoint(event->proc, addr, - libsym); - } - } else { - sbp = dict_find_entry(leader->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); - } - } -#elif defined(__mips__) +#if defined(__mips__) void *addr = NULL; struct library_symbol *sym= event->proc->callstack[i].c_un.libfunc; struct library_symbol *new_sym; |