Skip to content

Commit fb7a33c

Browse files
committed
[lldb/test] Add basic ld.lld --debug-names tests
Test that ld.lld --debug-names built per-module index can be consumed by lldb. This uncovers a bug during the development of the lld feature.
1 parent 9dc8694 commit fb7a33c

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

lldb/test/Shell/SymbolFile/DWARF/x86/find-basic-function.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@
5959
// RUN: lldb-test symbols --name=not_there --find=function %t | \
6060
// RUN: FileCheck --check-prefix=EMPTY %s
6161

62+
/// Test a per-module index built by lld.
63+
// RUN: ld.lld --debug-names %t.o -o %t
64+
// RUN: lldb-test symbols --name=foo --find=function --function-flags=base %t | \
65+
// RUN: FileCheck --check-prefix=BASE %s
66+
6267
// NAMES: Name: .debug_names
6368

6469
// BASE: Found 4 functions:

lldb/test/Shell/SymbolFile/DWARF/x86/find-basic-variable.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,11 @@
3333
// RUN: lldb-test symbols --name=not_there --find=variable %t | \
3434
// RUN: FileCheck --check-prefix=EMPTY %s
3535

36+
/// Test a per-module index built by lld.
37+
// RUN: ld.lld --debug-names %t.o -o %t
38+
// RUN: lldb-test symbols --name=foo --find=variable --context=context %t | \
39+
// RUN: FileCheck --check-prefix=CONTEXT %s
40+
3641
// NAMES: Name: .debug_names
3742

3843
// EMPTY: Found 0 variables:

0 commit comments

Comments
 (0)