GNU bug report logs - #9858
24.0.90; M-x gdb breaks if gdb-show-main is non-nil but there's no file loaded

Previous Next

Package: emacs;

Reported by: Ken Brown <kbrown <at> cornell.edu>

Date: Mon, 24 Oct 2011 16:13:02 UTC

Severity: normal

Found in version 24.0.90

Done: Ken Brown <kbrown <at> cornell.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Ken Brown <kbrown <at> cornell.edu>
To: 9858 <at> debbugs.gnu.org
Subject: bug#9858: 24.0.90; M-x gdb breaks if gdb-show-main is non-nil but there's no file loaded
Date: Mon, 24 Oct 2011 15:23:52 -0400
On 10/24/2011 12:10 PM, Ken Brown wrote:
> The info node GDB Graphical Interface File > GDB User Interface Layout
> suggests setting the (customizable) variable gdb-show-main non-nil in
> order to have the source buffer displayed on startup of M-x gdb. But if
> you do this and then run M-x gdb without specifying a file to debug, M-x
> gdb doesn't initialize properly, and the *Messages* buffer contains
>
> error in process filter: gud-find-file: Wrong type argument: stringp, nil

The following patch seems to fix it.  OK to apply?

=== modified file 'lisp/progmodes/gdb-mi.el'
--- lisp/progmodes/gdb-mi.el    2011-10-06 16:11:38 +0000
+++ lisp/progmodes/gdb-mi.el    2011-10-24 19:17:07 +0000
@@ -4121,7 +4121,7 @@
   (if gdb-many-windows
       (gdb-setup-windows)
     (gdb-get-buffer-create 'gdb-breakpoints-buffer)
-    (if gdb-show-main
+    (if (and gdb-show-main gdb-main-file)
         (let ((pop-up-windows t))
           (display-buffer (gud-find-file gdb-main-file))))))







This bug report was last modified 13 years and 227 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.