diff options
author | Alexey Samsonov <samsonov@google.com> | 2013-06-28 08:15:40 +0000 |
---|---|---|
committer | Alexey Samsonov <samsonov@google.com> | 2013-06-28 08:15:40 +0000 |
commit | 8175bc3d3bc8567a90b9dd50d68c1423baffd63b (patch) | |
tree | d520197471dc8c5b49816e39bdf55f5c4817494a /test/DebugInfo | |
parent | 363720e06c4a61a6695e2b2b8f1dfdd597e52b95 (diff) | |
download | external_llvm-8175bc3d3bc8567a90b9dd50d68c1423baffd63b.zip external_llvm-8175bc3d3bc8567a90b9dd50d68c1423baffd63b.tar.gz external_llvm-8175bc3d3bc8567a90b9dd50d68c1423baffd63b.tar.bz2 |
llvm-symbolizer: add support for Mach-O universal binaries
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185137 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/DebugInfo')
-rwxr-xr-x | test/DebugInfo/Inputs/macho-universal | bin | 0 -> 16660 bytes | |||
-rw-r--r-- | test/DebugInfo/Inputs/macho-universal.cc | 10 | ||||
-rw-r--r-- | test/DebugInfo/llvm-symbolizer.test | 18 |
3 files changed, 26 insertions, 2 deletions
diff --git a/test/DebugInfo/Inputs/macho-universal b/test/DebugInfo/Inputs/macho-universal Binary files differnew file mode 100755 index 0000000..a161441 --- /dev/null +++ b/test/DebugInfo/Inputs/macho-universal diff --git a/test/DebugInfo/Inputs/macho-universal.cc b/test/DebugInfo/Inputs/macho-universal.cc new file mode 100644 index 0000000..9f34fdb --- /dev/null +++ b/test/DebugInfo/Inputs/macho-universal.cc @@ -0,0 +1,10 @@ +// Built with Apple LLVM version 4.2 (clang-425.0.24) (based on LLVM 3.2svn) +// clang++ -arch x86_64 -arch i386 macho-universal.cc + +int inc(int x) { + return x + 1; +} + +int main(int argc, char *argv[]) { + return inc(argc); +} diff --git a/test/DebugInfo/llvm-symbolizer.test b/test/DebugInfo/llvm-symbolizer.test index 9a7b365..efe09c1 100644 --- a/test/DebugInfo/llvm-symbolizer.test +++ b/test/DebugInfo/llvm-symbolizer.test @@ -3,9 +3,12 @@ RUN: echo "%p/Inputs/dwarfdump-test.elf-x86-64 0x400436" >> %t.input RUN: echo "%p/Inputs/dwarfdump-test4.elf-x86-64 0x62c" >> %t.input RUN: echo "%p/Inputs/dwarfdump-inl-test.elf-x86-64 0x710" >> %t.input RUN: echo "\"%p/Inputs/dwarfdump-test3.elf-x86-64 space\" 0x633" >> %t.input +RUN: echo "%p/Inputs/macho-universal 0x1f84" >> %t.input +RUN: echo "%p/Inputs/macho-universal:i386 0x1f67" >> %t.input +RUN: echo "%p/Inputs/macho-universal:x86_64 0x100000f05" >> %t.input -RUN: llvm-symbolizer --functions --inlining --demangle=false < %t.input \ -RUN: | FileCheck %s +RUN: llvm-symbolizer --functions --inlining --demangle=false \ +RUN: --default-arch=i386 < %t.input | FileCheck %s REQUIRES: shell @@ -29,5 +32,16 @@ CHECK-NEXT: dwarfdump-inl-test.cc: CHECK: _Z3do1v CHECK-NEXT: dwarfdump-test3-decl.h:7 +CHECK: _main +CHECK: __Z3inci +CHECK: __Z3inci + RUN: echo "unexisting-file 0x1234" > %t.input2 RUN: llvm-symbolizer < %t.input2 + +RUN: echo "%p/Inputs/macho-universal 0x1f84" > %t.input3 +RUN: llvm-symbolizer < %t.input3 | FileCheck %s --check-prefix=UNKNOWN-ARCH + +UNKNOWN-ARCH-NOT: main +UNKNOWN-ARCH: ?? +UNKNOWN-ARCH-NOT: main |