From d09d9ce83ba2c369d06de5a308b5122a04322ba3 Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Fri, 6 Apr 2012 13:25:37 +0200 Subject: Drop a piece of PPC64 crud - Breakpoints on PPC64 are newly handled as proper PLT breakpoints --- handle_event.c | 38 +------------------------------------- 1 file changed, 1 insertion(+), 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; -- cgit v1.2.3