<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Tue, Sep 12, 2017 at 1:49 AM Jonas Devlieghere via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">JDevlieghere updated this revision to Diff 114778.<br>
JDevlieghere added a comment.<br>
<br>
Thanks Dave! There's no logic that deals specifically with nested functions, so I don't think it'll handle this particular case. Before hacking this in, I think it might be good to obtain a real example rather than an artificial one, to ensure we don't make the verification broader than necessary.<br></blockquote><div><br>Try nested functions in GCC? Yep, that seems to do it:<br><br>void f1(void) {<br>  void f2(void) {<br>  }<br>  f2();</div><div>}<br><br><div><div><font face="monospace">$ llvm-dwarfdump-tot foo.o -debug-dump=info | grep "name\|low\|high\|TAG"</font></div><div><font face="monospace">0x0000000b: DW_TAG_compile_unit [1] *</font></div><div><font face="monospace">              DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000059] = "foo.c")</font></div><div><font face="monospace">              DW_AT_low_pc [DW_FORM_addr]       (0x0000000000000000)</font></div><div><font face="monospace">              DW_AT_high_pc [DW_FORM_data8]     (0x000000000000002a)</font></div><div><font face="monospace">0x0000002d:   DW_TAG_subprogram [2] *</font></div><div><font face="monospace">                DW_AT_name [DW_FORM_string]     ("f1")</font></div><div><font face="monospace">                DW_AT_low_pc [DW_FORM_addr]     (0x000000000000000b)</font></div><div><font face="monospace">                DW_AT_high_pc [DW_FORM_data8]   (0x000000000000001f)</font></div><div><font face="monospace">0x00000045:     DW_TAG_subprogram [3]  </font></div><div><font face="monospace">                  DW_AT_name [DW_FORM_string]   ("f2")</font></div><div><font face="monospace">                  DW_AT_low_pc [DW_FORM_addr]   (0x0000000000000000)</font></div><div><font face="monospace">                  DW_AT_high_pc [DW_FORM_data8] (0x000000000000000b)</font></div></div><div> </div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
Repository:<br>
  rL LLVM<br>
<br>
<a href="https://reviews.llvm.org/D37696" rel="noreferrer" target="_blank">https://reviews.llvm.org/D37696</a><br>
<br>
Files:<br>
  include/llvm/DebugInfo/DWARF/DWARFDebugRangeList.h<br>
  include/llvm/DebugInfo/DWARF/DWARFDie.h<br>
  include/llvm/DebugInfo/DWARF/DWARFVerifier.h<br>
  lib/DebugInfo/DWARF/DWARFVerifier.cpp<br>
  unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp<br>
<br>
</blockquote></div></div>