public inbox for gdb-prs@sourceware.org
help / color / mirror / Atom feed
From: "palves at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: gdb-prs@sourceware.org
Subject: [Bug breakpoints/15802] (gdb) start will run entire program if there is no "main" symbol
Date: Tue, 30 Jul 2013 13:56:00 -0000 [thread overview]
Message-ID: <bug-15802-4717-po98K1AMJh@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-15802-4717@http.sourceware.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.
next prev parent reply other threads:[~2013-07-30 13:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-30 7:10 [Bug breakpoints/15802] New: " b.r.longbons at gmail dot com
2013-07-30 13:56 ` palves at redhat dot com [this message]
2024-01-08 16:52 ` [Bug breakpoints/15802] " ssbssa at sourceware dot org
2024-01-09 0:02 ` tromey at sourceware dot org
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=bug-15802-4717-po98K1AMJh@http.sourceware.org/bugzilla/ \
--to=sourceware-bugzilla@sourceware.org \
--cc=gdb-prs@sourceware.org \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).