* remote protocol target byte ordering question
@ 2008-07-01 1:42 Ananth Sowda
2008-07-01 2:14 ` Daniel Jacobowitz
2008-07-01 19:12 ` Michael Snyder
0 siblings, 2 replies; 3+ messages in thread
From: Ananth Sowda @ 2008-07-01 1:42 UTC (permalink / raw)
To: gdb
I know that GDB remote protocol uses target byte ordering for
multi-bytes values as in register set content, memory address or
values to be written to the target memory. I don't see where in the
GDB code this swapping from host to target byte order is done. Can
someone point to the right segment of the code? Thanks for any
pointers.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: remote protocol target byte ordering question
2008-07-01 1:42 remote protocol target byte ordering question Ananth Sowda
@ 2008-07-01 2:14 ` Daniel Jacobowitz
2008-07-01 19:12 ` Michael Snyder
1 sibling, 0 replies; 3+ messages in thread
From: Daniel Jacobowitz @ 2008-07-01 2:14 UTC (permalink / raw)
To: Ananth Sowda; +Cc: gdb
On Mon, Jun 30, 2008 at 06:42:09PM -0700, Ananth Sowda wrote:
> I know that GDB remote protocol uses target byte ordering for
> multi-bytes values as in register set content, memory address or
> values to be written to the target memory. I don't see where in the
> GDB code this swapping from host to target byte order is done. Can
> someone point to the right segment of the code? Thanks for any
> pointers.
Everywhere. The gdb convention is that all buffers are in target byte
order. For instance, follow extract_unsigned_integer.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: remote protocol target byte ordering question
2008-07-01 1:42 remote protocol target byte ordering question Ananth Sowda
2008-07-01 2:14 ` Daniel Jacobowitz
@ 2008-07-01 19:12 ` Michael Snyder
1 sibling, 0 replies; 3+ messages in thread
From: Michael Snyder @ 2008-07-01 19:12 UTC (permalink / raw)
To: Ananth Sowda; +Cc: gdb
On Mon, 2008-06-30 at 18:42 -0700, Ananth Sowda wrote:
> I know that GDB remote protocol uses target byte ordering for
> multi-bytes values as in register set content, memory address or
> values to be written to the target memory. I don't see where in the
> GDB code this swapping from host to target byte order is done. Can
> someone point to the right segment of the code? Thanks for any
> pointers.
There is a family of conversion functions whose names
begin with either "store_" or "extract_", and then a type
such as "signed_integer" or "unsigned_long", so eg.
"extract_unsigned_integer".
When you "extract" a value, you're taking it from target
format to host format, and when you "store" one you are
sending it from host format to target format.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-07-01 19:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-01 1:42 remote protocol target byte ordering question Ananth Sowda
2008-07-01 2:14 ` Daniel Jacobowitz
2008-07-01 19:12 ` Michael Snyder
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox