arch_debug_get_interrupt_pc() does now also support the currently
debugged thread, if set. This makes "dis" without specified address work when used with "in_context". git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27190 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
2aa5367afb
commit
1b20a9a58e
@ -710,10 +710,19 @@ arch_debug_get_stack_trace(addr_t* returnAddresses, int32 maxCount,
|
||||
void*
|
||||
arch_debug_get_interrupt_pc()
|
||||
{
|
||||
struct iframe* frame = i386_get_current_iframe();
|
||||
if (frame == NULL)
|
||||
return NULL;
|
||||
struct thread* thread = debug_get_debugged_thread();
|
||||
|
||||
if (thread == thread_get_current_thread()) {
|
||||
struct iframe* frame = i386_get_current_iframe();
|
||||
if (frame == NULL)
|
||||
return NULL;
|
||||
|
||||
return (void*)(addr_t)frame->eip;
|
||||
}
|
||||
|
||||
addr_t ebp = thread->arch_info.current_stack.esp[2];
|
||||
// NOTE: This doesn't work, if the thread is running (on another CPU).
|
||||
struct iframe* frame = find_previous_iframe(thread, ebp);
|
||||
return (void*)(addr_t)frame->eip;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user