kdb
[Top] [All Lists]

Re: KDB pop stack?

To: Keith Owens <kaos@xxxxxxx>
Subject: Re: KDB pop stack?
From: linas@xxxxxxxxxxxxxx
Date: Tue, 22 Jul 2003 19:05:52 -0500
Cc: kdb@xxxxxxxxxxx
In-reply-to: <14741.1058827537@ocs3.intra.ocs.com.au>; from kaos@sgi.com on Tue, Jul 22, 2003 at 08:45:37AM +1000
References: <20030721171702.A48304@forte.austin.ibm.com> <14741.1058827537@ocs3.intra.ocs.com.au>
Sender: kdb-bounce@xxxxxxxxxxx
User-agent: Mutt/1.2.5.1i
On Tue, Jul 22, 2003 at 08:45:37AM +1000, Keith Owens wrote:
> On Mon, 21 Jul 2003 17:17:02 -0500, 
> linas@xxxxxxxxxxxxxx wrote:
> >Maybe the newest version has the following feature: ability to 
> >view registers as they 'would have been' if the stack were poped? 
> 
> Where are those registers stored?  Working registers are overwritten.
> Preserved registers are saved somewhere on stack, but there is no
> defined place where they are stored.  At least not on i386, ia64 has
> unwind data that says where preserved registers are saved, i386 is all
> ad-hoc storage with no way for kdb to tell where that storage is.

Well, yes, I didn't say it was 'easy'.  

I'm working with ppc64, and the save of the non-volatile registers
happens in function prologs/epilogs.   The dirty/ugly method would
be to disassemble these, and do some guessing.  I don't know what
'unwind data' is: I assume its some extra debugging info that gcc
stores somewhere, indicating which regs got clobbered?  Or is this
some kinda ia64 instructon or convention?

Yeah, if its *.S files, and the coder didn't manually arrange 
for the unwind data, then you SOL. 

gdb has a pop stack command, I don't know how it works ... 

A hypothetical kdb pop-stack-show-regs command doesn't need to get
the working/volatile regs right.  Looking at thier contents wouldn't
provide any useful debugging info anyway. 


--linas


<Prev in Thread] Current Thread [Next in Thread>