GNU bug report logs - #15051
24.3; gdb -mi: breakpoint with in non-existent source file spams terminal incessantly

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Ryan Johnson <ryan.johnson@HIDDEN>; dated Thu, 8 Aug 2013 15:50:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 8 Aug 2013 15:49:04 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Aug 08 11:49:04 2013
Received: from localhost ([127.0.0.1]:47626 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.80)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1V7SSV-0006mg-6I
	for submit <at> debbugs.gnu.org; Thu, 08 Aug 2013 11:49:03 -0400
Received: from eggs.gnu.org ([208.118.235.92]:51478)
 by debbugs.gnu.org with esmtp (Exim 4.80)
 (envelope-from <ryan.johnson@HIDDEN>) id 1V7QZQ-0002MI-AF
 for submit <at> debbugs.gnu.org; Thu, 08 Aug 2013 09:48:08 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <ryan.johnson@HIDDEN>) id 1V7QZE-0002Tw-AC
 for submit <at> debbugs.gnu.org; Thu, 08 Aug 2013 09:47:58 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:39309)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <ryan.johnson@HIDDEN>) id 1V7QZE-0002Tq-73
 for submit <at> debbugs.gnu.org; Thu, 08 Aug 2013 09:47:52 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:53163)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <ryan.johnson@HIDDEN>) id 1V7QZ7-0004XY-9I
 for bug-gnu-emacs@HIDDEN; Thu, 08 Aug 2013 09:47:52 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <ryan.johnson@HIDDEN>) id 1V7QZ1-0002P9-DH
 for bug-gnu-emacs@HIDDEN; Thu, 08 Aug 2013 09:47:45 -0400
Received: from bureau81.ns.utoronto.ca ([128.100.132.181]:45168)
 by eggs.gnu.org with esmtp (Exim 4.71)
 (envelope-from <ryan.johnson@HIDDEN>) id 1V7QZ1-0002Mg-9W
 for bug-gnu-emacs@HIDDEN; Thu, 08 Aug 2013 09:47:39 -0400
Received: from [192.168.0.106] (206-248-170-238.dsl.teksavvy.com
 [206.248.170.238]) (authenticated bits=0)
 by bureau81.ns.utoronto.ca (8.13.8/8.13.8) with ESMTP id r78DlNIC011284
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
 for <bug-gnu-emacs@HIDDEN>; Thu, 8 Aug 2013 09:47:24 -0400
Message-ID: <5203A15A.1080307@HIDDEN>
Date: Thu, 08 Aug 2013 09:47:06 -0400
From: Ryan Johnson <ryan.johnson@HIDDEN>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64;
 rv:17.0) Gecko/20130620 Thunderbird/17.0.7
MIME-Version: 1.0
To: bug-gnu-emacs@HIDDEN
Subject: 24.3; gdb -mi: breakpoint with in non-existent source file spams
 terminal incessantly
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address
 (bad octet value).
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -2.7 (--)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Thu, 08 Aug 2013 11:49:01 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <http://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <http://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <http://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.7 (--)

Setting a breakpoint whose target is in a source file that gdb can't
find spams the terminal with failed source listings after every
command. This makes gdb-mode significantly less pleasant to use,
especially since important library functions like abort(),
__cxa_throw(), etc. usually don't have sources available.

To reproduce:

1. Create the following two files:

/* <<<--- foo.c --->>> */
#include <stdio.h>
extern void bar();
int main() {
puts("Thinking about calling bar");;
puts("Planning to call bar");
puts("About to call bar");
bar();
puts("Called bar");
return 0;
};
/* <<<--- end foo.c --->>> */

/* <<<--- bar.c --->>> */
void bar() { }
/* <<<--- end bar.c --->>> */

2. Compile them: `gcc -g foo.c bar.c -o bug'

3. Delete or move bar.c: `rm bar.c'

4. Invoke emacs: `emacs -Q'

5. M-x gdb (giving `bug' as the executable to debug)

6. Execute the following commands in gdb:
b bar
start
n
n
fin
n
n
n
quit

The output looks something like the typescript below. Note how gdb
attempts to list bar.c after every command:

<<<--- begin emacs gdb session --->>>
Current directory is ~/experiments/
GNU gdb (GDB) 7.6.50.20130728-cvs (cygwin-special)
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
<http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-cygwin".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
..
Reading symbols from /home/Ryan/experiments/bug...done.
(gdb) b bar
Breakpoint 1 at 0x100401114: file bar.c, line 1.
(gdb) list bar.c:1
1       bar.c: No such file or directory.
start
Temporary breakpoint 2 at 0x1004010dd: file foo.c, line 4.
Starting program: /home/Ryan/experiments/bug
[New Thread 4308.0x1038]
[New Thread 4308.0x108c]

Temporary breakpoint 2, main () at foo.c:4
4           puts("About to call bar");
(gdb) list bar.c:1
1       bar.c: No such file or directory.
n
5           bar();
(gdb) list bar.c:1
1       bar.c: No such file or directory.
n

