<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Oct 27, 2016, at 8:49 PM, David Blaikie <<a href="mailto:dblaikie@gmail.com" class="">dblaikie@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><br class=""><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Thu, Oct 27, 2016 at 5:13 PM Adrian Prantl <<a href="mailto:aprantl@apple.com" class="">aprantl@apple.com</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">aprantl created this revision.<br class="gmail_msg">
aprantl added reviewers: echristo, dblaikie, probinson.<br class="gmail_msg">
aprantl added subscribers: clayborg, llvm-commits.<br class="gmail_msg">
Herald added a subscriber: mehdi_amini.<br class="gmail_msg">
<br class="gmail_msg">
I noticed two incompatible changes:<br class="gmail_msg">
<br class="gmail_msg">
1. DW_AT_dwo_id was removed because the dwo_id was moved into the CU header. Note that the attribute<br class="gmail_msg"></blockquote><div class=""><br class=""></div><div class="">Well, that's a nice change... I should read the spec in more detail. (it would avoid the DWP tool from having to parse any DWARF,</div></div></div></div></blockquote><div><br class=""></div><div>Yes, this would also allow us to verify the dwoid in clang for module debug info (we don't do it because we don't want to parse DWARF in the frontend).</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_quote"><div class=""> I think - though it's still nice to parse some to find the dwo_name for better diagnostics, at least we can wait until we've identified a problem before doing that anyway)<br class=""></div><div class=""> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">value was reserved, so LLVM can continue to emit it without causing ambiguity for now.<br class="gmail_msg">
<br class="gmail_msg">
1. The one change that could cause a problem here is that DW_AT_ranges_base has been replaced by DW_AT_rnglist_base.<br class="gmail_msg"></blockquote><div class=""><br class="">That's a weird one - how's a DWARF consumer meant to identify whether they're dealing with new or old (whether they should look in debug_ranges or debug_rnglists)? Just based on the version in the header? (is there prior art for that sort of technique?)<br class=""></div></div></div></div></blockquote><div><br class=""></div><div>The DW_AT_ranges_base attribute was never part of a DWARF standard, AFAIK it was only used in a proposal. For proper DWARF 4 LLVM should probably emit the DW_AT_GNU_ranges_base extension (which, looking at DwarfDebug::finalizeModuleInfo() it does) and for proper DWARF 5 use the standardized format with the new section.</div><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_quote"><div class=""><br class="">I suppose in theory our dumper could be smart enough to print the right attribute string depending on version - though that seems annoying... <br class=""></div></div></div></div></blockquote><div><br class=""></div><div>Looks like this is not even necessary.</div><div><br class=""></div><div>-- adrian</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_quote"><div class=""><br class="">- David<br class=""> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br class="gmail_msg">
David/Eric: Would merely renaming the constant break any existing DWARF (4) tooling?<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
<a href="https://reviews.llvm.org/D26051" rel="noreferrer" class="gmail_msg" target="_blank">https://reviews.llvm.org/D26051</a><br class="gmail_msg">
<br class="gmail_msg">
Files:<br class="gmail_msg">
  include/llvm/Support/Dwarf.def<br class="gmail_msg">
  include/llvm/Support/Dwarf.h<br class="gmail_msg">
  lib/DebugInfo/DWARF/DWARFDebugInfoEntry.cpp<br class="gmail_msg">
  lib/DebugInfo/DWARF/DWARFUnit.cpp<br class="gmail_msg">
  lib/Support/Dwarf.cpp<br class="gmail_msg">
<br class="gmail_msg">
</blockquote></div></div>
</div></blockquote></div><br class=""></body></html>