From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 31941 invoked from network); 21 Dec 1999 19:57:34 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 21 Dec 1999 19:57:34 -0000 Received: from zmamail02.zma.compaq.com (zmamail02.zma.compaq.com [161.114.64.102]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id OAA23205 for ; Tue, 21 Dec 1999 14:57:34 -0500 Received: by zmamail02.zma.compaq.com (Postfix, from userid 12345) id 5A904313; Tue, 21 Dec 1999 14:57:03 -0500 (EST) Received: from cxo3ns.cxo.dec.com (cxo3ns.cxo.dec.com [16.63.0.10]) by zmamail02.zma.compaq.com (Postfix) with SMTP id 46A0D12E; Tue, 21 Dec 1999 14:57:02 -0500 (EST) Received: from brownfur.cxo.dec.com by cxo3ns.cxo.dec.com; (5.65v4.0/1.1.8.2/11Apr96-1001AM) id AA05553; Tue, 21 Dec 1999 12:57:01 -0700 Received: from dhcp192-89.cxo.dec.com by brownfur.cxo.dec.com (5.65v4.0/1.1.10.5/17Feb98-0753AM) id AA24464; Tue, 21 Dec 1999 12:57:00 -0700 Received: by compaq.com (sSMTP sendmail emulation); Thu, 23 Dec 1999 12:55:18 -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: Thu, 23 Dec 1999 12:55:17 -0700 (MST) Reply-To: Brian Hall Sender: brianw.hall@compaq.com From: Brian Hall To: axp-list@redhat.com Subject: RE: Retrieving PC from (traversing) the stack on Alpha Cc: lkcd@oss.sgi.com, comp.os.linux.alpha@list.deja.com, Matt Robinson Well, it's not clear to me how to get the PC and RA of interest off the stack when we are in the vmdump functions. We could retreive the RA from register 26 in the panic() function itself, and pass that to the dump_execute function. Then the dump code could at least tell where panic was called from. Is this sufficient, or at least a start? On 18-Dec-1999 Brian Hall 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. > > 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