<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=koi8-r">
<style type="text/css" style="display:none"><!-- p { margin-top: 0px; margin-bottom: 0px; }--></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p><br>
</p>
<div style="color: rgb(33, 33, 33);">
<div>
<div dir="ltr">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
So it has ranges but also unrelocated zero base address is emited in debug info. Since it has no<br>
corresponding relocation (`SectionIndex` == -1ULL), I am ignoring it to prevent using<br>
-1ULL as section index name.<br>
</blockquote>
<div>> Why would this need to be avoided? <br>
</div>
<div><span style="font-size: 12pt;"><br>
</span></div>
<div><span style="font-size: 12pt;">I</span><span style="font-size: 12pt;">f I would not skip </span><span style="font-size: 12pt;">such zero base </span><span style="font-size: 12pt;">address, then I would unable to print section names for ranges.</span></div>
<div>Because ranges which also has relocations pointed on would take SectionIndex from<br>
</div>
<div>base address instead.<br>
</div>
<div><br>
</div>
<div>Ah, I think can change logic of <span class="n" style="display: inline; word-break: break-all; font-family: Menlo, Consolas, Monaco, monospace; font-size: 12px; white-space: pre-wrap;"><span class="bright" style="background: rgba(151, 234, 151, 0.6);">getAbsoluteRanges
<span style="color: rgb(33, 33, 33); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);">
so that ranges will use own section index at first </span></span></span></div>
<div><span class="n" style="display: inline; word-break: break-all; font-family: Menlo, Consolas, Monaco, monospace; font-size: 12px; white-space: pre-wrap;"><span class="bright" style="background: rgba(151, 234, 151, 0.6);"><span style="color: rgb(33, 33, 33); font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 16px; background-color: rgb(255, 255, 255);"></span></span></span><span style="white-space: pre-wrap;">and
 will try to use section index of base address only if have no own index.</span></div>
<div><span style="white-space: pre-wrap;">That looks more correct. </span></div>
<div><br>
</div>
<div>> Shouldn't that be the default value when no base address is specified and its run on a fully relocated object? (no section index in either the base address nor in the > actual addresses in the range list)<br>
 <br>
</div>
<div>For executable yes, SectionIndex == -1ULL be default value and range dumper will just skip<br>
</div>
<div>printing section names (since we have no relocations and it is unknown, <a href="https://github.com/llvm-mirror/llvm/blob/master/lib/DebugInfo/DWARF/DWARFDie.cpp#L73">https://github.com/llvm-mirror/llvm/blob/master/lib/DebugInfo/DWARF/DWARFDie.cpp#L73</a>),<br>
</div>
<div>And this new code works fine for executables with base address, because it is relocated and non-zero in that case.</div>
<div>I'll add thestcase.<br>
</div>
<div><br>
</div>
<div>George.<br>
</div>
</div>
</div>
</div>
</div>
</body>
</html>