This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: cont vs run -- the real deal
- From: Paul Koning <pkoning at equallogic dot com>
- To: brendan at zen dot org
- Cc: gdb at sources dot redhat dot com
- Date: Thu, 6 Jul 2006 12:34:37 -0400
- Subject: Re: cont vs run -- the real deal
- References: <44AD3A4E.3020105@zen.org>
>>>>> "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