sparc: fix debug support
Declare and use the correct registers to define a stack frame. Change-Id: Ice3ba8f8715313a715f6b1cb553a6883541f5cc4 Reviewed-on: https://review.haiku-os.org/c/1327 Reviewed-by: Alex von Gluck IV <[email protected]>
This commit is contained in:
@@ -7,7 +7,8 @@
|
|||||||
|
|
||||||
|
|
||||||
struct sparc_debug_cpu_state {
|
struct sparc_debug_cpu_state {
|
||||||
uint32 dummy;
|
uint64 pc;
|
||||||
|
uint64 i6; // frame pointer
|
||||||
} __attribute__((aligned(8)));
|
} __attribute__((aligned(8)));
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ struct stack_frame {
|
|||||||
|
|
||||||
status_t
|
status_t
|
||||||
arch_debug_get_instruction_pointer(debug_context *context, thread_id thread,
|
arch_debug_get_instruction_pointer(debug_context *context, thread_id thread,
|
||||||
void **ip, void **stackFrameAddress)
|
void **pc, void **stackFrameAddress)
|
||||||
{
|
{
|
||||||
// get the CPU state
|
// get the CPU state
|
||||||
debug_cpu_state cpuState;
|
debug_cpu_state cpuState;
|
||||||
@@ -26,8 +26,8 @@ arch_debug_get_instruction_pointer(debug_context *context, thread_id thread,
|
|||||||
if (error != B_OK)
|
if (error != B_OK)
|
||||||
return error;
|
return error;
|
||||||
|
|
||||||
*ip = (void*)cpuState.rip;
|
*pc = (void*)cpuState.pc;
|
||||||
*stackFrameAddress = (void*)cpuState.rbp;
|
*stackFrameAddress = (void*)cpuState.i6;
|
||||||
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user