[PATCH] D37696: [dwarfdump] Add DWARF verifiers for address ranges
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 12 14:21:02 PDT 2017
On Tue, Sep 12, 2017 at 1:49 AM Jonas Devlieghere via Phabricator <
reviews at reviews.llvm.org> wrote:
> JDevlieghere updated this revision to Diff 114778.
> JDevlieghere added a comment.
>
> 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.
>
Try nested functions in GCC? Yep, that seems to do it:
void f1(void) {
void f2(void) {
}
f2();
}
$ llvm-dwarfdump-tot foo.o -debug-dump=info | grep "name\|low\|high\|TAG"
0x0000000b: DW_TAG_compile_unit [1] *
DW_AT_name [DW_FORM_strp] ( .debug_str[0x00000059] = "foo.c")
DW_AT_low_pc [DW_FORM_addr] (0x0000000000000000)
DW_AT_high_pc [DW_FORM_data8] (0x000000000000002a)
0x0000002d: DW_TAG_subprogram [2] *
DW_AT_name [DW_FORM_string] ("f1")
DW_AT_low_pc [DW_FORM_addr] (0x000000000000000b)
DW_AT_high_pc [DW_FORM_data8] (0x000000000000001f)
0x00000045: DW_TAG_subprogram [3]
DW_AT_name [DW_FORM_string] ("f2")
DW_AT_low_pc [DW_FORM_addr] (0x0000000000000000)
DW_AT_high_pc [DW_FORM_data8] (0x000000000000000b)
>
>
> Repository:
> rL LLVM
>
> https://reviews.llvm.org/D37696
>
> Files:
> include/llvm/DebugInfo/DWARF/DWARFDebugRangeList.h
> include/llvm/DebugInfo/DWARF/DWARFDie.h
> include/llvm/DebugInfo/DWARF/DWARFVerifier.h
> lib/DebugInfo/DWARF/DWARFVerifier.cpp
> unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170912/ccefedc5/attachment.html>
More information about the llvm-commits
mailing list