From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Miles Bader Newsgroups: gmane.emacs.devel Subject: other weird gdb-mi problems Date: Wed, 26 Aug 2009 16:49:10 +0900 Message-ID: Reply-To: Miles Bader NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1251274230 6498 80.91.229.12 (26 Aug 2009 08:10:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 26 Aug 2009 08:10:30 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Aug 26 10:10:23 2009 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MgDaG-0003m4-JH for ged-emacs-devel@m.gmane.org; Wed, 26 Aug 2009 10:10:20 +0200 Original-Received: from localhost ([127.0.0.1]:54591 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MgDaF-0003Cv-Uo for ged-emacs-devel@m.gmane.org; Wed, 26 Aug 2009 04:10:19 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MgDG6-0006UH-5n for emacs-devel@gnu.org; Wed, 26 Aug 2009 03:49:30 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MgDG1-0006O8-6h for emacs-devel@gnu.org; Wed, 26 Aug 2009 03:49:29 -0400 Original-Received: from [199.232.76.173] (port=32852 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MgDG0-0006Nk-Kb for emacs-devel@gnu.org; Wed, 26 Aug 2009 03:49:25 -0400 Original-Received: from mx20.gnu.org ([199.232.41.8]:6646) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MgDFw-0000A8-4N; Wed, 26 Aug 2009 03:49:20 -0400 Original-Received: from tyo202.gate.nec.co.jp ([202.32.8.206]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MgDFr-0002os-TC; Wed, 26 Aug 2009 03:49:16 -0400 Original-Received: from relay31.aps.necel.com ([10.29.19.54]) by tyo202.gate.nec.co.jp (8.13.8/8.13.4) with ESMTP id n7Q7nBEM015828; Wed, 26 Aug 2009 16:49:11 +0900 (JST) Original-Received: from relay11.aps.necel.com ([10.29.19.20] [10.29.19.20]) by relay31.aps.necel.com with ESMTP; Wed, 26 Aug 2009 16:49:11 +0900 Original-Received: from dhlpc061 ([10.114.112.173] [10.114.112.173]) by relay11.aps.necel.com with ESMTP; Wed, 26 Aug 2009 16:49:11 +0900 Original-Received: by dhlpc061 (Postfix, from userid 31295) id 78EB452E1E2; Wed, 26 Aug 2009 16:49:10 +0900 (JST) System-Type: x86_64-unknown-linux-gnu Blat: Foop Original-Lines: 64 X-Detected-Operating-System: by mx20.gnu.org: Solaris 8 (1) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:114610 Archived-At: 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.