set debug entry point

Joel Sherrill joel.sherrill@oarcorp.com
Sun Apr 7 14:31:00 GMT 2013


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



More information about the Gdb mailing list