This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gdb-h8-stub


Hi Daniel,

thanks for clarification.
My question is though, after sending an absolute start address with the 'X'
command, and getting rejected, the gdb doesn't replicate it with 'M' command.
The 'M' command has only relative addresses...

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?

Thanks a lot!
Regards -- Alexei


--- Daniel Jacobowitz <drow@mvista.com> wrote:
> On Thu, Jul 18, 2002 at 10:26:30AM -0400, Peter Barada wrote:
> > 
[skipped]
> > You're right about gdb infering that the stub doesn't support 'X' by
> > the empty response packet.  An empty packet is the response the stub
> > sends back to the host for any command that it doesn't understand.
> > Once gdb figures out that 'X' (write binary to memory) isn't supported
> > by the stub(due to the empy packet), it falls back to trying 'M'
> > (write hex to memory) and finds that it works(since all stubs are
> > required to support 'M').  The 'X' command is an extension so 'load'
> > runs about twice as fast.
> 
> Right.  The corollary is that M and X should be using the same address. 
> This works for most targets; you'll need to figure out why it doesn't
> work for yours.  It may be a VMA/LMA thing...
> 
> -- 
> Daniel Jacobowitz                           Carnegie Mellon University
> MontaVista Software                         Debian GNU/Linux Developer


__________________________________________________
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
http://autos.yahoo.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]