Implemented printing the stack trace in vm_page_fault() for PPC as well.
Not tested, though. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20284 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
00be6a4ccb
commit
ab0ad5e92b
|
@ -2888,20 +2888,31 @@ vm_page_fault(addr_t address, addr_t faultAddress, bool isWrite, bool isUser,
|
|||
#if 1
|
||||
if (area) {
|
||||
struct stack_frame {
|
||||
#ifdef __INTEL__
|
||||
#if defined(__INTEL__) || defined(__POWERPC__)
|
||||
struct stack_frame* previous;
|
||||
void* return_address;
|
||||
#else
|
||||
// ...
|
||||
#endif
|
||||
};
|
||||
} frame;
|
||||
#ifdef __INTEL__
|
||||
struct iframe *iframe = i386_get_user_iframe();
|
||||
if (iframe == NULL)
|
||||
panic("iframe is NULL!");
|
||||
|
||||
struct stack_frame frame;
|
||||
status_t status = user_memcpy(&frame, (void *)iframe->ebp,
|
||||
sizeof(struct stack_frame));
|
||||
#elif defined(__POWERPC__)
|
||||
struct iframe *iframe = ppc_get_user_iframe();
|
||||
if (iframe == NULL)
|
||||
panic("iframe is NULL!");
|
||||
|
||||
status_t status = user_memcpy(&frame, (void *)iframe->r1,
|
||||
sizeof(struct stack_frame));
|
||||
#else
|
||||
# warn "vm_page_fault() stack trace won't work"
|
||||
status = B_ERROR;
|
||||
#endif
|
||||
|
||||
dprintf("stack trace:\n");
|
||||
while (status == B_OK) {
|
||||
|
|
Loading…
Reference in New Issue