This is the mail archive of the gdb@sourceware.cygnus.com mailing list for the GDB project. See the GDB home page for more information.


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

Re: gdb-4.16.85 fails for sh-elf


> I experienced the same, when my linker script contained invalid addresses for
> gdb's stab sections but the shelf.x linker script from egcs worked for me).

	I was using a modified linker script from the newlib library.  I'll
try modifying the one from egcs and see if it helps.  Obviously, gdb
shouldn't crash no matter what object file you send at it...

> IMHO, the simulator's memory management is rather unusable.
> [... sh simulator sucks ...]

	Yeah, well I have never actually used the simulator for anything
other than verifying that my development environment is working.  Most of
my code relies on various interrupts and interractions with other hardware
on my board.

> No, gdb-980122/sh-elf worked for me except of not being able to debug
> relocatible/partial linked object files.
> 
> I had reported this problem several times before, but nobody has replied
> until now. Therefore I can't withstand the impression that sh-elf
> support currently has one of the lowest priorities at cygnus (Who cares
> about embedded systems ? ;-).

	Well, stuff has been periodically fixed and broken at least with
respect to egcs and the binutils.  The only gdb I've actually gotten to
work at all was 4.16 with sh-coff.  Cygnus is mostly an embedded tools
company (so it seems) so they probably care to some degree (one would
hope).

> My setup is very similar to yours: i586-pc-linux-gnulibc1/binutils-2.8.1.0.19
> or gas-snapshots/newlib-1.8.0 + patches/egcs-980205
> Which sh do you use? There is a bug in the original newlib-1.8.0 causing all
> sh1 code to break.

	Which patches do you use for newlib?  I found and fixed a bug in
memcpy when they were using the "dt" instruction which is invalid for the
sh1.  Is this the bug you were referring to?

	I am using the 7032 sh1 processor on a board of my own design.  It
has a boot flash (containing the debugging stub), program flash, DRAM,
ethernet, and a few 8 and 16 bit DACs.  My eventual goal is to make a
game of Laser Asteroids (Asteroids displayed with a laser and a set of
moving mirrors).  Pretty much all of the hardware is working (I can even
display shapes with the laser), I just need to write the software (hence
the need for a reasonable development environment).

> BTW, due to the debugging bug with regard to relocatible object files, I gave
> up using sh-elf and switched back to sh-coff

	I actually have a working sh-coff set of tools but I thought I
would try to get sh-elf to work.  Besides, I haven't yet gotten egcs to
fully compile with sh-coff.  I get an error when building libstdc++.

	This project is totally a hobby for me so sitting on the bleeding
edge is fine.  It this were an actual product that needed to be shipped, I
would have stopped playing with the tools and started writing code a long
time ago...

Aaron