From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ken Brown Newsgroups: gmane.emacs.bugs 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 Message-ID: <4EA5BB48.8050800@cornell.edu> References: <4EA58DDC.2020100@cornell.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1319484288 3520 80.91.229.12 (24 Oct 2011 19:24:48 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 24 Oct 2011 19:24:48 +0000 (UTC) To: 9858@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Oct 24 21:24:38 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RIQ8Q-0005yf-Qo for geb-bug-gnu-emacs@m.gmane.org; Mon, 24 Oct 2011 21:24:34 +0200 Original-Received: from localhost ([::1]:37950 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RIQ8Q-0001QY-Ac for geb-bug-gnu-emacs@m.gmane.org; Mon, 24 Oct 2011 15:24:34 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:50690) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RIQ8N-0001QT-CK for bug-gnu-emacs@gnu.org; Mon, 24 Oct 2011 15:24:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RIQ8L-0007Y4-SV for bug-gnu-emacs@gnu.org; Mon, 24 Oct 2011 15:24:31 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:54592) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RIQ8L-0007Y0-O7 for bug-gnu-emacs@gnu.org; Mon, 24 Oct 2011 15:24:29 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RIQ9q-0000sv-AB for bug-gnu-emacs@gnu.org; Mon, 24 Oct 2011 15:26:02 -0400 X-Loop: help-debbugs@gnu.org 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: Original-Received: via spool by 9858-submit@debbugs.gnu.org id=B9858.13194843313360 (code B ref 9858); Mon, 24 Oct 2011 19:26:02 +0000 Original-Received: (at 9858) by debbugs.gnu.org; 24 Oct 2011 19:25:31 +0000 Original-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 Original-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 Original-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) User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 In-Reply-To: <4EA58DDC.2020100@cornell.edu> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 24 Oct 2011 15:26:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:53081 Archived-At: 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))))))