[Lldb-commits] [compiler-rt] [libcxx] [libcxxabi] [libunwind] [lldb] [llvm] [compiler-rt] Disable LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON on AIX. (PR #131200)

2025-03-14 Thread Alexander Richardson via lldb-commits
arichardson wrote: > > Wouldn't it be more maintainable to just force the value to OFF for AIX > > where the `option()` is defined? > > Unfortunately, the cmake command line option `-D > LLVM_ENABLE_PER_TARGET_RUNTIME_DIR=ON` overrides the `option()` in the cmake > file. Sorry if this was no

[Lldb-commits] [lldb] f2e1027 - [lldb] Support discontinuous functions in another Disasembler overload (#130987)

2025-03-14 Thread via lldb-commits
Author: Pavel Labath Date: 2025-03-14T08:24:46+01:00 New Revision: f2e10278efe7a54544bf1a1d34cf55fe80d92316 URL: https://github.com/llvm/llvm-project/commit/f2e10278efe7a54544bf1a1d34cf55fe80d92316 DIFF: https://github.com/llvm/llvm-project/commit/f2e10278efe7a54544bf1a1d34cf55fe80d92316.diff

[Lldb-commits] [lldb] [lldb] Fix TestGdbRemoteForkNonStop.py test (PR #131293)

2025-03-14 Thread Pavel Labath via lldb-commits
https://github.com/labath requested changes to this pull request. You should make the test (python code) pass the correct path instead. We have `self.get_process_working_directory()` for that. https://github.com/llvm/llvm-project/pull/131293 ___ lldb-

[Lldb-commits] [lldb] [lldb][AIX] Support for XCOFF Sections (PR #131304)

2025-03-14 Thread Dhruv Srivastava via lldb-commits
https://github.com/DhruvSrivastavaX created https://github.com/llvm/llvm-project/pull/131304 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/issu

[Lldb-commits] [lldb] [lldb][AIX] Support for XCOFF Sections (PR #131304)

2025-03-14 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Dhruv Srivastava (DhruvSrivastavaX) 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-projec

[Lldb-commits] [lldb] [lldb][AIX] Support for XCOFF Sections (PR #131304)

2025-03-14 Thread Dhruv Srivastava via lldb-commits
https://github.com/DhruvSrivastavaX updated https://github.com/llvm/llvm-project/pull/131304 >From 106e137fea7d4b420ce3d97a8df16c3a91400997 Mon Sep 17 00:00:00 2001 From: Dhruv-Srivastava Date: Fri, 14 Mar 2025 02:51:21 -0500 Subject: [PATCH 1/2] Support for XCOFF Sections --- .../ObjectFile/

[Lldb-commits] [lldb] [lldb][AIX] Support for XCOFF Sections (PR #131304)

2025-03-14 Thread via lldb-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 77ad061923418ba0f4c8fd4a0710a5ace825bf8e 106e137fea7d4b420ce3d97a8df16c3a91400997 --e

[Lldb-commits] [lldb] ec95ce3 - [lldb][AIX] Added base files for NativeProcess Support for AIX (#118160)

2025-03-14 Thread via lldb-commits
Author: Dhruv Srivastava Date: 2025-03-14T16:52:41+05:30 New Revision: ec95ce358c88f1ad8c5c77f07bd556668ece66df URL: https://github.com/llvm/llvm-project/commit/ec95ce358c88f1ad8c5c77f07bd556668ece66df DIFF: https://github.com/llvm/llvm-project/commit/ec95ce358c88f1ad8c5c77f07bd556668ece66df.di

[Lldb-commits] [lldb] [lldb][AIX] Added base files for NativeProcess Support for AIX (PR #118160)

2025-03-14 Thread Dhruv Srivastava via lldb-commits
https://github.com/DhruvSrivastavaX closed https://github.com/llvm/llvm-project/pull/118160 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Fix TestGdbRemoteForkNonStop.py test (PR #131293)

2025-03-14 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Georgiy Samoylov (sga-sc) Changes During lldb testing on remote targets TestGdbRemoteForkNonStop.py freezes because in this test we try to create file on remote machine using absolute file path from local machine. This patch fixes this err

[Lldb-commits] [lldb] [lldb][AIX] Added base files for NativeProcess Support for AIX (PR #118160)

2025-03-14 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,281 @@ +//===-- NativeProcessAIX.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] Support discontinuous functions in another Disasembler overload (PR #130987)

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

[Lldb-commits] [lldb] [lldb][AIX] Added base files for NativeProcess Support for AIX (PR #118160)

2025-03-14 Thread Pavel Labath via lldb-commits
https://github.com/labath approved this pull request. LGTM with the included changes. https://github.com/llvm/llvm-project/pull/118160 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commit

[Lldb-commits] [lldb] [lldb][AIX] Added base files for NativeProcess Support for AIX (PR #118160)

2025-03-14 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,281 @@ +//===-- NativeProcessAIX.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][AIX] Added base files for NativeProcess Support for AIX (PR #118160)

2025-03-14 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,281 @@ +//===-- NativeProcessAIX.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][AIX] Added base files for NativeProcess Support for AIX (PR #118160)

2025-03-14 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,281 @@ +//===-- NativeProcessAIX.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][AIX] Added base files for NativeProcess Support for AIX (PR #118160)

2025-03-14 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,281 @@ +//===-- NativeProcessAIX.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][AIX] Added base files for NativeProcess Support for AIX (PR #118160)

2025-03-14 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,281 @@ +//===-- NativeProcessAIX.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][AIX] Added base files for NativeProcess Support for AIX (PR #118160)

2025-03-14 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,281 @@ +//===-- NativeProcessAIX.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][AIX] Added base files for NativeProcess Support for AIX (PR #118160)

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

[Lldb-commits] [lldb] [lldb][AIX] Added base files for NativeProcess Support for AIX (PR #118160)

2025-03-14 Thread Pavel Labath via lldb-commits
@@ -0,0 +1,137 @@ +//===-- NativeProcessAIX.h -- -*- C++ -*-===// +// +// 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: Apach

[Lldb-commits] [lldb] [lldb-dap] Adding support for cancelling a request. (PR #130169)

2025-03-14 Thread Adrian Vogelsgesang via lldb-commits
@@ -152,6 +153,8 @@ struct Response { bool fromJSON(const llvm::json::Value &, Response &, llvm::json::Path); llvm::json::Value toJSON(const Response &); +using VoidResponseBody = std::nullptr_t; vogelsgesang wrote: `std::monostate` would probably be more idi

[Lldb-commits] [lldb] [LLDB][Telemetry]Init field to nullptr. (PR #131191)

2025-03-14 Thread Vy Nguyen via lldb-commits
https://github.com/oontvoo created https://github.com/llvm/llvm-project/pull/131191 The field is currently un-initialised and can cause a crash in some build configs (where it got random values) >From 543e208f31370310ed938425fbf89ffb3a7232fd Mon Sep 17 00:00:00 2001 From: Vy Nguyen Date: Thu,

[Lldb-commits] [lldb] [lldb] Remove use of comma operator (NFC) (PR #131233)

2025-03-14 Thread Jonas Devlieghere via lldb-commits
https://github.com/JDevlieghere approved this pull request. https://github.com/llvm/llvm-project/pull/131233 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [LLDB][NFC]Refactor common test setup into SetUp method (PR #131203)

2025-03-14 Thread Jonas Devlieghere via lldb-commits
@@ -81,6 +81,20 @@ using namespace lldb_private::telemetry; class TelemetryTest : public testing::Test { public: lldb_private::SubsystemRAII subsystems; + std::vector> + received_entries; + + void SetUp() override { +// This would have been called by the plugin reg

[Lldb-commits] [lldb] Make breakpoint stop reason more accurate for function breakpoints (PR #130841)

2025-03-14 Thread Jacob Lalonde via lldb-commits
@@ -392,9 +391,59 @@ struct DAP { void SetThreadFormat(llvm::StringRef format); - InstructionBreakpoint *GetInstructionBreakpoint(const lldb::break_id_t bp_id); + template + BreakpointType *GetBreakpointFromStopReason(lldb::SBThread &thread) { +// Check to see if h

[Lldb-commits] [lldb] Make breakpoint stop reason more accurate for function breakpoints (PR #130841)

2025-03-14 Thread Jacob Lalonde via lldb-commits
@@ -962,28 +962,43 @@ llvm::json::Value CreateThreadStopped(DAP &dap, lldb::SBThread &thread, body.try_emplace("reason", "step"); break; case lldb::eStopReasonBreakpoint: { -ExceptionBreakpoint *exc_bp = dap.GetExceptionBPFromStopReason(thread); +ExceptionBre

[Lldb-commits] [lldb] [lldb-dap] Updating RequestHandler to encode/decode arguments and response. (PR #130090)

2025-03-14 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/130090 >From f26c9a79ca234bee77ec1a9694bf8be2d0e3745c Mon Sep 17 00:00:00 2001 From: John Harrison Date: Thu, 6 Mar 2025 13:21:10 +0100 Subject: [PATCH 1/8] [lldb-dap] Updating RequestHandler to encode/decode arguments

[Lldb-commits] [lldb] [lldb-dap] Updating RequestHandler to encode/decode arguments and response. (PR #130090)

2025-03-14 Thread John Harrison via lldb-commits
@@ -57,235 +77,306 @@ class RequestHandler { DAP &dap; }; -class AttachRequestHandler : public RequestHandler { -public: - using RequestHandler::RequestHandler; +/// Base class for handling DAP requests. Handlers should declare their +/// arguments and response body types l

[Lldb-commits] [lldb] [lldb-dap] Updating RequestHandler to encode/decode arguments and response. (PR #130090)

2025-03-14 Thread John Harrison via lldb-commits
@@ -663,58 +671,65 @@ void DAP::SetTarget(const lldb::SBTarget target) { } bool DAP::HandleObject(const protocol::Message &M) { - // FIXME: Directly handle `Message` instead of serializing to JSON. - llvm::json::Value v = toJSON(M); - llvm::json::Object object = *v.getAsObj

[Lldb-commits] [lldb] [lldb-dap] Updating RequestHandler to encode/decode arguments and response. (PR #130090)

2025-03-14 Thread John Harrison via lldb-commits
@@ -663,58 +671,65 @@ void DAP::SetTarget(const lldb::SBTarget target) { } bool DAP::HandleObject(const protocol::Message &M) { - // FIXME: Directly handle `Message` instead of serializing to JSON. - llvm::json::Value v = toJSON(M); - llvm::json::Object object = *v.getAsObj

[Lldb-commits] [lldb] [lldb-dap] Allow providing debug adapter arguments in the extension (PR #129262)

2025-03-14 Thread Jonas Devlieghere via lldb-commits
@@ -90,117 +99,119 @@ async function getDAPExecutable( return foundPath; } - return undefined; + throw new ErrorWithNotification( +"Unable to find the path to the LLDB debug adapter executable.", +new OpenSettingsButton("lldb-dap.executable-path"), + ); } -

[Lldb-commits] [lldb] [lldb-dap] Allow providing debug adapter arguments in the extension (PR #129262)

2025-03-14 Thread Jonas Devlieghere via lldb-commits
@@ -90,117 +99,119 @@ async function getDAPExecutable( return foundPath; } - return undefined; + throw new ErrorWithNotification( +"Unable to find the path to the LLDB debug adapter executable.", +new OpenSettingsButton("lldb-dap.executable-path"), + ); } -

[Lldb-commits] [lldb] Parallelize module loading in POSIX dyld code (PR #130912)

2025-03-14 Thread Tom Yang via lldb-commits
@@ -423,34 +493,66 @@ void DynamicLoaderPOSIXDYLD::RefreshModules() { E = m_rendezvous.end(); m_initial_modules_added = true; } -for (; I != E; ++I) { - // Don't load a duplicate copy of ld.so if we have already loaded it - // earlier in LoadInterp

[Lldb-commits] [lldb] Parallelize module loading in POSIX dyld code (PR #130912)

2025-03-14 Thread Tom Yang via lldb-commits
https://github.com/zhyty edited https://github.com/llvm/llvm-project/pull/130912 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] Parallelize module loading in POSIX dyld code (PR #130912)

2025-03-14 Thread Tom Yang via lldb-commits
zhyty wrote: > This looks like the equivalent of #110646 but for Linux and the overall > approach looks good to me. > > My only real concern is about the setting and it being **off** by default. I > would prefer that this is **on** by default and the setting is there as an > escape hatch in c

[Lldb-commits] [lldb] [LLDB][Minidump]Update MinidumpFileBuilder to read and write in chunks (PR #129307)

2025-03-14 Thread Jacob Lalonde via lldb-commits
https://github.com/Jlalond updated https://github.com/llvm/llvm-project/pull/129307 >From 2f77beefb752ffdae908101d75381268203311d6 Mon Sep 17 00:00:00 2001 From: Jacob Lalonde Date: Fri, 28 Feb 2025 11:38:35 -0800 Subject: [PATCH 1/6] Update MinidumpFileBuilder to read and write in chunks ---

[Lldb-commits] [lldb] [LLDB][Minidump]Update MinidumpFileBuilder to read and write in chunks (PR #129307)

2025-03-14 Thread Jacob Lalonde via lldb-commits
@@ -969,6 +969,83 @@ Status MinidumpFileBuilder::DumpDirectories() const { return error; } +Status MinidumpFileBuilder::ReadWriteMemoryInChunks( +const std::unique_ptr &data_up, +const lldb_private::CoreFileMemoryRange &range, uint64_t *bytes_read) { + if (!data_up)

[Lldb-commits] [lldb] [lldb] Update dwim-print to show expanded objc instances (PR #117500)

2025-03-14 Thread via lldb-commits
jimingham wrote: Yes, if this is for dwim-print/expr and only -P1, and obeys the summary dictates, this is fine. https://github.com/llvm/llvm-project/pull/117500 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[Lldb-commits] [lldb] [lldb-dap] Updating RequestHandler to encode/decode arguments and response. (PR #130090)

2025-03-14 Thread John Harrison via lldb-commits
@@ -248,6 +246,7 @@ struct DAP { // Serialize the JSON value into a string and send the JSON packet to // the "out" stream. void SendJSON(const llvm::json::Value &json); + void Send(const protocol::Message &message); ashgti wrote: Done. https://github.

[Lldb-commits] [lldb] [lldb] Update dwim-print to show expanded objc instances (PR #117500)

2025-03-14 Thread Dave Lee via lldb-commits
https://github.com/kastiglione updated https://github.com/llvm/llvm-project/pull/117500 >From 3199d3ee3817a8551cda1f5fce6083fef1c079d9 Mon Sep 17 00:00:00 2001 From: Dave Lee Date: Sat, 23 Nov 2024 18:25:22 -0800 Subject: [PATCH 1/5] [lldb] Update dwim-print to show expanded objc instances Whe

[Lldb-commits] [lldb] [lldb] Implement a statusline in LLDB (PR #121860)

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

[Lldb-commits] [lldb] [lldb-dap] Updating RequestHandler to encode/decode arguments and response. (PR #130090)

2025-03-14 Thread Adrian Vogelsgesang via lldb-commits
@@ -30,216 +30,197 @@ namespace lldb_dap::protocol { // MARK: Base Protocol -// "Request": { -// "allOf": [ { "$ref": "#/definitions/ProtocolMessage" }, { -// "type": "object", -// "description": "A client or debug adapter initiated request.", -// "properties":

[Lldb-commits] [lldb] [lldb-dap] Updating RequestHandler to encode/decode arguments and response. (PR #130090)

2025-03-14 Thread Adrian Vogelsgesang via lldb-commits
@@ -57,235 +68,288 @@ class RequestHandler { DAP &dap; }; -class AttachRequestHandler : public RequestHandler { -public: - using RequestHandler::RequestHandler; +/// Base class for handling DAP requests. Handlers should declare their +/// arguments and response body types l

[Lldb-commits] [lldb] [lldb-dap] Updating RequestHandler to encode/decode arguments and response. (PR #130090)

2025-03-14 Thread Adrian Vogelsgesang via lldb-commits
@@ -6,8 +6,9 @@ // //===--===// -#include "RequestHandler.h" +#include "Handler/RequestHandler.h" #include "DAP.h" +#include "Handler/ResponseHandler.h" vogelsgesang wrote: why do we need t

[Lldb-commits] [lldb] [lldb-dap] Allow providing debug adapter arguments in the extension (PR #129262)

2025-03-14 Thread Matthew Bastien via lldb-commits
https://github.com/matthewbastien updated https://github.com/llvm/llvm-project/pull/129262 >From 7ab3d3ac41e3aadda9c96dc5c5ea2551be7113c4 Mon Sep 17 00:00:00 2001 From: Matthew Bastien Date: Fri, 28 Feb 2025 11:08:25 -0500 Subject: [PATCH 1/8] allow providing debug adapter arguments --- lldb/

[Lldb-commits] [lldb] [LLDB][NFC] Fix typo in docs (PR #131388)

2025-03-14 Thread via lldb-commits
https://github.com/kon72 created https://github.com/llvm/llvm-project/pull/131388 None >From e0d55642575b52a3672db3dab5113da08c39aee1 Mon Sep 17 00:00:00 2001 From: kon72 Date: Sat, 15 Mar 2025 05:48:28 +0900 Subject: [PATCH] [LLDB][NFC] Fix typo in docs --- lldb/docs/use/python-reference.rs

[Lldb-commits] [lldb] [LLDB][Minidump]Update MinidumpFileBuilder to read and write in chunks (PR #129307)

2025-03-14 Thread Greg Clayton via lldb-commits
@@ -969,6 +969,83 @@ Status MinidumpFileBuilder::DumpDirectories() const { return error; } +Status MinidumpFileBuilder::ReadWriteMemoryInChunks( +const std::unique_ptr &data_up, +const lldb_private::CoreFileMemoryRange &range, uint64_t *bytes_read) { + if (!data_up)

[Lldb-commits] [lldb] [LLDB][Minidump]Update MinidumpFileBuilder to read and write in chunks (PR #129307)

2025-03-14 Thread Greg Clayton via lldb-commits
https://github.com/clayborg requested changes to this pull request. https://github.com/llvm/llvm-project/pull/129307 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [LLDB][Minidump]Update MinidumpFileBuilder to read and write in chunks (PR #129307)

2025-03-14 Thread Greg Clayton via lldb-commits
@@ -969,12 +969,89 @@ Status MinidumpFileBuilder::DumpDirectories() const { return error; } -static uint64_t -GetLargestRangeSize(const std::vector &ranges) { - uint64_t max_size = 0; - for (const auto &core_range : ranges) -max_size = std::max(max_size, core_range.ran

[Lldb-commits] [lldb] [LLDB][Minidump]Update MinidumpFileBuilder to read and write in chunks (PR #129307)

2025-03-14 Thread Greg Clayton via lldb-commits
@@ -1088,6 +1157,8 @@ MinidumpFileBuilder::AddMemoryList_64(std::vector &ranges, list_header.BaseRVA = memory_ranges_base_rva; m_data.AppendData(&list_header, sizeof(llvm::minidump::Memory64ListHeader)); + auto data_up = std::make_unique( + std::min(GetLargestRangeS

[Lldb-commits] [lldb] [LLDB][Minidump]Update MinidumpFileBuilder to read and write in chunks (PR #129307)

2025-03-14 Thread Greg Clayton via lldb-commits
@@ -969,6 +969,83 @@ Status MinidumpFileBuilder::DumpDirectories() const { return error; } +Status MinidumpFileBuilder::ReadWriteMemoryInChunks( +const std::unique_ptr &data_up, clayborg wrote: Change this to a `lldb_private::DataBufferHeap &data`. Unle

[Lldb-commits] [lldb] [LLDB][Minidump]Update MinidumpFileBuilder to read and write in chunks (PR #129307)

2025-03-14 Thread Greg Clayton via lldb-commits
@@ -969,12 +969,83 @@ Status MinidumpFileBuilder::DumpDirectories() const { return error; } -static uint64_t -GetLargestRangeSize(const std::vector &ranges) { - uint64_t max_size = 0; - for (const auto &core_range : ranges) -max_size = std::max(max_size, core_range.ran

[Lldb-commits] [lldb] [LLDB][Minidump]Update MinidumpFileBuilder to read and write in chunks (PR #129307)

2025-03-14 Thread Greg Clayton via lldb-commits
@@ -1003,18 +1080,15 @@ MinidumpFileBuilder::AddMemoryList_32(std::vector &ranges, ++region_index; progress.Increment(1, "Adding Memory Range " + core_range.Dump()); -const size_t bytes_read = -m_process_sp->ReadMemory(addr, data_up->GetBytes(), size, erro

[Lldb-commits] [lldb] [LLDB][Minidump]Update MinidumpFileBuilder to read and write in chunks (PR #129307)

2025-03-14 Thread Greg Clayton via lldb-commits
@@ -969,6 +969,83 @@ Status MinidumpFileBuilder::DumpDirectories() const { return error; } +Status MinidumpFileBuilder::ReadWriteMemoryInChunks( +const std::unique_ptr &data_up, +const lldb_private::CoreFileMemoryRange &range, uint64_t *bytes_read) { + if (!data_up)

[Lldb-commits] [lldb] [LLDB][Minidump]Update MinidumpFileBuilder to read and write in chunks (PR #129307)

2025-03-14 Thread Jacob Lalonde via lldb-commits
@@ -969,6 +969,83 @@ Status MinidumpFileBuilder::DumpDirectories() const { return error; } +Status MinidumpFileBuilder::ReadWriteMemoryInChunks( +const std::unique_ptr &data_up, +const lldb_private::CoreFileMemoryRange &range, uint64_t *bytes_read) { + if (!data_up)

[Lldb-commits] [lldb] [lldb][lldb-dap] Return optional from json utils (PR #129919)

2025-03-14 Thread Jonas Devlieghere via lldb-commits
https://github.com/JDevlieghere closed https://github.com/llvm/llvm-project/pull/129919 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Allow providing debug adapter arguments in the extension (PR #129262)

2025-03-14 Thread Matthew Bastien via lldb-commits
https://github.com/matthewbastien updated https://github.com/llvm/llvm-project/pull/129262 >From 7ab3d3ac41e3aadda9c96dc5c5ea2551be7113c4 Mon Sep 17 00:00:00 2001 From: Matthew Bastien Date: Fri, 28 Feb 2025 11:08:25 -0500 Subject: [PATCH 1/9] allow providing debug adapter arguments --- lldb/

[Lldb-commits] [lldb] [LLDB][Minidump]Update MinidumpFileBuilder to read and write in chunks (PR #129307)

2025-03-14 Thread Jacob Lalonde via lldb-commits
@@ -969,12 +969,89 @@ Status MinidumpFileBuilder::DumpDirectories() const { return error; } -static uint64_t -GetLargestRangeSize(const std::vector &ranges) { - uint64_t max_size = 0; - for (const auto &core_range : ranges) -max_size = std::max(max_size, core_range.ran

[Lldb-commits] [lldb] [lldb-dap] Allow providing debug adapter arguments in the extension (PR #129262)

2025-03-14 Thread John Harrison via lldb-commits
@@ -0,0 +1,103 @@ +import * as vscode from "vscode"; +import * as child_process from "child_process"; +import * as util from "util"; +import { LLDBDapServer } from "./lldb-dap-server"; +import { createDebugAdapterExecutable } from "./debug-adapter-factory"; +import { ConfigureButt

[Lldb-commits] [lldb] [lldb] Expose the Target API lock through the SB API (PR #131404)

2025-03-14 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Jonas Devlieghere (JDevlieghere) Changes Expose the target API lock through the SB API. This is motivated by `lldb-dap`, which is built on top of the SB API and needs a way to execute a series of SB API calls in an atomic manner (see #1312

[Lldb-commits] [lldb] [lldb][AIX] Added base files for NativeProcess Support for AIX (PR #118160)

2025-03-14 Thread Dhruv Srivastava via lldb-commits
https://github.com/DhruvSrivastavaX updated https://github.com/llvm/llvm-project/pull/118160 >From 03a290e9c748540b69ca6df7fa9c4481f9cdd3d0 Mon Sep 17 00:00:00 2001 From: Dhruv-Srivastava Date: Sat, 30 Nov 2024 01:14:15 -0600 Subject: [PATCH 01/13] Added base files for NativeProcess for AIX --

[Lldb-commits] [lldb] [lldb-dap] Updating RequestHandler to encode/decode arguments and response. (PR #130090)

2025-03-14 Thread Pavel Labath via lldb-commits
@@ -663,58 +671,65 @@ void DAP::SetTarget(const lldb::SBTarget target) { } bool DAP::HandleObject(const protocol::Message &M) { - // FIXME: Directly handle `Message` instead of serializing to JSON. - llvm::json::Value v = toJSON(M); - llvm::json::Object object = *v.getAsObj

[Lldb-commits] [lldb] [lldb-dap] Updating RequestHandler to encode/decode arguments and response. (PR #130090)

2025-03-14 Thread Pavel Labath via lldb-commits
@@ -57,235 +77,306 @@ class RequestHandler { DAP &dap; }; -class AttachRequestHandler : public RequestHandler { -public: - using RequestHandler::RequestHandler; +/// Base class for handling DAP requests. Handlers should declare their +/// arguments and response body types l

[Lldb-commits] [lldb] [lldb-dap] Updating RequestHandler to encode/decode arguments and response. (PR #130090)

2025-03-14 Thread Pavel Labath via lldb-commits
https://github.com/labath commented: Just a small drive-by. This generally looks good to me, but I'll leave the approval to someone else. https://github.com/llvm/llvm-project/pull/130090 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https:

[Lldb-commits] [lldb] [lldb-dap] Updating RequestHandler to encode/decode arguments and response. (PR #130090)

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

[Lldb-commits] [lldb] [LLDB][Telemetry]Define TargetInfo for collecting data about a target (PR #127834)

2025-03-14 Thread Pavel Labath via lldb-commits
https://github.com/labath commented: I think this is fine now. Time to call in @JDevlieghere :) https://github.com/llvm/llvm-project/pull/127834 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/l

[Lldb-commits] [lldb] [lldb] Expose the Target API lock through the SB API (PR #131404)

2025-03-14 Thread Adrian Vogelsgesang via lldb-commits
@@ -7,6 +7,7 @@ //===--===// #include "lldb/API/SBTarget.h" +#include "lldb/API/SBLock.h" vogelsgesang wrote: duplicated input of this header. Also included below https://github.com/llvm/ll

[Lldb-commits] [lldb] [lldb] Expose the Target API lock through the SB API (PR #131404)

2025-03-14 Thread Adrian Vogelsgesang via lldb-commits
@@ -946,6 +946,10 @@ class LLDB_API SBTarget { /// An error if a Trace already exists or the trace couldn't be created. lldb::SBTrace CreateTrace(SBError &error); +#ifndef SWIG + lldb::SBLock GetAPILock() const; vogelsgesang wrote: `Get` sounds a bit

[Lldb-commits] [lldb] [lldb] Expose the Target API lock through the SB API (PR #131404)

2025-03-14 Thread Adrian Vogelsgesang via lldb-commits
@@ -1692,6 +1692,20 @@ class Target : public std::enable_shared_from_this, } }; +/// The private implementation backing SBLock. +struct APILock { + APILock(std::recursive_mutex &mutex) : lock(mutex) {} + std::lock_guard lock; +}; + +/// The private implementation used by

[Lldb-commits] [lldb] [lldb] Expose the Target API lock through the SB API (PR #131404)

2025-03-14 Thread Adrian Vogelsgesang via lldb-commits
@@ -0,0 +1,40 @@ +//===-- SBLock.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-dap] Updating RequestHandler to encode/decode arguments and response. (PR #130090)

2025-03-14 Thread Adrian Vogelsgesang via lldb-commits
@@ -6,8 +6,9 @@ // //===--===// -#include "RequestHandler.h" +#include "Handler/RequestHandler.h" #include "DAP.h" +#include "Handler/ResponseHandler.h" vogelsgesang wrote: ah, and this was

[Lldb-commits] [lldb] [lldb-dap] Allow providing debug adapter arguments in the extension (PR #129262)

2025-03-14 Thread Jonas Devlieghere via lldb-commits
https://github.com/JDevlieghere approved this pull request. I'd like @vogelsgesang and @ashgti to have a look before we merge this, but the new experience seems really nice. I left a few nits about comments missing a period. Event though this is TypeScript, we should follow the [LLVM Coding S

[Lldb-commits] [lldb] [lldb] Expose the Target API lock through the SB API (PR #131404)

2025-03-14 Thread Jonas Devlieghere via lldb-commits
@@ -1692,6 +1692,20 @@ class Target : public std::enable_shared_from_this, } }; +/// The private implementation backing SBLock. +struct APILock { + APILock(std::recursive_mutex &mutex) : lock(mutex) {} + std::lock_guard lock; +}; + +/// The private implementation used by

[Lldb-commits] [lldb] [lldb-dap] Updating RequestHandler to encode/decode arguments and response. (PR #130090)

2025-03-14 Thread Adrian Vogelsgesang via lldb-commits
@@ -30,216 +30,170 @@ namespace lldb_dap::protocol { // MARK: Base Protocol -// "Request": { -// "allOf": [ { "$ref": "#/definitions/ProtocolMessage" }, { -// "type": "object", -// "description": "A client or debug adapter initiated request.", -// "properties":

[Lldb-commits] [lldb] b4f5dcc - [lldb-dap] Reword the description in package.json

2025-03-14 Thread Jonas Devlieghere via lldb-commits
Author: Jonas Devlieghere Date: 2025-03-14T16:49:06-07:00 New Revision: b4f5dcc65a362a1600a25924c1e55dde49c50a0c URL: https://github.com/llvm/llvm-project/commit/b4f5dcc65a362a1600a25924c1e55dde49c50a0c DIFF: https://github.com/llvm/llvm-project/commit/b4f5dcc65a362a1600a25924c1e55dde49c50a0c.d

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

2025-03-14 Thread via lldb-commits
jimingham wrote: If I make an instance of a collection class (most of which are comprehended by synthetic child providers) and then call: (lldb) expr $my_vector.append(1) (lldb) expr $my_vector Then if I understand correctly, the second printing will not show the elements correctly. Our supp

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

2025-03-14 Thread via lldb-commits
jimingham wrote: If this is only a problem for persistent variables, maybe we can somehow remember that we delayed an update of the memory generation and if we see that's true and we're updating a persistent variable, then clear the memory cache at that point? https://github.com/llvm/llvm-pro

[Lldb-commits] [lldb] [lldb-dap] Updating RequestHandler to encode/decode arguments and response. (PR #130090)

2025-03-14 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/130090 >From f26c9a79ca234bee77ec1a9694bf8be2d0e3745c Mon Sep 17 00:00:00 2001 From: John Harrison Date: Thu, 6 Mar 2025 13:21:10 +0100 Subject: [PATCH 1/9] [lldb-dap] Updating RequestHandler to encode/decode arguments

[Lldb-commits] [lldb] [lldb] Expose the Target API lock through the SB API (PR #131404)

2025-03-14 Thread Jonas Devlieghere via lldb-commits
JDevlieghere wrote: RFC: https://discourse.llvm.org/t/rfc-exposing-the-target-api-lock-through-the-sb-api/85215 https://github.com/llvm/llvm-project/pull/131404 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[Lldb-commits] [lldb] Parallelize module loading in POSIX dyld code (PR #130912)

2025-03-14 Thread Jonas Devlieghere via lldb-commits
https://github.com/JDevlieghere commented: This looks like the equivalent of #110646 but for Linux and the overall approach looks good to me. My only real concern is about the setting and it being **off** by default. I would prefer that this is **on** by default and the setting is there as an

[Lldb-commits] [lldb] Parallelize module loading in POSIX dyld code (PR #130912)

2025-03-14 Thread Jonas Devlieghere via lldb-commits
@@ -423,34 +493,66 @@ void DynamicLoaderPOSIXDYLD::RefreshModules() { E = m_rendezvous.end(); m_initial_modules_added = true; } -for (; I != E; ++I) { - // Don't load a duplicate copy of ld.so if we have already loaded it - // earlier in LoadInterp

[Lldb-commits] [lldb] Parallelize module loading in POSIX dyld code (PR #130912)

2025-03-14 Thread Jonas Devlieghere via lldb-commits
@@ -184,16 +233,37 @@ void DynamicLoaderPOSIXDYLD::DidLaunch() { Status DynamicLoaderPOSIXDYLD::CanLoadImage() { return Status(); } +void DynamicLoaderPOSIXDYLD::SetLoadedModule(const ModuleSP &module_sp, + addr_t link_map_addr) { +

[Lldb-commits] [lldb] 217fc65 - [lldb][lldb-dap] Return optional from json utils (#129919)

2025-03-14 Thread via lldb-commits
Author: Ebuka Ezike Date: 2025-03-14T10:17:18-07:00 New Revision: 217fc6579bd0ddac96c283c4d996e97c9eab181e URL: https://github.com/llvm/llvm-project/commit/217fc6579bd0ddac96c283c4d996e97c9eab181e DIFF: https://github.com/llvm/llvm-project/commit/217fc6579bd0ddac96c283c4d996e97c9eab181e.diff L

[Lldb-commits] [lldb] Make breakpoint stop reason more accurate for function breakpoints (PR #130841)

2025-03-14 Thread Jacob Lalonde via lldb-commits
@@ -392,9 +391,59 @@ struct DAP { void SetThreadFormat(llvm::StringRef format); - InstructionBreakpoint *GetInstructionBreakpoint(const lldb::break_id_t bp_id); + template + BreakpointType *GetBreakpointFromStopReason(lldb::SBThread &thread) { +// Check to see if h

[Lldb-commits] [lldb] Parallelize module loading in POSIX dyld code (PR #130912)

2025-03-14 Thread Jonas Devlieghere via lldb-commits
@@ -0,0 +1,8 @@ + +include "../../../../include/lldb/Core/PropertiesBase.td" + +let Definition = "dynamicloaderposixdyld" in { + def ParallelModuleLoad: Property<"parallel-module-load", "Boolean">, JDevlieghere wrote: If we settle on keeping the per-plugin setti

[Lldb-commits] [lldb] [LLDB][Minidump]Update MinidumpFileBuilder to read and write in chunks (PR #129307)

2025-03-14 Thread Greg Clayton via lldb-commits
@@ -142,6 +142,13 @@ class MinidumpFileBuilder { lldb_private::Status AddDirectory(llvm::minidump::StreamType type, uint64_t stream_size); lldb::offset_t GetCurrentDataEndOffset() const; + + // Read a memory region from the process and w

[Lldb-commits] [lldb] [LLDB][Minidump]Update MinidumpFileBuilder to read and write in chunks (PR #129307)

2025-03-14 Thread Greg Clayton via lldb-commits
@@ -969,6 +969,83 @@ Status MinidumpFileBuilder::DumpDirectories() const { return error; } +Status MinidumpFileBuilder::ReadWriteMemoryInChunks( +const std::unique_ptr &data_up, +const lldb_private::CoreFileMemoryRange &range, uint64_t *bytes_read) {

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

2025-03-14 Thread Mikhail Zakharov via lldb-commits
https://github.com/real-mikhail updated https://github.com/llvm/llvm-project/pull/129092 >From 1d2da22bceb83cbda54567e5f819e5eef4e6 Mon Sep 17 00:00:00 2001 From: Mikhail Zakharov Date: Thu, 27 Feb 2025 18:43:33 +0100 Subject: [PATCH 1/2] [lldb] Do not bump memory modificator ID when "inter

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

2025-03-14 Thread Mikhail Zakharov via lldb-commits
real-mikhail wrote: I checked that and added a test for this case. Updating value works and new value can be displayed (in simple case): ``` (lldb) expr A $mine = {100, 200} (lldb) expr $mine.a = 300 (int) $0 = 300 (lldb) expr $mine (A) $mine = {a=300, b=200} { a = 300 b = 200 } ``` But it

[Lldb-commits] [lldb] [lldb-dap] Allow providing debug adapter arguments in the extension (PR #129262)

2025-03-14 Thread John Harrison via lldb-commits
@@ -0,0 +1,130 @@ +import * as child_process from "node:child_process"; +import * as vscode from "vscode"; + +function areArraysEqual(lhs: T[], rhs: T[]): boolean { + if (lhs.length !== rhs.length) { +return false; + } + for (let i = 0; i < lhs.length; i++) { +if (lhs[i

[Lldb-commits] [lldb] [lldb-dap] Allow providing debug adapter arguments in the extension (PR #129262)

2025-03-14 Thread John Harrison via lldb-commits
https://github.com/ashgti edited https://github.com/llvm/llvm-project/pull/129262 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Allow providing debug adapter arguments in the extension (PR #129262)

2025-03-14 Thread John Harrison via lldb-commits
https://github.com/ashgti deleted https://github.com/llvm/llvm-project/pull/129262 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Allow providing debug adapter arguments in the extension (PR #129262)

2025-03-14 Thread John Harrison via lldb-commits
@@ -0,0 +1,103 @@ +import * as vscode from "vscode"; +import * as child_process from "child_process"; +import * as util from "util"; +import { LLDBDapServer } from "./lldb-dap-server"; +import { createDebugAdapterExecutable } from "./debug-adapter-factory"; +import { ConfigureButt

[Lldb-commits] [lldb] [lldb-dap] Updating RequestHandler to encode/decode arguments and response. (PR #130090)

2025-03-14 Thread John Harrison via lldb-commits
@@ -30,216 +30,170 @@ namespace lldb_dap::protocol { // MARK: Base Protocol -// "Request": { -// "allOf": [ { "$ref": "#/definitions/ProtocolMessage" }, { -// "type": "object", -// "description": "A client or debug adapter initiated request.", -// "properties":