Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* FW: gdbserver, remote serial protocol and endian issues
@ 2002-04-10  2:50 Paul Bartlett
  2002-04-10  3:05 ` Paul Bartlett
  0 siblings, 1 reply; 8+ messages in thread
From: Paul Bartlett @ 2002-04-10  2:50 UTC (permalink / raw)
  To: gdb



-----Original Message-----
From: ac131313@cygnus.com [mailto:ac131313@cygnus.com]
Sent: 09 April 2002 18:14
To: paul.bartlett@st.com
Subject: Re: gdbserver, remote serial protocol and endian issues


> 
> I've spent a good proportion of the day trawling the list
> archives for JT Conklin's stuff.
> 
> I noticed that he was a prolific contributor up to about 16 July
> 2001 and then just disappeared completely.

He was overtaken by other commitments.

> A cursory inspection of remote.c shows that the memory attribute
> changes have made it down to remote_xfer_memory(). I presume
> that all that needs to be done (for remote targets anyhow) is to
> come up with suitable changes to the rsp and propagate the
> parameters through.
> 
> I see that one of JT's last contributions was a suggested
> syntax.

> Does anybody have any opinions on which way to go from here?

Proceduraly or technically?

Proceduraly, the first thing to do is get the GDB community to agree on 
the protocol extension.

Technically, the first thing to do would be the same - without that 
agreement you run the (real) risk of implementing a protocol extension 
that isn't accepted into the GDB source tree.

enjoy,
Andrew




^ permalink raw reply	[flat|nested] 8+ messages in thread
* gdbserver, remote serial protocol and endian issues
@ 2002-04-08  3:48 Paul Bartlett
  2002-04-08  7:45 ` Daniel Jacobowitz
  2002-04-08 19:48 ` Andrew Cagney
  0 siblings, 2 replies; 8+ messages in thread
From: Paul Bartlett @ 2002-04-08  3:48 UTC (permalink / raw)
  To: gdb

Hi Folks,

We've developed an implementation of gdbserver that
runs in a box interfacing the debug ports of SuperH
SH4/SH5 targets to ethernet.

When connecting to a target cpu, various memory mapped
registers must be initialised in order to configure 
the external bus interfaces, clock generators and 
so forth.

This achieved by doing pokes from script files.

The target may be jumper configured to be either big 
or little endian.

Unfortunately, the remote serial protocol makes no
distinction between writes to memory and writes to
memory mapped registers - you just get a byte stream
in target endian order.

In our case, the registers are not byte addressable
and need to be written variously as 8, 16 and 32 bit
quantities. Again, remote serial protocol does not
provide for access size definition.

In order to get things to work at all, we've had to
embed knowledge of specific CPU variants in the
gdbserver code together with an indication of the
target endianness - messy to say the least, and a
pain to maintain.

On an aesthetic note, when reading and writing CPU
registers, the transfer really ought to be endian
neutral - i.e. in a consistent format that does
not change with the endianness of the target. Network
byte order perhaps? This would also remove the need
for gdbserver to be aware of target endianness.

I noticed a brief flurry of posts on the subject about
a year ago but nothing since.

Does anyone have an opinion on this?

Cheers,

Paul



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2002-04-10 10:05 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-10  2:50 FW: gdbserver, remote serial protocol and endian issues Paul Bartlett
2002-04-10  3:05 ` Paul Bartlett
  -- strict thread matches above, loose matches on Subject: below --
2002-04-08  3:48 Paul Bartlett
2002-04-08  7:45 ` Daniel Jacobowitz
     [not found]   ` <00d501c1df12$ab1bdd60$300e81a4@bri.st.com>
2002-04-08  8:44     ` Daniel Jacobowitz
2002-04-08  9:01       ` Paul Bartlett
2002-04-08 11:14       ` Andrew Cagney
2002-04-08 19:48 ` Andrew Cagney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox