kernel_ppc: Save caller's stack pointer in arch_debug_save_registers
Suggested by Ingo in ticket #6139. Code is adapted from x86. Note that on ppc64 GPR1 needs to be 64-bit, thus the choice of addr_t. Resolves part of ticket #6160. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37281 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
4fa4224a1d
commit
d46ce4d62a
@ -10,6 +10,7 @@
|
||||
|
||||
|
||||
struct arch_debug_registers {
|
||||
addr_t r1;
|
||||
};
|
||||
|
||||
|
||||
|
@ -258,6 +258,9 @@ return 0;
|
||||
void
|
||||
arch_debug_save_registers(struct arch_debug_registers* registers)
|
||||
{
|
||||
// get the caller's frame pointer
|
||||
stack_frame* frame = (stack_frame*)get_current_stack_frame();
|
||||
registers->r1 = (addr_t)frame->previous;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user