[Lldb-commits] [lldb] [LLDB] Fix GetIndexOfChildMemberWithName to handle anonymous structs. (PR #138487)

2025-05-06 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,33 @@ +int main(int argc, char** argv) { + struct A { +struct { + int x = 1; +}; +int y = 2; + } a; + + struct B { +// Anonymous struct inherits another struct. +struct : public A { + int z = 3; +}; +int w = 4; +A a; + } b;

[Lldb-commits] [lldb] [LLDB] Fix GetIndexOfChildMemberWithName to handle anonymous structs. (PR #138487)

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

[Lldb-commits] [lldb] [lldb] Change synthetic symbol names to have file address (PR #138416)

2025-05-06 Thread Ely Ronnen via lldb-commits
https://github.com/eronnen updated https://github.com/llvm/llvm-project/pull/138416 Rate limit 路 GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-s

[Lldb-commits] [lldb] 488cb24 - [lldb] fix crash on FreeBSD/powerpc64le (#138331)

2025-05-06 Thread via lldb-commits
Author: Piotr Kubaj Date: 2025-05-06T10:23:33+01:00 New Revision: 488cb24c2eddb8d0ec3419a4117691022e9e679b URL: https://github.com/llvm/llvm-project/commit/488cb24c2eddb8d0ec3419a4117691022e9e679b DIFF: https://github.com/llvm/llvm-project/commit/488cb24c2eddb8d0ec3419a4117691022e9e679b.diff L

[Lldb-commits] [lldb] [lldb] fix crash on FreeBSD/powerpc64le (PR #138331)

2025-05-06 Thread David Spickett via lldb-commits
https://github.com/DavidSpickett closed https://github.com/llvm/llvm-project/pull/138331 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] fix crash on FreeBSD/powerpc64le (PR #138331)

2025-05-06 Thread David Spickett via lldb-commits
https://github.com/DavidSpickett edited https://github.com/llvm/llvm-project/pull/138331 ___ 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-06 Thread Pavel Labath via lldb-commits
https://github.com/labath commented: 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, ...

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

2025-05-06 Thread Pavel Labath 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 array subscription and integer parsing to DIL (PR #138551)

2025-05-06 Thread Pavel Labath 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-06 Thread Pavel Labath via lldb-commits
https://github.com/labath edited 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-06 Thread Pavel Labath via lldb-commits
@@ -24,6 +28,8 @@ qualified_id = ["::"] [nested_name_specifier] unqualified_id identifier = ? C99 Identifier ? ; +numeric_literal = ? C99 Integer constant ? ; labath wrote: I think the C99 part isn't really true. Maybe we should have a separate section to e

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

2025-05-06 Thread Pavel Labath via lldb-commits
@@ -108,6 +130,26 @@ class UnaryOpNode : public ASTNode { ASTNodeUP m_operand; }; +class ArraySubscriptNode : public ASTNode { +public: + ArraySubscriptNode(uint32_t location, ASTNodeUP lhs, ASTNodeUP rhs) + : ASTNode(location, NodeKind::eArraySubscriptNode), m_lhs(st

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

2025-05-06 Thread Pavel Labath 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 Pavel Labath via lldb-commits
@@ -57,6 +64,29 @@ static std::optional IsWord(llvm::StringRef expr, return candidate; } +static void ConsumeNumberBody(char &prev_ch, llvm::StringRef::iterator &cur_pos, + llvm::StringRef expr) { + while (cur_pos != expr.end() && + (I

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

2025-05-06 Thread Pavel Labath via lldb-commits
https://github.com/labath approved this pull request. Thanks. I think this is fine now. @jimingham, @adrian-prantl, do you have anything to add. Heads-up: I believe you will need to implement this method in the Swift type system in order to keep dereferencing working. https://github.com/llvm/

[Lldb-commits] [lldb] [lldb] Parse DWARF CFI for discontinuous functions (PR #137006)

2025-05-06 Thread Pavel Labath via lldb-commits
labath wrote: @felipepiovezan, after yesterdays explanation, maybe you feel brave enough to review this? :P https://github.com/llvm/llvm-project/pull/137006 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[Lldb-commits] [lldb] [lldb/docs] Fix/improve the gdb command map for dynamic types (PR #138538)

2025-05-06 Thread Michael Buch via lldb-commits
https://github.com/Michael137 approved this pull request. Makes sense to me https://github.com/llvm/llvm-project/pull/138538 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Fix block address resolution for functions in multiple sections (PR #137955)

2025-05-06 Thread David Spickett via lldb-commits
https://github.com/DavidSpickett approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/137955 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb/Host] Enable inheriting "non-inheritable" FDs (PR #126935)

2025-05-06 Thread David Spickett via lldb-commits
https://github.com/DavidSpickett approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/126935 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Implement `runInTerminal` for Windows (PR #121269)

2025-05-06 Thread Hu Jialun via lldb-commits
SuibianP wrote: Pinging again for review @ashgti @omjavaid @walter-erquinigo Also want to highlight https://github.com/SuibianP/llvm-project/commit/f9675fbe23abe59c3cf56a6263b7a78ec20e42d4#diff-ed319b24adfa654beeff8b32f9d8f975c62299fbe5cb6fbe1028aa6bbaa369e7. Not sure how it is passing CI tho

[Lldb-commits] [lldb] [LLDB] Add IsCoreDumping to ProcessInstanceInfo (PR #138580)

2025-05-06 Thread David Spickett via lldb-commits
@@ -115,5 +115,8 @@ TEST_F(HostTest, GetProcessInfoSetsPriority) { } ASSERT_TRUE(Info.IsZombie().has_value()); ASSERT_FALSE(Info.IsZombie().value()); + + ASSERT_TRUE(Info.IsCoreDumping().has_value()); + ASSERT_FALSE(Info.IsCoreDumping().value()); DavidS

[Lldb-commits] [lldb] [LLDB] Add IsCoreDumping to ProcessInstanceInfo (PR #138580)

2025-05-06 Thread David Spickett via lldb-commits
@@ -213,6 +213,11 @@ static bool GetStatusInfo(::pid_t Pid, ProcessInstanceInfo &ProcessInfo, } else if (Line.consume_front("Tgid:")) { Line = Line.ltrim(); Line.consumeInteger(10, Tgid); +} else if (Line.consume_front("CoreDumping:")) { + uint32_t cor

[Lldb-commits] [lldb] [LLDB] Fix GetIndexOfChildMemberWithName to handle anonymous structs. (PR #138487)

2025-05-06 Thread Michael Buch via lldb-commits
https://github.com/Michael137 approved this pull request. Some day if we could somehow move all of this into Clang, that'd make me happy :) https://github.com/llvm/llvm-project/pull/138487 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http

[Lldb-commits] [lldb] [LLDB] Fix GetIndexOfChildMemberWithName to handle anonymous structs. (PR #138487)

2025-05-06 Thread Michael Buch via lldb-commits
@@ -0,0 +1,33 @@ +int main(int argc, char** argv) { Michael137 wrote: Can we add a test that involves empty base classes? https://github.com/llvm/llvm-project/pull/138487 ___ lldb-commits mailing list lldb-commits@list

[Lldb-commits] [lldb] [LLDB] Fix GetIndexOfChildMemberWithName to handle anonymous structs. (PR #138487)

2025-05-06 Thread Michael Buch via lldb-commits
@@ -6743,7 +6743,11 @@ size_t TypeSystemClang::GetIndexOfChildMemberWithName( if (field_name.empty()) { CompilerType field_type = GetType(field->getType()); std::vector save_indices = child_indexes; -child_indexes.push_back(child_id

[Lldb-commits] [lldb] Extending LLDB to work on AIX (PR #102601)

2025-05-06 Thread via lldb-commits
https://github.com/ravindra-shinde2 updated https://github.com/llvm/llvm-project/pull/102601 Rate limit 路 GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Ari

[Lldb-commits] [lldb] 1eaa289 - [lldb/Host] Enable inheriting "non-inheritable" FDs (#126935)

2025-05-06 Thread via lldb-commits
Author: Pavel Labath Date: 2025-05-06T15:04:30+02:00 New Revision: 1eaa289472aaddbeabcde10f89cffb161c2dca55 URL: https://github.com/llvm/llvm-project/commit/1eaa289472aaddbeabcde10f89cffb161c2dca55 DIFF: https://github.com/llvm/llvm-project/commit/1eaa289472aaddbeabcde10f89cffb161c2dca55.diff

[Lldb-commits] [lldb] [lldb/Host] Enable inheriting "non-inheritable" FDs (PR #126935)

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

[Lldb-commits] [lldb] [lldb/Host] Enable inheriting "non-inheritable" FDs (PR #126935)

2025-05-06 Thread Pavel Labath via lldb-commits
labath wrote: Thank you. https://github.com/llvm/llvm-project/pull/126935 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb/docs] Fix/improve the gdb command map for dynamic types (PR #138538)

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

[Lldb-commits] [lldb] 6a99d81 - [lldb/docs] Fix/improve the gdb command map for dynamic types (#138538)

2025-05-06 Thread via lldb-commits
Author: Pavel Labath Date: 2025-05-06T15:06:24+02:00 New Revision: 6a99d817204dfa39afc42f1f6a810d82f6a8794f URL: https://github.com/llvm/llvm-project/commit/6a99d817204dfa39afc42f1f6a810d82f6a8794f DIFF: https://github.com/llvm/llvm-project/commit/6a99d817204dfa39afc42f1f6a810d82f6a8794f.diff

[Lldb-commits] [lldb] [lldb][AIX] get host info for AIX (cont..) (PR #138687)

2025-05-06 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Hemang Gadhavi (HemangGadhavi) Changes This PR is in reference to porting LLDB on AIX. Link to discussions on llvm discourse and github: 1. https://discourse.llvm.org/t/port-lldb-to-ibm-aix/80640 2. https://github.com/llvm/llvm-project/iss

[Lldb-commits] [lldb] [lldb][RPC] Upstream Python scripts (PR #138028)

2025-05-06 Thread David Spickett via lldb-commits
@@ -0,0 +1,13 @@ +// Generate a dummy SB API file using lldb-rpc-gen. +# RUN: mkdir -p %t/server +# RUN: mkdir -p %t/lib DavidSpickett wrote: CI failing with: ``` /var/lib/buildkite-agent/builds/linux-56-59b8f5d88-spx4x-1/llvm-project/github-pull-requests/build/t

[Lldb-commits] [lldb] [lldb][AIX] get host info for AIX (cont..) (PR #138687)

2025-05-06 Thread Hemang Gadhavi via lldb-commits
https://github.com/HemangGadhavi created https://github.com/llvm/llvm-project/pull/138687 This PR is in reference to porting LLDB on AIX. Link to discussions on llvm discourse and github: 1. https://discourse.llvm.org/t/port-lldb-to-ibm-aix/80640 2. https://github.com/llvm/llvm-project/issues/

[Lldb-commits] [lldb] [LLDB] Add IsCoreDumping to ProcessInstanceInfo (PR #138580)

2025-05-06 Thread Jacob Lalonde via lldb-commits
@@ -115,5 +115,8 @@ TEST_F(HostTest, GetProcessInfoSetsPriority) { } ASSERT_TRUE(Info.IsZombie().has_value()); ASSERT_FALSE(Info.IsZombie().value()); + + ASSERT_TRUE(Info.IsCoreDumping().has_value()); + ASSERT_FALSE(Info.IsCoreDumping().value()); Jlalon

[Lldb-commits] [lldb] [LLDB] Add IsCoreDumping to ProcessInstanceInfo (PR #138580)

2025-05-06 Thread Jacob Lalonde via lldb-commits
@@ -213,6 +213,11 @@ static bool GetStatusInfo(::pid_t Pid, ProcessInstanceInfo &ProcessInfo, } else if (Line.consume_front("Tgid:")) { Line = Line.ltrim(); Line.consumeInteger(10, Tgid); +} else if (Line.consume_front("CoreDumping:")) { + uint32_t cor

[Lldb-commits] [lldb] [LLDB] Add IsCoreDumping to ProcessInstanceInfo (PR #138580)

2025-05-06 Thread David Spickett via lldb-commits
https://github.com/DavidSpickett approved this pull request. Once you've checked the return value, this LGTM. https://github.com/llvm/llvm-project/pull/138580 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[Lldb-commits] [lldb] [lldb] Upgrade ExtractIndexFromString to use llvm::Expected (PR #138297)

2025-05-06 Thread Charles Zablit via lldb-commits
@@ -270,10 +270,14 @@ class VectorTypeSyntheticFrontEnd : public SyntheticChildrenFrontEnd { } llvm::Expected GetIndexOfChildWithName(ConstString name) override { -const char *item_name = name.GetCString(); -uint32_t idx = ExtractIndexFromString(item_name); -i

[Lldb-commits] [lldb] [lldb] Upgrade ExtractIndexFromString to use llvm::Expected (PR #138297)

2025-05-06 Thread Charles Zablit via lldb-commits
https://github.com/charles-zablit updated https://github.com/llvm/llvm-project/pull/138297 Rate limit 路 GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial

[Lldb-commits] [lldb] [DRAFT][lldb][RPC] Design doc for upstreaming PR (PR #138612)

2025-05-06 Thread David Spickett via lldb-commits
@@ -0,0 +1,94 @@ +LLDB RPC Upstreaming Design Doc +=== + +This document aims to explain the general structure of the upstreaming patches for adding LLDB RPC. The 2 primary concepts explained here will be: + +* How LLDB RPC is used +* How the ``lldb-rpc

[Lldb-commits] [lldb] [DRAFT][lldb][RPC] Design doc for upstreaming PR (PR #138612)

2025-05-06 Thread David Spickett via lldb-commits
https://github.com/DavidSpickett edited https://github.com/llvm/llvm-project/pull/138612 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [DRAFT][lldb][RPC] Design doc for upstreaming PR (PR #138612)

2025-05-06 Thread David Spickett via lldb-commits
https://github.com/DavidSpickett commented: Thanks for writing this up. When we get to a point where PRs have landed you can just change "will be" / "will do" language to "is" / "does" and it should be a good reference for the future. One thing that is missing right now is how to test it. Bas

[Lldb-commits] [lldb] [lldb] Upgrade ExtractIndexFromString to use llvm::Expected (PR #138297)

2025-05-06 Thread Charles Zablit via lldb-commits
https://github.com/charles-zablit updated https://github.com/llvm/llvm-project/pull/138297 >From 8f62523c8ccece4a1c11af51ccf320b19b2ed013 Mon Sep 17 00:00:00 2001 From: Charles Zablit Date: Fri, 2 May 2025 16:37:09 +0100 Subject: [PATCH 1/2] [lldb] Upgrade ExtractIndexFromString to use llvm::E

[Lldb-commits] [lldb] [lldb[RPC] Upstream RPC server interface emitters (PR #138032)

2025-05-06 Thread David Spickett via lldb-commits
@@ -0,0 +1,80 @@ +//===-- RPCServerSourceEmitter.h --===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[Lldb-commits] [lldb] [lldb[RPC] Upstream RPC server interface emitters (PR #138032)

2025-05-06 Thread David Spickett via lldb-commits
@@ -0,0 +1,592 @@ +//===-- RPCServerSourceEmitter.cpp ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[Lldb-commits] [lldb] [lldb[RPC] Upstream RPC server interface emitters (PR #138032)

2025-05-06 Thread David Spickett via lldb-commits
@@ -0,0 +1,592 @@ +//===-- RPCServerSourceEmitter.cpp ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[Lldb-commits] [lldb] [lldb[RPC] Upstream RPC server interface emitters (PR #138032)

2025-05-06 Thread David Spickett via lldb-commits
@@ -0,0 +1,592 @@ +//===-- RPCServerSourceEmitter.cpp ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[Lldb-commits] [lldb] [lldb[RPC] Upstream RPC server interface emitters (PR #138032)

2025-05-06 Thread David Spickett via lldb-commits
@@ -0,0 +1,73 @@ +//===-- RPCServerHeaderEmitter.cpp ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[Lldb-commits] [lldb] [lldb[RPC] Upstream RPC server interface emitters (PR #138032)

2025-05-06 Thread David Spickett via lldb-commits
https://github.com/DavidSpickett edited https://github.com/llvm/llvm-project/pull/138032 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb[RPC] Upstream RPC server interface emitters (PR #138032)

2025-05-06 Thread David Spickett via lldb-commits
https://github.com/DavidSpickett commented: Looks OK in isolation, a bit like looking at a TableGen backend, easier to judge the output than the emitters. Please look over the FIXMEs and see if anything can be done right now, I highlighted one that is potentially a problem but the rest don't s

[Lldb-commits] [lldb] [lldb[RPC] Upstream RPC server interface emitters (PR #138032)

2025-05-06 Thread David Spickett via lldb-commits
@@ -0,0 +1,592 @@ +//===-- RPCServerSourceEmitter.cpp ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[Lldb-commits] [lldb] [lldb[RPC] Upstream RPC server interface emitters (PR #138032)

2025-05-06 Thread David Spickett via lldb-commits
@@ -0,0 +1,592 @@ +//===-- RPCServerSourceEmitter.cpp ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[Lldb-commits] [lldb] [lldb[RPC] Upstream RPC server interface emitters (PR #138032)

2025-05-06 Thread David Spickett via lldb-commits
@@ -0,0 +1,592 @@ +//===-- RPCServerSourceEmitter.cpp ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[Lldb-commits] [lldb] [lldb][RPC] Upstream RPC server interface emitters (PR #138032)

2025-05-06 Thread David Spickett via lldb-commits
https://github.com/DavidSpickett edited https://github.com/llvm/llvm-project/pull/138032 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [DRAFT][lldb][RPC] Design doc for upstreaming PR (PR #138612)

2025-05-06 Thread Chelsea Cassanova via lldb-commits
chelcassanova wrote: Thanks for responding! I'll add a section on testing the tool itself (which we do with shell tests) and testing the interfaces (which we do by running the main LLDB API test suite against liblldbrpc). > Also, is there a way for a developer to set up an lldb-rpc based sessi

[Lldb-commits] [lldb] [DRAFT][lldb][RPC] Design doc for upstreaming PR (PR #138612)

2025-05-06 Thread David Spickett via lldb-commits
DavidSpickett wrote: But there's no lldb-rpc client built into `lldb`, right? Because that would be my first instinct to try. https://github.com/llvm/llvm-project/pull/138612 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm

[Lldb-commits] [lldb] [DRAFT][lldb][RPC] Design doc for upstreaming PR (PR #138612)

2025-05-06 Thread Chelsea Cassanova via lldb-commits
chelcassanova wrote: > Ok so if had a very specific situation I wanted to run via lldb-rpc, I could > write an API test for it? That's cool, if I do find a bug I'd need to write a > test case anyway. Yes, you could have an API test that could then get run against liblldbrpc. We also have deco

[Lldb-commits] [lldb] [lldb] Do not bump memory modificator ID when "internal" debugger memory is updated (PR #129092)

2025-05-06 Thread Mikhail Zakharov via lldb-commits
real-mikhail wrote: With the current test fix (`TestProcessModificationIdOnExpr`), it is locked to `target-x86` but it seems that it should require `target-x86_64` instead. Currently it is not run on Windows-x64 and it fails on Windows-x86 (since the test is checking low level internal data, a

[Lldb-commits] [lldb] [lldb] Fix dynamic type resolutions for core files (PR #138698)

2025-05-06 Thread Michael Buch via lldb-commits
https://github.com/Michael137 approved this pull request. https://github.com/llvm/llvm-project/pull/138698 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][docs] Update instructions to build standalone (PR #137383)

2025-05-06 Thread Alex Langford via lldb-commits
https://github.com/bulbazord approved this pull request. https://github.com/llvm/llvm-project/pull/137383 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][RPC] Upstream lldb-rpc-gen tool (PR #138031)

2025-05-06 Thread Alex Langford via lldb-commits
https://github.com/bulbazord edited https://github.com/llvm/llvm-project/pull/138031 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][RPC] Upstream lldb-rpc-gen tool (PR #138031)

2025-05-06 Thread Alex Langford via lldb-commits
@@ -0,0 +1,535 @@ +//===-- RPCCommon.cpp -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[Lldb-commits] [lldb] [lldb][RPC] Upstream lldb-rpc-gen tool (PR #138031)

2025-05-06 Thread Alex Langford via lldb-commits
@@ -0,0 +1,535 @@ +//===-- RPCCommon.cpp -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[Lldb-commits] [lldb] [lldb][RPC] Upstream lldb-rpc-gen tool (PR #138031)

2025-05-06 Thread Alex Langford via lldb-commits
https://github.com/bulbazord commented: Given that I wrote some of this code, it looks mostly good to me 馃槃 Note that this has a dependency on the emitters so this probably shouldn't land quite yet. I commented on some of the FIXMEs because I think now is the time to really address them. It woul

[Lldb-commits] [lldb] [lldb][RPC] Upstream lldb-rpc-gen tool (PR #138031)

2025-05-06 Thread Alex Langford via lldb-commits
@@ -0,0 +1,535 @@ +//===-- RPCCommon.cpp -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[Lldb-commits] [lldb] [lldb][RPC] Upstream lldb-rpc-gen tool (PR #138031)

2025-05-06 Thread Alex Langford via lldb-commits
@@ -0,0 +1,540 @@ +#include "RPCBindingsHarnessEmitter.h" bulbazord wrote: This file will need a license header. https://github.com/llvm/llvm-project/pull/138031 ___ lldb-commits mailing list lldb-commits@lists.llvm.or

[Lldb-commits] [lldb] [lldb][RPC] Upstream lldb-rpc-gen tool (PR #138031)

2025-05-06 Thread Alex Langford via lldb-commits
@@ -0,0 +1,535 @@ +//===-- RPCCommon.cpp -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[Lldb-commits] [lldb] [lldb][RPC] Upstream lldb-rpc-gen tool (PR #138031)

2025-05-06 Thread Alex Langford via lldb-commits
@@ -0,0 +1,535 @@ +//===-- RPCCommon.cpp -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[Lldb-commits] [lldb] [lldb][RPC] Upstream lldb-rpc-gen tool (PR #138031)

2025-05-06 Thread Alex Langford via lldb-commits
@@ -0,0 +1,535 @@ +//===-- RPCCommon.cpp -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[Lldb-commits] [lldb] [lldb][RPC] Upstream Python scripts (PR #138028)

2025-05-06 Thread Chelsea Cassanova via lldb-commits
@@ -0,0 +1,18 @@ +// Copy lldb-rpc-defines.h from source. +# RUN: mkdir -p %t/input +# RUN: mkdir -p %t/output +# RUN: cp %p/../../../../../include/lldb/lldb-defines.h %t/input + +// Run the convert script on it, then run the framework include fix on it. The framework version fix

[Lldb-commits] [lldb] [lldb][RPC] Upstream Python scripts (PR #138028)

2025-05-06 Thread Chelsea Cassanova via lldb-commits
@@ -0,0 +1,65 @@ +#!/usr/bin/env python3 +# Usage: framework-header-version-fix.py MAJOR MINOR PATCH +# This script modifies lldb-rpc-defines.h to uncomment the macro defines used for the LLDB +# major, minor and patch values as well as populating their definitions. + +import

[Lldb-commits] [lldb] [DRAFT][lldb][RPC] Design doc for upstreaming PR (PR #138612)

2025-05-06 Thread David Spickett via lldb-commits
DavidSpickett wrote: Ok so if had a very specific situation I wanted to run via lldb-rpc, I could write an API test for it? That's cool, if I do find a bug I'd need to write a test case anyway. Please add that as a suggestion in the document where you describe / will describe the testing proc

[Lldb-commits] [lldb] [DRAFT][lldb][RPC] Design doc for upstreaming PR (PR #138612)

2025-05-06 Thread Chelsea Cassanova via lldb-commits
https://github.com/chelcassanova updated https://github.com/llvm/llvm-project/pull/138612 Rate limit 路 GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,

[Lldb-commits] [lldb] [DRAFT][lldb][RPC] Design doc for upstreaming PR (PR #138612)

2025-05-06 Thread Chelsea Cassanova via lldb-commits
@@ -0,0 +1,94 @@ +LLDB RPC Upstreaming Design Doc +=== + +This document aims to explain the general structure of the upstreaming patches for adding LLDB RPC. The 2 primary concepts explained here will be: + +* How LLDB RPC is used +* How the ``lldb-rpc

[Lldb-commits] [lldb] [lldb] Use llvm::bit_ceil (NFC) (PR #138723)

2025-05-06 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Kazu Hirata (kazutakahirata) Changes This patch replaces a local implementation of bit_ceil with llvm::bit_ceil. Technically, the local implementation evaluates to 0 on input 0, whereas llvm::bit_ceil evaluates to 1, but that doesn't matter

[Lldb-commits] [lldb] [lldb] Use llvm::bit_ceil (NFC) (PR #138723)

2025-05-06 Thread Kazu Hirata via lldb-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/138723 This patch replaces a local implementation of bit_ceil with llvm::bit_ceil. Technically, the local implementation evaluates to 0 on input 0, whereas llvm::bit_ceil evaluates to 1, but that doesn't matter

[Lldb-commits] [lldb] [lldb-dap] Migrate attach to typed RequestHandler. (PR #137911)

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

[Lldb-commits] [lldb] [lldb][RPC] Upstream Python scripts (PR #138028)

2025-05-06 Thread Chelsea Cassanova via lldb-commits
@@ -0,0 +1,65 @@ +#!/usr/bin/env python3 +# Usage: convert-lldb-header-to-rpc-header.py +# This scripts takes common LLDB headers (such as lldb-defines.h) and replaces references to LLDB +# with those for RPC. This happens for: +# - namespace definitions +# - namespace usage +

[Lldb-commits] [lldb] [DRAFT][lldb][RPC] Design doc for upstreaming PR (PR #138612)

2025-05-06 Thread Alex Langford via lldb-commits
@@ -0,0 +1,107 @@ +LLDB RPC Upstreaming Design Doc +=== + +This document aims to explain the general structure of the upstreaming patches for adding LLDB RPC. The 2 primary concepts explained here will be: + +* How LLDB RPC is used +* How the ``lldb-rp

[Lldb-commits] [lldb] [DRAFT][lldb][RPC] Design doc for upstreaming PR (PR #138612)

2025-05-06 Thread Alex Langford via lldb-commits
@@ -0,0 +1,94 @@ +LLDB RPC Upstreaming Design Doc +=== + +This document aims to explain the general structure of the upstreaming patches for adding LLDB RPC. The 2 primary concepts explained here will be: + +* How LLDB RPC is used +* How the ``lldb-rpc

[Lldb-commits] [lldb] [DRAFT][lldb][RPC] Design doc for upstreaming PR (PR #138612)

2025-05-06 Thread Alex Langford via lldb-commits
bulbazord wrote: > > But there's no lldb-rpc client built into lldb, right? Because that would > > be my first instinct to try. > > Not directly in lldb itself as the `lldb-rpc-client` binary is a separate > build object. To add to this, LLDBRPC's API should be *almost* the same as LLDB's. Th

[Lldb-commits] [lldb] [DRAFT][lldb][RPC] Design doc for upstreaming PR (PR #138612)

2025-05-06 Thread Alex Langford via lldb-commits
@@ -0,0 +1,107 @@ +LLDB RPC Upstreaming Design Doc +=== + +This document aims to explain the general structure of the upstreaming patches for adding LLDB RPC. The 2 primary concepts explained here will be: + +* How LLDB RPC is used +* How the ``lldb-rp

[Lldb-commits] [lldb] [lldb][RPC] Upstream Python scripts (PR #138028)

2025-05-06 Thread Chelsea Cassanova via lldb-commits
@@ -0,0 +1,44 @@ +#!/usr/bin/env python3 +# Usage: framework-header-include-fix.py +# This script modifies all #include lines in all lldb-rpc headers +# from either filesystem or local includes to liblldbrpc includes. + +import argparse +import os +import re + + +def main(): +

[Lldb-commits] [lldb] [lldb][RPC] Upstream RPC server interface emitters (PR #138032)

2025-05-06 Thread Alex Langford via lldb-commits
@@ -0,0 +1,592 @@ +//===-- RPCServerSourceEmitter.cpp ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[Lldb-commits] [lldb] [lldb][RPC] Upstream RPC server interface emitters (PR #138032)

2025-05-06 Thread Alex Langford via lldb-commits
@@ -0,0 +1,592 @@ +//===-- RPCServerSourceEmitter.cpp ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[Lldb-commits] [lldb] [lldb][RPC] Upstream RPC server interface emitters (PR #138032)

2025-05-06 Thread Alex Langford via lldb-commits
@@ -0,0 +1,592 @@ +//===-- RPCServerSourceEmitter.cpp ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[Lldb-commits] [lldb] [lldb][RPC] Upstream RPC server interface emitters (PR #138032)

2025-05-06 Thread Alex Langford via lldb-commits
@@ -0,0 +1,592 @@ +//===-- RPCServerSourceEmitter.cpp ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[Lldb-commits] [lldb] [lldb][RPC] Upstream RPC server interface emitters (PR #138032)

2025-05-06 Thread Alex Langford via lldb-commits
@@ -0,0 +1,592 @@ +//===-- RPCServerSourceEmitter.cpp ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[Lldb-commits] [lldb] [lldb][RPC] Upstream Python scripts (PR #138028)

2025-05-06 Thread Chelsea Cassanova via lldb-commits
chelcassanova wrote: For what it's worth, while these scripts do work for intended purpose for now, an approach I'd love is to have all this header modification be a subtool of the `lldb-rpc-gen` tool itself. Subtooling a ClangTool is something I'm not too sure on how to do so maybe a better C

[Lldb-commits] [lldb] [lldb] Do not bump memory modificator ID when "internal" debugger memory is updated (PR #129092)

2025-05-06 Thread David Spickett via lldb-commits
DavidSpickett wrote: Please correct the REQUIRES if you have access to such machines to confirm it. Maybe the test is so specific that it is fine to be on only one architecture/os combination. I recall a way in codegen tests to capture a line number in one pattern and re-use that in a check p

[Lldb-commits] [lldb] [lldb][RPC] Upstream RPC server interface emitters (PR #138032)

2025-05-06 Thread Chelsea Cassanova via lldb-commits
@@ -0,0 +1,592 @@ +//===-- RPCServerSourceEmitter.cpp ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Ap

[Lldb-commits] [lldb] [lldb][RPC] Upstream RPC server interface emitters (PR #138032)

2025-05-06 Thread Chelsea Cassanova via lldb-commits
https://github.com/chelcassanova edited https://github.com/llvm/llvm-project/pull/138032 ___ 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-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
@@ -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
@@ -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-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-dap] Change the launch sequence (PR #138219)

2025-05-06 Thread via lldb-commits
kusmour wrote: Unblocked! > @kusmour Please take another look. In the current state all the test pass > (reliably) locally and the linux bot seems happy too. Not sure if we want to > keep the test disabled for now or turn them back on and see what the > reliability is like on the bots. I don

[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-dap] Change the launch sequence (PR #138219)

2025-05-06 Thread Jonas Devlieghere via lldb-commits
JDevlieghere wrote: > Unblocked! Thanks! > > @kusmour Please take another look. In the current state all the test pass > > (reliably) locally and the linux bot seems happy too. Not sure if we want > > to keep the test disabled for now or turn them back on and see what the > > reliability is

  1   2   >