From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ryan Johnson Newsgroups: gmane.emacs.bugs Subject: bug#15051: 24.3; gdb -mi: breakpoint with in non-existent source file spams terminal incessantly Date: Thu, 08 Aug 2013 09:47:06 -0400 Message-ID: <5203A15A.1080307@cs.utoronto.ca> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1375977020 10205 80.91.229.3 (8 Aug 2013 15:50:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 8 Aug 2013 15:50:20 +0000 (UTC) To: 15051@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Aug 08 17:50:22 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1V7STk-0008Qr-Fd for geb-bug-gnu-emacs@m.gmane.org; Thu, 08 Aug 2013 17:50:20 +0200 Original-Received: from localhost ([::1]:43453 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V7STk-0004m1-2P for geb-bug-gnu-emacs@m.gmane.org; Thu, 08 Aug 2013 11:50:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54914) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V7STa-0004ck-QZ for bug-gnu-emacs@gnu.org; Thu, 08 Aug 2013 11:50:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V7STT-0007fr-TS for bug-gnu-emacs@gnu.org; Thu, 08 Aug 2013 11:50:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:53310) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V7STT-0007f8-OW for bug-gnu-emacs@gnu.org; Thu, 08 Aug 2013 11:50:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1V7STT-0006pk-2v for bug-gnu-emacs@gnu.org; Thu, 08 Aug 2013 11:50:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ryan Johnson Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 08 Aug 2013 15:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 15051 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.137597694426087 (code B ref -1); Thu, 08 Aug 2013 15:50:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 8 Aug 2013 15:49:04 +0000 Original-Received: from localhost ([127.0.0.1]:47626 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V7SSV-0006mg-6I for submit@debbugs.gnu.org; Thu, 08 Aug 2013 11:49:03 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:51478) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1V7QZQ-0002MI-AF for submit@debbugs.gnu.org; Thu, 08 Aug 2013 09:48:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V7QZE-0002Tw-AC for submit@debbugs.gnu.org; Thu, 08 Aug 2013 09:47:58 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:39309) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V7QZE-0002Tq-73 for submit@debbugs.gnu.org; Thu, 08 Aug 2013 09:47:52 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53163) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V7QZ7-0004XY-9I for bug-gnu-emacs@gnu.org; Thu, 08 Aug 2013 09:47:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V7QZ1-0002P9-DH for bug-gnu-emacs@gnu.org; Thu, 08 Aug 2013 09:47:45 -0400 Original-Received: from bureau81.ns.utoronto.ca ([128.100.132.181]:45168) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V7QZ1-0002Mg-9W for bug-gnu-emacs@gnu.org; Thu, 08 Aug 2013 09:47:39 -0400 Original-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 ; Thu, 8 Aug 2013 09:47:24 -0400 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 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-Mailman-Approved-At: Thu, 08 Aug 2013 11:49:01 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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:77080 Archived-At: 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 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 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: . Find the GDB manual and other documentation resources online at: . 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)