* Retrieving PC from (traversing) the stack on Alpha [not found] <Pine.SGI.3.94.991213130230.334794A-100000@awesome.engr.sgi.com> @ 1999-12-16 5:00 ` Brian Hall 1999-12-17 5:00 ` Scott Wood 0 siblings, 1 reply; 2+ messages in thread From: Brian Hall @ 1999-12-16 5:00 UTC (permalink / raw) Okay, after some research, I think I figured out how to get at the needed Alpha registers: register unsigned long fptr __asm__("$15"); /* get frame pointer? */ register unsigned long sptr __asm__("$30"); /* get stack pointer? */ Now, my understanding of the problem is that I need to go back two frames on the stack to get the PC of interest, and three for the RA of interest. How do I do this? I haven't had much luck yet trying to figure out how to navigate the kernel stack. I see the pt_regs structure, but I'm not exactly sure how to figure the frame size, since that can vary with each frame. On 13-Dec-1999 Matt Robinson wrote: > The problem is from panic(), you don't have the registers, so you > need to grab them. That way the 'lcrash' code has a point to start > with as far as the failing process is concerned. Hence the "if (regs)" > stuff. -- Brian Hall <brianw.hall@compaq.com> Linux Consultant - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/ ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Retrieving PC from (traversing) the stack on Alpha 1999-12-16 5:00 ` Retrieving PC from (traversing) the stack on Alpha Brian Hall @ 1999-12-17 5:00 ` Scott Wood 0 siblings, 0 replies; 2+ messages in thread From: Scott Wood @ 1999-12-17 5:00 UTC (permalink / raw) On 16 Dec 1999 23:05:05 +0100, Brian Hall <brianw.hall@compaq.com> wrote: >Okay, after some research, I think I figured out how to get at the needed >Alpha registers: > >register unsigned long fptr __asm__("$15"); /* get frame pointer? */ >register unsigned long sptr __asm__("$30"); /* get stack pointer? */ > >Now, my understanding of the problem is that I need to go back two frames on >the stack to get the PC of interest, and three for the RA of interest. How do I >do this? I haven't had much luck yet trying to figure out how to navigate the >kernel stack. I see the pt_regs structure, but I'm not exactly sure how to >figure the frame size, since that can vary with each frame. Look at dik_show_trace in arch/alpha/kernel/traps.c; it examines each quadword on the stack and only considers addresses inside the text segment. -Scott ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1999-12-17 5:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <Pine.SGI.3.94.991213130230.334794A-100000@awesome.engr.sgi.com>
1999-12-16 5:00 ` Retrieving PC from (traversing) the stack on Alpha Brian Hall
1999-12-17 5:00 ` Scott Wood
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox