[LLVMdev] [patch] DwarfDebug problem with line section
devang.patel at gmail.com
Mon Aug 23 17:36:18 PDT 2010
On Tue, Aug 17, 2010 at 7:09 AM, Jonas Maebe <jonas.maebe at elis.ugent.be>wrote:
> On ELF platforms (at least Linux and FreeBSD) and on Windows, both of
> the following are labels (i.e., absolute addresses to be relocated by
> the linker) as opposed to offsets relative to the relevant section's
> start, even though the DWARF standard says they are offsets:
> * address of the abbreviation table
> * DW_AT_stmt_list
As you say, dwarf standard says it is an offset.
4. A DW_AT_stmt_list attribute whose value is a section offset to the line
number information for this compilation unit.
This information is placed in a separate object file section from the
debugging information entries themselves. The value of the statement list
attribute is the offset in the .debug_line section of the first byte of the
line number information for this compilation unit (see Section 6.2).
> At least that's what I learned when I looked at what GCC and GNU AS
> generated, and changing them into offsets (I tried that in our
> compiler) results in GDB not understanding the debug information.
AFAICT, GCC in darwin uses offset here. Using absolute address breaks
debugger on darwin.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev