[Lldb-commits] [lldb] [LLDB] Add field member operators to DIL (PR #138093)

2025-05-23 Thread Kazu Hirata via lldb-commits
kazutakahirata wrote: > I think this should fix the problem: #141259 . Kazu, could you verify that it > does please? @cmtice Yes, it does. I've LGTMed #141259. Thank you for fixing this quickly! https://github.com/llvm/llvm-project/pull/138093 ___

[Lldb-commits] [lldb] [LLDB] Add field member operators to DIL (PR #138093)

2025-05-23 Thread via lldb-commits
cmtice wrote: > > @cmtice I'm getting: > > ``` > > lldb/include/lldb/ValueObject/DILParser.h:121:8: error: private field > > 'm_fragile_ivar' is not used [-Werror,-Wunused-private-field] > > 121 | bool m_fragile_ivar; > > |^ > > lldb/include/lldb/ValueObject/DILParser.h:122:8:

[Lldb-commits] [lldb] [LLDB] Add field member operators to DIL (PR #138093)

2025-05-23 Thread via lldb-commits
cmtice wrote: > @cmtice I'm getting: > > ``` > lldb/include/lldb/ValueObject/DILParser.h:121:8: error: private field > 'm_fragile_ivar' is not used [-Werror,-Wunused-private-field] > 121 | bool m_fragile_ivar; > |^ > lldb/include/lldb/ValueObject/DILParser.h:122:8: error: priv

[Lldb-commits] [lldb] [LLDB] Add field member operators to DIL (PR #138093)

2025-05-23 Thread Kazu Hirata via lldb-commits
kazutakahirata wrote: @cmtice I'm getting: ``` lldb/include/lldb/ValueObject/DILParser.h:121:8: error: private field 'm_fragile_ivar' is not used [-Werror,-Wunused-private-field] 121 | bool m_fragile_ivar; |^ lldb/include/lldb/ValueObject/DILParser.h:122:8: error: private fiel

[Lldb-commits] [lldb] [LLDB] Add field member operators to DIL (PR #138093)

2025-05-23 Thread via lldb-commits
https://github.com/cmtice closed https://github.com/llvm/llvm-project/pull/138093 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [LLDB] Add field member operators to DIL (PR #138093)

2025-05-22 Thread via lldb-commits
@@ -88,6 +89,42 @@ class IdentifierNode : public ASTNode { std::string m_name; }; +class MemberOfNode : public ASTNode { +public: + MemberOfNode(uint32_t location, ASTNodeUP base, bool is_arrow, + std::string name, lldb::DynamicValueType use_dynamic, +

[Lldb-commits] [lldb] [LLDB] Add field member operators to DIL (PR #138093)

2025-05-22 Thread via lldb-commits
https://github.com/cmtice updated https://github.com/llvm/llvm-project/pull/138093 >From fe9ac0fa05bb43ea718214746f0ea9b7eefc929a Mon Sep 17 00:00:00 2001 From: Caroline Tice Date: Thu, 1 May 2025 00:05:57 -0700 Subject: [PATCH 1/5] [LLDB] Add field member operators to DIL Add the arrow and pe

[Lldb-commits] [lldb] [LLDB] Add field member operators to DIL (PR #138093)

2025-05-22 Thread Pavel Labath via lldb-commits
https://github.com/labath edited https://github.com/llvm/llvm-project/pull/138093 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [LLDB] Add field member operators to DIL (PR #138093)

2025-05-22 Thread Pavel Labath via lldb-commits
@@ -88,6 +89,42 @@ class IdentifierNode : public ASTNode { std::string m_name; }; +class MemberOfNode : public ASTNode { +public: + MemberOfNode(uint32_t location, ASTNodeUP base, bool is_arrow, + std::string name, lldb::DynamicValueType use_dynamic, +

[Lldb-commits] [lldb] [LLDB] Add field member operators to DIL (PR #138093)

2025-05-22 Thread Pavel Labath via lldb-commits
https://github.com/labath commented: I think this is good strategy -- take the existing implementation of `.` and improve that later. I have one comment about the location of the members, but otherwise, I think this looks good. https://github.com/llvm/llvm-project/pull/138093

[Lldb-commits] [lldb] [LLDB] Add field member operators to DIL (PR #138093)

2025-05-17 Thread via lldb-commits
https://github.com/cmtice updated https://github.com/llvm/llvm-project/pull/138093 >From fe9ac0fa05bb43ea718214746f0ea9b7eefc929a Mon Sep 17 00:00:00 2001 From: Caroline Tice Date: Thu, 1 May 2025 00:05:57 -0700 Subject: [PATCH 1/4] [LLDB] Add field member operators to DIL Add the arrow and pe

[Lldb-commits] [lldb] [LLDB] Add field member operators to DIL (PR #138093)

2025-05-17 Thread via lldb-commits
cmtice wrote: I believe I have addressed all the review comments so far. Please take another look. Thanks! https://github.com/llvm/llvm-project/pull/138093 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[Lldb-commits] [lldb] [LLDB] Add field member operators to DIL (PR #138093)

2025-05-13 Thread Pavel Labath via lldb-commits
@@ -272,4 +272,66 @@ Interpreter::Visit(const UnaryOpNode *node) { m_expr, "invalid ast: unexpected binary operator", node->GetLocation()); } +llvm::Expected +Interpreter::Visit(const MemberOfNode *node) { + Status error; + auto base_or_err = Evaluate(node->GetBase());

[Lldb-commits] [lldb] [LLDB] Add field member operators to DIL (PR #138093)

2025-05-13 Thread Pavel Labath via lldb-commits
@@ -272,4 +272,66 @@ Interpreter::Visit(const UnaryOpNode *node) { m_expr, "invalid ast: unexpected binary operator", node->GetLocation()); } +llvm::Expected +Interpreter::Visit(const MemberOfNode *node) { + Status error; + auto base_or_err = Evaluate(node->GetBase());

[Lldb-commits] [lldb] [LLDB] Add field member operators to DIL (PR #138093)

2025-05-12 Thread via lldb-commits
https://github.com/cmtice updated https://github.com/llvm/llvm-project/pull/138093 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-se

[Lldb-commits] [lldb] [LLDB] Add field member operators to DIL (PR #138093)

2025-05-12 Thread via lldb-commits
@@ -272,4 +272,66 @@ Interpreter::Visit(const UnaryOpNode *node) { m_expr, "invalid ast: unexpected binary operator", node->GetLocation()); } +llvm::Expected +Interpreter::Visit(const MemberOfNode *node) { + Status error; + auto base_or_err = Evaluate(node->GetBase());

[Lldb-commits] [lldb] [LLDB] Add field member operators to DIL (PR #138093)

2025-05-12 Thread via lldb-commits
@@ -272,4 +272,66 @@ Interpreter::Visit(const UnaryOpNode *node) { m_expr, "invalid ast: unexpected binary operator", node->GetLocation()); } +llvm::Expected +Interpreter::Visit(const MemberOfNode *node) { + Status error; + auto base_or_err = Evaluate(node->GetBase());

[Lldb-commits] [lldb] [LLDB] Add field member operators to DIL (PR #138093)

2025-05-12 Thread via lldb-commits
@@ -272,4 +272,66 @@ Interpreter::Visit(const UnaryOpNode *node) { m_expr, "invalid ast: unexpected binary operator", node->GetLocation()); } +llvm::Expected +Interpreter::Visit(const MemberOfNode *node) { + Status error; + auto base_or_err = Evaluate(node->GetBase());

[Lldb-commits] [lldb] [LLDB] Add field member operators to DIL (PR #138093)

2025-05-12 Thread Pavel Labath via lldb-commits
@@ -272,4 +272,66 @@ Interpreter::Visit(const UnaryOpNode *node) { m_expr, "invalid ast: unexpected binary operator", node->GetLocation()); } +llvm::Expected +Interpreter::Visit(const MemberOfNode *node) { + Status error; + auto base_or_err = Evaluate(node->GetBase());

[Lldb-commits] [lldb] [LLDB] Add field member operators to DIL (PR #138093)

2025-05-12 Thread Pavel Labath via lldb-commits
@@ -272,4 +272,66 @@ Interpreter::Visit(const UnaryOpNode *node) { m_expr, "invalid ast: unexpected binary operator", node->GetLocation()); } +llvm::Expected +Interpreter::Visit(const MemberOfNode *node) { + Status error; + auto base_or_err = Evaluate(node->GetBase());

[Lldb-commits] [lldb] [LLDB] Add field member operators to DIL (PR #138093)

2025-05-12 Thread Pavel Labath via lldb-commits
@@ -88,6 +89,29 @@ class IdentifierNode : public ASTNode { std::string m_name; }; +class MemberOfNode : public ASTNode { +public: + MemberOfNode(uint32_t location, ASTNodeUP base, bool is_arrow, + std::string name) + : ASTNode(location, NodeKind::eMemberO

[Lldb-commits] [lldb] [LLDB] Add field member operators to DIL (PR #138093)

2025-05-12 Thread Pavel Labath via lldb-commits
@@ -272,4 +272,66 @@ Interpreter::Visit(const UnaryOpNode *node) { m_expr, "invalid ast: unexpected binary operator", node->GetLocation()); } +llvm::Expected +Interpreter::Visit(const MemberOfNode *node) { + Status error; + auto base_or_err = Evaluate(node->GetBase());

[Lldb-commits] [lldb] [LLDB] Add field member operators to DIL (PR #138093)

2025-05-12 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,59 @@ +int +main(int argc, char**argv) +{ + int x = 2; + struct Sx { +int x; +int& r; +char y; + } s{1, x, 2}; + + Sx& sr = s; + Sx* sp = &s; + + Sx sarr[2] = {{5, x, 2}, {1, x, 3}}; + + using SxAlias = Sx; + SxAlias sa{3, x, 4}; + + return 0; // Se

[Lldb-commits] [lldb] [LLDB] Add field member operators to DIL (PR #138093)

2025-05-12 Thread Pavel Labath via lldb-commits
@@ -272,4 +272,66 @@ Interpreter::Visit(const UnaryOpNode *node) { m_expr, "invalid ast: unexpected binary operator", node->GetLocation()); } +llvm::Expected +Interpreter::Visit(const MemberOfNode *node) { + Status error; + auto base_or_err = Evaluate(node->GetBase());

[Lldb-commits] [lldb] [LLDB] Add field member operators to DIL (PR #138093)

2025-05-12 Thread Pavel Labath via lldb-commits
@@ -272,4 +272,66 @@ Interpreter::Visit(const UnaryOpNode *node) { m_expr, "invalid ast: unexpected binary operator", node->GetLocation()); } +llvm::Expected +Interpreter::Visit(const MemberOfNode *node) { + Status error; + auto base_or_err = Evaluate(node->GetBase());

[Lldb-commits] [lldb] [LLDB] Add field member operators to DIL (PR #138093)

2025-05-12 Thread Pavel Labath via lldb-commits
@@ -111,7 +111,27 @@ ASTNodeUP DILParser::ParseUnaryExpression() { llvm_unreachable("invalid token kind"); } } - return ParsePrimaryExpression(); + return ParsePostfixExpression(); +} +// Parse a postfix_expression. labath wrote: ```suggestion /

[Lldb-commits] [lldb] [LLDB] Add field member operators to DIL (PR #138093)

2025-05-12 Thread Pavel Labath via lldb-commits
@@ -272,4 +272,66 @@ Interpreter::Visit(const UnaryOpNode *node) { m_expr, "invalid ast: unexpected binary operator", node->GetLocation()); } +llvm::Expected +Interpreter::Visit(const MemberOfNode *node) { + Status error; + auto base_or_err = Evaluate(node->GetBase());

[Lldb-commits] [lldb] [LLDB] Add field member operators to DIL (PR #138093)

2025-05-12 Thread Pavel Labath via lldb-commits
@@ -272,4 +272,66 @@ Interpreter::Visit(const UnaryOpNode *node) { m_expr, "invalid ast: unexpected binary operator", node->GetLocation()); } +llvm::Expected +Interpreter::Visit(const MemberOfNode *node) { + Status error; labath wrote: Declare it where

[Lldb-commits] [lldb] [LLDB] Add field member operators to DIL (PR #138093)

2025-05-07 Thread via lldb-commits
cmtice wrote: > A very predictable question. Why is the implementation of this more > complicated than `base->GetChildMemberWithName(name)`. I think it shouldn't > be. > > To avoid repeating the same points over and over, I suggest going through the > discussion on the dereference/addressof p

[Lldb-commits] [lldb] [LLDB] Add field member operators to DIL (PR #138093)

2025-05-07 Thread via lldb-commits
@@ -88,6 +89,29 @@ class IdentifierNode : public ASTNode { std::string m_name; }; +class MemberOfNode : public ASTNode { +public: + MemberOfNode(uint32_t location, ASTNodeUP base, bool is_arrow, + ConstString name) + : ASTNode(location, NodeKind::eMemberO

[Lldb-commits] [lldb] [LLDB] Add field member operators to DIL (PR #138093)

2025-05-07 Thread via lldb-commits
@@ -88,6 +89,29 @@ class IdentifierNode : public ASTNode { std::string m_name; }; +class MemberOfNode : public ASTNode { +public: + MemberOfNode(uint32_t location, ASTNodeUP base, bool is_arrow, + ConstString name) + : ASTNode(location, NodeKind::eMemberO

[Lldb-commits] [lldb] [LLDB] Add field member operators to DIL (PR #138093)

2025-05-07 Thread via lldb-commits
@@ -272,4 +272,204 @@ Interpreter::Visit(const UnaryOpNode *node) { m_expr, "invalid ast: unexpected binary operator", node->GetLocation()); } +lldb::ValueObjectSP +Interpreter::EvaluateMemberOf(lldb::ValueObjectSP value, + const std::vector

[Lldb-commits] [lldb] [LLDB] Add field member operators to DIL (PR #138093)

2025-05-07 Thread via lldb-commits
https://github.com/cmtice updated https://github.com/llvm/llvm-project/pull/138093 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-se

[Lldb-commits] [lldb] [LLDB] Add field member operators to DIL (PR #138093)

2025-05-02 Thread Pavel Labath via lldb-commits
https://github.com/labath edited https://github.com/llvm/llvm-project/pull/138093 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [LLDB] Add field member operators to DIL (PR #138093)

2025-05-02 Thread Pavel Labath via lldb-commits
@@ -88,6 +89,29 @@ class IdentifierNode : public ASTNode { std::string m_name; }; +class MemberOfNode : public ASTNode { +public: + MemberOfNode(uint32_t location, ASTNodeUP base, bool is_arrow, + ConstString name) + : ASTNode(location, NodeKind::eMemberO

[Lldb-commits] [lldb] [LLDB] Add field member operators to DIL (PR #138093)

2025-05-02 Thread Pavel Labath via lldb-commits
@@ -88,6 +89,29 @@ class IdentifierNode : public ASTNode { std::string m_name; }; +class MemberOfNode : public ASTNode { +public: + MemberOfNode(uint32_t location, ASTNodeUP base, bool is_arrow, + ConstString name) + : ASTNode(location, NodeKind::eMemberO

[Lldb-commits] [lldb] [LLDB] Add field member operators to DIL (PR #138093)

2025-05-02 Thread Pavel Labath via lldb-commits
@@ -272,4 +272,204 @@ Interpreter::Visit(const UnaryOpNode *node) { m_expr, "invalid ast: unexpected binary operator", node->GetLocation()); } +lldb::ValueObjectSP +Interpreter::EvaluateMemberOf(lldb::ValueObjectSP value, + const std::vector

[Lldb-commits] [lldb] [LLDB] Add field member operators to DIL (PR #138093)

2025-05-02 Thread Pavel Labath via lldb-commits
https://github.com/labath commented: A very predictable question. Why is the implementation of this more complicated than `base->GetChildMemberWithName(name)`. I think it shouldn't be. To avoid repeating the same points over and over, I suggest going through the discussion on the dereference/a

[Lldb-commits] [lldb] [LLDB] Add field member operators to DIL (PR #138093)

2025-05-01 Thread via lldb-commits
github-actions[bot] wrote: :warning: Python code formatter, darker found issues in your code. :warning: You can test this locally with the following command: ``bash darker --check --diff -r HEAD~1...HEAD lldb/test/API/commands/frame/var-dil/basics/MemberOf/TestFrameVarDILMemberOf

[Lldb-commits] [lldb] [LLDB] Add field member operators to DIL (PR #138093)

2025-05-01 Thread via lldb-commits
https://github.com/cmtice created https://github.com/llvm/llvm-project/pull/138093 Add the arrow and period operators, allowing DIL to find and access member fields. >From fe9ac0fa05bb43ea718214746f0ea9b7eefc929a Mon Sep 17 00:00:00 2001 From: Caroline Tice Date: Thu, 1 May 2025 00:05:57 -070

[Lldb-commits] [lldb] [LLDB] Add field member operators to DIL (PR #138093)

2025-05-01 Thread via lldb-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff HEAD~1 HEAD --extensions cpp,h -- lldb/test/API/commands/frame/var-dil/basics/MemberO

[Lldb-commits] [lldb] [LLDB] Add field member operators to DIL (PR #138093)

2025-05-01 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: None (cmtice) Changes Add the arrow and period operators, allowing DIL to find and access member fields. --- Patch is 28.98 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/138093.diff 18 Files