emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

other weird gdb-mi problems


From: Miles Bader
Subject: other weird gdb-mi problems
Date: Wed, 26 Aug 2009 16:49:10 +0900

I'm debugging a program, which segfaulted (I think due to stack
overflow); here's the top of the stack:

   (gdb) fr 0
   #0  0x083718ee in IpLoc::shares_outermost_container (this=0x84eb8fc, 
       var=0x84eb894) at IpLoc.h:1021
   1021           return oc1 == oc2;
   (gdb) ba 5
   #0  0x083718ee in IpLoc::shares_outermost_container (this=0x84eb8fc, 
       var=0x84eb894) at IpLoc.h:1021
   #1  0x08371994 in IpLoc::contains (this=0x84eb8fc, var=0x84eb894)
       at IpLoc.h:1048
   #2  0x0836eb31 in IpLoc::innermost_container (this=0x84eb894, 
       within=0x84e95a4) at IpLoc.cpp:825
   #3  0x08372232 in IpLoc::innermost_container (this=0x84eb894, 
       within=0x84e95a4) at IpLoc.h:803
   #4  0x0836ed94 in print_member_name (cont=0x84e95a4, var=0x84eb894, os=...)
       at IpLoc.cpp:849

Now, let's try moving up the stack:

   (gdb) up
   #1  0x08371994 in IpLoc::contains (this=0x84eb8fc, var=0x84eb894)
       at IpLoc.h:1048
   1048             && _oc_start <= var->_oc_start && _oc_end >= var->_oc_end);

(**** BUG 1) The transcript output looks ok -- but the source code
window displays the source file/location for frame 0, not for the
current frame!

Now let's try moving to deeper stack frames, using the "up" command:

   (gdb) up
   #1  0x08371994 in IpLoc::contains (this=0x84eb8fc, var=0x84eb894)
       at IpLoc.h:1048
   1048             && _oc_start <= var->_oc_start && _oc_end >= var->_oc_end);
   (gdb) up
   #1  0x08371994 in IpLoc::contains (this=0x84eb8fc, var=0x84eb894)
       at IpLoc.h:1048
   1048             && _oc_start <= var->_oc_start && _oc_end >= var->_oc_end);

... wait a minute... why am I still at frame 1?!
"down" is similarly weird:

   (gdb) down
   Bottom (innermost) frame selected; you cannot go down.

 (**** BUG 2) Basically, the "up" and "down" commands seem to always
start from frame 0, not from the current frame.  I can move to a given
frame using "frame N", but that's pretty annoying.  [The source code
window always shows a display for frame 0, no matter what frame is
printed in the transcript windows.]

That's all for now... :)

Thanks,

-Miles

-- 
(\(\
(^.^)
(")")
*This is the cute bunny virus, please copy this into your sig so it can spread.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]