From unknown Fri Aug 08 22:14:56 2025 X-Loop: help-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 Resent-From: Ken Brown Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 24 Oct 2011 16:13:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 9858 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 9858@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.131947272512406 (code B ref -1); Mon, 24 Oct 2011 16:13:02 +0000 Received: (at submit) by debbugs.gnu.org; 24 Oct 2011 16:12:05 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RIN89-0003E2-B7 for submit@debbugs.gnu.org; Mon, 24 Oct 2011 12:12:05 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RIN86-0003DX-PI for submit@debbugs.gnu.org; Mon, 24 Oct 2011 12:12:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RIN6W-0002kv-Eq for submit@debbugs.gnu.org; Mon, 24 Oct 2011 12:10:25 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:37190) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RIN6W-0002kr-Aj for submit@debbugs.gnu.org; Mon, 24 Oct 2011 12:10:24 -0400 Received: from eggs.gnu.org ([140.186.70.92]:39995) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RIN6Q-0001MV-9x for bug-gnu-emacs@gnu.org; Mon, 24 Oct 2011 12:10:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RIN6M-0002jq-4d for bug-gnu-emacs@gnu.org; Mon, 24 Oct 2011 12:10:18 -0400 Received: from granite1.mail.cornell.edu ([128.253.83.141]:51572 helo=authusersmtp.mail.cornell.edu) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RIN6L-0002jj-VH for bug-gnu-emacs@gnu.org; Mon, 24 Oct 2011 12:10:14 -0400 Received: from [128.84.234.240] (dhcp240.math.cornell.edu [128.84.234.240]) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id p9OGAC5t015813 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Mon, 24 Oct 2011 12:10:13 -0400 (EDT) Message-ID: <4EA58DDC.2020100@cornell.edu> Date: Mon, 24 Oct 2011 12:10:04 -0400 From: Ken Brown User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: Solaris 9 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -5.8 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.8 (-----) 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 I think M-x gdb should just start up normally in this situation, perhaps with a message that there's no source file. To reproduce: emacs -Q M-: (setq gdb-show-main t) M-x gdb In GNU Emacs 24.0.90.2 (x86_64-unknown-linux-gnu, GTK+ Version 2.22.0) of 2011-10-24 on moufangfedora Windowing system distributor `Fedora Project', version 11.0.10905000 Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: nil value of $XMODIFIERS: @im=none locale-coding-system: nil default enable-multibyte-characters: t Major mode: Fundamental Minor modes in effect: tooltip-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: M-x s e t - v a g d b - s h o w - m a i n C-g M-: ( s e t q SPC g d b - s h o w - m a i n SPC t ) M-x g d b C-x b * M M-x r e p o r Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Quit t error in process filter: gud-find-file: Wrong type argument: stringp, nil error in process filter: Wrong type argument: stringp, nil Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr message format-spec rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mailabbrev mail-utils gmm-utils mailheader emacsbug gdb-mi bindat json gud easy-mmode comint regexp-opt ring help-fns time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces cus-face files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) From unknown Fri Aug 08 22:14:56 2025 X-Loop: help-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 Resent-From: Ken Brown Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 24 Oct 2011 19:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9858 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 9858@debbugs.gnu.org Received: via spool by 9858-submit@debbugs.gnu.org id=B9858.13194843313360 (code B ref 9858); Mon, 24 Oct 2011 19:26:02 +0000 Received: (at 9858) by debbugs.gnu.org; 24 Oct 2011 19:25:31 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RIQ9L-0000s9-6u for submit@debbugs.gnu.org; Mon, 24 Oct 2011 15:25:31 -0400 Received: from granite1.mail.cornell.edu ([128.253.83.141] helo=authusersmtp.mail.cornell.edu) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RIQ9G-0000rz-Cs for 9858@debbugs.gnu.org; Mon, 24 Oct 2011 15:25:28 -0400 Received: from [128.84.234.240] (dhcp240.math.cornell.edu [128.84.234.240]) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id p9OJNqD0021609 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for <9858@debbugs.gnu.org>; Mon, 24 Oct 2011 15:23:53 -0400 (EDT) Message-ID: <4EA5BB48.8050800@cornell.edu> Date: Mon, 24 Oct 2011 15:23:52 -0400 From: Ken Brown User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 References: <4EA58DDC.2020100@cornell.edu> In-Reply-To: <4EA58DDC.2020100@cornell.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -5.8 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.8 (-----) 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)))))) From unknown Fri Aug 08 22:14:56 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.427 (Entity 5.427) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Ken Brown Subject: bug#9858: closed (Re: bug#9858: 24.0.90; M-x gdb breaks if gdb-show-main is non-nil but there's no file loaded) Message-ID: References: <4ED5A2E8.2070904@cornell.edu> <4EA58DDC.2020100@cornell.edu> X-Gnu-PR-Message: they-closed 9858 X-Gnu-PR-Package: emacs Reply-To: 9858@debbugs.gnu.org Date: Wed, 30 Nov 2011 03:29:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1322623742-5666-1" This is a multi-part message in MIME format... ------------=_1322623742-5666-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #9858: 24.0.90; M-x gdb breaks if gdb-show-main is non-nil but there's no f= ile loaded which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 9858@debbugs.gnu.org. --=20 9858: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D9858 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1322623742-5666-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 9858-done) by debbugs.gnu.org; 30 Nov 2011 03:28:44 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RVaqh-0001Su-Gv for submit@debbugs.gnu.org; Tue, 29 Nov 2011 22:28:44 -0500 Received: from granite1.mail.cornell.edu ([128.253.83.141] helo=authusersmtp.mail.cornell.edu) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RVaqe-0001Sl-NT for 9858-done@debbugs.gnu.org; Tue, 29 Nov 2011 22:28:42 -0500 Received: from [192.168.1.4] (cpe-67-249-194-47.twcny.res.rr.com [67.249.194.47]) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id pAU3ScrW015637 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for <9858-done@debbugs.gnu.org>; Tue, 29 Nov 2011 22:28:39 -0500 (EST) Message-ID: <4ED5A2E8.2070904@cornell.edu> Date: Tue, 29 Nov 2011 22:28:40 -0500 From: Ken Brown User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: 9858-done@debbugs.gnu.org Subject: Re: bug#9858: 24.0.90; M-x gdb breaks if gdb-show-main is non-nil but there's no file loaded References: <4EA58DDC.2020100@cornell.edu> <4EA5BB48.8050800@cornell.edu> In-Reply-To: <4EA5BB48.8050800@cornell.edu> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -5.8 (-----) X-Debbugs-Envelope-To: 9858-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.8 (-----) On 10/24/2011 3:23 PM, Ken Brown wrote: > The following patch seems to fix it. OK to apply? Patch applied. Closing bug. ------------=_1322623742-5666-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 24 Oct 2011 16:12:05 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RIN89-0003E2-B7 for submit@debbugs.gnu.org; Mon, 24 Oct 2011 12:12:05 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RIN86-0003DX-PI for submit@debbugs.gnu.org; Mon, 24 Oct 2011 12:12:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RIN6W-0002kv-Eq for submit@debbugs.gnu.org; Mon, 24 Oct 2011 12:10:25 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:37190) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RIN6W-0002kr-Aj for submit@debbugs.gnu.org; Mon, 24 Oct 2011 12:10:24 -0400 Received: from eggs.gnu.org ([140.186.70.92]:39995) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RIN6Q-0001MV-9x for bug-gnu-emacs@gnu.org; Mon, 24 Oct 2011 12:10:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RIN6M-0002jq-4d for bug-gnu-emacs@gnu.org; Mon, 24 Oct 2011 12:10:18 -0400 Received: from granite1.mail.cornell.edu ([128.253.83.141]:51572 helo=authusersmtp.mail.cornell.edu) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RIN6L-0002jj-VH for bug-gnu-emacs@gnu.org; Mon, 24 Oct 2011 12:10:14 -0400 Received: from [128.84.234.240] (dhcp240.math.cornell.edu [128.84.234.240]) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id p9OGAC5t015813 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Mon, 24 Oct 2011 12:10:13 -0400 (EDT) Message-ID: <4EA58DDC.2020100@cornell.edu> Date: Mon, 24 Oct 2011 12:10:04 -0400 From: Ken Brown User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 MIME-Version: 1.0 To: bug-gnu-emacs@gnu.org Subject: 24.0.90; M-x gdb breaks if gdb-show-main is non-nil but there's no file loaded Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: Solaris 9 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -5.8 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.8 (-----) 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 I think M-x gdb should just start up normally in this situation, perhaps with a message that there's no source file. To reproduce: emacs -Q M-: (setq gdb-show-main t) M-x gdb In GNU Emacs 24.0.90.2 (x86_64-unknown-linux-gnu, GTK+ Version 2.22.0) of 2011-10-24 on moufangfedora Windowing system distributor `Fedora Project', version 11.0.10905000 Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: nil value of $XMODIFIERS: @im=none locale-coding-system: nil default enable-multibyte-characters: t Major mode: Fundamental Minor modes in effect: tooltip-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: M-x s e t - v a g d b - s h o w - m a i n C-g M-: ( s e t q SPC g d b - s h o w - m a i n SPC t ) M-x g d b C-x b * M M-x r e p o r Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Quit t error in process filter: gud-find-file: Wrong type argument: stringp, nil error in process filter: Wrong type argument: stringp, nil Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr message format-spec rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mailabbrev mail-utils gmm-utils mailheader emacsbug gdb-mi bindat json gud easy-mmode comint regexp-opt ring help-fns time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces cus-face files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) ------------=_1322623742-5666-1--