Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ void DebugNamesDWARFIndex::GetTypesWithQuery(
ConstString name = query.GetTypeBasename();
std::vector<lldb_private::CompilerContext> query_context =
query.GetContextRef();
if (query_context.size() <= 1)
if (query_context.size() <= 1 && !query.GetExactMatch())
return GetTypes(name, callback);

llvm::SmallVector<CompilerContext> parent_contexts =
Expand Down
8 changes: 8 additions & 0 deletions lldb/test/Shell/SymbolFile/DWARF/x86/find-basic-type.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
// RUN: ld.lld %t.o -o %t
// RUN: lldb-test symbols --name=foo --find=type %t | \
// RUN: FileCheck --check-prefix=NAME %s
// RUN: lldb-test symbols --name=::foo --find=type %t | \
// RUN: FileCheck --check-prefix=EXACT %s
// RUN: lldb-test symbols --name=foo --context=context --find=type %t | \
// RUN: FileCheck --check-prefix=CONTEXT %s
// RUN: lldb-test symbols --name=not_there --find=type %t | \
Expand All @@ -12,6 +14,8 @@
// RUN: %clang %s -g -c -o %t --target=x86_64-apple-macosx
// RUN: lldb-test symbols --name=foo --find=type %t | \
// RUN: FileCheck --check-prefix=NAME %s
// RUN: lldb-test symbols --name=::foo --find=type %t | \
// RUN: FileCheck --check-prefix=EXACT %s
// RUN: lldb-test symbols --name=foo --context=context --find=type %t | \
// RUN: FileCheck --check-prefix=CONTEXT %s
// RUN: lldb-test symbols --name=not_there --find=type %t | \
Expand All @@ -22,6 +26,8 @@
// 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 --find=type %t | \
// RUN: FileCheck --check-prefix=EXACT %s
// RUN: lldb-test symbols --name=foo --context=context --find=type %t | \
// RUN: FileCheck --check-prefix=CONTEXT %s
// RUN: lldb-test symbols --name=not_there --find=type %t | \
Expand All @@ -31,9 +37,11 @@

// EMPTY: Found 0 types:
// NAME: Found 4 types:
// EXACT: Found 1 types:
// CONTEXT: Found 1 types:
struct foo { };
// NAME-DAG: name = "foo", {{.*}} decl = find-basic-type.cpp:[[@LINE-1]]
// EXACT-DAG: name = "foo", {{.*}} decl = find-basic-type.cpp:[[@LINE-2]]

namespace bar {
int context;
Expand Down
Loading