<html><head>
<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
</head><body bgcolor="#FFFFFF" text="#000000">I'd rather keep it in. I'm
sure gcc might not emit the arange table correctly, but the DWARF specs
are quite clear that the idea of an arange table is to map *every* byte
in the program to it's debug CU. Not just text. If there's a reference
in the debug_info to an address, the arange table should have the
reverse of that. This is why I used the label list to generate it,
rather than trying to pick out functions/variables/etc. The labels added
to debug_info define exactly the set of addresses required.<br>
<br>
Common symbols have an address in the final program, so they should be
included too.<br>
<br>
Debuggers historically don't always use the full capabilities of the
DWARF data, because the compilers don't generate correct data. If we fix
the compiler here once and for all, it enables future debuggers to make
use of it.<br>
<br>
The biggest challenge faced by debuggers today is compilers which only
emit barely enough DWARF to function. We can do better than that.<br>
<br>
<blockquote style="border: 0px none;"
cite="mid:CALehDX6HgtuADYtG0Fd8NYQi_NgnxVF8YbZvEH-2LGyaVG-CNw@mail.gmail.com"
type="cite">
<div style="margin:30px 25px 10px 25px;" class="__pbConvHr"><div
style="display:table;width:100%;border-top:1px solid
#EDEEF0;padding-top:5px"> <div
style="display:table-cell;vertical-align:middle;padding-right:6px;"><img
photoaddress="echristo@gmail.com" photoname="Eric Christopher"
src="cid:part1.04010203.02090305@codersnotes.com"
name="compose-unknown-contact.jpg" height="25px" width="25px"></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;width:100%">
<a moz-do-not-send="true" href="mailto:echristo@gmail.com"
style="color:#737F92
!important;padding-right:6px;font-weight:bold;text-decoration:none
!important;">Eric Christopher</a></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;">
<font color="#9FA2A5"><span style="padding-left:6px">Wednesday,
October 02, 2013 2:35 PM</span></font></div></div></div>
<div style="color:#888888;margin-left:24px;margin-right:24px;"
__pbrmquotes="true" class="__pbConvBody"><div>*nod* The fix is fine.<br><br>I
think the additional complication that got us here is the adding of<br>data
symbols to aranges. Now, as far as I can tell, gcc doesn't emit<br>aranges
for any of them, however, the real problem for us are common<br>symbols.
I think we want to omit ranges for common symbols - it<br>doesn't
really seem to make sense anyhow.<br><br>I know that gdb and the various
gnu tools don't use that part of the<br>information, but I don't know
of any other users. So objections to<br>removing that part? It'll
definitely greatly simplify the code.<br><br>-eric<br><br></div></div>
<div style="margin:30px 25px 10px 25px;" class="__pbConvHr"><div
style="display:table;width:100%;border-top:1px solid
#EDEEF0;padding-top:5px"> <div
style="display:table-cell;vertical-align:middle;padding-right:6px;"><img
photoaddress="richard@codersnotes.com" photoname="Richard Mitton"
src="cid:part1.04010203.02090305@codersnotes.com"
name="compose-unknown-contact.jpg" height="25px" width="25px"></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;width:100%">
<a moz-do-not-send="true" href="mailto:richard@codersnotes.com"
style="color:#737F92
!important;padding-right:6px;font-weight:bold;text-decoration:none
!important;">Richard Mitton</a></div> <div
style="display:table-cell;white-space:nowrap;vertical-align:middle;">
<font color="#9FA2A5"><span style="padding-left:6px">Wednesday,
October 02, 2013 2:00 PM</span></font></div></div></div>
<div style="color:#888888;margin-left:24px;margin-right:24px;"
__pbrmquotes="true" class="__pbConvBody">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<div class="moz-cite-prefix">LGTM, although I dunno if I'm actually
authorized to approve patches :)<br>
<br>
There's code in there already that ignores labels in metadata
sections, but it wasn't getting triggered because debug_loc labels
are added after the test for it. And the stupid sectionless common
symbols mean that it couldn't just ignore NULL sections either.<br>
<br>
This looks like a fine fix.<br>
<br>
<div>Richard Mitton<br><a moz-do-not-send="true"
href="mailto:richard@codersnotes.com" class="moz-txt-link-abbreviated">richard@codersnotes.com</a></div>
On 10/02/2013 01:33 PM, Alexey Samsonov wrote:<br>
</div>
<br>
<div>_______________________________________________<br>llvm-commits
mailing list<br><a class="moz-txt-link-abbreviated" href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br><a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br></div></div>
</blockquote>
</body></html>