This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug breakpoints/15802] (gdb) start will run entire program if there is no "main" symbol


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]