This is the mail archive of the
mailing list for the GDB project.
Re: gdb load command flow
- From: Jeremy Bennett <jeremy dot bennett at embecosm dot com>
- To: gdb at sourceware dot org
- Cc: raja dot saleru at iap-online dot com
- Date: Fri, 14 Nov 2008 09:06:29 +0000
- Subject: Re: gdb load command flow
- References: <email@example.com> <firstname.lastname@example.org>
- Reply-to: jeremy dot bennett at embecosm dot com
On Fri, 2008-11-14 at 03:06 -0500, email@example.com wrote:
> I would like to know the flow between the gdb and OpenOPCD communication
> when the below command is executed.
> (gdb) load
> I understand till the flow
> command_line_handler -> load_command() -> target_load() -> generic_load()->
> from generic load, how it will communicate with gdbserver of OpenOCD ? Is
> it through socket write() or through RSP (remtoe serial protocol) ? for
> sending the executable segments into the target for loading ?
target_load() should eventually call target_xfer_partial(), to transfer
the bytes to the target. For diagrams of the flow for this and other GDB
commands take a look at:
The connection to gdbserver will be through RSP. Presumably on the
client GDB session you've connected using something like:
target remote hostname:port
target_xfer_partial() will attempt to use RSP X packets to write the
data as binary if the communication channel is 8-bit clean. If not it
will use M packets. For a sequence diagram and explanation for this and
other GDB commands using RSP take a look at:
I'm not hugely familiar with OpenOCD, but I understand that they have
their own implementation of gdbserver. In which case I would expect that
to be receiving the RSP packets and mapping them into OpenOCD JTAG and
using any responses to generate RSP reply packets as required.
Any feedback on the above two documents much appreciated.
Hope this helps,
Tel: +44 (1202) 416955
Cell: +44 (7970) 676050