diff --git a/llvm/test/tools/dsymutil/ARM/extern-alias.test b/llvm/test/tools/dsymutil/ARM/extern-alias.test index f8b59584d2b46..58a1c6a738257 100644 --- a/llvm/test/tools/dsymutil/ARM/extern-alias.test +++ b/llvm/test/tools/dsymutil/ARM/extern-alias.test @@ -41,6 +41,6 @@ RUN: dsymutil -oso-prepend-path %p/../Inputs %p/../Inputs/private/tmp/extern/ext RUN: dsymutil --linker llvm -oso-prepend-path %p/../Inputs %p/../Inputs/private/tmp/private_extern/private_extern.out -o %t.dSYM --verbose | FileCheck %s RUN: dsymutil --linker llvm -oso-prepend-path %p/../Inputs %p/../Inputs/private/tmp/extern/extern.out -o %t.dSYM --verbose | FileCheck %s -CHECK-NOT: could not find object file symbol for symbol _baz +CHECK-NOT: could not find symbol '_baz' CHECK: { sym: _baz, objAddr: 0x0, binAddr: 0x100007F58, size: 0x0 } CHECK: { sym: _foo, objAddr: 0x0, binAddr: 0x100007F58, size: 0x20 } diff --git a/llvm/test/tools/dsymutil/ARM/missing-symbol-warning.test b/llvm/test/tools/dsymutil/ARM/missing-symbol-warning.test new file mode 100644 index 0000000000000..1de805d321953 --- /dev/null +++ b/llvm/test/tools/dsymutil/ARM/missing-symbol-warning.test @@ -0,0 +1,3 @@ +RUN: dsymutil -oso-prepend-path %p/../Inputs --dump-debug-map %p/../Inputs/private/tmp/warning/test.out 2>&1 | FileCheck %s +# CHECK: could not find symbol '_foo' in object file '{{.*}}test.o' +# CHECK: { sym: _main, objAddr: 0x0, binAddr: 0x100003F84, size: 0x1C } diff --git a/llvm/test/tools/dsymutil/ARM/static-archive-collision.test b/llvm/test/tools/dsymutil/ARM/static-archive-collision.test index 7182f0917d897..55fd5e6b621e7 100644 --- a/llvm/test/tools/dsymutil/ARM/static-archive-collision.test +++ b/llvm/test/tools/dsymutil/ARM/static-archive-collision.test @@ -22,5 +22,5 @@ $ clang main.o foo.a -o main.out RUN: dsymutil -oso-prepend-path %p/../Inputs %p/../Inputs/private/tmp/collision/main.out --dump-debug-map 2>&1 | FileCheck %s CHECK: skipping debug map object with duplicate name and timestamp: {{.*}} /private/tmp/collision/foo.a(foo.o) -CHECK-NOT: could not find object file symbol for symbol _g -CHECK-NOT: could not find object file symbol for symbol _f +CHECK-NOT: could not find symbol '_g' +CHECK-NOT: could not find symbol '_f' diff --git a/llvm/test/tools/dsymutil/Inputs/private/tmp/warning/test.o b/llvm/test/tools/dsymutil/Inputs/private/tmp/warning/test.o new file mode 100644 index 0000000000000..53647992d70c9 Binary files /dev/null and b/llvm/test/tools/dsymutil/Inputs/private/tmp/warning/test.o differ diff --git a/llvm/test/tools/dsymutil/Inputs/private/tmp/warning/test.out b/llvm/test/tools/dsymutil/Inputs/private/tmp/warning/test.out new file mode 100755 index 0000000000000..bfd5c74f4a1dd Binary files /dev/null and b/llvm/test/tools/dsymutil/Inputs/private/tmp/warning/test.out differ diff --git a/llvm/test/tools/dsymutil/X86/alias.test b/llvm/test/tools/dsymutil/X86/alias.test index 4c1e816870609..65e9bf22640a8 100644 --- a/llvm/test/tools/dsymutil/X86/alias.test +++ b/llvm/test/tools/dsymutil/X86/alias.test @@ -4,7 +4,7 @@ # RUN: dsymutil --linker llvm -f -oso-prepend-path=%p/../Inputs/alias \ # RUN: %p/../Inputs/alias/foobar -o - | llvm-dwarfdump - 2>&1 | FileCheck %s -# CHECK-NOT: could not find object file symbol for symbol +# CHECK-NOT: could not find symbol # CHECK: DW_AT_name ("foo.c") # CHECK: DW_AT_name ("bar.c") diff --git a/llvm/test/tools/dsymutil/X86/thinlto.test b/llvm/test/tools/dsymutil/X86/thinlto.test index 2d2195805f3aa..d76bfb17e7d52 100644 --- a/llvm/test/tools/dsymutil/X86/thinlto.test +++ b/llvm/test/tools/dsymutil/X86/thinlto.test @@ -23,5 +23,5 @@ RUN: dsymutil -oso-prepend-path %p/../Inputs %p/../Inputs/private/tmp/thinlto/fo RUN: dsymutil --linker llvm -oso-prepend-path %p/../Inputs %p/../Inputs/private/tmp/thinlto/foobar.dylib -o %t.dSYM 2>&1 | FileCheck %s --allow-empty -CHECK-NOT: could not find object file symbol for symbol __ZZ9function2vE12magic_static -CHECK-NOT: could not find object file symbol for symbol __ZGVZ9function2vE12magic_static +CHECK-NOT: could not find symbol '__ZZ9function2vE12magic_static' +CHECK-NOT: could not find symbol 'symbol __ZGVZ9function2vE12magic_static' diff --git a/llvm/tools/dsymutil/MachODebugMapParser.cpp b/llvm/tools/dsymutil/MachODebugMapParser.cpp index 7a32eacee14c1..524a6795c360e 100644 --- a/llvm/tools/dsymutil/MachODebugMapParser.cpp +++ b/llvm/tools/dsymutil/MachODebugMapParser.cpp @@ -729,7 +729,8 @@ void MachODebugMapParser::handleStabSymbolTableEntry( } if (ObjectSymIt == CurrentObjectAddresses.end()) { - Warning("could not find object file symbol for symbol " + Twine(Name)); + Warning("could not find symbol '" + Twine(Name) + "' in object file '" + + CurrentDebugMapObject->getObjectFilename() + "'"); return; }