From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,64d603116415300c,start X-Google-Attributes: gid111c93,public X-Google-Thread: 13bc9c,64d603116415300c,start X-Google-Attributes: gid13bc9c,public From: Brian Hall Subject: Retrieving PC from (traversing) the stack on Alpha Date: 1999/12/16 Message-ID: #1/1 X-Deja-AN: 561698739 Content-Transfer-Encoding: 8bit Sender: root@news.uni-erlangen.de References: X-Priority: 3 (Normal) X-To: Matt Robinson , x-linux-kernel@vger.rutgers.edu, comp.os.linux.alpha@list.deja.com Content-Type: text/plain; charset=us-ascii X-Cc: lkcd@oss.sgi.com X-Orcpt: rfc822;linux-kernel-outgoing-dig X-Addition: NG Organization: Mail to Usenet Gateway Mime-Version: 1.0 Reply-To: Brian Hall Newsgroups: comp.os.linux.alpha,revue.linux-kernel X-Loop: majordomo@vger.rutgers.edu 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 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/