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: cont vs run -- the real deal


>>>>> "Brendan" == Brendan Kehoe <brendan@zen.org> writes:

 Brendan> Does there exist in writing an explanation of why "run"
 Brendan> works for native programs and "target sim" targets, but
 Brendan> "cont" is the correct approach for "target remote ..." ?
 Brendan> The docs I'm able to see, and the sources for the various
 Brendan> stubs and infcmd.c all seem to leave it implied somehow.

With remote targets, you're connecting GDB to a program that has
already been started (by some other means, done at the remote end).
So you're gaining control afterwards, which means that you're going to
continue from where it left off.

The gdbserver case is a bit confusing: when you start an application
via gdbserver, you're getting control on the first instruction.  But
it's still "after" the run, though well before main().

     paul


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