diff options
author | Fangrui Song <i@maskray.me> | 2024-04-23 11:18:05 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-23 11:18:05 -0700 |
commit | a7e27260a92b7a40ede0c3ea4035733ea61e6571 (patch) | |
tree | 8bd463ae7f1b6a7249912fc66d09958d323a3aed | |
parent | 5f3f9d1a905b1f293d81758db3fa20c2a1dc3ff4 (diff) |
[lldb/test] Add basic ld.lld --debug-names tests (#88335)
Test that ld.lld --debug-names (#86508) built per-module index can be
consumed by lldb. This has uncovered a bug during the development of the
lld feature.
-rw-r--r-- | lldb/test/Shell/SymbolFile/DWARF/x86/find-basic-function.cpp | 5 | ||||
-rw-r--r-- | lldb/test/Shell/SymbolFile/DWARF/x86/find-basic-variable.cpp | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/lldb/test/Shell/SymbolFile/DWARF/x86/find-basic-function.cpp b/lldb/test/Shell/SymbolFile/DWARF/x86/find-basic-function.cpp index 30143a41d5e7..b9a63525d071 100644 --- a/lldb/test/Shell/SymbolFile/DWARF/x86/find-basic-function.cpp +++ b/lldb/test/Shell/SymbolFile/DWARF/x86/find-basic-function.cpp @@ -59,6 +59,11 @@ // RUN: lldb-test symbols --name=not_there --find=function %t | \ // RUN: FileCheck --check-prefix=EMPTY %s +/// Test a per-module index built by lld. +// RUN: ld.lld --debug-names %t.o -o %t +// RUN: lldb-test symbols --name=foo --find=function --function-flags=base %t | \ +// RUN: FileCheck --check-prefix=BASE %s + // NAMES: Name: .debug_names // BASE: Found 4 functions: diff --git a/lldb/test/Shell/SymbolFile/DWARF/x86/find-basic-variable.cpp b/lldb/test/Shell/SymbolFile/DWARF/x86/find-basic-variable.cpp index 98b4097cdda0..e46fa14489d3 100644 --- a/lldb/test/Shell/SymbolFile/DWARF/x86/find-basic-variable.cpp +++ b/lldb/test/Shell/SymbolFile/DWARF/x86/find-basic-variable.cpp @@ -33,6 +33,11 @@ // RUN: lldb-test symbols --name=not_there --find=variable %t | \ // RUN: FileCheck --check-prefix=EMPTY %s +/// Test a per-module index built by lld. +// RUN: ld.lld --debug-names %t.o -o %t +// RUN: lldb-test symbols --name=foo --find=variable --context=context %t | \ +// RUN: FileCheck --check-prefix=CONTEXT %s + // NAMES: Name: .debug_names // EMPTY: Found 0 variables: |