* 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:
@@ -23,6 +23,7 @@ status_t arch_debug_init(kernel_args *args);
|
|||||||
void *arch_debug_get_caller(void);
|
void *arch_debug_get_caller(void);
|
||||||
int32 arch_debug_get_stack_trace(addr_t* returnAddresses, int32 maxCount,
|
int32 arch_debug_get_stack_trace(addr_t* returnAddresses, int32 maxCount,
|
||||||
int32 skipFrames, bool userOnly);
|
int32 skipFrames, bool userOnly);
|
||||||
|
void *arch_debug_get_interrupt_pc();
|
||||||
bool arch_debug_contains_call(struct thread *thread, const char *symbol,
|
bool arch_debug_contains_call(struct thread *thread, const char *symbol,
|
||||||
addr_t start, addr_t end);
|
addr_t start, addr_t end);
|
||||||
void arch_debug_save_registers(int *);
|
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
|
status_t
|
||||||
arch_debug_init(kernel_args *args)
|
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
|
status_t
|
||||||
arch_debug_init(kernel_args *args)
|
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
|
// execute the command
|
||||||
evaluate_debug_command(commandLine);
|
evaluate_debug_command(commandLine);
|
||||||
|
|
||||||
|
debug_set_debugged_thread(previousThread);
|
||||||
|
|
||||||
// reset the page directory
|
// reset the page directory
|
||||||
if (oldPageDirectory)
|
if (oldPageDirectory)
|
||||||
write_cr3(oldPageDirectory);
|
write_cr3(oldPageDirectory);
|
||||||
@@ -699,6 +703,20 @@ arch_debug_get_stack_trace(addr_t* returnAddresses, int32 maxCount,
|
|||||||
return count;
|
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
|
status_t
|
||||||
arch_debug_init(kernel_args *args)
|
arch_debug_init(kernel_args *args)
|
||||||
|
|||||||
Reference in New Issue
Block a user