diff options
author | Alexey Samsonov <vonosmas@gmail.com> | 2014-06-12 18:52:35 +0000 |
---|---|---|
committer | Alexey Samsonov <vonosmas@gmail.com> | 2014-06-12 18:52:35 +0000 |
commit | 4dfa6812d7e70e419dd2f302b4108f205145aa4b (patch) | |
tree | 5f8bd25dfd3a07ce9b58ee7a2f3f09842b459358 /test/DebugInfo/Inputs/fission-ranges.cc | |
parent | 7c3436d9411f96d39b7de17d997289893c330d44 (diff) | |
download | llvm-4dfa6812d7e70e419dd2f302b4108f205145aa4b.tar.gz llvm-4dfa6812d7e70e419dd2f302b4108f205145aa4b.tar.bz2 llvm-4dfa6812d7e70e419dd2f302b4108f205145aa4b.tar.xz |
[llvm-symbolizer] Fix parsing DW_AT_ranges in Fission skeleton compile unit DIEs.
Turns out that DW_AT_ranges_base attribute sets the offset for
DW_AT_ranges values specified in the .dwo file, but not for DW_AT_ranges specified
in the skeleton compile unit DIE in the main executable. This is extremely confusing,
and would hopefully be fixed in DWARF-5 when it's finalized. For now this
behavior makes sense, as otherwise Fission would break DWARF consumers who
doesn't know anything about DW_AT_ranges_base.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210809 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/DebugInfo/Inputs/fission-ranges.cc')
-rw-r--r-- | test/DebugInfo/Inputs/fission-ranges.cc | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/DebugInfo/Inputs/fission-ranges.cc b/test/DebugInfo/Inputs/fission-ranges.cc new file mode 100644 index 0000000000..a585bf9c00 --- /dev/null +++ b/test/DebugInfo/Inputs/fission-ranges.cc @@ -0,0 +1,17 @@ +static inline int inlined_f() { + volatile int x = 2; + return x; +} + +int main() { + return inlined_f(); +} + +// Build instructions: +// $ mkdir /tmp/dbginfo +// $ cp fission-ranges.cc /tmp/dbginfo/ +// $ cd /tmp/dbginfo +// $ gcc -gsplit-dwarf -O2 -fPIC fission-ranges.cc -c -o obj2.o +// $ clang -gsplit-dwarf -O2 -fsanitize=address -fPIC -Dmain=foo fission-ranges.cc -c -o obj1.o +// $ gcc obj1.o obj2.o -shared -o <output> +// $ objcopy --remove-section=.debug_aranges <output> |