* Added arch_debug_get_interrupt_pc(), which is supposed to return the
PC of the innermost iframe. * The "in_context" command does now set the currently debugged thread respectively. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27166 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
ec16be9366
commit
0739b87ee9
@ -23,6 +23,7 @@ status_t arch_debug_init(kernel_args *args);
|
||||
void *arch_debug_get_caller(void);
|
||||
int32 arch_debug_get_stack_trace(addr_t* returnAddresses, int32 maxCount,
|
||||
int32 skipFrames, bool userOnly);
|
||||
void *arch_debug_get_interrupt_pc();
|
||||
bool arch_debug_contains_call(struct thread *thread, const char *symbol,
|
||||
addr_t start, addr_t end);
|
||||
void arch_debug_save_registers(int *);
|
||||
|
@ -339,6 +339,14 @@ arch_debug_get_stack_trace(addr_t* returnAddresses, int32 maxCount,
|
||||
}
|
||||
|
||||
|
||||
void*
|
||||
arch_debug_get_interrupt_pc()
|
||||
{
|
||||
// TODO: Implement!
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
arch_debug_init(kernel_args *args)
|
||||
{
|
||||
|
@ -286,6 +286,14 @@ arch_debug_get_caller(void)
|
||||
}
|
||||
|
||||
|
||||
void*
|
||||
arch_debug_get_interrupt_pc()
|
||||
{
|
||||
// TODO: Implement!
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
arch_debug_init(kernel_args *args)
|
||||
{
|
||||
|
@ -596,9 +596,13 @@ cmd_in_context(int argc, char** argv)
|
||||
}
|
||||
}
|
||||
|
||||
struct thread* previousThread = debug_set_debugged_thread(thread);
|
||||
|
||||
// execute the command
|
||||
evaluate_debug_command(commandLine);
|
||||
|
||||
debug_set_debugged_thread(previousThread);
|
||||
|
||||
// reset the page directory
|
||||
if (oldPageDirectory)
|
||||
write_cr3(oldPageDirectory);
|
||||
@ -699,6 +703,20 @@ arch_debug_get_stack_trace(addr_t* returnAddresses, int32 maxCount,
|
||||
return count;
|
||||
}
|
||||
|
||||
/*! Returns the program counter of this thread where the innermost interrupts
|
||||
happened. Returns \c NULL, if there's none or a problem occurred retrieving
|
||||
it.
|
||||
*/
|
||||
void*
|
||||
arch_debug_get_interrupt_pc()
|
||||
{
|
||||
struct iframe* frame = i386_get_current_iframe();
|
||||
if (frame == NULL)
|
||||
return NULL;
|
||||
|
||||
return (void*)(addr_t)frame->eip;
|
||||
}
|
||||
|
||||
|
||||
status_t
|
||||
arch_debug_init(kernel_args *args)
|
||||
|
Loading…
Reference in New Issue
Block a user