This is the mail archive of the
gdb-prs@sourceware.org
mailing list for the GDB project.
[Bug breakpoints/15802] (gdb) start will run entire program if there is no "main" symbol
- From: "palves at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: gdb-prs at sourceware dot org
- Date: Tue, 30 Jul 2013 13:56:13 +0000
- Subject: [Bug breakpoints/15802] (gdb) start will run entire program if there is no "main" symbol
- Auto-submitted: auto-generated
- References: <bug-15802-4717 at http dot sourceware dot org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=15802
Pedro Alves <palves at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |palves at redhat dot com
--- Comment #1 from Pedro Alves <palves at redhat dot com> ---
Thanks for filing this. It's annoyed me before too.
> (Of course, arguably it's wrong to break specifically on main, since there
> may be static constructors that run earlier ...)
That's how the command is defined:
(gdb) help start
Run the debugged program until the beginning of the main procedure.
You may specify arguments to give to your program, just as with the
"run" command.
I once hacked a patch to add a "create" command, that creates the inferior
process, but leaves it held at the entry point. This was like setting a break
at the entry point (b *_start; run), but easier, with no breakpoint at all:
https://github.com/palves/gdb/commit/be1bc6c802bc5f07b648f45901120dae2278c330
Never got myself to gather enough strength to submit and face the potential
bikeshed. :-)
--
You are receiving this mail because:
You are on the CC list for the bug.