[Lldb-commits] [lldb] 15a6df5 - [lldb/DWARF/test] Freshen up debug_names tests

Adrian Prantl via lldb-commits lldb-commits at lists.llvm.org
Thu Jan 16 09:23:57 PST 2020


It looks like this broke on green dragon:

http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/5907/

http://green.lab.llvm.org/green/view/LLDB/job/lldb-cmake/5907/testReport/junit/lldb-shell/SymbolFile_DWARF/debug_names_compressed_cpp/

Script:
--
: 'RUN: at line 6';   /Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/bin/clang --target=specify-a-target-or-use-a-_host-substitution -c -o /Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/tools/lldb/test/SymbolFile/DWARF/Output/debug-names-compressed.cpp.tmp.o --target=x86_64-pc-linux -gdwarf-5 -gpubnames /Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug-names-compressed.cpp
: 'RUN: at line 7';   /Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/bin/ld.lld /Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/tools/lldb/test/SymbolFile/DWARF/Output/debug-names-compressed.cpp.tmp.o -o /Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/tools/lldb/test/SymbolFile/DWARF/Output/debug-names-compressed.cpp.tmp --compress-debug-sections=zlib
: 'RUN: at line 8';   /Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/bin/llvm-readobj --sections /Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/tools/lldb/test/SymbolFile/DWARF/Output/debug-names-compressed.cpp.tmp | /Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/bin/FileCheck /Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug-names-compressed.cpp --check-prefix NAMES
: 'RUN: at line 9';   /Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/bin/lldb-test symbols --find=variable --name=foo /Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/tools/lldb/test/SymbolFile/DWARF/Output/debug-names-compressed.cpp.tmp | /Users/buildslave/jenkins/workspace/lldb-cmake/lldb-build/bin/FileCheck /Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug-names-compressed.cpp
--
Exit Code: 1

Command Output (stderr):
--
b'/Users/buildslave/jenkins/workspace/lldb-cmake/llvm-project/lldb/test/Shell/SymbolFile/DWARF/debug-names-compressed.cpp:15:15: error: CHECK-DAG: expected string not found in input\n// CHECK-DAG: name = "foo", type = {{.*}} (int), {{.*}} decl = debug-names-compressed.cpp:[[@LINE-1]]\n              ^\n<stdin>:3:1: note: scanning from here\n0x7f9c96308c58: Variable{0x7fffffff00000023}, name = "foo", type = {7fffffff0000002e} 0x00007F9C96311718 (int), scope = global, decl = \xff\xff\xff\xff\x11:14, location = DW_OP_addrx 0x0, external\n<stdin>:3:1: note: with "@LINE-1" equal to "14"\n0x7f9c96308c58: Variable{0x7fffffff00000023}, name = "foo", type = {7fffffff0000002e} 0x00007F9C96311718 (int), scope = global, decl = \xff\xff\xff\xff\x11:14, location = DW_OP_addrx 0x0, external\n'
--



