bug-gdb
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ARM compiler generates DW_FORM_indirect


From: David B Anderson
Subject: Re: ARM compiler generates DW_FORM_indirect
Date: Fri, 10 Nov 2000 13:04:21 -0800 (PST)

Tim Combs writes:
>Using gdb5.0, I was debugging a little test problem.  The ARM
>C compiler generates by default DWARF2.  When I tried to load it,
>gdb said DW_FORM_indirect wasn't implemented yet.  I am working 
>on implementing it but being a newbie to this part of gdb, I have
>a couple of general questions. The spec says that "the attribute value 
>itself in the .debug_info section begins with an unsigned LEB128 number 
>that represents its form."
>My understanding of the spec is that the .dwarf_info section looks
>like this:
>1. length of compilation unit
>2. Version of DWARF info
>3. offset to .debug_abbrev section
>4. size of address
>5. (Some number of) DIEs
>   a. LEB128 number containing abbrev code
>   b. Attribute values
>
>So I think my confusion is from the gdb code. It seems from my
>untrained eye that I have already read past the attribute value when
>I discover the DW_FORM_indirect.  What is the relationship between
>the attr->value and attr->form and the attr value?

What you've missed here is that the DW_FORM_indirect
appears in the .debug_abbreviation section, not in .debug_info.

So when you are seeing DW_FORM_indirect it means you
have not yet read the value (before the FORM is known
the value cannot be read of course).

So what you need to do is read the ULEB number from .debug_info
to get a *new* form, and the value will immediately follow
the ULEB number in .debug_info (using the new FORM
to control the reading).

Hope this helps.
David B. Anderson address@hidden address@hidden http://reality.sgi.com/davea/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]