On Tue, Jul 22, 2003 at 08:45:37AM +1000, Keith Owens wrote: > On Mon, 21 Jul 2003 17:17:02 -0500, > [EMAIL PROTECTED] 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
