all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Miles Bader <miles.bader@necel.com>
To: emacs-devel@gnu.org
Subject: other weird gdb-mi problems
Date: Wed, 26 Aug 2009 16:49:10 +0900	[thread overview]
Message-ID: <buobpm36mmh.fsf@dhlpc061.dev.necel.com> (raw)

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	other threads:[~2009-08-26  7:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-26  7:49 Miles Bader [this message]
2009-08-26 17:19 ` other weird gdb-mi problems Eli Zaretskii
2009-08-26 23:27   ` Nick Roberts
2009-08-27  1:49     ` Miles Bader
2009-08-27  1:50     ` Miles Bader
2009-08-27  4:52       ` Nick Roberts
2009-08-27  9:42         ` Miles Bader
2009-08-28  3:05           ` Nick Roberts
2009-08-27 13:57     ` Dmitry Dzhus
2009-08-27 23:36       ` Nick Roberts

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=buobpm36mmh.fsf@dhlpc061.dev.necel.com \
    --to=miles.bader@necel.com \
    --cc=emacs-devel@gnu.org \
    --cc=miles@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.