MIPS support to libm, libdl and libthread_db
Change-Id: I9106721af7fe0cd45df82976250db0d300a20117 Signed-off-by: Raghu Gandham <raghu@mips.com>
This commit is contained in:

committed by
Raghu Gandham

parent
10579fc43d
commit
726800e8f4
@@ -99,7 +99,7 @@ _event_getmsg_helper(td_thrhandle_t const * handle, void * bkpt_addr)
|
||||
gEventMsgHandle.tid = gEventMsgHandle.pid;
|
||||
return 0x42;
|
||||
}
|
||||
#else
|
||||
#elif defined(__arm__)
|
||||
pc = (void *)ptrace(PTRACE_PEEKUSR, handle->tid, (void *)60 /* r15/pc */, NULL);
|
||||
|
||||
if (pc == bkpt_addr) {
|
||||
@@ -109,6 +109,15 @@ _event_getmsg_helper(td_thrhandle_t const * handle, void * bkpt_addr)
|
||||
gEventMsgHandle.tid = gEventMsgHandle.pid;
|
||||
return 0x42;
|
||||
}
|
||||
#elif defined(__mips__)
|
||||
pc = (void *)ptrace(PTRACE_PEEKUSR, handle->tid, (void *)(64*4) /* pc */, NULL);
|
||||
if (pc == bkpt_addr) {
|
||||
// The hook function takes the id of the new thread as it's first param,
|
||||
// so grab it from a0
|
||||
gEventMsgHandle.pid = ptrace(PTRACE_PEEKUSR, handle->tid, (void *)(4*4) /* a0 */, NULL);
|
||||
gEventMsgHandle.tid = gEventMsgHandle.pid;
|
||||
return 0x42;
|
||||
}
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user