> On Jan 16, 2020, at 7:31 AM, Pavel Labath via lldb-commits <lldb-commits at lists.llvm.org> wrote:
> 
> 
> Author: Pavel Labath
> Date: 2020-01-16T16:25:49+01:00
> New Revision: 15a6df52efaa74308bfdcd03718a84ac893b40d8
> 
> URL: https://github.com/llvm/llvm-project/commit/15a6df52efaa74308bfdcd03718a84ac893b40d8
> DIFF: https://github.com/llvm/llvm-project/commit/15a6df52efaa74308bfdcd03718a84ac893b40d8.diff
> 
> LOG: [lldb/DWARF/test] Freshen up debug_names tests
> 
> These tests used "clang -mllvm -accel-tables=Dwarf" as a way to
> guarantee that clang will emit the debug_names table. Unfortunately,
> a change it clang made that insufficient (-gpubnames is required now
> too), which rendered these tests ineffective. Since lldb automatically
> falls back to the manual index, the tests didn't fail and this change
> went largely unnoticed.
> 
> This patch updates the tests to really use debug_names (-gdwarf-5
> -gpubnames) is the combination that works now, and it adds additional
> checks to ensure the section is actually emitted.
> 
> Fortunately, no regressions crept in while these tests were disabled.
> 
> Added: 
> 
> 
> Modified: 
>    lldb/packages/Python/lldbsuite/test/lang/c/forward/TestForwardDeclaration.py
>    lldb/test/Shell/SymbolFile/DWARF/debug-names-compressed.cpp
>    lldb/test/Shell/SymbolFile/DWARF/dwarf5-index-is-used.cpp
>    lldb/test/Shell/SymbolFile/DWARF/dwarf5-partial-index.cpp
>    lldb/test/Shell/SymbolFile/DWARF/find-basic-function.cpp
>    lldb/test/Shell/SymbolFile/DWARF/find-basic-namespace.cpp
>    lldb/test/Shell/SymbolFile/DWARF/find-basic-type.cpp
>    lldb/test/Shell/SymbolFile/DWARF/find-basic-variable.cpp
>    lldb/test/Shell/SymbolFile/DWARF/find-function-regex.cpp
>    lldb/test/Shell/SymbolFile/DWARF/find-method.cpp
>    lldb/test/Shell/SymbolFile/DWARF/find-variable-dwo.cpp
>    lldb/test/Shell/SymbolFile/DWARF/find-variable-file.cpp
> 
> Removed: 
> 
> 
> 
> ################################################################################
> diff  --git a/lldb/packages/Python/lldbsuite/test/lang/c/forward/TestForwardDeclaration.py b/lldb/packages/Python/lldbsuite/test/lang/c/forward/TestForwardDeclaration.py
> index 9ea13612c07a..f955d013bc90 100644
> --- a/lldb/packages/Python/lldbsuite/test/lang/c/forward/TestForwardDeclaration.py
> +++ b/lldb/packages/Python/lldbsuite/test/lang/c/forward/TestForwardDeclaration.py
> @@ -62,4 +62,4 @@ def test(self):
>     def test_debug_names(self):
>         """Test that we are able to find complete types when using DWARF v5
>         accelerator tables"""
> -        self.do_test(dict(CFLAGS_EXTRAS="-mllvm -accel-tables=Dwarf"))
> +        self.do_test(dict(CFLAGS_EXTRAS="-gdwarf-5 -gpubnames"))
> 
> diff  --git a/lldb/test/Shell/SymbolFile/DWARF/debug-names-compressed.cpp b/lldb/test/Shell/SymbolFile/DWARF/debug-names-compressed.cpp
> index aeb0ff1d01b1..4dcbb4715220 100644
> --- a/lldb/test/Shell/SymbolFile/DWARF/debug-names-compressed.cpp
> +++ b/lldb/test/Shell/SymbolFile/DWARF/debug-names-compressed.cpp
> @@ -3,12 +3,15 @@
> 
> // REQUIRES: lld, zlib
> 
> -// RUN: %clang -g -c -o %t.o --target=x86_64-pc-linux -mllvm -accel-tables=Dwarf %s
> +// RUN: %clang -c -o %t.o --target=x86_64-pc-linux -gdwarf-5 -gpubnames %s
> // RUN: ld.lld %t.o -o %t --compress-debug-sections=zlib
> +// RUN: llvm-readobj --sections %t | FileCheck %s --check-prefix NAMES
> // RUN: lldb-test symbols --find=variable --name=foo %t | FileCheck %s
> 
> +// NAMES: Name: .debug_names
> +
> // CHECK: Found 1 variables:
> int foo;
> -// ONE-DAG: name = "foo", type = {{.*}} (int), {{.*}} decl = debug-names-compressed.cpp:[[@LINE-1]]
> +// CHECK-DAG: name = "foo", type = {{.*}} (int), {{.*}} decl = debug-names-compressed.cpp:[[@LINE-1]]
> 
> extern "C" void _start() {}
> 
> diff  --git a/lldb/test/Shell/SymbolFile/DWARF/dwarf5-index-is-used.cpp b/lldb/test/Shell/SymbolFile/DWARF/dwarf5-index-is-used.cpp
> index f5122ebadae2..d6ac23716f6c 100644
> --- a/lldb/test/Shell/SymbolFile/DWARF/dwarf5-index-is-used.cpp
> +++ b/lldb/test/Shell/SymbolFile/DWARF/dwarf5-index-is-used.cpp
> @@ -2,7 +2,7 @@
> 
> // REQUIRES: lld
> 
> -// RUN: %clang %s -g -c -o %t.o --target=x86_64-pc-linux -mllvm -accel-tables=Dwarf -gpubnames
> +// RUN: %clang %s -c -o %t.o --target=x86_64-pc-linux -gdwarf-5 -gpubnames
> // RUN: ld.lld %t.o -o %t
> // RUN: lldb-test symbols %t | FileCheck %s
> 
> 
> diff  --git a/lldb/test/Shell/SymbolFile/DWARF/dwarf5-partial-index.cpp b/lldb/test/Shell/SymbolFile/DWARF/dwarf5-partial-index.cpp
> index 84e3b62e17bb..ab84415f61b2 100644
> --- a/lldb/test/Shell/SymbolFile/DWARF/dwarf5-partial-index.cpp
> +++ b/lldb/test/Shell/SymbolFile/DWARF/dwarf5-partial-index.cpp
> @@ -3,11 +3,14 @@
> 
> // REQUIRES: lld
> 
> -// RUN: %clang %s -g -c -o %t-1.o --target=x86_64-pc-linux -DONE -mllvm -accel-tables=Dwarf
> -// RUN: %clang %s -g -c -o %t-2.o --target=x86_64-pc-linux -DTWO -mllvm -accel-tables=Dwarf
> +// RUN: %clang %s -c -o %t-1.o --target=x86_64-pc-linux -DONE -gdwarf-5 -gpubnames
> +// RUN: llvm-readobj --sections %t-1.o | FileCheck %s --check-prefix NAMES
> +// RUN: %clang %s -c -o %t-2.o --target=x86_64-pc-linux -DTWO -gdwarf-5 -gno-pubnames
> // RUN: ld.lld %t-1.o %t-2.o -o %t
> // RUN: lldb-test symbols --find=variable --name=foo  %t | FileCheck %s
> 
> +// NAMES: Name: .debug_names
> +
> // CHECK: Found 2 variables:
> #ifdef ONE
> namespace one {
> 
> diff  --git a/lldb/test/Shell/SymbolFile/DWARF/find-basic-function.cpp b/lldb/test/Shell/SymbolFile/DWARF/find-basic-function.cpp
> index a05b0685a3d8..0adf7b733408 100644
> --- a/lldb/test/Shell/SymbolFile/DWARF/find-basic-function.cpp
> +++ b/lldb/test/Shell/SymbolFile/DWARF/find-basic-function.cpp
> @@ -1,6 +1,6 @@
> // REQUIRES: lld
> 
> -// RUN: %clang %s -g -c -o %t.o --target=x86_64-pc-linux -mllvm -accel-tables=Disable
> +// RUN: %clang %s -g -c -o %t.o --target=x86_64-pc-linux -gno-pubnames
> // RUN: ld.lld %t.o -o %t
> // RUN: lldb-test symbols --name=foo --find=function --function-flags=base %t | \
> // RUN:   FileCheck --check-prefix=BASE %s
> @@ -21,7 +21,7 @@
> // RUN: lldb-test symbols --name=foo --find=function --function-flags=method %t | \
> // RUN:   FileCheck --check-prefix=METHOD %s
> // RUN: lldb-test symbols --name=foo --find=function --function-flags=full %t | \
> -// RUN:   FileCheck --check-prefix=FULL-APPLE %s
> +// RUN:   FileCheck --check-prefix=FULL-INDEXED %s
> // RUN: lldb-test symbols --name=_Z3fooi --find=function --function-flags=full %t | \
> // RUN:   FileCheck --check-prefix=FULL-MANGLED %s
> // RUN: lldb-test symbols --name=foo --context=context --find=function --function-flags=base %t | \
> @@ -29,14 +29,15 @@
> // RUN: lldb-test symbols --name=not_there --find=function %t | \
> // RUN:   FileCheck --check-prefix=EMPTY %s
> 
> -// RUN: %clang %s -g -c -o %t.o --target=x86_64-pc-linux -mllvm -accel-tables=Dwarf
> +// RUN: %clang %s -c -o %t.o --target=x86_64-pc-linux -gdwarf-5 -gpubnames
> // RUN: ld.lld %t.o -o %t
> +// RUN: llvm-readobj --sections %t | FileCheck %s --check-prefix NAMES
> // RUN: lldb-test symbols --name=foo --find=function --function-flags=base %t | \
> // RUN:   FileCheck --check-prefix=BASE %s
> // RUN: lldb-test symbols --name=foo --find=function --function-flags=method %t | \
> // RUN:   FileCheck --check-prefix=METHOD %s
> // RUN: lldb-test symbols --name=foo --find=function --function-flags=full %t | \
> -// RUN:   FileCheck --check-prefix=FULL %s
> +// RUN:   FileCheck --check-prefix=FULL-INDEXED %s
> // RUN: lldb-test symbols --name=_Z3fooi --find=function --function-flags=full %t | \
> // RUN:   FileCheck --check-prefix=FULL-MANGLED %s
> // RUN: lldb-test symbols --name=foo --context=context --find=function --function-flags=base %t | \
> @@ -44,6 +45,8 @@
> // RUN: lldb-test symbols --name=not_there --find=function %t | \
> // RUN:   FileCheck --check-prefix=EMPTY %s
> 
> +// NAMES: Name: .debug_names
> +
> // BASE: Found 4 functions:
> // BASE-DAG: name = "foo()", mangled = "_Z3foov"
> // BASE-DAG: name = "foo(int)", mangled = "_Z3fooi"
> @@ -55,14 +58,14 @@
> // METHOD-DAG: name = "sbar::foo(int)", mangled = "_ZN4sbar3fooEi"
> // METHOD-DAG: name = "ffbar()::sbaz::foo()", mangled = "_ZZ5ffbarvEN4sbaz3fooEv"
> 
> -// FULL-APPLE: Found 7 functions:
> -// FULL-APPLE-DAG: name = "foo()", mangled = "_Z3foov"
> -// FULL-APPLE-DAG: name = "foo(int)", mangled = "_Z3fooi"
> -// FULL-APPLE-DAG: name = "bar::foo()", mangled = "_ZN3bar3fooEv"
> -// FULL-APPLE-DAG: name = "bar::baz::foo()", mangled = "_ZN3bar3baz3fooEv"
> -// FULL-APPLE-DAG: name = "sbar::foo()", mangled = "_ZN4sbar3fooEv"
> -// FULL-APPLE-DAG: name = "sbar::foo(int)", mangled = "_ZN4sbar3fooEi"
> -// FULL-APPLE-DAG: name = "ffbar()::sbaz::foo()", mangled = "_ZZ5ffbarvEN4sbaz3fooEv"
> +// FULL-INDEXED: Found 7 functions:
> +// FULL-INDEXED-DAG: name = "foo()", mangled = "_Z3foov"
> +// FULL-INDEXED-DAG: name = "foo(int)", mangled = "_Z3fooi"
> +// FULL-INDEXED-DAG: name = "bar::foo()", mangled = "_ZN3bar3fooEv"
> +// FULL-INDEXED-DAG: name = "bar::baz::foo()", mangled = "_ZN3bar3baz3fooEv"
> +// FULL-INDEXED-DAG: name = "sbar::foo()", mangled = "_ZN4sbar3fooEv"
> +// FULL-INDEXED-DAG: name = "sbar::foo(int)", mangled = "_ZN4sbar3fooEi"
> +// FULL-INDEXED-DAG: name = "ffbar()::sbaz::foo()", mangled = "_ZZ5ffbarvEN4sbaz3fooEv"
> 
> // FULL: Found 0 functions:
> 
> 
> diff  --git a/lldb/test/Shell/SymbolFile/DWARF/find-basic-namespace.cpp b/lldb/test/Shell/SymbolFile/DWARF/find-basic-namespace.cpp
> index e7655a37053c..13d50af7ef60 100644
> --- a/lldb/test/Shell/SymbolFile/DWARF/find-basic-namespace.cpp
> +++ b/lldb/test/Shell/SymbolFile/DWARF/find-basic-namespace.cpp
> @@ -1,6 +1,6 @@
> // REQUIRES: lld
> 
> -// RUN: %clang %s -g -c -o %t.o --target=x86_64-pc-linux -mllvm -accel-tables=Disable
> +// RUN: %clang %s -g -c -o %t.o --target=x86_64-pc-linux -gno-pubnames
> // RUN: ld.lld %t.o -o %t
> // RUN: lldb-test symbols --name=foo --find=namespace %t | \
> // RUN:   FileCheck --check-prefix=FOO %s
> @@ -17,8 +17,9 @@
> // RUN: lldb-test symbols --name=not_there --find=namespace %t | \
> // RUN:   FileCheck --check-prefix=EMPTY %s
> 
> -// RUN: %clang %s -g -c -o %t.o --target=x86_64-pc-linux -mllvm -accel-tables=Dwarf
> +// RUN: %clang %s -c -o %t.o --target=x86_64-pc-linux -gdwarf-5 -gpubnames
> // RUN: ld.lld %t.o -o %t
> +// RUN: llvm-readobj --sections %t | FileCheck %s --check-prefix NAMES
> // RUN: lldb-test symbols --name=foo --find=namespace %t | \
> // RUN:   FileCheck --check-prefix=FOO %s
> // RUN: lldb-test symbols --name=foo --find=namespace --context=context %t | \
> @@ -26,6 +27,8 @@
> // RUN: lldb-test symbols --name=not_there --find=namespace %t | \
> // RUN:   FileCheck --check-prefix=EMPTY %s
> 
> +// NAMES: Name: .debug_names
> +
> // FOO: Found namespace: foo
> 
> // CONTEXT: Found namespace: bar::foo
> 
> diff  --git a/lldb/test/Shell/SymbolFile/DWARF/find-basic-type.cpp b/lldb/test/Shell/SymbolFile/DWARF/find-basic-type.cpp
> index 060a5b41eebc..2ed7b219d8da 100644
> --- a/lldb/test/Shell/SymbolFile/DWARF/find-basic-type.cpp
> +++ b/lldb/test/Shell/SymbolFile/DWARF/find-basic-type.cpp
> @@ -1,6 +1,6 @@
> // REQUIRES: lld
> 
> -// RUN: %clang %s -g -c -o %t.o --target=x86_64-pc-linux -mllvm -accel-tables=Disable
> +// RUN: %clang %s -g -c -o %t.o --target=x86_64-pc-linux -gno-pubnames
> // RUN: ld.lld %t.o -o %t
> // RUN: lldb-test symbols --name=foo --find=type %t | \
> // RUN:   FileCheck --check-prefix=NAME %s
> @@ -17,8 +17,9 @@
> // RUN: lldb-test symbols --name=not_there --find=type %t | \
> // RUN:   FileCheck --check-prefix=EMPTY %s
> 
> -// RUN: %clang %s -g -c -o %t.o --target=x86_64-pc-linux -mllvm -accel-tables=Dwarf
> +// RUN: %clang %s -c -o %t.o --target=x86_64-pc-linux -gdwarf-5 -gpubnames
> // RUN: ld.lld %t.o -o %t
> +// RUN: llvm-readobj --sections %t | FileCheck %s --check-prefix NAMES
> // RUN: lldb-test symbols --name=foo --find=type %t | \
> // RUN:   FileCheck --check-prefix=NAME %s
> // RUN: lldb-test symbols --name=foo --context=context --find=type %t | \
> @@ -26,6 +27,8 @@
> // RUN: lldb-test symbols --name=not_there --find=type %t | \
> // RUN:   FileCheck --check-prefix=EMPTY %s
> 
> +// NAMES: Name: .debug_names
> +
> // EMPTY: Found 0 types:
> // NAME: Found 4 types:
> // CONTEXT: Found 1 types:
> 
> diff  --git a/lldb/test/Shell/SymbolFile/DWARF/find-basic-variable.cpp b/lldb/test/Shell/SymbolFile/DWARF/find-basic-variable.cpp
> index bca8f27e1d4e..fa09dcf164d7 100644
> --- a/lldb/test/Shell/SymbolFile/DWARF/find-basic-variable.cpp
> +++ b/lldb/test/Shell/SymbolFile/DWARF/find-basic-variable.cpp
> @@ -1,6 +1,6 @@
> // REQUIRES: lld
> 
> -// RUN: %clang %s -g -c -o %t.o --target=x86_64-pc-linux -mllvm -accel-tables=Disable
> +// RUN: %clang %s -g -c -o %t.o --target=x86_64-pc-linux -gno-pubnames
> // RUN: ld.lld %t.o -o %t
> // RUN: lldb-test symbols --name=foo --find=variable --context=context %t | \
> // RUN:   FileCheck --check-prefix=CONTEXT %s
> @@ -21,8 +21,9 @@
> // RUN: lldb-test symbols --name=not_there --find=variable %t | \
> // RUN:   FileCheck --check-prefix=EMPTY %s
> //
> -// RUN: %clang %s -g -c -o %t.o --target=x86_64-pc-linux -mllvm -accel-tables=Dwarf
> +// RUN: %clang %s -g -c -o %t.o --target=x86_64-pc-linux -gdwarf-5 -gpubnames
> // RUN: ld.lld %t.o -o %t
> +// RUN: llvm-readobj --sections %t | FileCheck %s --check-prefix NAMES
> // RUN: lldb-test symbols --name=foo --find=variable --context=context %t | \
> // RUN:   FileCheck --check-prefix=CONTEXT %s
> // RUN: lldb-test symbols --name=foo --find=variable %t | \
> @@ -32,6 +33,8 @@
> // RUN: lldb-test symbols --name=not_there --find=variable %t | \
> // RUN:   FileCheck --check-prefix=EMPTY %s
> 
> +// NAMES: Name: .debug_names
> +
> // EMPTY: Found 0 variables:
> // NAME: Found 4 variables:
> // CONTEXT: Found 1 variables:
> 
> diff  --git a/lldb/test/Shell/SymbolFile/DWARF/find-function-regex.cpp b/lldb/test/Shell/SymbolFile/DWARF/find-function-regex.cpp
> index b1e9d10e82ac..be267596fb37 100644
> --- a/lldb/test/Shell/SymbolFile/DWARF/find-function-regex.cpp
> +++ b/lldb/test/Shell/SymbolFile/DWARF/find-function-regex.cpp
> @@ -1,16 +1,19 @@
> // REQUIRES: lld
> 
> -// RUN: %clang %s -g -c -o %t.o --target=x86_64-pc-linux -mllvm -accel-tables=Disable
> +// RUN: %clang %s -g -c -o %t.o --target=x86_64-pc-linux -gno-pubnames
> // RUN: ld.lld %t.o -o %t
> // RUN: lldb-test symbols --name=f.o --regex --find=function %t | FileCheck %s
> //
> // RUN: %clang %s -g -c -o %t --target=x86_64-apple-macosx
> // RUN: lldb-test symbols --name=f.o --regex --find=function %t | FileCheck %s
> 
> -// RUN: %clang %s -g -c -o %t.o --target=x86_64-pc-linux -mllvm -accel-tables=Dwarf
> +// RUN: %clang %s -g -c -o %t.o --target=x86_64-pc-linux -gdwarf-5 -gpubnames
> // RUN: ld.lld %t.o -o %t
> +// RUN: llvm-readobj --sections %t | FileCheck %s --check-prefix NAMES
> // RUN: lldb-test symbols --name=f.o --regex --find=function %t | FileCheck %s
> 
> +// NAMES: Name: .debug_names
> +
> // CHECK: Found 3 functions:
> // CHECK-DAG: name = "foo()", mangled = "_Z3foov"
> // CHECK-DAG: name = "ffo()", mangled = "_Z3ffov"
> 
> diff  --git a/lldb/test/Shell/SymbolFile/DWARF/find-method.cpp b/lldb/test/Shell/SymbolFile/DWARF/find-method.cpp
> index 7e7710fd472b..9f8b3df2f31a 100644
> --- a/lldb/test/Shell/SymbolFile/DWARF/find-method.cpp
> +++ b/lldb/test/Shell/SymbolFile/DWARF/find-method.cpp
> @@ -1,6 +1,6 @@
> // REQUIRES: lld
> 
> -// RUN: %clang %s -g -c -o %t.o --target=x86_64-pc-linux -mllvm -accel-tables=Disable
> +// RUN: %clang %s -g -c -o %t.o --target=x86_64-pc-linux -gno-pubnames
> // RUN: ld.lld %t.o -o %t
> // RUN: lldb-test symbols --name=foo --find=function --function-flags=method %t | \
> // RUN:   FileCheck %s
> @@ -9,6 +9,14 @@
> // RUN: lldb-test symbols --name=foo --find=function --function-flags=method %t | \
> // RUN:   FileCheck %s
> 
> +// RUN: %clang %s -c -o %t.o --target=x86_64-pc-linux -gdwarf-5 -gpubnames
> +// RUN: ld.lld %t.o -o %t
> +// RUN: llvm-readobj --sections %t | FileCheck %s --check-prefix NAMES
> +// RUN: lldb-test symbols --name=foo --find=function --function-flags=method %t | \
> +// RUN:   FileCheck %s
> +
> +// NAMES: Name: .debug_names
> +
> // CHECK-DAG: name = "A::foo()", mangled = "_ZN1A3fooEv"
> // CHECK-DAG: name = "B::foo()", mangled = "_ZN1B3fooEv"
> // CHECK-DAG: name = "C::foo()", mangled = "_ZN1C3fooEv"
> 
> diff  --git a/lldb/test/Shell/SymbolFile/DWARF/find-variable-dwo.cpp b/lldb/test/Shell/SymbolFile/DWARF/find-variable-dwo.cpp
> index b2fb1a375cf2..b5d35e4f7883 100644
> --- a/lldb/test/Shell/SymbolFile/DWARF/find-variable-dwo.cpp
> +++ b/lldb/test/Shell/SymbolFile/DWARF/find-variable-dwo.cpp
> @@ -1,14 +1,17 @@
> // REQUIRES: lld
> 
> -// RUN: %clang %s -g -gsplit-dwarf -c -emit-llvm -o - --target=x86_64-pc-linux -DONE | \
> -// RUN:   llc -accel-tables=Dwarf -filetype=obj -split-dwarf-file=%t-1.dwo -o %t-1.o
> +// RUN: %clang %s -gdwarf-5 -gpubnames -gsplit-dwarf -c -emit-llvm -o - --target=x86_64-pc-linux -DONE | \
> +// RUN:   llc -filetype=obj -split-dwarf-file=%t-1.dwo -o %t-1.o
> // RUN: llvm-objcopy --split-dwo=%t-1.dwo %t-1.o
> -// RUN: %clang %s -g -gsplit-dwarf -c -emit-llvm -o - --target=x86_64-pc-linux -DTWO | \
> -// RUN:   llc -accel-tables=Dwarf -filetype=obj -split-dwarf-file=%t-2.dwo -o %t-2.o
> +// RUN: %clang %s -gdwarf-5 -gpubnames -gsplit-dwarf -c -emit-llvm -o - --target=x86_64-pc-linux -DTWO | \
> +// RUN:   llc -filetype=obj -split-dwarf-file=%t-2.dwo -o %t-2.o
> // RUN: llvm-objcopy --split-dwo=%t-2.dwo %t-2.o
> // RUN: ld.lld %t-1.o %t-2.o -o %t
> +// RUN: llvm-readobj --sections %t | FileCheck %s --check-prefix NAMES
> // RUN: lldb-test symbols --name=foo --find=variable %t | FileCheck %s
> 
> +// NAMES: Name: .debug_names
> +
> // CHECK: Found 2 variables:
> #ifdef ONE
> namespace one {
> 
> diff  --git a/lldb/test/Shell/SymbolFile/DWARF/find-variable-file.cpp b/lldb/test/Shell/SymbolFile/DWARF/find-variable-file.cpp
> index 550896cc7078..b11cf1eb1336 100644
> --- a/lldb/test/Shell/SymbolFile/DWARF/find-variable-file.cpp
> +++ b/lldb/test/Shell/SymbolFile/DWARF/find-variable-file.cpp
> @@ -1,7 +1,7 @@
> // REQUIRES: lld
> 
> -// RUN: %clang -g -c -o %t-1.o --target=x86_64-pc-linux -mllvm -accel-tables=Disable %s
> -// RUN: %clang -g -c -o %t-2.o --target=x86_64-pc-linux -mllvm -accel-tables=Disable %S/Inputs/find-variable-file-2.cpp
> +// RUN: %clang -g -c -o %t-1.o --target=x86_64-pc-linux -gno-pubnames %s
> +// RUN: %clang -g -c -o %t-2.o --target=x86_64-pc-linux -gno-pubnames %S/Inputs/find-variable-file-2.cpp
> // RUN: ld.lld %t-1.o %t-2.o -o %t
> // RUN: lldb-test symbols --file=find-variable-file.cpp --find=variable %t | \
> // RUN:   FileCheck --check-prefix=ONE %s
> @@ -18,14 +18,17 @@
> // RUN: lldb-test symbols --file=find-variable-file-2.cpp --find=variable %t | \
> // RUN:   FileCheck --check-prefix=TWO %s
> 
> -// RUN: %clang -g -c -o %t-1.o --target=x86_64-pc-linux -mllvm -accel-tables=Dwarf %s
> -// RUN: %clang -g -c -o %t-2.o --target=x86_64-pc-linux -mllvm -accel-tables=Dwarf %S/Inputs/find-variable-file-2.cpp
> +// RUN: %clang -c -o %t-1.o --target=x86_64-pc-linux -gdwarf-5 -gpubnames %s
> +// RUN: %clang -c -o %t-2.o --target=x86_64-pc-linux -gdwarf-5 -gpubnames %S/Inputs/find-variable-file-2.cpp
> // RUN: ld.lld %t-1.o %t-2.o -o %t
> +// RUN: llvm-readobj --sections %t | FileCheck %s --check-prefix NAMES
> // RUN: lldb-test symbols --file=find-variable-file.cpp --find=variable %t | \
> // RUN:   FileCheck --check-prefix=ONE %s
> // RUN: lldb-test symbols --file=find-variable-file-2.cpp --find=variable %t | \
> // RUN:   FileCheck --check-prefix=TWO %s
> 
> +// NAMES: Name: .debug_names
> +
> // ONE: Found 1 variables:
> namespace one {
> int foo;
> 
> 
> 
> _______________________________________________
> lldb-commits mailing list
> lldb-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits



More information about the lldb-commits mailing list