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

Previous Next

Package: emacs;

Reported by: Ryan Johnson <ryan.johnson <at> cs.utoronto.ca>

Date: Thu, 8 Aug 2013 15:50:02 UTC

Severity: normal

Tags: confirmed

Found in version 24.3

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 15051 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Ryan Johnson <ryan.johnson <at> cs.utoronto.ca>
Cc: 15051 <at> debbugs.gnu.org
Subject: Re: bug#15051: 24.3; gdb -mi: breakpoint with in non-existent
 source file spams terminal incessantly
Date: Sun, 06 Dec 2020 16:41:16 +0100
Ryan Johnson <ryan.johnson <at> cs.utoronto.ca> writes:

> 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)

(This bug report unfortunately got no response at the time.)

Thanks for the clear recipe to reproduce this bug.  It is still present
in Emacs 28, but has changed, and is now even worse, I think.

First of all:

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

After "b bar", Emacs says:

File /tmp/"/tmp/bar.c" is read-only on disk.  Make buffer read-only, too? (y or n) n

Then, it's these, as you point out:

(gdb) b bar
Breakpoint 1 at 0x117e: file bar.c, line 1.
(gdb) list bar.c:1
1	bar.c: No such file or directory.
start
Temporary breakpoint 2 at 0x1139: file foo.c, line 4.
Starting program: /tmp/bug 

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

And then I got 20K copies of:

list bar.c:1
1	in bar.c
list bar.c:1
1	in bar.c
list bar.c:1
1	in bar.c
list bar.c:1
1	in bar.c

which continued until I killed gdb.

So this problem is still present in Emacs 28, but is now somewhat
different.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 4 years and 157 days ago.

Previous Next


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