From: Daniel Jacobowitz <dmj+@andrew.cmu.edu>
To: Paul Bartlett <paul.bartlett@st.com>
Cc: gdb@sources.redhat.com
Subject: Re: gdbserver, remote serial protocol and endian issues
Date: Mon, 08 Apr 2002 08:44:00 -0000 [thread overview]
Message-ID: <20020408114455.A26658@nevyn.them.org> (raw)
In-Reply-To: <00d501c1df12$ab1bdd60$300e81a4@bri.st.com>
On Mon, Apr 08, 2002 at 04:33:01PM +0100, Paul Bartlett wrote:
> Hi Daniel,
>
> > I don't agree. Target registers are in
> > target-endianness when you read them off
> > the stack; they should be in target endianness
> > in memory. GDB has 'set endian little' and
> > 'set endian big', and the stub should just pass
> > them along however it gets them. gdbserver is
> > also meant to run in a native configuration,
> > where compile-time checks can tell you the
> > endianness.
>
> Well, maybe I'm guilty of not considering the
> general case - haven't thought it through yet.
As soon as you try looking through stack frames, you realize that
keeping registers in target byte order is a lot simpler for the rest of
GDB.
> Our application connects to the H-UDI (JTAG)
> port of the SH4 for high speed (~20 MBits/s)
> access through the back door into the chip.
>
> The physical implementation includes a 32 bit
> shift register. What we notice is that if we
> change endianness then we have to endswap the
> 32 bit quantity that appears in the register
> before transferring it to the target machine
> reg. - it never actually gets into memory.
That's a property of the board, right? It expects this shift register
to be in its own endianness... or is something else going on?
> > My first impression is that gdbserver is the
> > wrong tool for the job. Gdbserver is meant as
> > a remote stub for Unix-like systems. You're
> > not running it on a Unix-like system; you're
> > using it as a proxy, right? Since GDB already
> > has a stub to speak to the hardware monitor
> > on SH4 boards, as far as I'm aware.
> > This sounds like a job for rproxy
> > (http://world.std.com/~qqi) instead.
>
> Maybe we re-invented the wheel, some. Our
> implementation runs on a box equipped with
> cpu/flash/ram and ethernet and jtag interfaces.
> It does implement the remote protocol in much
> the same way that rproxy does, but also adds
> facilities like posix i/o through the debug
> port.
>
> Works well. We've used it for debugging both
> 'bare machine' embedded and rtos based apps.
> (I also brought up a linux kernel with it).
Nice job, although I'm not sure gdbserver is the best base for it; like
I said, it's generally Unix-based. However, with the other
organizational cleanup I've been adding to it lately, I think there's a
clean place to integrate this sort of thing now.
I don't suppose you're thinking of contributing it? The POSIX I/O
stuff especially would be nice to have in gdbserver.
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
next prev parent reply other threads:[~2002-04-08 15:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2002-04-08 9:01 ` Paul Bartlett
2002-04-08 11:14 ` Andrew Cagney
2002-04-08 19:48 ` Andrew Cagney
2002-04-10 2:50 FW: " Paul Bartlett
2002-04-10 3:05 ` Paul Bartlett
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=20020408114455.A26658@nevyn.them.org \
--to=dmj+@andrew.cmu.edu \
--cc=gdb@sources.redhat.com \
--cc=paul.bartlett@st.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