From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 26221 invoked from network); 17 Dec 1999 16:42:48 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 17 Dec 1999 16:42:48 -0000 Received: from zmamail01.zma.compaq.com (zmamail01.zma.compaq.com [161.114.64.101]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id LAA10787 for ; Fri, 17 Dec 1999 11:42:48 -0500 Received: by zmamail01.zma.compaq.com (Postfix, from userid 12345) id BBE42700; Fri, 17 Dec 1999 11:42:17 -0500 (EST) Received: from cxo3ns.cxo.dec.com (cxo3ns.cxo.dec.com [16.63.0.10]) by zmamail01.zma.compaq.com (Postfix) with SMTP id 29846708 for ; Fri, 17 Dec 1999 11:42:17 -0500 (EST) Received: from brownfur.cxo.dec.com by cxo3ns.cxo.dec.com; (5.65v4.0/1.1.8.2/11Apr96-1001AM) id AA26009; Fri, 17 Dec 1999 09:42:12 -0700 Received: from dhcp192-89.cxo.dec.com by brownfur.cxo.dec.com (5.65v4.0/1.1.10.5/17Feb98-0753AM) id AA26106; Fri, 17 Dec 1999 09:42:16 -0700 Received: by compaq.com (sSMTP sendmail emulation); Sun, 19 Dec 1999 09:41:06 -0700 Message-Id: X-Mailer: XFMail 1.4.4 on Linux X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit Mime-Version: 1.0 In-Reply-To: Date: Sun, 19 Dec 1999 09:41:06 -0700 (MST) Reply-To: Brian Hall Sender: brianw.hall@compaq.com From: Brian Hall To: axp-list@redhat.com Subject: Retrieving PC from (traversing) the stack on Alpha 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