[Lldb-commits] [lldb] [LLDB] Add bit extraction to DIL (PR #141422)

2025-05-25 Thread Ilia Kuklin via lldb-commits
https://github.com/kuilpd created https://github.com/llvm/llvm-project/pull/141422 None >From b093c5fb20c56251c61235c748b673ce59840173 Mon Sep 17 00:00:00 2001 From: Ilia Kuklin Date: Tue, 20 May 2025 17:58:01 +0500 Subject: [PATCH] [LLDB] Add BitExtraction node to DIL --- lldb/include/lldb/

[Lldb-commits] [lldb] [LLDB] Add array subscription and integer parsing to DIL (PR #141102)

2025-05-25 Thread Ilia Kuklin via lldb-commits
https://github.com/kuilpd closed https://github.com/llvm/llvm-project/pull/141102 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [LLDB] Add array subscription and integer parsing to DIL (PR #141102)

2025-05-25 Thread Ilia Kuklin via lldb-commits
https://github.com/kuilpd edited https://github.com/llvm/llvm-project/pull/141102 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [LLDB] Add array subscription and integer parsing to DIL (PR #141102)

2025-05-25 Thread Ilia Kuklin via lldb-commits
https://github.com/kuilpd updated https://github.com/llvm/llvm-project/pull/141102 >From 5210b8b00dfd05d092b3519cbb0a5480b3abe534 Mon Sep 17 00:00:00 2001 From: Ilia Kuklin Date: Thu, 22 May 2025 16:15:11 +0500 Subject: [PATCH 1/2] [LLDB] Add array subscription and integer parsing to DIL (#138

[Lldb-commits] [lldb] [LLDB] Add array subscription and integer parsing to DIL (PR #141102)

2025-05-22 Thread Ilia Kuklin via lldb-commits
https://github.com/kuilpd edited https://github.com/llvm/llvm-project/pull/141102 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [LLDB] Add array subscription and integer parsing to DIL (PR #141102)

2025-05-22 Thread Ilia Kuklin via lldb-commits
kuilpd wrote: @labath This code ``` llvm::Expected num_children = synthetic->GetNumChildren(child_idx + 1); ``` didn't work for `std::vector` on Windows on AArch64, got a buildbot error there: https://lab.llvm.org/buildbot/#/builders/141/builds/8906 ``` AssertionError: ':1:7: array index

[Lldb-commits] [lldb] [LLDB] Add array subscription and integer parsing to DIL (PR #141102)

2025-05-22 Thread Ilia Kuklin via lldb-commits
https://github.com/kuilpd created https://github.com/llvm/llvm-project/pull/141102 None >From ad2c40ea689c71074237287989fa7ae01bd428e4 Mon Sep 17 00:00:00 2001 From: Ilia Kuklin Date: Thu, 22 May 2025 16:15:11 +0500 Subject: [PATCH 1/2] [LLDB] Add array subscription and integer parsing to DIL

[Lldb-commits] [lldb] Revert "[LLDB] Add array subscription and integer parsing to DIL" (PR #141059)

2025-05-22 Thread Ilia Kuklin via lldb-commits
https://github.com/kuilpd closed https://github.com/llvm/llvm-project/pull/141059 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Revert "[LLDB] Add array subscription and integer parsing to DIL" (PR #141059)

2025-05-22 Thread Ilia Kuklin via lldb-commits
https://github.com/kuilpd created https://github.com/llvm/llvm-project/pull/141059 Reverts llvm/llvm-project#138551 >From b2e110036df39bb33163b5cd6c8dacf9253b6b33 Mon Sep 17 00:00:00 2001 From: Ilia Kuklin Date: Thu, 22 May 2025 17:29:24 +0500 Subject: [PATCH] Revert "[LLDB] Add array subscrip

[Lldb-commits] [lldb] [LLDB] Add array subscription and integer parsing to DIL (PR #138551)

2025-05-22 Thread Ilia Kuklin via lldb-commits
https://github.com/kuilpd closed https://github.com/llvm/llvm-project/pull/138551 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [LLDB] Add array subscription and integer parsing to DIL (PR #138551)

2025-05-20 Thread Ilia Kuklin via lldb-commits
@@ -272,4 +272,67 @@ Interpreter::Visit(const UnaryOpNode *node) { m_expr, "invalid ast: unexpected binary operator", node->GetLocation()); } +llvm::Expected +Interpreter::Visit(const ArraySubscriptNode *node) { + auto lhs_or_err = Evaluate(node->GetBase()); + if (!lhs

[Lldb-commits] [lldb] [LLDB] Add array subscription and integer parsing to DIL (PR #138551)

2025-05-20 Thread Ilia Kuklin via lldb-commits
https://github.com/kuilpd updated https://github.com/llvm/llvm-project/pull/138551 >From ad204cdfd226ca2a886c5475775fe67b29a70926 Mon Sep 17 00:00:00 2001 From: Ilia Kuklin Date: Wed, 30 Apr 2025 22:03:50 +0500 Subject: [PATCH 1/7] [LLDB] Add array subscription and integer parsing to DIL ---

[Lldb-commits] [lldb] [LLDB] Add array subscription and integer parsing to DIL (PR #138551)

2025-05-16 Thread Ilia Kuklin via lldb-commits
@@ -272,4 +272,67 @@ Interpreter::Visit(const UnaryOpNode *node) { m_expr, "invalid ast: unexpected binary operator", node->GetLocation()); } +llvm::Expected +Interpreter::Visit(const ArraySubscriptNode *node) { + auto lhs_or_err = Evaluate(node->GetBase()); + if (!lhs

[Lldb-commits] [lldb] [LLDB] Add array subscription and integer parsing to DIL (PR #138551)

2025-05-16 Thread Ilia Kuklin via lldb-commits
https://github.com/kuilpd updated https://github.com/llvm/llvm-project/pull/138551 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 array subscription and integer parsing to DIL (PR #138551)

2025-05-16 Thread Ilia Kuklin via lldb-commits
@@ -111,7 +111,42 @@ ASTNodeUP DILParser::ParseUnaryExpression() { llvm_unreachable("invalid token kind"); } } - return ParsePrimaryExpression(); + return ParsePostfixExpression(); +} + +// Parse a postfix_expression. +// +// postfix_expression: +//primary_ex

[Lldb-commits] [lldb] [LLDB] Add array subscription and integer parsing to DIL (PR #138551)

2025-05-15 Thread Ilia Kuklin via lldb-commits
@@ -272,4 +272,67 @@ Interpreter::Visit(const UnaryOpNode *node) { m_expr, "invalid ast: unexpected binary operator", node->GetLocation()); } +llvm::Expected +Interpreter::Visit(const ArraySubscriptNode *node) { + auto lhs_or_err = Evaluate(node->GetBase()); + if (!lhs

[Lldb-commits] [lldb] [LLDB] Add array subscription and integer parsing to DIL (PR #138551)

2025-05-15 Thread Ilia Kuklin via lldb-commits
@@ -111,7 +111,42 @@ ASTNodeUP DILParser::ParseUnaryExpression() { llvm_unreachable("invalid token kind"); } } - return ParsePrimaryExpression(); + return ParsePostfixExpression(); +} + +// Parse a postfix_expression. +// +// postfix_expression: +//primary_ex

[Lldb-commits] [lldb] [LLDB] Add array subscription and integer parsing to DIL (PR #138551)

2025-05-15 Thread Ilia Kuklin via lldb-commits
kuilpd wrote: I think I addressed everything I could, please take a look again. https://github.com/llvm/llvm-project/pull/138551 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [LLDB] Add array subscription and integer parsing to DIL (PR #138551)

2025-05-15 Thread Ilia Kuklin via lldb-commits
@@ -272,4 +272,67 @@ Interpreter::Visit(const UnaryOpNode *node) { m_expr, "invalid ast: unexpected binary operator", node->GetLocation()); } +llvm::Expected +Interpreter::Visit(const ArraySubscriptNode *node) { + auto lhs_or_err = Evaluate(node->GetBase()); + if (!lhs

[Lldb-commits] [lldb] [LLDB] Add array subscription and integer parsing to DIL (PR #138551)

2025-05-15 Thread Ilia Kuklin via lldb-commits
@@ -272,4 +272,67 @@ Interpreter::Visit(const UnaryOpNode *node) { m_expr, "invalid ast: unexpected binary operator", node->GetLocation()); } +llvm::Expected +Interpreter::Visit(const ArraySubscriptNode *node) { + auto lhs_or_err = Evaluate(node->GetBase()); + if (!lhs

[Lldb-commits] [lldb] [LLDB] Add array subscription and integer parsing to DIL (PR #138551)

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

[Lldb-commits] [lldb] [lldb] Restore ObjC incomplete type dereferencing fix (PR #139567)

2025-05-12 Thread Ilia Kuklin via lldb-commits
https://github.com/kuilpd closed https://github.com/llvm/llvm-project/pull/139567 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Restore ObjC incomplete type dereferencing fix (PR #139567)

2025-05-12 Thread Ilia Kuklin via lldb-commits
kuilpd wrote: Thank you! https://github.com/llvm/llvm-project/pull/139567 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Restore ObjC incomplete type dereferencing fix (PR #139567)

2025-05-12 Thread Ilia Kuklin via lldb-commits
https://github.com/kuilpd ready_for_review https://github.com/llvm/llvm-project/pull/139567 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Restore ObjC incomplete type dereferencing fix (PR #139567)

2025-05-12 Thread Ilia Kuklin via lldb-commits
kuilpd wrote: @felipepiovezan I don't have a machine to run ObjC tests on, could you apply this patch and see if it fixes the issue in #135843 ? https://github.com/llvm/llvm-project/pull/139567 ___ lldb-commits mailing list lldb-commits@lists.llvm.or

[Lldb-commits] [lldb] [lldb] Restore ObjC incomplete type dereferencing fix (PR #139567)

2025-05-12 Thread Ilia Kuklin via lldb-commits
https://github.com/kuilpd created https://github.com/llvm/llvm-project/pull/139567 Attempt an ObjC incomplete type fix even if `GetDereferencedType` returns an error. Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e;

[Lldb-commits] [lldb] [lldb][TypeSystemClang] Allow arrays to be dereferenced in C/C++. (PR #135843)

2025-05-12 Thread Ilia Kuklin via lldb-commits
https://github.com/kuilpd closed https://github.com/llvm/llvm-project/pull/135843 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][TypeSystemClang] Allow arrays to be dereferenced in C/C++. (PR #135843)

2025-05-09 Thread Ilia Kuklin via lldb-commits
https://github.com/kuilpd edited https://github.com/llvm/llvm-project/pull/135843 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][TypeSystemClang] Allow arrays to be dereferenced in C/C++. (PR #135843)

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

[Lldb-commits] [lldb] [lldb][TypeSystemClang] Allow arrays to be dereferenced in C/C++. (PR #135843)

2025-05-09 Thread Ilia Kuklin via lldb-commits
@@ -2794,47 +2794,31 @@ ValueObjectSP ValueObject::Dereference(Status &error) { if (m_deref_valobj) return m_deref_valobj->GetSP(); - const bool is_pointer_or_reference_type = IsPointerOrReferenceType(); - if (is_pointer_or_reference_type) { -bool omit_empty_base_c

[Lldb-commits] [lldb] [LLDB] Add array subscription and integer parsing to DIL (PR #138551)

2025-05-08 Thread Ilia Kuklin via lldb-commits
kuilpd wrote: > Because I wanted to avoid this getting bogged down in the discussion about > the types of numbers. I don't really mind the "extra capability" of indexing > an array with a another variable. The part I have problem with is the > precedent it sets about the representation of numb

[Lldb-commits] [lldb] [LLDB] Add array subscription and integer parsing to DIL (PR #138551)

2025-05-08 Thread Ilia Kuklin via lldb-commits
https://github.com/kuilpd updated https://github.com/llvm/llvm-project/pull/138551 >From cfe7359bd16c1e87932e2ebb8bcdfc88130e9729 Mon Sep 17 00:00:00 2001 From: Ilia Kuklin Date: Wed, 30 Apr 2025 22:03:50 +0500 Subject: [PATCH 1/4] [LLDB] Add array subscription and integer parsing to DIL ---

[Lldb-commits] [lldb] [LLDB] Add array subscription and integer parsing to DIL (PR #138551)

2025-05-06 Thread Ilia Kuklin via lldb-commits
kuilpd wrote: > I don't have an answer to that, but I do know that it's possible to index > pointers in the current implementation. I suggest checking out how it > achieves that and seeing if it can be translated to here. I found `GetSyntheticArrayMember`, hopefully this is the one you're refe

[Lldb-commits] [lldb] [LLDB] Add array subscription and integer parsing to DIL (PR #138551)

2025-05-06 Thread Ilia Kuklin via lldb-commits
https://github.com/kuilpd updated https://github.com/llvm/llvm-project/pull/138551 >From cfe7359bd16c1e87932e2ebb8bcdfc88130e9729 Mon Sep 17 00:00:00 2001 From: Ilia Kuklin Date: Wed, 30 Apr 2025 22:03:50 +0500 Subject: [PATCH 1/3] [LLDB] Add array subscription and integer parsing to DIL ---

[Lldb-commits] [lldb] [LLDB] Add array subscription and integer parsing to DIL (PR #138551)

2025-05-06 Thread Ilia Kuklin via lldb-commits
@@ -24,6 +28,8 @@ qualified_id = ["::"] [nested_name_specifier] unqualified_id identifier = ? C99 Identifier ? ; +numeric_literal = ? C99 Integer constant ? ; kuilpd wrote: Yeah, `0b...` and `0o...` formats supported here are missing from C99. How should I

[Lldb-commits] [lldb] [LLDB] Add array subscription and integer parsing to DIL (PR #138551)

2025-05-06 Thread Ilia Kuklin via lldb-commits
kuilpd wrote: > Apart from the pointer indexing question, this PR also opens the question of > "how should the numbers be represented". Here you represent them as > ValueObjects, which means you have to give them types, which means you have > to find a type system for them, ... Why is that a

[Lldb-commits] [lldb] [LLDB] Add array subscription and integer parsing to DIL (PR #138551)

2025-05-06 Thread Ilia Kuklin via lldb-commits
@@ -280,6 +311,52 @@ void DILParser::BailOut(const std::string &error, uint32_t loc, m_dil_lexer.ResetTokenIdx(m_dil_lexer.NumLexedTokens() - 1); } +// Parse a numeric_literal. +// +// numeric_literal: +//? Token::numeric_constant ? +// +ASTNodeUP DILParser::ParseNumer

[Lldb-commits] [lldb] [LLDB] Add array subscription and integer parsing to DIL (PR #138551)

2025-05-06 Thread Ilia Kuklin via lldb-commits
@@ -111,7 +111,36 @@ ASTNodeUP DILParser::ParseUnaryExpression() { llvm_unreachable("invalid token kind"); } } - return ParsePrimaryExpression(); + return ParsePostfixExpression(); +} + +// Parse a postfix_expression. +// +// postfix_expression: +//primary_ex

[Lldb-commits] [lldb] [LLDB] Add array subscription and integer parsing to DIL (PR #138551)

2025-05-05 Thread Ilia Kuklin via lldb-commits
kuilpd wrote: > Swift doesn't have pointers really. It does pass some things by value (called > structs) and others by reference (called classes), but it doesn't let you > know how. So this ambiguity between "pointer to object" and "pointer to > contiguous buffer of objects" doesn't come up.

[Lldb-commits] [lldb] [LLDB] Add array subscription and integer parsing to DIL (PR #138551)

2025-05-05 Thread Ilia Kuklin via lldb-commits
kuilpd wrote: > I don't have an answer to that, but I do know that it's possible to index > pointers in the current implementation. I suggest checking out how it > achieves that and seeing if it can be translated to here. Ah, I will look into this further, thanks. https://github.com/llvm/llvm

[Lldb-commits] [lldb] [LLDB] Add array subscription and integer parsing to DIL (PR #138551)

2025-05-05 Thread Ilia Kuklin via lldb-commits
kuilpd wrote: One thing I'm not sure about here: will converting array type to a pointer, adding the index and then dereferencing work for Swift? I tried just doing `base->GetChildAtIndex(index)`, but it doesn't work when the base is a pointer and it also returns an error when index is out of b

[Lldb-commits] [lldb] [LLDB] Add array subscription and integer parsing to DIL (PR #138551)

2025-05-05 Thread Ilia Kuklin via lldb-commits
https://github.com/kuilpd created https://github.com/llvm/llvm-project/pull/138551 None >From cfe7359bd16c1e87932e2ebb8bcdfc88130e9729 Mon Sep 17 00:00:00 2001 From: Ilia Kuklin Date: Wed, 30 Apr 2025 22:03:50 +0500 Subject: [PATCH] [LLDB] Add array subscription and integer parsing to DIL ---

[Lldb-commits] [lldb] [LLDB] Fix `ValueObject::AddressOf()` return value (PR #137688)

2025-05-05 Thread Ilia Kuklin via lldb-commits
https://github.com/kuilpd closed https://github.com/llvm/llvm-project/pull/137688 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [LLDB] Fix `ValueObject::AddressOf()` return value (PR #137688)

2025-05-05 Thread Ilia Kuklin via lldb-commits
kuilpd wrote: @labath Is this okay to merge now? https://github.com/llvm/llvm-project/pull/137688 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][TypeSystemClang] Allow arrays to be dereferenced in C/C++. (PR #135843)

2025-05-05 Thread Ilia Kuklin via lldb-commits
https://github.com/kuilpd updated https://github.com/llvm/llvm-project/pull/135843 >From 7cca4bf228ab2b882a1a6487eb24948cba9e5b12 Mon Sep 17 00:00:00 2001 From: Ilia Kuklin Date: Wed, 16 Apr 2025 00:30:51 +0500 Subject: [PATCH 1/5] [lldb][TypeSystemClang] Add a function `IsValidDereferenceType

[Lldb-commits] [lldb] [lldb][TypeSystemClang] Allow arrays to be dereferenced in C/C++. (PR #135843)

2025-05-05 Thread Ilia Kuklin via lldb-commits
@@ -88,7 +88,7 @@ def cleanup(): self.expect( "frame variable *number_not_engaged", error=True, -substrs=["not a pointer or reference type"], +substrs=["dereference failed: not a"], kuilpd wrote: I had a

[Lldb-commits] [lldb] [LLDB] Fix `ValueObject::AddressOf()` return value (PR #137688)

2025-05-01 Thread Ilia Kuklin via lldb-commits
https://github.com/kuilpd ready_for_review https://github.com/llvm/llvm-project/pull/137688 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][TypeSystemClang] Allow arrays to be dereferenced in C/C++. (PR #135843)

2025-04-30 Thread Ilia Kuklin via lldb-commits
https://github.com/kuilpd updated https://github.com/llvm/llvm-project/pull/135843 >From 7cca4bf228ab2b882a1a6487eb24948cba9e5b12 Mon Sep 17 00:00:00 2001 From: Ilia Kuklin Date: Wed, 16 Apr 2025 00:30:51 +0500 Subject: [PATCH 1/4] [lldb][TypeSystemClang] Add a function `IsValidDereferenceType

[Lldb-commits] [lldb] [LLDB] Fix `ValueObject::AddressOf()` return value (PR #137688)

2025-04-30 Thread Ilia Kuklin via lldb-commits
https://github.com/kuilpd updated https://github.com/llvm/llvm-project/pull/137688 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 unary operators Dereference and AddressOf to DIL (PR #134428)

2025-04-29 Thread Ilia Kuklin via lldb-commits
https://github.com/kuilpd closed https://github.com/llvm/llvm-project/pull/134428 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [LLDB] Fix `ValueObject::AddressOf()` return value (PR #137688)

2025-04-28 Thread Ilia Kuklin via lldb-commits
kuilpd wrote: If I apply code formatter to the test, it breaks lines and no longer works. Should I rewrite it without using inline tests? https://github.com/llvm/llvm-project/pull/137688 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https:

[Lldb-commits] [lldb] [LLDB] Add unary operators Dereference and AddressOf to DIL (PR #134428)

2025-04-28 Thread Ilia Kuklin via lldb-commits
@@ -232,4 +263,105 @@ Interpreter::Visit(const IdentifierNode *node) { return identifier; } -} // namespace lldb_private::dil +llvm::Expected +Interpreter::Visit(const UnaryOpNode *node) { + FlowAnalysis rhs_flow( + /* address_of_is_pending */ node->kind() == UnaryOpKi

[Lldb-commits] [lldb] [LLDB] Fix `ValueObject::AddressOf()` return value (PR #137688)

2025-04-28 Thread Ilia Kuklin via lldb-commits
https://github.com/kuilpd created https://github.com/llvm/llvm-project/pull/137688 `ValueObject::AddressOf()` used to return address as a value which has it's own address, allowing to do `value.AddressOf().AddressOf()`. This patch makes the return address a simple const value. >From 5108154682

[Lldb-commits] [lldb] [lldb] Make ValueObject::Dereference less aggressive (PR #137311)

2025-04-28 Thread Ilia Kuklin via lldb-commits
https://github.com/kuilpd approved this pull request. I see, makes sense now, thank you. https://github.com/llvm/llvm-project/pull/137311 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-com

[Lldb-commits] [lldb] [lldb] Make ValueObject::Dereference less aggressive (PR #137311)

2025-04-25 Thread Ilia Kuklin via lldb-commits
https://github.com/kuilpd edited https://github.com/llvm/llvm-project/pull/137311 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Make ValueObject::Dereference less aggressive (PR #137311)

2025-04-25 Thread Ilia Kuklin via lldb-commits
@@ -2202,6 +2202,45 @@ void ValueObject::GetExpressionPath(Stream &s, } } +// Return the alternate value (synthetic if the input object is non-synthetic +// and otherwise) this is permitted by the expression path options. +static ValueObjectSP GetAlternateValue( +ValueOb

[Lldb-commits] [lldb] [lldb][TypeSystemClang] Allow arrays to be dereferenced in C/C++. (PR #135843)

2025-04-25 Thread Ilia Kuklin via lldb-commits
kuilpd wrote: > It's also possible that the implementation of Dereference is just too > persistent. I think it's doing too much. I've created > https://github.com/llvm/llvm-project/pull/137311 which I think is a better > way to approach dereferencing (BTW, I think you'll need to do something

[Lldb-commits] [lldb] [lldb] Make ValueObject::Dereference less aggressive (PR #137311)

2025-04-25 Thread Ilia Kuklin via lldb-commits
https://github.com/kuilpd edited https://github.com/llvm/llvm-project/pull/137311 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Make ValueObject::Dereference less aggressive (PR #137311)

2025-04-25 Thread Ilia Kuklin via lldb-commits
https://github.com/kuilpd commented: So the difference is that if `value->Dereference` fails, the user should try to manually dereference a synthetic value? https://github.com/llvm/llvm-project/pull/137311 ___ lldb-commits mailing list lldb-commits@li

[Lldb-commits] [lldb] [LLDB] Add unary operators Dereference and AddressOf to DIL (PR #134428)

2025-04-25 Thread Ilia Kuklin via lldb-commits
kuilpd wrote: @labath Should I move the check for `void *` to `TypeSystemClang::GetDereferencedType` in the other PR? https://github.com/llvm/llvm-project/pull/134428 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cg

[Lldb-commits] [lldb] [lldb][TypeSystemClang] Allow arrays to be dereferenced in C/C++. (PR #135843)

2025-04-24 Thread Ilia Kuklin via lldb-commits
https://github.com/kuilpd updated https://github.com/llvm/llvm-project/pull/135843 >From 08834d47602b0df46e43678c08b3902d45145871 Mon Sep 17 00:00:00 2001 From: Ilia Kuklin Date: Wed, 16 Apr 2025 00:30:51 +0500 Subject: [PATCH 1/3] [lldb][TypeSystemClang] Add a function `IsValidDereferenceType

[Lldb-commits] [lldb] [lldb][TypeSystemClang] Allow arrays to be dereferenced in C/C++. (PR #135843)

2025-04-24 Thread Ilia Kuklin via lldb-commits
https://github.com/kuilpd ready_for_review https://github.com/llvm/llvm-project/pull/135843 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][TypeSystemClang] Allow arrays to be dereferenced in C/C++. (PR #135843)

2025-04-15 Thread Ilia Kuklin via lldb-commits
kuilpd wrote: @labath @jimingham This is just one way to allow C/C++ to dereference arrays and let other languages decide on which types they allow to dereference. I tried making a `GetDereferencedType` function in TypeSystem, but it doesn't really need to do anything right now, everything is

[Lldb-commits] [lldb] [lldb][TypeSystemClang] Allow arrays to be dereferenced in C/C++. (PR #135843)

2025-04-15 Thread Ilia Kuklin via lldb-commits
https://github.com/kuilpd created https://github.com/llvm/llvm-project/pull/135843 Add a function `IsValidDereferenceType` to TypeSystem. TypeSystemClang now allows arrays to be dereferenced. >From 889900ece6cccfb7cd2d8d16706bc2d5db18c381 Mon Sep 17 00:00:00 2001 From: Ilia Kuklin Date: Wed, 1

[Lldb-commits] [lldb] [LLDB] Add unary operators Dereference and AddressOf to DIL (PR #134428)

2025-04-14 Thread Ilia Kuklin via lldb-commits
@@ -18,6 +18,22 @@ namespace lldb_private::dil { +static lldb::ValueObjectSP +ArrayToPointerConversion(lldb::ValueObjectSP valobj, + std::shared_ptr ctx) { + assert(valobj->IsArrayType() && + "an argument to array-to-pointer conversion must be

[Lldb-commits] [lldb] [LLDB] Add unary operators Dereference and AddressOf to DIL (PR #134428)

2025-04-10 Thread Ilia Kuklin via lldb-commits
@@ -18,6 +18,22 @@ namespace lldb_private::dil { +static lldb::ValueObjectSP +ArrayToPointerConversion(lldb::ValueObjectSP valobj, + std::shared_ptr ctx) { + assert(valobj->IsArrayType() && + "an argument to array-to-pointer conversion must be

[Lldb-commits] [lldb] [LLDB] Add unary operators Dereference and AddressOf to DIL (PR #134428)

2025-04-09 Thread Ilia Kuklin via lldb-commits
@@ -232,4 +263,105 @@ Interpreter::Visit(const IdentifierNode *node) { return identifier; } -} // namespace lldb_private::dil +llvm::Expected +Interpreter::Visit(const UnaryOpNode *node) { + FlowAnalysis rhs_flow( + /* address_of_is_pending */ node->kind() == UnaryOpKi

[Lldb-commits] [lldb] [LLDB] Add unary operators Dereference and AddressOf to DIL (PR #134428)

2025-04-09 Thread Ilia Kuklin via lldb-commits
@@ -232,4 +263,105 @@ Interpreter::Visit(const IdentifierNode *node) { return identifier; } -} // namespace lldb_private::dil +llvm::Expected +Interpreter::Visit(const UnaryOpNode *node) { + FlowAnalysis rhs_flow( + /* address_of_is_pending */ node->kind() == UnaryOpKi

[Lldb-commits] [lldb] [LLDB] Add unary operators Dereference and AddressOf to DIL (PR #134428)

2025-04-09 Thread Ilia Kuklin via lldb-commits
kuilpd wrote: > I'm also not very convinced by this "FlowAnalysis" thingy. Is it supposed to > be a performance optimization (collapsing *&foo to foo) or does it do > something more? FlowAnalysis is also used in subscript operator, to short-circuit getting an address of an element: `&arr[1]`,

[Lldb-commits] [lldb] [LLDB] Add unary operators Dereference and AddressOf to DIL (PR #134428)

2025-04-09 Thread Ilia Kuklin via lldb-commits
@@ -232,4 +263,105 @@ Interpreter::Visit(const IdentifierNode *node) { return identifier; } -} // namespace lldb_private::dil +llvm::Expected +Interpreter::Visit(const UnaryOpNode *node) { + FlowAnalysis rhs_flow( + /* address_of_is_pending */ node->kind() == UnaryOpKi

[Lldb-commits] [lldb] [LLDB] Add unary operators Dereference and AddressOf to DIL (PR #134428)

2025-04-09 Thread Ilia Kuklin via lldb-commits
@@ -3,7 +3,12 @@ (* This is currently a subset of the final DIL Language, matching the current DIL implementation. *) -expression = primary_expression ; +expression = unary_expression ; + +unary_expression = unary_operator expression kuilpd wrote: We have

[Lldb-commits] [lldb] [LLDB] Add unary operators Dereference and AddressOf to DIL (PR #134428)

2025-04-08 Thread Ilia Kuklin via lldb-commits
https://github.com/kuilpd ready_for_review https://github.com/llvm/llvm-project/pull/134428 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [LLDB] Add unary operators Dereference and AddressOf to DIL (PR #134428)

2025-04-08 Thread Ilia Kuklin via lldb-commits
kuilpd wrote: > This is the reason. Long-term maintainability of the project. We already have > (too) many different ways to build test binaries, so you need a very good > reason to introduce another method, and frankly, I don't think you have one. Is it a general consensus that people shouldn

[Lldb-commits] [lldb] [LLDB] Add unary operators Dereference and AddressOf to DIL (PR #134428)

2025-04-04 Thread Ilia Kuklin via lldb-commits
https://github.com/kuilpd updated https://github.com/llvm/llvm-project/pull/134428 >From 58c4f082452bc0600dcf72ba89cbfeafc109cc54 Mon Sep 17 00:00:00 2001 From: Ilia Kuklin Date: Fri, 4 Apr 2025 22:13:02 +0500 Subject: [PATCH] Add unary operators Dereference and AddressOf --- lldb/docs/dil-ex

[Lldb-commits] [lldb] [LLDB] Add unary operators Dereference and AddressOf to DIL (PR #134428)

2025-04-04 Thread Ilia Kuklin via lldb-commits
https://github.com/kuilpd created https://github.com/llvm/llvm-project/pull/134428 None >From 2b85f5a42d3ba8e8544ddeb0b578c82c02f8de0c Mon Sep 17 00:00:00 2001 From: Ilia Kuklin Date: Fri, 4 Apr 2025 22:13:02 +0500 Subject: [PATCH] Add unary operators Dereference and AddressOf --- lldb/docs/

[Lldb-commits] [clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-02-13 Thread Ilia Kuklin via lldb-commits
kuilpd wrote: > But only for dSYMs. Looking at the `dSYM`, none of the enums are actually > preserved in the debug-info. You have to actually use the enum types in > source to get dsymutil to preserve them. I'll fix it Ah, I see. Thank you for handling this! https://github.com/llvm/llvm-proje

[Lldb-commits] [clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-02-13 Thread Ilia Kuklin via lldb-commits
https://github.com/kuilpd closed https://github.com/llvm/llvm-project/pull/115005 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-02-13 Thread Ilia Kuklin via lldb-commits
kuilpd wrote: @Michael137 Thank you for seeing this through! https://github.com/llvm/llvm-project/pull/115005 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-02-13 Thread Ilia Kuklin via lldb-commits
https://github.com/kuilpd updated https://github.com/llvm/llvm-project/pull/115005 >From dd65babbf4c73a0b2fc2e4aa47a9a346bd5a9adf Mon Sep 17 00:00:00 2001 From: Ilia Kuklin Date: Mon, 4 Nov 2024 14:33:45 +0500 Subject: [PATCH 01/15] [lldb] Analyze enum promotion type during parsing --- clang/

[Lldb-commits] [clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-02-12 Thread Ilia Kuklin via lldb-commits
https://github.com/kuilpd updated https://github.com/llvm/llvm-project/pull/115005 >From dd65babbf4c73a0b2fc2e4aa47a9a346bd5a9adf Mon Sep 17 00:00:00 2001 From: Ilia Kuklin Date: Mon, 4 Nov 2024 14:33:45 +0500 Subject: [PATCH 01/14] [lldb] Analyze enum promotion type during parsing --- clang/

[Lldb-commits] [clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-02-08 Thread Ilia Kuklin via lldb-commits
kuilpd wrote: @Michael137 Changed the first argument of `computeEnumBits` to an `ArrayRef` to avoid the template and so it can be still seamlessly used from Sema. On LLDB side, I had to create a `SmallVector` and put enum constants there at the point of their creation (`AddEnumerationValueToEn

[Lldb-commits] [clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-02-08 Thread Ilia Kuklin via lldb-commits
https://github.com/kuilpd updated https://github.com/llvm/llvm-project/pull/115005 >From 4d797371598960baf7729d05590aa1a8c7077694 Mon Sep 17 00:00:00 2001 From: Ilia Kuklin Date: Mon, 4 Nov 2024 14:33:45 +0500 Subject: [PATCH 01/13] [lldb] Analyze enum promotion type during parsing --- clang/

[Lldb-commits] [clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-31 Thread Ilia Kuklin via lldb-commits
@@ -2367,11 +2369,36 @@ size_t DWARFASTParserClang::ParseChildEnumerators( } if (name && name[0] && got_value) { - m_ast.AddEnumerationValueToEnumerationType( + auto ECD = m_ast.AddEnumerationValueToEnumerationType( kuilpd wrote: Alright, wi

[Lldb-commits] [clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-31 Thread Ilia Kuklin via lldb-commits
@@ -2367,11 +2369,36 @@ size_t DWARFASTParserClang::ParseChildEnumerators( } if (name && name[0] && got_value) { - m_ast.AddEnumerationValueToEnumerationType( + auto ECD = m_ast.AddEnumerationValueToEnumerationType( kuilpd wrote: It's used i

[Lldb-commits] [clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-31 Thread Ilia Kuklin via lldb-commits
@@ -2367,11 +2369,36 @@ size_t DWARFASTParserClang::ParseChildEnumerators( } if (name && name[0] && got_value) { - m_ast.AddEnumerationValueToEnumerationType( + auto ECD = m_ast.AddEnumerationValueToEnumerationType( kuilpd wrote: Yes, but I

[Lldb-commits] [clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-31 Thread Ilia Kuklin via lldb-commits
@@ -2367,11 +2369,36 @@ size_t DWARFASTParserClang::ParseChildEnumerators( } if (name && name[0] && got_value) { - m_ast.AddEnumerationValueToEnumerationType( + auto ECD = m_ast.AddEnumerationValueToEnumerationType( kuilpd wrote: > > Iterati

[Lldb-commits] [clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-31 Thread Ilia Kuklin via lldb-commits
https://github.com/kuilpd updated https://github.com/llvm/llvm-project/pull/115005 >From 4d797371598960baf7729d05590aa1a8c7077694 Mon Sep 17 00:00:00 2001 From: Ilia Kuklin Date: Mon, 4 Nov 2024 14:33:45 +0500 Subject: [PATCH 01/12] [lldb] Analyze enum promotion type during parsing --- clang/

[Lldb-commits] [clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-31 Thread Ilia Kuklin via lldb-commits
@@ -2367,11 +2369,36 @@ size_t DWARFASTParserClang::ParseChildEnumerators( } if (name && name[0] && got_value) { - m_ast.AddEnumerationValueToEnumerationType( + auto ECD = m_ast.AddEnumerationValueToEnumerationType( kuilpd wrote: Well... I t

[Lldb-commits] [clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-30 Thread Ilia Kuklin via lldb-commits
@@ -2367,11 +2369,38 @@ size_t DWARFASTParserClang::ParseChildEnumerators( } if (name && name[0] && got_value) { - m_ast.AddEnumerationValueToEnumerationType( + auto ECD = m_ast.AddEnumerationValueToEnumerationType( clang_type, decl, name, enum_val

[Lldb-commits] [clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-30 Thread Ilia Kuklin via lldb-commits
https://github.com/kuilpd updated https://github.com/llvm/llvm-project/pull/115005 >From 4d797371598960baf7729d05590aa1a8c7077694 Mon Sep 17 00:00:00 2001 From: Ilia Kuklin Date: Mon, 4 Nov 2024 14:33:45 +0500 Subject: [PATCH 01/10] [lldb] Analyze enum promotion type during parsing --- clang/

[Lldb-commits] [clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-27 Thread Ilia Kuklin via lldb-commits
https://github.com/kuilpd updated https://github.com/llvm/llvm-project/pull/115005 >From 4d797371598960baf7729d05590aa1a8c7077694 Mon Sep 17 00:00:00 2001 From: Ilia Kuklin Date: Mon, 4 Nov 2024 14:33:45 +0500 Subject: [PATCH 1/8] [lldb] Analyze enum promotion type during parsing --- clang/in

[Lldb-commits] [clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-27 Thread Ilia Kuklin via lldb-commits
https://github.com/kuilpd updated https://github.com/llvm/llvm-project/pull/115005 >From 4d797371598960baf7729d05590aa1a8c7077694 Mon Sep 17 00:00:00 2001 From: Ilia Kuklin Date: Mon, 4 Nov 2024 14:33:45 +0500 Subject: [PATCH 1/7] [lldb] Analyze enum promotion type during parsing --- clang/in

[Lldb-commits] [clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-27 Thread Ilia Kuklin via lldb-commits
@@ -2367,11 +2369,38 @@ size_t DWARFASTParserClang::ParseChildEnumerators( } if (name && name[0] && got_value) { - m_ast.AddEnumerationValueToEnumerationType( + auto ECD = m_ast.AddEnumerationValueToEnumerationType( clang_type, decl, name, enum_val

[Lldb-commits] [clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-27 Thread Ilia Kuklin via lldb-commits
https://github.com/kuilpd edited https://github.com/llvm/llvm-project/pull/115005 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-27 Thread Ilia Kuklin via lldb-commits
@@ -2367,11 +2369,38 @@ size_t DWARFASTParserClang::ParseChildEnumerators( } if (name && name[0] && got_value) { - m_ast.AddEnumerationValueToEnumerationType( + auto ECD = m_ast.AddEnumerationValueToEnumerationType( clang_type, decl, name, enum_val

[Lldb-commits] [clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-27 Thread Ilia Kuklin via lldb-commits
@@ -3903,6 +3903,7 @@ class EnumDecl : public TagDecl { void setInstantiationOfMemberEnum(ASTContext &C, EnumDecl *ED, TemplateSpecializationKind TSK); +public: kuilpd wrote: I left this in so that that I could simply do

[Lldb-commits] [clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-27 Thread Ilia Kuklin via lldb-commits
kuilpd wrote: @Michael137 Reused the code I merged in #120965 to get the best promotion type. https://github.com/llvm/llvm-project/pull/115005 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/ll

[Lldb-commits] [clang] [lldb] [lldb] Analyze enum promotion type during parsing (PR #115005)

2025-01-27 Thread Ilia Kuklin via lldb-commits
https://github.com/kuilpd updated https://github.com/llvm/llvm-project/pull/115005 >From 4d797371598960baf7729d05590aa1a8c7077694 Mon Sep 17 00:00:00 2001 From: Ilia Kuklin Date: Mon, 4 Nov 2024 14:33:45 +0500 Subject: [PATCH 1/6] [lldb] Analyze enum promotion type during parsing --- clang/in

[Lldb-commits] [lldb] [lldb] Negate `is_signed` variable for argument `isUnsigned` in TypeSystemClang.cpp (PR #120794)

2024-12-23 Thread Ilia Kuklin via lldb-commits
https://github.com/kuilpd closed https://github.com/llvm/llvm-project/pull/120794 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Negate `is_signed` variable for argument `isUnsigned` in TypeSystemClang.cpp (PR #120794)

2024-12-23 Thread Ilia Kuklin via lldb-commits
https://github.com/kuilpd updated https://github.com/llvm/llvm-project/pull/120794 >From b5cb9a262a5e1bdb19eb72e7e357c98e90fa9f4e Mon Sep 17 00:00:00 2001 From: Ilia Kuklin Date: Sat, 21 Dec 2024 02:04:35 +0500 Subject: [PATCH 1/2] Negate is_signed variable for argument isUnsigned --- lldb/so

  1   2   >