<br><br><div class="gmail_quote">On Tue, Aug 17, 2010 at 7:09 AM, Jonas Maebe <span dir="ltr"><<a href="mailto:jonas.maebe@elis.ugent.be">jonas.maebe@elis.ugent.be</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><br></div>
On ELF platforms (at least Linux and FreeBSD) and on Windows, both of<br>
the following are labels (i.e., absolute addresses to be relocated by<br>
the linker) as opposed to offsets relative to the relevant section's<br>
start, even though the DWARF standard says they are offsets:<br>
* address of the abbreviation table<br>
* DW_AT_stmt_list<br>
<br></blockquote><div><br></div><div>As you say, dwarf standard says it is an offset.</div><div><br></div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px 'Times New Roman'">4.<span class="Apple-tab-span" style="white-space:pre">      </span>A <span style="color: #3608fe">DW_AT_stmt_list </span>attribute whose value is a section offset to the line number information for this compilation unit.</p>

<div><span class="Apple-style-span" style="font-family: 'Times New Roman'; font-size: 12px; ">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 <span style="font: 10.0px 'Courier New'">.debug_line </span>section of the first byte of the line number information for this compilation unit (see Section <span style="color: #3608fe">6.2</span>).</span></div>
<div><br></div><div><span class="Apple-style-span" style="font-family: 'Times New Roman'; font-size: 12px; "></span> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

At least that's what I learned when I looked at what GCC and GNU AS<br>
generated, and changing them into offsets (I tried that in our<br>
compiler) results in GDB not understanding the debug information.<br></blockquote><div><br></div><div>AFAICT, GCC in darwin uses offset here. Using absolute address breaks debugger on darwin.</div><div><br></div><div>-</div>
</div>Devang<br>