This is the mail archive of the 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: gdb load command flow

On Fri, 2008-11-14 at 03:06 -0500, 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 ?

Hi Raja,

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
SkypeID: jeremybennett

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