[Lldb-commits] [lldb] [lldb][Expression] Reject languages not supported by TypeSystems for expression evaluation (PR #156648)

2025-09-03 Thread Pavel Labath via lldb-commits
https://github.com/labath approved this pull request. I think this makes sense. Does this also mean we can delete some language auto-upgrading code somewhere? https://github.com/llvm/llvm-project/pull/156648 ___ lldb-commits mailing list lldb-commits@

[Lldb-commits] [lldb] [lldb][DWARFASTParserClang] Don't complete conflicting Objective-C++ types (PR #156681)

2025-09-03 Thread Pavel Labath via lldb-commits
https://github.com/labath approved this pull request. https://github.com/llvm/llvm-project/pull/156681 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Fix race condition in Process::WaitForProcessToStop() (PR #144919)

2025-09-03 Thread Pavel Labath via lldb-commits
labath wrote: I think it'd be better to not do that. HandleCommand does that because it has no idea what events are going to be produced by the command it runs. In case of EvaluateExpression, it feels like there ought to be a way which events are going to be produced and consumed, and I think

[Lldb-commits] [lldb] [LLDB] Add `ScalarLiteralNode` and literal parsing in DIL (PR #152308)

2025-08-26 Thread Pavel Labath via lldb-commits
@@ -175,7 +185,27 @@ TEST(DILLexerTests, NumbersTest) { EXPECT_THAT_EXPECTED(maybe_lexer, llvm::Succeeded()); DILLexer lexer(*maybe_lexer); Token token = lexer.GetCurrentToken(); -EXPECT_TRUE(token.IsNot(Token::numeric_constant)); +EXPECT_TRUE(token.IsNot(To

[Lldb-commits] [lldb] [LLDB] Add `ScalarLiteralNode` and literal parsing in DIL (PR #152308)

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

[Lldb-commits] [lldb] [LLDB] Add `ScalarLiteralNode` and literal parsing in DIL (PR #152308)

2025-08-26 Thread Pavel Labath via lldb-commits
https://github.com/labath approved this pull request. Sorry about the delay. I was out last week. https://github.com/llvm/llvm-project/pull/152308 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[Lldb-commits] [lldb] [LLDB] Re-land 'Update DIL handling of array subscripting' (PR #154269)

2025-08-25 Thread Pavel Labath via lldb-commits
https://github.com/labath commented: Okay, I think I understand now. The question is about what to do with pointer to data structures with child providers (e.g. `std::vector*`). The original "frame var" indexed the pointer (meaning `v[0]` was the same as dereferencing the vector -- handy beca

[Lldb-commits] [lldb] [LLDB] Re-land 'Update DIL handling of array subscripting' (PR #154269)

2025-08-25 Thread Pavel Labath via lldb-commits
@@ -330,40 +330,135 @@ Interpreter::Visit(const ArraySubscriptNode *node) { return lhs_or_err; lldb::ValueObjectSP base = *lhs_or_err; - // Check to see if 'base' has a synthetic value; if so, try using that. + StreamString var_expr_path_strm; uint64_t child_idx = n

[Lldb-commits] [lldb] [LLDB] Re-land 'Update DIL handling of array subscripting' (PR #154269)

2025-08-25 Thread Pavel Labath via lldb-commits
@@ -330,40 +330,135 @@ Interpreter::Visit(const ArraySubscriptNode *node) { return lhs_or_err; lldb::ValueObjectSP base = *lhs_or_err; - // Check to see if 'base' has a synthetic value; if so, try using that. + StreamString var_expr_path_strm; uint64_t child_idx = n

[Lldb-commits] [lldb] [LLDB] Re-land 'Update DIL handling of array subscripting' (PR #154269)

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

[Lldb-commits] [lldb] [lldb] Refactoring JSONTransport into an abstract RPC Message Handler and transport layer. (PR #153121)

2025-08-19 Thread Pavel Labath via lldb-commits
https://github.com/labath approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/153121 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [LLDB] Re-land 'Update DIL handling of array subscripting' (PR #154269)

2025-08-19 Thread Pavel Labath via lldb-commits
labath wrote: > Hopefully Does that mean you didn't check if it fixes it? I think we should understand how the test passed without this PR before including that. https://github.com/llvm/llvm-project/pull/154269 ___ lldb-commits mailing list lldb-comm

[Lldb-commits] [lldb] [lldb] Refactoring JSONTransport into an abstract RPC Message Handler and transport layer. (PR #153121)

2025-08-18 Thread Pavel Labath via lldb-commits
@@ -258,36 +259,53 @@ void DAP::SendJSON(const llvm::json::Value &json) { llvm::json::Path::Root root; if (!fromJSON(json, message, root)) { DAP_LOG_ERROR(log, root.getError(), "({1}) encoding failed: {0}", - transport.GetClientName()); +

[Lldb-commits] [lldb] [lldb] Refactoring JSONTransport into an abstract RPC Message Handler and transport layer. (PR #153121)

2025-08-18 Thread Pavel Labath via lldb-commits
@@ -54,112 +50,226 @@ class TransportUnhandledContentsError std::string m_unhandled_contents; }; -class TransportInvalidError : public llvm::ErrorInfo { +/// A transport is responsible for maintaining the connection to a client +/// application, and reading/writing structure

[Lldb-commits] [lldb] [lldb] Refactoring JSONTransport into an abstract RPC Message Handler and transport layer. (PR #153121)

2025-08-18 Thread Pavel Labath via lldb-commits
@@ -57,53 +157,84 @@ template class JSONTransportTest : public PipePairTest { NativeFile::Unowned)); } - template - Expected - RunOnce(std::chrono::milliseconds timeout = std::chrono::seconds(1)) { -std::promise> promised_messag

[Lldb-commits] [lldb] [lldb] Refactoring JSONTransport into an abstract RPC Message Handler and transport layer. (PR #153121)

2025-08-18 Thread Pavel Labath via lldb-commits
@@ -28,22 +31,119 @@ using namespace lldb_private; namespace { -struct JSONTestType { - std::string str; +namespace test_protocol { + +struct Req { + std::string name; }; +json::Value toJSON(const Req &T) { return json::Object{{"req", T.name}}; } +bool fromJSON(const json:

[Lldb-commits] [lldb] [lldb] Refactoring JSONTransport into an abstract RPC Message Handler and transport layer. (PR #153121)

2025-08-18 Thread Pavel Labath via lldb-commits
@@ -54,112 +50,226 @@ class TransportUnhandledContentsError std::string m_unhandled_contents; }; -class TransportInvalidError : public llvm::ErrorInfo { +/// A transport is responsible for maintaining the connection to a client +/// application, and reading/writing structure

[Lldb-commits] [lldb] [lldb] Refactoring JSONTransport into an abstract RPC Message Handler and transport layer. (PR #153121)

2025-08-18 Thread Pavel Labath via lldb-commits
@@ -28,22 +31,119 @@ using namespace lldb_private; namespace { -struct JSONTestType { - std::string str; +namespace test_protocol { + +struct Req { + std::string name; }; +json::Value toJSON(const Req &T) { return json::Object{{"req", T.name}}; } +bool fromJSON(const json:

[Lldb-commits] [lldb] [lldb] Refactoring JSONTransport into an abstract RPC Message Handler and transport layer. (PR #153121)

2025-08-18 Thread Pavel Labath via lldb-commits
https://github.com/labath commented: The main loop changes seem fine. Some other comments below. :) https://github.com/llvm/llvm-project/pull/153121 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[Lldb-commits] [lldb] [lldb] Refactoring JSONTransport into an abstract RPC Message Handler and transport layer. (PR #153121)

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

[Lldb-commits] [lldb] [LLDB] Update DIL handling of array subscripting. (PR #151605)

2025-08-15 Thread Pavel Labath via lldb-commits
@@ -330,40 +330,83 @@ Interpreter::Visit(const ArraySubscriptNode *node) { return lhs_or_err; lldb::ValueObjectSP base = *lhs_or_err; - // Check to see if 'base' has a synthetic value; if so, try using that. + StreamString var_expr_path_strm; uint64_t child_idx = no

[Lldb-commits] [lldb] [LLDB] Update DIL handling of array subscripting. (PR #151605)

2025-08-15 Thread Pavel Labath via lldb-commits
https://github.com/labath approved this pull request. https://github.com/llvm/llvm-project/pull/151605 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [LLDB] Add `ScalarLiteralNode` and literal parsing in DIL (PR #152308)

2025-08-15 Thread Pavel Labath via lldb-commits
@@ -175,7 +185,27 @@ TEST(DILLexerTests, NumbersTest) { EXPECT_THAT_EXPECTED(maybe_lexer, llvm::Succeeded()); DILLexer lexer(*maybe_lexer); Token token = lexer.GetCurrentToken(); -EXPECT_TRUE(token.IsNot(Token::numeric_constant)); +EXPECT_TRUE(token.IsNot(To

[Lldb-commits] [lldb] [LLDB] Add `ScalarLiteralNode` and literal parsing in DIL (PR #152308)

2025-08-15 Thread Pavel Labath via lldb-commits
@@ -70,13 +75,32 @@ static std::optional IsWord(llvm::StringRef expr, return candidate; } -static bool IsNumberBodyChar(char ch) { return IsDigit(ch) || IsLetter(ch); } +static bool IsNumberBodyChar(char ch) { + return IsDigit(ch) || IsLetter(ch) || ch == '.'; +} -static

[Lldb-commits] [lldb] [LLDB] Add `ScalarLiteralNode` and literal parsing in DIL (PR #152308)

2025-08-15 Thread Pavel Labath via lldb-commits
@@ -402,4 +404,122 @@ Interpreter::Visit(const BitFieldExtractionNode *node) { return child_valobj_sp; } +static lldb::TypeSystemSP GetTypeSystemFromCU(std::shared_ptr ctx) { + SymbolContext symbol_context = + ctx->GetSymbolContext(lldb::eSymbolContextCompUnit); + ll

[Lldb-commits] [lldb] [LLDB] Add `ScalarLiteralNode` and literal parsing in DIL (PR #152308)

2025-08-15 Thread Pavel Labath via lldb-commits
@@ -402,4 +404,125 @@ Interpreter::Visit(const BitFieldExtractionNode *node) { return child_valobj_sp; } +static llvm::Expected +GetTypeSystemFromCU(std::shared_ptr ctx) { + SymbolContext symbol_context = + ctx->GetSymbolContext(lldb::eSymbolContextCompUnit); + lldb::

[Lldb-commits] [lldb] [LLDB] Add `ScalarLiteralNode` and literal parsing in DIL (PR #152308)

2025-08-15 Thread Pavel Labath via lldb-commits
@@ -402,4 +404,125 @@ Interpreter::Visit(const BitFieldExtractionNode *node) { return child_valobj_sp; } +static llvm::Expected +GetTypeSystemFromCU(std::shared_ptr ctx) { + SymbolContext symbol_context = + ctx->GetSymbolContext(lldb::eSymbolContextCompUnit); + lldb::

[Lldb-commits] [clang] [libcxxabi] [lldb] [llvm] [lldb][Expression] Add structor variant to LLDB's function call labels (PR #149827)

2025-08-14 Thread Pavel Labath via lldb-commits
labath wrote: I re-ran the number, and the results are roughly the same. > Am I misremembering that this came up before elsewhere? I guess that's what > the simple-template-name stuff fixed? Yes, simple template names came about because some targets were overflowing the debug_str section. I'm

[Lldb-commits] [lldb] [LLDB][Value] Require type size when reading a scalar (PR #153386)

2025-08-14 Thread Pavel Labath via lldb-commits
@@ -347,6 +347,9 @@ Status Value::GetValueAsData(ExecutionContext *exe_ctx, DataExtractor &data, else data.SetAddressByteSize(sizeof(void *)); +if (!type_size) + return Status::FromErrorString("type does not have a size"); labath wrote: I

[Lldb-commits] [lldb] [lldb] Refactoring JSONTransport into an abstract RPC Message Handler and transport layer. (PR #153121)

2025-08-14 Thread Pavel Labath via lldb-commits
@@ -54,112 +50,227 @@ class TransportUnhandledContentsError std::string m_unhandled_contents; }; -class TransportInvalidError : public llvm::ErrorInfo { +/// A transport is responsible for maintaining the connection to a client +/// application, and reading/writing structure

[Lldb-commits] [lldb] [lldb] Add flag to "settings show" to include default values (PR #153233)

2025-08-14 Thread Pavel Labath via lldb-commits
labath wrote: I'd probably go with the first version. It doesn't leave a strange hanging default label, and it saves a line. It true that other settings show the default value after the actual one, but these settings are kind of special already (in that they print on multiple lines), so I thin

[Lldb-commits] [lldb] [LLDB] Add `ScalarLiteralNode` and literal parsing in DIL (PR #152308)

2025-08-14 Thread Pavel Labath via lldb-commits
@@ -402,4 +404,120 @@ Interpreter::Visit(const BitFieldExtractionNode *node) { return child_valobj_sp; } +static lldb::TypeSystemSP GetTypeSystemFromCU(std::shared_ptr ctx) { + SymbolContext symbol_context = + ctx->GetSymbolContext(lldb::eSymbolContextCompUnit); + ll

[Lldb-commits] [lldb] [LLDB] Add `ScalarLiteralNode` and literal parsing in DIL (PR #152308)

2025-08-14 Thread Pavel Labath via lldb-commits
labath wrote: There's still too much auto in the patch. Particularly those that hide llvm::Expected are dangerous. Apart from that, and despite the number of comments, I think this is pretty good. https://github.com/llvm/llvm-project/pull/152308 ___

[Lldb-commits] [lldb] [LLDB] Add `ScalarLiteralNode` and literal parsing in DIL (PR #152308)

2025-08-14 Thread Pavel Labath via lldb-commits
@@ -70,13 +75,32 @@ static std::optional IsWord(llvm::StringRef expr, return candidate; } -static bool IsNumberBodyChar(char ch) { return IsDigit(ch) || IsLetter(ch); } +static bool IsNumberBodyChar(char ch) { + return IsDigit(ch) || IsLetter(ch) || ch == '.'; +} -static

[Lldb-commits] [lldb] [LLDB] Add `ScalarLiteralNode` and literal parsing in DIL (PR #152308)

2025-08-14 Thread Pavel Labath via lldb-commits
@@ -70,13 +75,32 @@ static std::optional IsWord(llvm::StringRef expr, return candidate; } -static bool IsNumberBodyChar(char ch) { return IsDigit(ch) || IsLetter(ch); } +static bool IsNumberBodyChar(char ch) { + return IsDigit(ch) || IsLetter(ch) || ch == '.'; +} -static

[Lldb-commits] [lldb] [LLDB] Add `ScalarLiteralNode` and literal parsing in DIL (PR #152308)

2025-08-14 Thread Pavel Labath via lldb-commits
@@ -370,6 +374,76 @@ std::optional DILParser::ParseIntegerConstant() { return std::nullopt; } +// Parse a numeric_literal. +// +// numeric_literal: +//? Token::integer_constant ? +//? Token::floating_constant ? +// +ASTNodeUP DILParser::ParseNumericLiteral() { + AS

[Lldb-commits] [lldb] [LLDB] Add `ScalarLiteralNode` and literal parsing in DIL (PR #152308)

2025-08-14 Thread Pavel Labath via lldb-commits
@@ -178,6 +179,54 @@ class BitFieldExtractionNode : public ASTNode { int64_t m_last_index; }; +class IntegerLiteralNode : public ASTNode { +public: + IntegerLiteralNode(uint32_t location, llvm::APInt value, uint32_t radix, + bool is_unsigned, bool is_lon

[Lldb-commits] [lldb] [LLDB] Add `ScalarLiteralNode` and literal parsing in DIL (PR #152308)

2025-08-14 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,76 @@ +""" +Test DIL literals. +""" + +import lldb +from lldbsuite.test.lldbtest import * +from lldbsuite.test.decorators import * +from lldbsuite.test import lldbutil + + +class TestFrameVarDILLiterals(TestBase): +NO_DEBUG_INFO_TESTCASE = True + +def test_liter

[Lldb-commits] [lldb] [LLDB] Add `ScalarLiteralNode` and literal parsing in DIL (PR #152308)

2025-08-14 Thread Pavel Labath via lldb-commits
@@ -178,6 +179,54 @@ class BitFieldExtractionNode : public ASTNode { int64_t m_last_index; }; +class IntegerLiteralNode : public ASTNode { +public: + IntegerLiteralNode(uint32_t location, llvm::APInt value, uint32_t radix, + bool is_unsigned, bool is_lon

[Lldb-commits] [lldb] [LLDB] Add `ScalarLiteralNode` and literal parsing in DIL (PR #152308)

2025-08-14 Thread Pavel Labath via lldb-commits
@@ -402,4 +404,122 @@ Interpreter::Visit(const BitFieldExtractionNode *node) { return child_valobj_sp; } +static lldb::TypeSystemSP GetTypeSystemFromCU(std::shared_ptr ctx) { + SymbolContext symbol_context = + ctx->GetSymbolContext(lldb::eSymbolContextCompUnit); + ll

[Lldb-commits] [lldb] [LLDB] Add `ScalarLiteralNode` and literal parsing in DIL (PR #152308)

2025-08-14 Thread Pavel Labath via lldb-commits
@@ -402,4 +404,122 @@ Interpreter::Visit(const BitFieldExtractionNode *node) { return child_valobj_sp; } +static lldb::TypeSystemSP GetTypeSystemFromCU(std::shared_ptr ctx) { + SymbolContext symbol_context = + ctx->GetSymbolContext(lldb::eSymbolContextCompUnit); + ll

[Lldb-commits] [lldb] [LLDB] Add `ScalarLiteralNode` and literal parsing in DIL (PR #152308)

2025-08-14 Thread Pavel Labath via lldb-commits
@@ -402,4 +404,122 @@ Interpreter::Visit(const BitFieldExtractionNode *node) { return child_valobj_sp; } +static lldb::TypeSystemSP GetTypeSystemFromCU(std::shared_ptr ctx) { + SymbolContext symbol_context = + ctx->GetSymbolContext(lldb::eSymbolContextCompUnit); + ll

[Lldb-commits] [lldb] [LLDB] Add `ScalarLiteralNode` and literal parsing in DIL (PR #152308)

2025-08-14 Thread Pavel Labath via lldb-commits
@@ -178,6 +179,54 @@ class BitFieldExtractionNode : public ASTNode { int64_t m_last_index; }; +class IntegerLiteralNode : public ASTNode { +public: + IntegerLiteralNode(uint32_t location, llvm::APInt value, uint32_t radix, + bool is_unsigned, bool is_lon

[Lldb-commits] [lldb] [LLDB] Add `ScalarLiteralNode` and literal parsing in DIL (PR #152308)

2025-08-14 Thread Pavel Labath via lldb-commits
@@ -402,4 +404,122 @@ Interpreter::Visit(const BitFieldExtractionNode *node) { return child_valobj_sp; } +static lldb::TypeSystemSP GetTypeSystemFromCU(std::shared_ptr ctx) { + SymbolContext symbol_context = + ctx->GetSymbolContext(lldb::eSymbolContextCompUnit); + ll

[Lldb-commits] [lldb] [LLDB] Add `ScalarLiteralNode` and literal parsing in DIL (PR #152308)

2025-08-14 Thread Pavel Labath via lldb-commits
@@ -178,6 +179,54 @@ class BitFieldExtractionNode : public ASTNode { int64_t m_last_index; }; +class IntegerLiteralNode : public ASTNode { +public: + IntegerLiteralNode(uint32_t location, llvm::APInt value, uint32_t radix, + bool is_unsigned, bool is_lon

[Lldb-commits] [lldb] [LLDB] Add `ScalarLiteralNode` and literal parsing in DIL (PR #152308)

2025-08-14 Thread Pavel Labath via lldb-commits
@@ -370,6 +374,76 @@ std::optional DILParser::ParseIntegerConstant() { return std::nullopt; } +// Parse a numeric_literal. +// +// numeric_literal: +//? Token::integer_constant ? +//? Token::floating_constant ? +// +ASTNodeUP DILParser::ParseNumericLiteral() { + AS

[Lldb-commits] [lldb] [LLDB] Add `ScalarLiteralNode` and literal parsing in DIL (PR #152308)

2025-08-14 Thread Pavel Labath via lldb-commits
@@ -402,4 +404,122 @@ Interpreter::Visit(const BitFieldExtractionNode *node) { return child_valobj_sp; } +static lldb::TypeSystemSP GetTypeSystemFromCU(std::shared_ptr ctx) { + SymbolContext symbol_context = + ctx->GetSymbolContext(lldb::eSymbolContextCompUnit); + ll

[Lldb-commits] [lldb] [LLDB] Add `ScalarLiteralNode` and literal parsing in DIL (PR #152308)

2025-08-14 Thread Pavel Labath via lldb-commits
@@ -178,6 +179,54 @@ class BitFieldExtractionNode : public ASTNode { int64_t m_last_index; }; +class IntegerLiteralNode : public ASTNode { +public: + IntegerLiteralNode(uint32_t location, llvm::APInt value, uint32_t radix, + bool is_unsigned, bool is_lon

[Lldb-commits] [lldb] [LLDB] Add `ScalarLiteralNode` and literal parsing in DIL (PR #152308)

2025-08-11 Thread Pavel Labath via lldb-commits
@@ -72,12 +74,39 @@ static std::optional IsWord(llvm::StringRef expr, static bool IsNumberBodyChar(char ch) { return IsDigit(ch) || IsLetter(ch); } -static std::optional IsNumber(llvm::StringRef expr, - llvm::StringRef &remainder

[Lldb-commits] [lldb] [LLDB] Add `ScalarLiteralNode` and literal parsing in DIL (PR #152308)

2025-08-11 Thread Pavel Labath via lldb-commits
@@ -403,11 +403,13 @@ ASTNodeUP DILParser::ParseIntegerLiteral() { auto radix = llvm::getAutoSenseRadix(spelling_ref); bool is_unsigned = false, is_long = false, is_longlong = false; + if (spelling_ref.consume_back_insensitive("u")) +is_unsigned = true; if (spellin

[Lldb-commits] [lldb] [LLDB] Add `ScalarLiteralNode` and literal parsing in DIL (PR #152308)

2025-08-11 Thread Pavel Labath via lldb-commits
@@ -178,6 +179,40 @@ class BitFieldExtractionNode : public ASTNode { int64_t m_last_index; }; +class ScalarLiteralNode : public ASTNode { +public: + ScalarLiteralNode(uint32_t location, Scalar value, uint32_t radix, +bool is_unsigned, bool is_long, bool

[Lldb-commits] [lldb] [LLDB] Add `ScalarLiteralNode` and literal parsing in DIL (PR #152308)

2025-08-11 Thread Pavel Labath via lldb-commits
https://github.com/labath commented: > The node will also have boolean literals and nullptr later, they are all > stored in a Scalar, so I don't think we should do 4 nodes for this. Why not? If all you needed was a single Scalar field that is handled uniformly, then sure. However, here you hav

[Lldb-commits] [lldb] [LLDB] Add `ScalarLiteralNode` and literal parsing in DIL (PR #152308)

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

[Lldb-commits] [lldb] [lldb] Add "settings modified" command (PR #152338)

2025-08-11 Thread Pavel Labath via lldb-commits
labath wrote: I don't know about "discoverable", but I think it's more logical and fits it with the existing "noun verb" command naming scheme. You say you want to "show" "settings", and then you follow that with some modifiers/restrictions on that. Currently, the only restriction is via the s

[Lldb-commits] [lldb] [lldb] refactor PlatformAndroid and make threadsafe (PR #145382)

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

[Lldb-commits] [lldb] [lldb] refactor PlatformAndroid and make threadsafe (PR #145382)

2025-08-08 Thread Pavel Labath via lldb-commits
@@ -8,98 +8,45 @@ #include "AdbClient.h" -#include "llvm/ADT/STLExtras.h" -#include "llvm/ADT/SmallVector.h" -#include "llvm/ADT/StringRef.h" -#include "llvm/Support/FileUtilities.h" - -#include "lldb/Host/ConnectionFileDescriptor.h" -#include "lldb/Host/FileSystem.h" -#inclu

[Lldb-commits] [lldb] [lldb] refactor PlatformAndroid and make threadsafe (PR #145382)

2025-08-08 Thread Pavel Labath via lldb-commits
@@ -85,86 +72,217 @@ static Status ReadAllBytes(Connection &conn, void *buffer, size_t size) { error = Status::FromErrorStringWithFormat( "Unable to read requested number of bytes. Connection status: %d.", status); + return error; } -Status AdbClient:

[Lldb-commits] [lldb] [lldb] refactor PlatformAndroid and make threadsafe (PR #145382)

2025-08-08 Thread Pavel Labath via lldb-commits
https://github.com/labath commented: Looks good. Just a couple of details. https://github.com/llvm/llvm-project/pull/145382 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] refactor PlatformAndroid and make threadsafe (PR #145382)

2025-08-08 Thread Pavel Labath via lldb-commits
@@ -26,6 +24,7 @@ using namespace lldb; using namespace lldb_private; using namespace lldb_private::platform_android; using namespace std::chrono; +using namespace llvm; labath wrote: I'd rather not add this. I don't see any heavy llvm usage, and this file has

[Lldb-commits] [lldb] [lldb] refactor PlatformAndroid and make threadsafe (PR #145382)

2025-08-08 Thread Pavel Labath via lldb-commits
@@ -8,61 +8,48 @@ #include "AdbClient.h" -#include "llvm/ADT/STLExtras.h" -#include "llvm/ADT/SmallVector.h" -#include "llvm/ADT/StringRef.h" -#include "llvm/Support/FileUtilities.h" - -#include "lldb/Host/ConnectionFileDescriptor.h" #include "lldb/Host/FileSystem.h" -#inclu

[Lldb-commits] [lldb] [LLDB] Add `ScalarLiteralNode` and literal parsing in DIL (PR #152308)

2025-08-08 Thread Pavel Labath via lldb-commits
@@ -402,4 +404,122 @@ Interpreter::Visit(const BitFieldExtractionNode *node) { return child_valobj_sp; } +static lldb::TypeSystemSP GetTypeSystemFromCU(std::shared_ptr ctx) { + SymbolContext symbol_context = + ctx->GetSymbolContext(lldb::eSymbolContextCompUnit); + au

[Lldb-commits] [lldb] [LLDB] Add `ScalarLiteralNode` and literal parsing in DIL (PR #152308)

2025-08-08 Thread Pavel Labath via lldb-commits
@@ -72,12 +74,39 @@ static std::optional IsWord(llvm::StringRef expr, static bool IsNumberBodyChar(char ch) { return IsDigit(ch) || IsLetter(ch); } -static std::optional IsNumber(llvm::StringRef expr, - llvm::StringRef &remainder

[Lldb-commits] [lldb] [LLDB] Add `ScalarLiteralNode` and literal parsing in DIL (PR #152308)

2025-08-08 Thread Pavel Labath via lldb-commits
@@ -402,4 +404,122 @@ Interpreter::Visit(const BitFieldExtractionNode *node) { return child_valobj_sp; } +static lldb::TypeSystemSP GetTypeSystemFromCU(std::shared_ptr ctx) { + SymbolContext symbol_context = + ctx->GetSymbolContext(lldb::eSymbolContextCompUnit); + au

[Lldb-commits] [lldb] [LLDB] Add `ScalarLiteralNode` and literal parsing in DIL (PR #152308)

2025-08-08 Thread Pavel Labath via lldb-commits
@@ -178,6 +179,40 @@ class BitFieldExtractionNode : public ASTNode { int64_t m_last_index; }; +class ScalarLiteralNode : public ASTNode { +public: + ScalarLiteralNode(uint32_t location, Scalar value, uint32_t radix, +bool is_unsigned, bool is_long, bool

[Lldb-commits] [lldb] [LLDB] Add `ScalarLiteralNode` and literal parsing in DIL (PR #152308)

2025-08-08 Thread Pavel Labath via lldb-commits
@@ -370,6 +374,74 @@ std::optional DILParser::ParseIntegerConstant() { return std::nullopt; } +// Parse a numeric_literal. +// +// numeric_literal: +//? Token::integer_constant ? +//? Token::floating_constant ? +// +ASTNodeUP DILParser::ParseNumericLiteral() { + AS

[Lldb-commits] [lldb] [LLDB] Add `ScalarLiteralNode` and literal parsing in DIL (PR #152308)

2025-08-08 Thread Pavel Labath via lldb-commits
@@ -402,4 +404,122 @@ Interpreter::Visit(const BitFieldExtractionNode *node) { return child_valobj_sp; } +static lldb::TypeSystemSP GetTypeSystemFromCU(std::shared_ptr ctx) { + SymbolContext symbol_context = + ctx->GetSymbolContext(lldb::eSymbolContextCompUnit); + au

[Lldb-commits] [lldb] [LLDB] Add `ScalarLiteralNode` and literal parsing in DIL (PR #152308)

2025-08-08 Thread Pavel Labath via lldb-commits
@@ -402,4 +404,122 @@ Interpreter::Visit(const BitFieldExtractionNode *node) { return child_valobj_sp; } +static lldb::TypeSystemSP GetTypeSystemFromCU(std::shared_ptr ctx) { + SymbolContext symbol_context = + ctx->GetSymbolContext(lldb::eSymbolContextCompUnit); + au

[Lldb-commits] [lldb] [LLDB] Add `ScalarLiteralNode` and literal parsing in DIL (PR #152308)

2025-08-08 Thread Pavel Labath via lldb-commits
@@ -72,12 +74,39 @@ static std::optional IsWord(llvm::StringRef expr, static bool IsNumberBodyChar(char ch) { return IsDigit(ch) || IsLetter(ch); } -static std::optional IsNumber(llvm::StringRef expr, - llvm::StringRef &remainder

[Lldb-commits] [lldb] [LLDB] Add `ScalarLiteralNode` and literal parsing in DIL (PR #152308)

2025-08-08 Thread Pavel Labath via lldb-commits
@@ -402,4 +404,122 @@ Interpreter::Visit(const BitFieldExtractionNode *node) { return child_valobj_sp; } +static lldb::TypeSystemSP GetTypeSystemFromCU(std::shared_ptr ctx) { + SymbolContext symbol_context = + ctx->GetSymbolContext(lldb::eSymbolContextCompUnit); + au

[Lldb-commits] [lldb] [LLDB] Add `ScalarLiteralNode` and literal parsing in DIL (PR #152308)

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

[Lldb-commits] [lldb] [LLDB] Add `ScalarLiteralNode` and literal parsing in DIL (PR #152308)

2025-08-08 Thread Pavel Labath via lldb-commits
https://github.com/labath commented: I have a feeling that this would actually be better off as two node types (float and integer), as each stage (lexer, parser and evaluator) handles the two differently. Maybe then the integer node could use llvm::APInt directly, which would make the `is_unsi

[Lldb-commits] [clang] [libcxxabi] [lldb] [llvm] [lldb][Expression] Add structor variant to LLDB's function call labels (PR #149827)

2025-08-08 Thread Pavel Labath via lldb-commits
@@ -2482,6 +2485,134 @@ bool SymbolFileDWARF::ResolveFunction(const DWARFDIE &orig_die, return false; } +static int ClangToItaniumCtorKind(clang::CXXCtorType kind) { + switch (kind) { + case clang::CXXCtorType::Ctor_Complete: +return 1; + case clang::CXXCtorType::Cto

[Lldb-commits] [lldb] [LLDB] Run API tests with PDB too (PR #149305)

2025-08-08 Thread Pavel Labath via lldb-commits
@@ -804,6 +804,13 @@ def setUpCommands(cls): ) return commands +def getDebugInfoSetupCommands(self): +if self.getDebugInfo() == "native-pdb": labath wrote: That's correct. Is that your goal? (I haven't been following the overal

[Lldb-commits] [clang] [libcxxabi] [lldb] [llvm] [lldb][Expression] Add structor variant to LLDB's function call labels (PR #149827)

2025-08-08 Thread Pavel Labath via lldb-commits
@@ -2482,6 +2485,134 @@ bool SymbolFileDWARF::ResolveFunction(const DWARFDIE &orig_die, return false; } +static int ClangToItaniumCtorKind(clang::CXXCtorType kind) { + switch (kind) { + case clang::CXXCtorType::Ctor_Complete: +return 1; + case clang::CXXCtorType::Cto

[Lldb-commits] [clang] [libcxxabi] [lldb] [llvm] [lldb][Expression] Add structor variant to LLDB's function call labels (PR #149827)

2025-08-08 Thread Pavel Labath via lldb-commits
@@ -2482,6 +2485,134 @@ bool SymbolFileDWARF::ResolveFunction(const DWARFDIE &orig_die, return false; } +static int ClangToItaniumCtorKind(clang::CXXCtorType kind) { + switch (kind) { + case clang::CXXCtorType::Ctor_Complete: +return 1; + case clang::CXXCtorType::Cto

[Lldb-commits] [clang] [libcxxabi] [lldb] [llvm] [lldb][Expression] Add structor variant to LLDB's function call labels (PR #149827)

2025-08-08 Thread Pavel Labath via lldb-commits
@@ -2482,6 +2485,134 @@ bool SymbolFileDWARF::ResolveFunction(const DWARFDIE &orig_die, return false; } +static int ClangToItaniumCtorKind(clang::CXXCtorType kind) { + switch (kind) { + case clang::CXXCtorType::Ctor_Complete: +return 1; + case clang::CXXCtorType::Cto

[Lldb-commits] [clang] [libcxxabi] [lldb] [llvm] [lldb][Expression] Add structor variant to LLDB's function call labels (PR #149827)

2025-08-08 Thread Pavel Labath via lldb-commits
@@ -2482,6 +2485,134 @@ bool SymbolFileDWARF::ResolveFunction(const DWARFDIE &orig_die, return false; } +static int ClangToItaniumCtorKind(clang::CXXCtorType kind) { + switch (kind) { + case clang::CXXCtorType::Ctor_Complete: +return 1; + case clang::CXXCtorType::Cto

[Lldb-commits] [lldb] [LLDB] Run API tests with PDB too (PR #149305)

2025-08-08 Thread Pavel Labath via lldb-commits
@@ -804,6 +804,13 @@ def setUpCommands(cls): ) return commands +def getDebugInfoSetupCommands(self): +if self.getDebugInfo() == "native-pdb": labath wrote: I don't know that for sure, but I can imagine it being added just becau

[Lldb-commits] [lldb] [lldb] Add "settings modified" command (PR #152338)

2025-08-08 Thread Pavel Labath via lldb-commits
labath wrote: *I* am wondering if this wouldn't be better off as a flag on the "settings show" command: `settings show --modified`. I can also imagine that, in the default mode, a plain "settings show" would render the modified settings differently (e.g., in bold) https://github.com/llvm/llvm

[Lldb-commits] [clang] [libcxxabi] [lldb] [llvm] [lldb][Expression] Add structor variant to LLDB's function call labels (PR #149827)

2025-08-06 Thread Pavel Labath via lldb-commits
@@ -2482,6 +2485,134 @@ bool SymbolFileDWARF::ResolveFunction(const DWARFDIE &orig_die, return false; } +static int ClangToItaniumCtorKind(clang::CXXCtorType kind) { + switch (kind) { + case clang::CXXCtorType::Ctor_Complete: +return 1; + case clang::CXXCtorType::Cto

[Lldb-commits] [lldb] [lldb] Eliminate (_)Py_IsFinalizing (NFC) (PR #152226)

2025-08-06 Thread Pavel Labath via lldb-commits
https://github.com/labath approved this pull request. Makes sense. I gave this a spin on our internal build, and it seems to work fine. https://github.com/llvm/llvm-project/pull/152226 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://

[Lldb-commits] [lldb] [lldb][ARM] Port Arm Linux to use NativeRegisterContextDBReg (PR #152284)

2025-08-06 Thread Pavel Labath via lldb-commits
https://github.com/labath approved this pull request. Seems reasonable to me. https://github.com/llvm/llvm-project/pull/152284 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Add readOnly attribute for variables (PR #151884)

2025-08-06 Thread Pavel Labath via lldb-commits
@@ -301,6 +301,14 @@ Variable CreateVariable(lldb::SBValue v, int64_t var_ref, bool format_hex, if (lldb::addr_t addr = v.GetLoadAddress(); addr != LLDB_INVALID_ADDRESS) var.memoryReference = addr; + bool is_readonly = v.GetType().IsAggregateType() ||

[Lldb-commits] [clang] [libcxxabi] [lldb] [llvm] [lldb][Expression] Add structor variant to LLDB's function call labels (PR #149827)

2025-08-06 Thread Pavel Labath via lldb-commits
@@ -250,11 +250,52 @@ static unsigned GetCXXMethodCVQuals(const DWARFDIE &subprogram, return cv_quals; } +static const char *GetMangledOrStructorName(const DWARFDIE &die) { + const char *name = die.GetMangledName(/*substitute_name_allowed*/ false); + if (name) +return

[Lldb-commits] [clang] [libcxxabi] [lldb] [llvm] [lldb][Expression] Add structor variant to LLDB's function call labels (PR #149827)

2025-08-06 Thread Pavel Labath via lldb-commits
@@ -2482,6 +2485,134 @@ bool SymbolFileDWARF::ResolveFunction(const DWARFDIE &orig_die, return false; } +static int ClangToItaniumCtorKind(clang::CXXCtorType kind) { + switch (kind) { + case clang::CXXCtorType::Ctor_Complete: +return 1; + case clang::CXXCtorType::Cto

[Lldb-commits] [lldb] [lldb] Treat address found via function name as a callable address (PR #151973)

2025-08-06 Thread Pavel Labath via lldb-commits
https://github.com/labath approved this pull request. https://github.com/llvm/llvm-project/pull/151973 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [LLDB] added getName method in SBModule (PR #150331)

2025-08-04 Thread Pavel Labath via lldb-commits
https://github.com/labath commented: The code looks good, but I have a problem with the docstring, as it captures none of the subtlety around this function (which was discussed in the other thread). I'd recommend something like: "If this Module represents a part of a larger file, returns the n

[Lldb-commits] [lldb] [lldb] Reimplment PyRun_String using the Python stable C API (PR #151761)

2025-08-04 Thread Pavel Labath via lldb-commits
@@ -1469,11 +1466,33 @@ python::runStringMultiLine(const llvm::Twine &string, const PythonDictionary &locals) { if (!globals.IsValid() || !locals.IsValid()) return nullDeref(); - PyObject *result = PyRun_String(NullTerminated(string), Py_file_i

[Lldb-commits] [lldb] [lldb] Update JSONTransport to use MainLoop for reading. (PR #148300)

2025-08-04 Thread Pavel Labath via lldb-commits
@@ -7,163 +7,104 @@ //===--===// #include "lldb/Host/JSONTransport.h" -#include "lldb/Utility/IOObject.h" #include "lldb/Utility/LLDBLog.h" #include "lldb/Utility/Log.h" -#include "lldb/Utility/SelectHelper

[Lldb-commits] [lldb] [lldb] Update JSONTransport to use MainLoop for reading. (PR #148300)

2025-08-04 Thread Pavel Labath via lldb-commits
https://github.com/labath approved this pull request. Looks much better. Thanks. https://github.com/llvm/llvm-project/pull/148300 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Update JSONTransport to use MainLoop for reading. (PR #148300)

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

[Lldb-commits] [lldb] [LLDB] Update DIL handling of array subscripting. (PR #151605)

2025-08-04 Thread Pavel Labath via lldb-commits
@@ -323,47 +323,144 @@ Interpreter::Visit(const MemberOfNode *node) { m_expr, errMsg, node->GetLocation(), node->GetFieldName().size()); } + llvm::Expected Interpreter::Visit(const ArraySubscriptNode *node) { auto lhs_or_err = Evaluate(node->GetBase()); if (!lhs_

[Lldb-commits] [lldb] [LLDB] Update DIL handling of array subscripting. (PR #151605)

2025-08-04 Thread Pavel Labath via lldb-commits
@@ -323,47 +323,144 @@ Interpreter::Visit(const MemberOfNode *node) { m_expr, errMsg, node->GetLocation(), node->GetFieldName().size()); } + llvm::Expected Interpreter::Visit(const ArraySubscriptNode *node) { auto lhs_or_err = Evaluate(node->GetBase()); if (!lhs_

[Lldb-commits] [lldb] [LLDB] Update DIL handling of array subscripting. (PR #151605)

2025-08-04 Thread Pavel Labath via lldb-commits
https://github.com/labath commented: I see the bitfield handling is reflected in the test case, but I don't see anything about handling of synthetic children or objc pointers. For the objc case, I'm very tempted to *not* copy that bit of code over, since it: a) is untested (or you wouldn't hav

[Lldb-commits] [lldb] [LLDB] Update DIL handling of array subscripting. (PR #151605)

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

[Lldb-commits] [lldb] [LLDB] Update DIL handling of array subscripting. (PR #151605)

2025-08-04 Thread Pavel Labath via lldb-commits
@@ -323,47 +323,144 @@ Interpreter::Visit(const MemberOfNode *node) { m_expr, errMsg, node->GetLocation(), node->GetFieldName().size()); } + llvm::Expected Interpreter::Visit(const ArraySubscriptNode *node) { auto lhs_or_err = Evaluate(node->GetBase()); if (!lhs_

[Lldb-commits] [lldb] [lldb] Zero extend APInt when piece size is bigger than the bitwidth (PR #150149)

2025-08-04 Thread Pavel Labath via lldb-commits
https://github.com/labath approved this pull request. Thanks. https://github.com/llvm/llvm-project/pull/150149 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Fix auto advance PC in `EmulateInstructionARM64` if PC >= 4G (PR #151460)

2025-08-04 Thread Pavel Labath via lldb-commits
@@ -13,15 +13,124 @@ #include "lldb/Core/Disassembler.h" #include "lldb/Target/ExecutionContext.h" #include "lldb/Utility/ArchSpec.h" +#include "lldb/Utility/RegisterValue.h" #include "Plugins/Instruction/ARM64/EmulateInstructionARM64.h" +#include "Plugins/Process/Utility/Re

[Lldb-commits] [lldb] [lldb] Fix auto advance PC in `EmulateInstructionARM64` if PC >= 4G (PR #151460)

2025-08-04 Thread Pavel Labath via lldb-commits
https://github.com/labath approved this pull request. https://github.com/llvm/llvm-project/pull/151460 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Implement DW_CFA_val_offset and DW_CFA_val_offset_sf (PR #150732)

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

  1   2   3   4   5   6   7   8   9   10   >