[llvm] Add support for verifying .debug_names in split DWARF for CUs and TUs. (PR #101775)

Michael Buch via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 19 07:02:35 PDT 2024


Michael137 wrote:

Sorry for the late ping

Looks like the new verification error triggers in some of the tests on the DWARFv5 x86 macOS bots: https://green.lab.llvm.org/job/llvm.org/view/LLDB/job/lldb-cmake-matrix/628/execution/node/79/log/
```
********************
Unresolved Tests (3):
  lldb-api :: lang/cpp/modules-import/TestCXXModulesImport.py
  lldb-api :: lang/objc/modules-auto-import/TestModulesAutoImport.py
  lldb-api :: lang/objc/modules-objc-property/TestModulesObjCProperty.py
```

Seeing a bunch of these in the log:
```
error: Name Index @ 0x0: Entry @ 0xc93e unable to load .dwo file "None" for DWARF unit @ 0x43.
error: Name Index @ 0x0: Entry @ 0xc945 unable to load .dwo file "None" for DWARF unit @ 0x43.
error: Name Index @ 0x0: Entry @ 0xc94c unable to load .dwo file "None" for DWARF unit @ 0x43.
error: Name Index @ 0x0: Entry @ 0xc953 unable to load .dwo file "None" for DWARF unit @ 0x43.
error: Name Index @ 0x0: Entry @ 0xc95a unable to load .dwo file "None" for DWARF unit @ 0x43.
error: Name Index @ 0x0: Entry @ 0xc961 unable to load .dwo file "None" for DWARF unit @ 0x43.
error: Name Index @ 0x0: Entry @ 0xc968 unable to load .dwo file "None" for DWARF unit @ 0x43.
error: Name Index @ 0x0: Entry @ 0xc96f unable to load .dwo file "None" for DWARF unit @ 0x43.
error: Name Index @ 0x0: Entry @ 0xc976 unable to load .dwo file "None" for DWARF unit @ 0x43.
error: Name Index @ 0x0: Entry @ 0xc97d unable to load .dwo file "None" for DWARF unit @ 0x43.
error: Name Index @ 0x0: Entry @ 0xc984 unable to load .dwo file "None" for DWARF unit @ 0x43.
error: Name Index @ 0x0: Entry @ 0xc98b unable to load .dwo file "None" for DWARF unit @ 0x43.
error: Name Index @ 0x0: Entry @ 0xc992 unable to load .dwo file "None" for DWARF unit @ 0x43.
error: Name Index @ 0x0: Entry @ 0xc999 unable to load .dwo file "None" for DWARF unit @ 0x43.
error: Name Index @ 0x0: Entry @ 0xc9a0 unable to load .dwo file "None" for DWARF unit @ 0x43.
error: output verification failed for x86_64
make: *** [a.out.dSYM] Error 1
```

Trying to repro this locally now.

This is what one of the clang commands looks like:
```
"/Users/ec2-user/jenkins/workspace/llvm.org/lldb-cmake-matrix/lldb-build/bin/clang"  -std=c++11 -gdwarf-5 -isysroot "/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk" -arch x86_64  -I/Users/ec2-user/jenkins/workspace/llvm.org/lldb-cmake-matrix/llvm-project/lldb/packages/Python/lldbsuite/test/make/../../../../..//include -I/Users/ec2-user/jenkins/workspace/llvm.org/lldb-cmake-matrix/lldb-build/tools/lldb/include -I/Users/ec2-user/jenkins/workspace/llvm.org/lldb-cmake-matrix/llvm-project/lldb/test/API/lang/cpp/modules-import -I/Users/ec2-user/jenkins/workspace/llvm.org/lldb-cmake-matrix/llvm-project/lldb/packages/Python/lldbsuite/test/make -include /Users/ec2-user/jenkins/workspace/llvm.org/lldb-cmake-matrix/llvm-project/lldb/packages/Python/lldbsuite/test/make/test_common.h  -fno-limit-debug-info    -nostdlib++ -nostdinc++ -cxx-isystem /Users/ec2-user/jenkins/workspace/llvm.org/lldb-cmake-matrix/lldb-build/include/c++/v1 -fmodules -gmodules -fmodules-cache-path=/Users/ec2-user/jenkins/workspace/llvm.org/lldb-cmake-matrix/lldb-build/lldb-test-build.noindex/module-cache-clang/lldb-api -gmodules -fcxx-modules -I/Users/ec2-user/jenkins/workspace/llvm.org/lldb-cmake-matrix/lldb-build/lldb-test-build.noindex/lang/cpp/modules-import/TestCXXModulesImport.test_expr_failing_import_dsym/include --driver-mode=g++ -MT main.o -MD -MP -MF main.d -c -o main.o /Users/ec2-user/jenkins/workspace/llvm.org/lldb-cmake-matrix/llvm-project/lldb/test/API/lang/cpp/modules-import/main.cpp

"/Users/ec2-user/jenkins/workspace/llvm.org/lldb-cmake-matrix/lldb-build/bin/clang"  main.o -gdwarf-5 -isysroot "/Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk" -arch x86_64  -I/Users/ec2-user/jenkins/workspace/llvm.org/lldb-cmake-matrix/llvm-project/lldb/packages/Python/lldbsuite/test/make/../../../../..//include -I/Users/ec2-user/jenkins/workspace/llvm.org/lldb-cmake-matrix/lldb-build/tools/lldb/include -I/Users/ec2-user/jenkins/workspace/llvm.org/lldb-cmake-matrix/llvm-project/lldb/test/API/lang/cpp/modules-import -I/Users/ec2-user/jenkins/workspace/llvm.org/lldb-cmake-matrix/llvm-project/lldb/packages/Python/lldbsuite/test/make -include /Users/ec2-user/jenkins/workspace/llvm.org/lldb-cmake-matrix/llvm-project/lldb/packages/Python/lldbsuite/test/make/test_common.h  -fno-limit-debug-info     -L/Users/ec2-user/jenkins/workspace/llvm.org/lldb-cmake-matrix/lldb-build/lib -Wl,-rpath,/Users/ec2-user/jenkins/workspace/llvm.org/lldb-cmake-matrix/lldb-build/lib -lc++ --driver-mode=g++ -o "a.out"

ld: warning: ignoring duplicate libraries: '-lc++'

codesign --entitlements /Users/ec2-user/jenkins/workspace/llvm.org/lldb-cmake-matrix/llvm-project/lldb/packages/Python/lldbsuite/test/make/entitlements-macos.plist -s - "a.out"

"/Users/ec2-user/jenkins/workspace/llvm.org/lldb-cmake-matrix/lldb-build/./bin/dsymutil"  -o "a.out.dSYM" "a.out"
Verifying .debug_abbrev...
Verifying .debug_info Unit Header Chain...
Verifying .debug_types Unit Header Chain...
Verifying non-dwo Units...
Verifying unit: 1 / 2, "Foo"
Verifying unit: 2 / 2, "/Users/ec2-user/jenkins/workspace/llvm.org/lldb-cmake-matrix/llvm-project/lldb/test/API/lang/cpp/modules-import/main.cpp"
Verifying dwo Units...
Verifying .debug_line...
Verifying .debug_str_offsets...
Verifying .debug_names...
error: Name Index @ 0x0: Entry @ 0x9a unable to load .dwo file "None" for DWARF unit @ 0x0.
error: output verification failed for x86_64
make: *** [a.out.dSYM] Error 1
```

Note how we're compiling with `-gdwarf-5` *and* `-gmodules` in all of the failing tests. So probably `-gmodules` related

https://github.com/llvm/llvm-project/pull/101775


More information about the llvm-commits mailing list