This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
RE: Questions about stabs in MIPS executable
- From: Tim Michals <Tim dot Michals at Cygnetinc dot com>
- To: 'Jonathan Larmour' <jlarmour at redhat dot com>
- Cc: ecos-discuss at sources dot redhat dot com
- Date: Thu, 29 Nov 2001 07:36:45 -0600
- Subject: RE: [ECOS] Questions about stabs in MIPS executable
I'm using a third party debugger (JTAG eumulator). Yes, I can load the
image using GDB.
I'm using the standard ecos .lnk file. Also here is some more info:
> All,
>
> Using gcc 2.95.2 cross compiler for mips-elf on NT using cygwin. Built
> gcc using the following options:
>
> $ /src/gcc/gcc-2.95.2/configure --target=mips-elf --prefix=/tools
> --exec-prefix
> =/tools/H-i686-pc-cygwin --with-gnu-as --with-gnu-ld --with-stabs
> --with-newlib
> -v 2>&1 | tee configure.out
>
> The issue is creating an executable with stabs. Here is the gcc options
> used to compile mips-elf-gcc -EB -mgp32 -mips2 -msoft-float
> -DTURN_CACHE_OFF=1 -c -o boot.o -gstabs+
>
>
> Using mips-elf-objdump -g <file> and it reports that there is not debug
> information. I compile using the -gstabs+ option. Here is a dump with
> mips-elf-readelf -a <file>
>
> Section Headers:
> [Nr] Name Type Addr Off Size ES Flg Lk
> Inf Al
> [ 0] NULL 00000000 000000 000000 00 0
> 0 0
> [ 1] .rom_vectors PROGBITS 80000000 001000 000800 00 AX 0
> 0 1
> [ 2] .text PROGBITS 80000800 001800 01269c 00 AX 0
> 0 16
> [ 3] .fini PROGBITS 80012e9c 016fbc 000000 00 W 0
> 0 1
> [ 4] .ctors PROGBITS 80012e9c 013e9c 000034 00 WA 0
> 0 4
> [ 5] .dtors PROGBITS 80012ed0 013ed0 000024 00 WA 0
> 0 4
> [ 6] .rodata PROGBITS 80012ef4 013ef4 001e10 00 A 0
> 0 8
> [ 7] .rodata1 PROGBITS 80014d04 016fbc 000000 00 W 0
> 0 1
> [ 8] .fixup PROGBITS 80014d04 016fbc 000000 00 W 0
> 0 1
> [ 9] .gcc_except_table PROGBITS 80014d10 016fbc 000000 00 W 0
> 0 1
> [10] .data PROGBITS 80014d10 015d10 0012ac 00 WA 0
> 0 8
> [11] .bss NOBITS 80015fbc 016fbc 808d64 00 WA 0
> 0 16
> [12] .reginfo MIPS_REGINFO 00000000 016fbc 000018 01 0
> 0 4
> [13] .mdebug MIPS_DEBUG 00000000 016fd4 0af584 01 0
> 0 4
> [14] .shstrtab STRTAB 00000000 0c6558 000088 00 0
> 0 1
> [15] .symtab SYMTAB 00000000 0c6888 003cc0 10 16
> 1c0 4
> [16] .strtab STRTAB 00000000 0ca548 003d17 00 0
> 0 1
>
> notice there is no .stabs section? What I'm doing wrong?
-----Original Message-----
From: Jonathan Larmour [mailto:jlarmour@redhat.com]
Sent: Wednesday, November 28, 2001 10:00 PM
To: Tim Michals
Cc: ecos-discuss@sources.redhat.com
Subject: Re: [ECOS] Questions about stabs in MIPS executable
Tim Michals wrote:
>
> Notice how a couple of sections are missing (.stabs and .stabstr) So is
this
> the issue? Also another clue is if mips-elf-obj -g <file> is used on the
> file created by the working gcc it dumps debug information.
>
> Also if the same command on the eCOS compiler mips-elf-obj -g <file> it
> indicates that there is no debug info? Any clues?
If you just load it up in GDB (even though not downloading) does that work?
Can you list functions and source files? By the looks of it, that shouldn't
work, but I want to check :).
It's possible that the eCos linker script you are using (you don't say
what) doesn't mention the stabs sections, perhaps because it is normally
expecting dwarf debug. Check that out.
Jifl
--
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine