From 5b5a910d8239e6a7c0c8e9012d5585325f89d88c Mon Sep 17 00:00:00 2001 From: Dave Lee Date: Tue, 2 Apr 2024 10:43:34 -0700 Subject: [PATCH] [lldb] Support breakpoints by property name --- .../LanguageRuntime/Swift/SwiftLanguageRuntimeNames.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lldb/source/Plugins/LanguageRuntime/Swift/SwiftLanguageRuntimeNames.cpp b/lldb/source/Plugins/LanguageRuntime/Swift/SwiftLanguageRuntimeNames.cpp index a8c28bafda509..24d9f04899f82 100644 --- a/lldb/source/Plugins/LanguageRuntime/Swift/SwiftLanguageRuntimeNames.cpp +++ b/lldb/source/Plugins/LanguageRuntime/Swift/SwiftLanguageRuntimeNames.cpp @@ -924,6 +924,9 @@ static bool ParseGlobal(const swift::Demangle::NodePointer &node, case swift::Demangle::Node::Kind::Getter: case swift::Demangle::Node::Kind::Setter: + if (auto *variable_node = child->getFirstChild()) + return ParseFunction(variable_node, identifier, parent_kind, kind); + break; case swift::Demangle::Node::Kind::Function: return ParseFunction(child, identifier, parent_kind, kind); @@ -987,9 +990,6 @@ bool SwiftLanguageRuntime::MethodName::ExtractFunctionBasenameFromMangled( case swift::Demangle::Node::Kind::Getter: case swift::Demangle::Node::Kind::Setter: - // don't handle getters and setters right now... - return false; - case swift::Demangle::Node::Kind::Function: switch (parent_kind) { case swift::Demangle::Node::Kind::BoundGenericClass: