kdb problems

Scott Lurndal slurn at nanobiz.com
Wed Apr 19 16:42:22 PDT 2000


> 
> Hi,
> 
> Some followup..  (In other words,
> I could have something besides kdb problems.)
> 
> I have an app that does an ioctl to a driver.
> I'm getting an Oops and using kdb to debug it.
> 
> With kdb, I'm seeing esp = 0xd0823bcd [odd number]
> and eip = 0xd08238b0 [near esp].  ebp = 0xc04e7e44.
> I expected esp to be near ebp, not near eip (?).

esp should _always_ be congruent to zero modulo 16 - this
is required so all pushes of multiword data are aligned 
correctly (e.g. floating stuff).

> 
> Is it uncommon/wrong/strange for esp to be an odd value?

Very strange.

> Is it unusual for esp to be near eip?  I expected it to
> be near ebp, not eip.

I suspect that someone dereferenced a uninitialized function pointer that
had a stack address in it.


> So it looks to me like esp is scrogged -- unless kdb
> modifies it in some strange/funny way (?).

Nope.

> 
> If I dump memory at &regs (from the regs display),
> I can see these same values of esp and eip in the
> regs memory area (but didn't check their offsets).

&regs is basically the stack pointer immediately following
the processor pushing the processor state after a fault
or interrupt.

> 
> 
> Also, regarding the BT command in kdb, if BT may have
> difficulty in following stack frames, maybe a limit
> should be put on how many traceback lines (frames)
> it will follow.  I printed the same one a few hundred
> times before I rebooted my system.

It should hit the 'more>' code and you can use 'q' to exit.

scott

> 
> ~Randy
> 
> 
> > -----Original Message-----
> > From: Dunlap, Randy 
> > Sent: Wednesday, April 19, 2000 2:43 PM
> > To: 'kdb at oss.sgi.com'
> > Subject: kdb problems
> > 
> > 
> > Hi,
> > 
> > I'm using kdb-v1.1-2.3.48 on 2.3.99-pre6-3 (with a
> > couple minor changes only to linux/Makefile,
> > include/asm-386/apicdef.h, and arch/i386/kernel/smp.c).
> > 
> > a.  Just to let you know, "go" still isn't fixed on
> > some platforms.  (From the FAQ:
> > 
> >   Note: This may be fixed in v0.6 - please let me
> >   know if it isn't.)
> > 
> > b.  When I use the "bt" command, I get a screen full
> > on the same line replicated to fill up the screen
> > (until [more] is printed).  After pressing Enter/CR,
> > I get the SAME bt output.  It appears to be broken.
> > CONFIG_KDB_FRAMEPTR=y.
> > 
> > ~Randy
> 




More information about the kdb mailing list