GNU bug report logs -
#5076
23.1.50; gdb weird breakpoint problem
Previous Next
Reported by: Michael Welsh Duggan <md5i <at> md5i.com>
Date: Mon, 30 Nov 2009 04:20:12 UTC
Severity: normal
Done: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> Compile the following program using
> gcc -g -o bar bar.c
>
> int main() {
> int a = 4;
> int b = 5;
>
> int c = a++ * b;
> int d = ++a * b;
>
> return d;
> }
>
> Start gdb on the resulting progam bar. An example (modify to suit
> location):
>
> M-x gdb RET C-a C-k gdb -i=mi bar RET
Yes. I think it will also happen with a more simple program/recipe too.
By default Emacs uses GDB's non-stop mode but I think it has some bugs.
Look at this:
#include <stdio.h>
int main() {
printf ("Hello World\n");
}
...
This GDB was configured as "x86_64-unknown-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /home/nickrob/bar...done.
(gdb) set target-async 1
(gdb) set pagination off
(gdb) set non-stop on
(gdb) r
Starting program: /home/nickrob/bar
Hello World
Program exited with code 014.
(gdb) start
Temporary breakpoint 1 at 0x400514: file bar.c, line 4.
Starting program: /home/nickrob/bar
Temporary breakpoint 1, main () at bar.c:4
4 printf ("Hello World\n");
(gdb) n
Hello World
5 }
(gdb) n
Program received signal SIGSEGV, Segmentation fault.
main () at bar.c:5
5 }
--
Nick http://users.snap.net.nz/~nickrob
This bug report was last modified 13 years and 329 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.