This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: set debug entry point
- From: Joel Sherrill <joel dot sherrill at oarcorp dot com>
- To: ishare <june dot tune dot sea at gmail dot com>
- Cc: "gdb at sourceware dot org" <gdb at sourceware dot org>
- Date: Sun, 7 Apr 2013 09:31:22 -0500
- Subject: Re: set debug entry point
- References: <20130407142128 dot GA11702 at debian dot 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