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
___
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:
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
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
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
@@ -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,
+
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
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
@@ -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,
+
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
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
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
@@ -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());
@@ -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());
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
@@ -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());
@@ -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());
@@ -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());
@@ -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());
@@ -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());
@@ -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
@@ -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());
@@ -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
@@ -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());
@@ -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());
@@ -111,7 +111,27 @@ ASTNodeUP DILParser::ParseUnaryExpression() {
llvm_unreachable("invalid token kind");
}
}
- return ParsePrimaryExpression();
+ return ParsePostfixExpression();
+}
+// Parse a postfix_expression.
labath wrote:
```suggestion
/
@@ -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());
@@ -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
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
@@ -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
@@ -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
@@ -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
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
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
@@ -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
@@ -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
@@ -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
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
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
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
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
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
42 matches
Mail list logo