From: Joel Sherrill <joel.sherrill@oarcorp.com>
To: ishare <june.tune.sea@gmail.com>
Cc: "gdb@sourceware.org" <gdb@sourceware.org>
Subject: Re: set debug entry point
Date: Sun, 07 Apr 2013 14:31:00 -0000 [thread overview]
Message-ID: <5161833A.5040707@oarcorp.com> (raw)
In-Reply-To: <20130407142128.GA11702@debian.localdomain>
On 04/07/2013 09:21 AM, ishare wrote:
>
> If one elf has no main , where does gdb start to trace it ?
Every program has a starting point. main() is just the first
user provided code that runs in a C program. Set up
and initialization code has run before that.
When the program was linked, it could have used a linker
directive or the ld --entry argument to specify the entry
symbol.
> is there mothod to tell gdb start at specified address?
gdb should start the program at the entry address. You
can always set the program counter directly using
something like set $pc XXX but that is architecture
specific.
> tks!
--
Joel Sherrill, Ph.D. Director of Research& Development
joel.sherrill@OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35806
Support Available (256) 722-9985
prev parent reply other threads:[~2013-04-07 14:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-07 14:24 ishare
2013-04-07 14:31 ` Joel Sherrill [this message]
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=5161833A.5040707@oarcorp.com \
--to=joel.sherrill@oarcorp.com \
--cc=gdb@sourceware.org \
--cc=june.tune.sea@gmail.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox