From: nickrob@snap.net.nz (Nick Roberts)
To: Michael Welsh Duggan <md5i@md5i.com>, 5076@emacsbugs.donarmstrong.com
Cc: emacs-pretest-bug@gnu.org
Subject: bug#5076: 23.1.50; gdb weird breakpoint problem
Date: Wed, 2 Dec 2009 20:07:05 +1300 [thread overview]
Message-ID: <19222.4633.34878.857098@totara.tehura.co.nz> (raw)
In-Reply-To: <87k4x81wbk.fsf@maru.md5i.com>
> 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
next prev parent reply other threads:[~2009-12-02 7:07 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-30 4:16 bug#5076: 23.1.50; gdb weird breakpoint problem Michael Welsh Duggan
2009-12-02 7:07 ` Nick Roberts [this message]
2009-12-02 7:26 ` Michael Welsh Duggan
2011-09-18 9:29 ` Lars Magne Ingebrigtsen
2011-09-18 10:23 ` Nick Roberts
2011-09-18 10:27 ` Lars Magne Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=19222.4633.34878.857098@totara.tehura.co.nz \
--to=nickrob@snap.net.nz \
--cc=5076@emacsbugs.donarmstrong.com \
--cc=emacs-pretest-bug@gnu.org \
--cc=md5i@md5i.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.