From: Daniel Jacobowitz <drow@mvista.com>
To: Alexei Minayev <aminayev@yahoo.com>
Cc: gdb@sources.redhat.com
Subject: Re: gdb-h8-stub
Date: Fri, 19 Jul 2002 05:34:00 -0000 [thread overview]
Message-ID: <20020719123433.GA25272@nevyn.them.org> (raw)
In-Reply-To: <20020719060019.54178.qmail@web13509.mail.yahoo.com>
On Thu, Jul 18, 2002 at 11:00:19PM -0700, Alexei Minayev wrote:
> Hi Daniel,
>
> thanks for an interesting discussion.
>
> --- Daniel Jacobowitz <drow@mvista.com> wrote:
> > On Thu, Jul 18, 2002 at 11:25:50AM -0700, Alexei Minayev wrote:
> > > X200000
> > > M0,15:... ; (this would actually mean 0x200000 to 0x200015)
> > > M15,15:...
> > > M30,15:...
> > > ...
> > >
> > > So according to this, the stub *must* read the address from the X command
> and
> > > store it for future memory operations, even if it doesn't support binary
> > > downloads.
> > > In your opinion, is that what gdb means?
> >
> > No, what I'm trying to say is that that's the wrong behavior for the
> > client. You'll need to figure out why GDB is doing this.
> >
> it might have been the wrong behavior for the client... but it's a very
> standard client code, working in many stubs.
> The stub code, in particular, when parsing an 'M' command, is looking for an
> *absolute* address. But the gdb sends relative addresses to him.
> I mean, what could the client possibly say wrong, that gdb chooses a totally
> different way of communication?
>
> I went ahead and implemented binary downloading.
> Still:
> X200000,0...Ack
> X0,4e...Ack (I'd expect X200000,4e here)
> Packet received: OK
> X4e,4e...Ack (expected: X20004e,4e)
> Packet received: OK
> and so on.
>
> Address is *relative* to what comes in the first packet. E.g. the second
> packet gdb sends is "X0", which means "0 bytes +0x200000 base", and the base
> value was in the first packet.
>
> Am I forgetting some option or variable?
The test for the X packet is missing something that is present in
normal use:
memaddr = remote_address_masked (memaddr);
p += hexnumstr (p, (ULONGEST) memaddr);
*p++ = ',';
You have TARGET_ADDR_BIT set too small for your port. You are probably
confusing TARGET_PTR_BIT (the number of bits in a pointer, which can
have some separate space marker not included in this count) and
TARGET_ADDR_BIT (the number of bits to correctly identify an address
when dealing with the OS or stub).
--
Daniel Jacobowitz Carnegie Mellon University
MontaVista Software Debian GNU/Linux Developer
next prev parent reply other threads:[~2002-07-19 12:34 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-17 23:27 gdb-h8-stub Alexei Minayev
2002-07-18 7:26 ` gdb-h8-stub Peter Barada
2002-07-18 7:37 ` gdb-h8-stub Daniel Jacobowitz
2002-07-18 11:25 ` gdb-h8-stub Alexei Minayev
2002-07-18 13:05 ` gdb-h8-stub Daniel Jacobowitz
2002-07-18 23:00 ` gdb-h8-stub Alexei Minayev
2002-07-19 5:34 ` Daniel Jacobowitz [this message]
2002-07-20 11:39 ` gdb-h8-stub Alexei Minayev
2002-07-19 7:23 ` gdb-h8-stub Peter Barada
2002-07-22 2:29 gdb-h8-stub Andrew Volkov
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=20020719123433.GA25272@nevyn.them.org \
--to=drow@mvista.com \
--cc=aminayev@yahoo.com \
--cc=gdb@sources.redhat.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