aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSedat Dilek <sedat.dilek@gmail.com>2012-09-01 18:24:19 +0200
committerPetr Machata <pmachata@redhat.com>2012-09-03 12:13:22 +0200
commit5165cf30236ab00b4b38b67794e8055f1076f619 (patch)
tree52d1e0ae02cb5c1823d32fd6cfc70edf276e449b
parent7d804e9391378fae7de474d746efc72cb2024d4c (diff)
downloadltrace-5165cf30236ab00b4b38b67794e8055f1076f619.tar.gz
breakpoints.c: handle_event.c: Fix compilation on MIPS
From my conversation with Petr Machata: >>> [ breakpoints.c ] >>> >>> MIPS arch has no own "breakpoints.c". >>> IIRC sth, was wrong with "list_of_symbols" in >>> enable_all_breakpoints()... "Process" has no member "list_of_symbols", >>> so cut off the mips-ifdef part. >>> Just testing compiles or not. >> >> Cutting this actually seems reasonable. There was a similar ifdef for >> PPC, and that is now gone as well (and PPC works fine). I believe >> ltrace now handles delaying breakpoint enablement. >> >>> [ handle_event.c ] >>> >>> Same as for breakpoints.c cut off the mips-ifdef, seen >>> "list_of_symbols" errors in handle_breakpoint(). >> >> Hmm, that seems like an implementation of the delayed start. I think >> this can be removed as well, with the same rationale as above. These two should probably be in a patch by themselves. Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
-rw-r--r--breakpoints.c29
-rw-r--r--handle_event.c19
2 files changed, 0 insertions, 48 deletions
diff --git a/breakpoints.c b/breakpoints.c
index e7120ee..3eee38b 100644
--- a/breakpoints.c
+++ b/breakpoints.c
@@ -302,35 +302,6 @@ enable_all_breakpoints(Process *proc)
dict_apply_to_all(proc->breakpoints, enable_bp_cb,
proc);
}
-#ifdef __mips__
- {
- /*
- * I'm sure there is a nicer way to do this. We need to
- * insert breakpoints _after_ the child has been started.
- */
- struct library_symbol *sym;
- struct library_symbol *new_sym;
- sym=proc->list_of_symbols;
- while(sym){
- void *addr= sym2addr(proc,sym);
- if(!addr){
- sym=sym->next;
- continue;
- }
- if(dict_find_entry(proc->breakpoints,addr)){
- sym=sym->next;
- continue;
- }
- debug(2,"inserting bp %p %s",addr,sym->name);
- new_sym=malloc(sizeof(*new_sym) + strlen(sym->name) + 1);
- memcpy(new_sym,sym,sizeof(*new_sym) + strlen(sym->name) + 1);
- new_sym->next=proc->list_of_symbols;
- proc->list_of_symbols=new_sym;
- insert_breakpoint(proc, addr, new_sym);
- sym=sym->next;
- }
- }
-#endif
}
static void
diff --git a/handle_event.c b/handle_event.c
index a82581b..1720cb3 100644
--- a/handle_event.c
+++ b/handle_event.c
@@ -593,25 +593,6 @@ handle_breakpoint(Event *event)
for (i = event->proc->callstack_depth - 1; i >= 0; i--) {
if (brk_addr == event->proc->callstack[i].return_addr) {
-#if defined(__mips__)
- void *addr = NULL;
- struct library_symbol *sym= event->proc->callstack[i].c_un.libfunc;
- struct library_symbol *new_sym;
- assert(sym);
- addr = sym2addr(event->proc, sym);
- sbp = dict_find_entry(leader->breakpoints, addr);
- if (sbp) {
- if (addr != sbp->addr) {
- insert_breakpoint(event->proc, addr, sym);
- }
- } else {
- new_sym=malloc(sizeof(*new_sym) + strlen(sym->name) + 1);
- memcpy(new_sym,sym,sizeof(*new_sym) + strlen(sym->name) + 1);
- new_sym->next = leader->list_of_symbols;
- leader->list_of_symbols = new_sym;
- insert_breakpoint(event->proc, addr, new_sym);
- }
-#endif
for (j = event->proc->callstack_depth - 1; j > i; j--) {
callstack_pop(event->proc);
}