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:
PulkoMandy
2019-03-30 15:23:15 +00:00
committed by waddlesplash
parent 3bfbec8336
commit 8ff82ee2d4
2 changed files with 5 additions and 4 deletions
@@ -18,7 +18,7 @@ struct stack_frame {
status_t
arch_debug_get_instruction_pointer(debug_context *context, thread_id thread,
void **ip, void **stackFrameAddress)
void **pc, void **stackFrameAddress)
{
// get the CPU state
debug_cpu_state cpuState;
@@ -26,8 +26,8 @@ arch_debug_get_instruction_pointer(debug_context *context, thread_id thread,
if (error != B_OK)
return error;
*ip = (void*)cpuState.rip;
*stackFrameAddress = (void*)cpuState.rbp;
*pc = (void*)cpuState.pc;
*stackFrameAddress = (void*)cpuState.i6;
return B_OK;
}