From: Jeremy Bennett <jeremy.bennett@embecosm.com>
To: gdb@sourceware.org
Cc: raja.saleru@iap-online.com
Subject: Re: gdb load command flow
Date: Fri, 14 Nov 2008 09:07:00 -0000 [thread overview]
Message-ID: <1226653589.2943.168.camel@thomas> (raw)
In-Reply-To: <59596.210.143.35.18.1226650011.squirrel@www.iap-online.com>
On Fri, 2008-11-14 at 03:06 -0500, raja.saleru@iap-online.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 ?
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:
http://www.embecosm.com/download/ean3.html
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:
http://www.embecosm.com/download/ean4.html
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,
Jeremy
--
Tel: +44 (1202) 416955
Cell: +44 (7970) 676050
SkypeID: jeremybennett
Email: jeremy.bennett@embecosm.com
Web: www.embecosm.com
next prev parent reply other threads:[~2008-11-14 9:07 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <33036.210.143.35.19.1225860010.squirrel@www.iap-online.com>
2008-11-07 7:49 ` gdb internal functionality raja.saleru
2008-11-07 12:21 ` EBo
2008-11-10 10:53 ` Jeremy Bennett
2008-11-07 18:22 ` Michael Snyder
2008-11-14 8:07 ` gdb load command flow raja.saleru
2008-11-14 8:13 ` Ramana Radhakrishnan
2008-11-14 9:07 ` Jeremy Bennett [this message]
[not found] ` <59596.210.143.35.18.1226650013.squirrel@www.iap-online.com>
2008-11-26 1:28 ` gdb remote serial packet has wrong address raja.saleru
2008-11-26 18:46 ` Michael Snyder
[not found] ` <28893.210.143.35.18.1227662837.squirrel@www.iap-online.com>
2009-01-06 10:35 ` adding new commandline interface to gdb ? raja.saleru
2009-01-07 9:09 ` teawater
[not found] ` <17669.210.143.35.18.1231238130.squirrel@www.iap-online.com>
2009-01-20 8:36 ` info watch command raja.saleru
2009-01-20 13:46 ` Daniel Jacobowitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1226653589.2943.168.camel@thomas \
--to=jeremy.bennett@embecosm.com \
--cc=gdb@sourceware.org \
--cc=raja.saleru@iap-online.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox