lkml.org 
[lkml]   [1999]   [Dec]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Retrieving PC from (traversing) the stack on Alpha
Brian Hall wrote:
> 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 get_wchan, which traverses the frame list to find the first PC
that's not in a scheduling function.

Check also __builtin_frame_address(N) and __builtin_return_address(N) in
the GCC info. They do exactly what you want if they work, but I
understand that only N == 0 works on some processors. If that's the
case for your Alpha, __builtin_frame_address(0) is still a clean way to
get the first frame.

Don't ask me for any more clues as I don't have an Alpha!

have a nice day,
-- Jamie

-
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/

\
 
 \ /
  Last update: 2005-03-22 13:55    [W:0.018 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site