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

See the CrossGCC FAQ for lots more information.


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

Re: [Fwd: dwarf2 in GNU assembler 2.10.1]


Dear Nick,

Thank you a lot for such a prompt answer.
It gave me the answer which I would have toiled
for days to get otherwise.

I have looked at the code.
It looks to me that only ".debug_line" section of
dwarf2 has been implemented.
I am sure that from-assembly-to-object level that section
might be most important
but I am just wondering whether the section such as
".debug_info" has been implemented also.

Yet another question is about ".mdebug".
Actually I do not know anything about MDEBUG format.
At first hand, I thought that "stabs" information is somehow
in ".mdebug" section, because the assembly code generated
seemed to have stabs information.
However, having read your reply, I am wondering whether
it is a debug format different from stabs.



Best regards,
Yookyung


Nick Clifton wrote:

> Hi Yookyung
>
> > I got your e-mail address from
> > "ChangeLog" file in GNU assembler 2.10.1 and
> > noticed that you added "--gdwarf2" option to the option list.
>
> Unfortunately that was for the ARM port of GAS and not the MIPS
> port...
>
> > (The host is solaris and the target is mips).
>
> The MIPS port of GAS does not currently support generating dwarf2
> debug information.
>
> It should not prove to be too difficult however, to add this support
> yourself, should you be willing to modify the sources.  Have a look at
> how the support works in other ports.  (Just search for occurrences of
> dwarf2 in any of the gas/config/tc-*.c files).
>
> In theory all that you need to do is to amend gas/config/tc-mips.c to
> #include "dwarf2dbg.h".  Then add entries for the "loc" and "file"
> pseudo ops to the mips_pseudo_table[] array, and then arrange for
> dwarf2_emit_insn() to be called each time an assembled instruction is
> emitted.
>
> > Another question is that, even if I produced with STABS debugging
> > information like as --gstabs -o foo.o foo.s it seemed the generated
> > object file contains stabs information not in the (expected)
> > sections like .stab .stabstr but in the "larger" .mdebug section
>
> Yes.  The MIPS port uses the MDEBUG format rather than STABS.
>
> Cheers
>         Nick


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com


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