From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: nickrob@snap.net.nz (Nick Roberts) Newsgroups: gmane.emacs.bugs Subject: bug#5060: More debugging information Date: Sun, 29 Nov 2009 13:36:05 +1300 Message-ID: <19217.49653.913430.150725@totara.tehura.co.nz> References: <874oofl2aq.fsf@maru.md5i.com> Reply-To: Nick Roberts , 5060@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1259455663 9123 80.91.229.12 (29 Nov 2009 00:47:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 29 Nov 2009 00:47:43 +0000 (UTC) To: Michael Welsh Duggan , 5060@emacsbugs.donarmstrong.com Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Nov 29 01:47:36 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NEXwt-0005FB-76 for geb-bug-gnu-emacs@m.gmane.org; Sun, 29 Nov 2009 01:47:35 +0100 Original-Received: from localhost ([127.0.0.1]:38944 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NEXws-0008Ii-R8 for geb-bug-gnu-emacs@m.gmane.org; Sat, 28 Nov 2009 19:47:34 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NEXwp-0008Hr-3N for bug-gnu-emacs@gnu.org; Sat, 28 Nov 2009 19:47:31 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NEXwk-0008GS-5v for bug-gnu-emacs@gnu.org; Sat, 28 Nov 2009 19:47:30 -0500 Original-Received: from [199.232.76.173] (port=40252 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NEXwk-0008GP-00 for bug-gnu-emacs@gnu.org; Sat, 28 Nov 2009 19:47:26 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:47212) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NEXwj-0006xY-9k for bug-gnu-emacs@gnu.org; Sat, 28 Nov 2009 19:47:25 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nAT0lNxT031992; Sat, 28 Nov 2009 16:47:23 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id nAT0j5NW031700; Sat, 28 Nov 2009 16:45:05 -0800 Resent-Date: Sat, 28 Nov 2009 16:45:05 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: nickrob@snap.net.nz (Nick Roberts) Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Sun, 29 Nov 2009 00:45:05 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: followup 5060 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by 5060-submit@emacsbugs.donarmstrong.com id=B5060.125945497431172 (code B ref 5060); Sun, 29 Nov 2009 00:45:05 +0000 Original-Received: (at 5060) by emacsbugs.donarmstrong.com; 29 Nov 2009 00:36:14 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from viper.snap.net.nz (mail10.snap.net.nz [202.37.101.41]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nAT0aCpR031169 for <5060@emacsbugs.donarmstrong.com>; Sat, 28 Nov 2009 16:36:13 -0800 Original-Received: from totara (188.63.255.123.dynamic.snap.net.nz [123.255.63.188]) by viper.snap.net.nz (Postfix) with ESMTP id EC0DE2F4066; Sun, 29 Nov 2009 13:36:06 +1300 (NZDT) Original-Received: by totara (Postfix, from userid 1000) id 046BCC167; Sun, 29 Nov 2009 13:36:05 +1300 (NZDT) In-Reply-To: <874oofl2aq.fsf@maru.md5i.com> X-Mailer: VM 7.19 under Emacs 22.2.1 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Sat, 28 Nov 2009 19:47:30 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:33027 Archived-At: > Shortly before the failure occurs, gdb-frame-handler is called. In the > context of the failure, the frame variable is set to: > > ((line . "29") (file . "longjmp.c") (func . "__libc_siglongjmp") > (addr . "0xb79ef6c1") (level . "0")) > > gdb-selected-file is nil, since there is no 'fullname. > gdb-selected-line gets 29. So, gud-last-frame is '(nil . 29). > gud-display-frame is then called, which calls gud-display-line with the > args from gud-last frame. I.e., (gud-display-frame nil 29). This nil > is what is later causing problems when gud-find-file is called. > > My guess is that gud-display-frame should not be called if > gdb-selected-file is nil. But I do not understand the code well enough > to know that this is the case. That sounds right. Using gdb-frame-handler to get the current line is a bit of a hack because gdb doesn't always print the location when it stops. This code doesn't look quite right. Does the patch below work? -- Nick http://users.snap.net.nz/~nickrob *** gdb-mi.el.~1.53.~ 2009-11-03 19:06:46.000000000 +1300 --- gdb-mi.el 2009-11-29 00:41:01.000000000 +1300 *************** overlay arrow in source buffer." *** 3754,3762 **** (setq gdb-frame-number (bindat-get-field frame 'level)) (setq gdb-frame-address (bindat-get-field frame 'addr)) (let ((line (bindat-get-field frame 'line))) ! (setq gdb-selected-line (or (and line (string-to-number line)) ! nil)) ; don't fail if line is nil ! (when line ; obey the current file only if we have line info (setq gud-last-frame (cons gdb-selected-file gdb-selected-line)) (gud-display-frame))) (if gud-overlay-arrow-position --- 3754,3761 ---- (setq gdb-frame-number (bindat-get-field frame 'level)) (setq gdb-frame-address (bindat-get-field frame 'addr)) (let ((line (bindat-get-field frame 'line))) ! (setq gdb-selected-line (and line (string-to-number line))) ! (when (and gdb-selected-file gdb-selected-line) (setq gud-last-frame (cons gdb-selected-file gdb-selected-line)) (gud-display-frame))) (if gud-overlay-arrow-position