This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: Questions about GCC MIPS R5900's mdebug section
- To: tpeng at metrowerks dot com
- Subject: Re: Questions about GCC MIPS R5900's mdebug section
- From: Ian Lance Taylor <ian at zembu dot com>
- Date: 18 Nov 1999 22:09:47 -0500
- CC: gdb at sourceware dot cygnus dot com, binutils at sourceware dot cygnus dot com, tpeng at metrowerks dot com
- References: <199911182224.QAA25319@Metrowerks.com>
Date: Thu, 18 Nov 1999 16:25:42 +0000
From: Thomas Peng <tpeng@metrowerks.com>
1. Is there
a way to force the GCC MIPS compiler to emit the .stab and .stabstr
sections instead of the .mdebug section? Based on my knowledge, it looks
like GCC is emitting stabs and the assembler is transforming that into
.mdebug section. Shall we build GAS for MIPS with or without .mdebug stabs
conversion disabled? if possible, many thanks for your suggestions in
advance!
It's pretty easy to convert the assembler to .stab/.stabstr. However,
I think that gcc by default then generates stabs entries which don't
quite work, although that might be easy to fix. I don't remember the
details, unfortunately.
2. If the GCC MIPS compiler can't generate the .stab and
.stabstr sections, is there any documentation or source file or dump tool
that descibles the .mdebug section in detail?
I don't know of any documentation on stabs smuggled in ECOFF.
Fortunately, when using stabs debugging, you don't really have to know
the .mdebug section in detail. For an example of reading stabs in
.mdebug, see _bfd_mips_elf_find_nearest_line in bfd/elf32-mips.c,
which calls _bfd_ecoff_locate_line and lookup_line in
bfd/ecofflink.c. Ignore the !stabs case in lookup_line. The stabs
entries you find, marked with ECOFF_IS_STAB, are more or less normal.
Ian