cont vs run -- the real deal

Paul Koning pkoning@equallogic.com
Thu Jul 6 16:34:00 GMT 2006


>>>>> "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



More information about the Gdb mailing list