This is the mail archive of the gdb@sourceware.cygnus.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]

Re: RDI target broken in 000215 snapshot


> >
> > > Another interesting bit of info.  The new snapshot is apparently not
> > > detecting the endianness of the target (both the sessions below were
> > > with a Samsung SNDS evel board (big-endian):
> >
> > 
> > I guess you got it.
> > 
> > Can you set the endianess and do the load after that?
>
> Yes.  If I set endian to big, then code gets downloaded properly.
>
> -- 
> Grant Edwards
> grante@visi.com

At least you have a way to work now.  Just add a .gdbinit with the set endian command on your project directory (the one
you want to be big endian).

We can now, with less pressure, discuss what is going on.

The default for arm targets is "selectable" and "little endian".
This is introduced in december by Stan, who checked in a patch from Scott.
The ChangeLog fails to mention this change!!!  But cvs diff never lies... ;-)

I believe the ideal scenario would be to have this thing set in a "smart" way.
The current RDI code just ignores the endianess indication returned by the target.
Maybe we could use that to set the endianess (only if "auto" is selected, please) of the target.
I don't know if this will work, but I can try when I get back.

Of course, you can try that yourself and submit a patch :-)
The interesting line is in remote-rdi.c:279

Cheers,
Fernando


Grant Edwards wrote:
> 
> Another interesting bit of info.  The new snapshot is apparently not
> detecting the endianness of the target (both the sessions below were
> with a Samsung SNDS evel board (big-endian):
> 
> $ arm-elf-gdb
> GNU gdb 4.18
> [...]
> This GDB was configured as "--host=i586-pc-linux-gnu --target=arm-elf".
> (gdb) target rdi /dev/ttyS1
> EmbeddedICE Manager (ADP, ARM7TDI) 2.07 (Advanced RISC Machines SDT 2.11a)
> Rebuilt on Apr  1 1998 at 00:43:57
> Serial Rate:   9600
> Connected to ARM RDI target.
> (gdb) show endian
> The target endianness is set automatically (currently big endian)
> 
> 
> $ ~/gdb-000222/gdb/gdb
> GNU gdb 000222
> [...]
> This GDB was configured as "--host=i586-pc-linux-gnu --target=arm-elf".
> (gdb) target rdi /dev/ttyS1
> EmbeddedICE Manager (ADP, ARM7TDI) 2.07 (Advanced RISC Machines SDT 2.11a)
> Rebuilt on Apr  1 1998 at 00:43:57
> Serial Rate:   9600
> Connected to ARM RDI target.
> (gdb) show endian
> The target endianness is set automatically (currently little endian)
> 
> --
> Grant

-- 
Fernando Nasser
Red Hat - Toronto                       E-Mail:  fnasser@cygnus.com
2323 Yonge Street, Suite #300           Tel:  416-482-2661 ext. 311
Toronto, Ontario   M4P 2C9              Fax:  416-482-6299

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