Breakpoint 1, bar () at bar.c:1
1       in bar.c
(gdb) list bar.c:1
1       in bar.c
fin
Run till exit from #0  bar () at bar.c:1
main () at foo.c:6
6           puts("Called bar");
(gdb) list bar.c:1
1       bar.c: No such file or directory.
n
7           return 0;
(gdb) list bar.c:1
1       bar.c: No such file or directory.
n
8       };
(gdb) list bar.c:1
1       bar.c: No such file or directory.
n
[Inferior 1 (process 4308) exited normally]
(gdb) list bar.c:1
1       in bar.c
quit

Debugger finished
<<<--- end emacs gdb session --->>>

By way of comparison, here is what happens if I run gdb outside emacs 
(gdb startup message removed for brevity):

<<<--- begin standalone gdb session --->>>
Reading symbols from /home/Ryan/experiments/bug...done.
(gdb) b bar
Breakpoint 1 at 0x100401114: file bar.c, line 1.
(gdb) start
Temporary breakpoint 2 at 0x1004010dd: file foo.c, line 4.
Starting program: /home/Ryan/experiments/bug
[New Thread 4676.0x1250]
[New Thread 4676.0x13d0]

Temporary breakpoint 2, main () at foo.c:4
4           puts("About to call bar");
(gdb) n
About to call bar
5           bar();
(gdb) n

Breakpoint 1, bar () at bar.c:1
1       bar.c: No such file or directory.
(gdb) fin
Run till exit from #0  bar () at bar.c:1
main () at foo.c:6
6           puts("Called bar");
(gdb) n
Called bar
7           return 0;
(gdb) n
8       };
(gdb) n
[Thread 4676.0x13d0 exited with code 0]
[Inferior 1 (process 4676) exited normally]
(gdb) quit
<<<--- end standalone gdb session --->>>

In GNU Emacs 24.3.1 (x86_64-unknown-cygwin)
  of 2013-07-05 on desktop-new
Configured using:
  `configure
  '--srcdir=/home/kbrown/src/cygemacs/emacs-24.3-4/src/emacs-24.3'
  '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin'
  '--sbindir=/usr/sbin' '--libexecdir=/usr/lib' '--datadir=/usr/share'
  '--localstatedir=/var' '--sysconfdir=/etc' '--datarootdir=/usr/share'
  '--docdir=/usr/share/doc/emacs' '-C' '--with-x=no' 'CC=gcc'
  'CFLAGS=-ggdb -O2 -pipe
  -fdebug-prefix-map=/home/kbrown/src/cygemacs/emacs-24.3-4/build=/usr/src/debug/emacs-24.3-4
  -fdebug-prefix-map=/home/kbrown/src/cygemacs/emacs-24.3-4/src/emacs-24.3=/usr/src/debug/emacs-24.3-4'
  'LDFLAGS=' 'LIBS=' 'CPPFLAGS=''

Important settings:
   value of $LANG: en_US.UTF-8
   locale-coding-system: utf-8-unix
   default enable-multibyte-characters: t

Major mode: Debugger

Minor modes in effect:
   menu-bar-mode: t
   file-name-shadow-mode: t
   global-font-lock-mode: t
   font-lock-mode: t
   auto-composition-mode: t
   auto-encryption-mode: t
   auto-compression-mode: t
   line-number-mode: t
   transient-mark-mode: t

Recent input:
ESC [ > 7 7 ; 1 0 2 0 0 ; 0 c ESC x g d b RET C-g C-x
C-f C-g ESC x g d b RET DEL DEL DEL DEL . t e DEL e
DEL DEL e x DEL C-z DEL DEL DEL b u g RET b SPC b a
r RET s t a r t RET j x o C-x u C-x o C-x 2 C-x o C-x
o s t DEL DEL n RET n RET n RET n RET f i n RET n RET
n RET n RET ESC x r e p o r t - b u g RET

Recent messages:
("emacs")
For information about GNU Emacs and the GNU system, type C-h C-a.
Quit [2 times]
Target doesn't support non-stop mode.  Turning it off.
(New file)
Loading cc-langs...done
Switched to thread 1
Undo!

Load-path shadows:
None found.

Features:
(shadow sort gnus-util mail-extr emacsbug message cl-macs gv format-spec
rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils cc-langs cl cl-lib cc-mode cc-fonts
easymenu cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars
cc-defs gdb-mi bindat json gud tool-bar easy-mmode comint regexp-opt
ansi-color ring time-date ediff-hook vc-hooks lisp-float-type
tabulated-list newcomment lisp-mode register page menu-bar rfn-eshadow
timer select 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 macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
dbusbind multi-tty emacs)





Acknowledgement sent to Ryan Johnson <ryan.johnson@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#15051; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 31 Oct 2014 17:00:04 UTC

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