This is the mail archive of the gdb@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]

Re: set debug entry point


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


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