[Lldb-commits] [lldb] [LLDB][Telemetry]Define DebuggerTelemetryInfo and related methods (PR #127696)

2025-02-27 Thread Pavel Labath via lldb-commits
@@ -226,13 +227,45 @@ lldb::SBError SBDebugger::InitializeWithErrorHandling() { return error; } +#if LLVM_ENABLE_TELEMETRY +#if ENABLE_BACKTRACES +static void TelemetryHandler(void *) { + // TODO: get the bt into the msg? + // Also need to pre-alloc the memory for this ent

[Lldb-commits] [lldb] 036f5c0 - [lldb] Reimplement LineTable::FindLineEntryByAddress on top of lower_bound (#127799)

2025-02-27 Thread via lldb-commits
Author: Pavel Labath Date: 2025-02-27T09:56:35+01:00 New Revision: 036f5c0f58d362ad5d28400ccbbecdb3aa6d3133 URL: https://github.com/llvm/llvm-project/commit/036f5c0f58d362ad5d28400ccbbecdb3aa6d3133 DIFF: https://github.com/llvm/llvm-project/commit/036f5c0f58d362ad5d28400ccbbecdb3aa6d3133.diff

[Lldb-commits] [lldb] [lldb] Reimplement LineTable::FindLineEntryByAddress on top of lower_bound (PR #127799)

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

[Lldb-commits] [lldb] [lldb] Reimplement LineTable::FindLineEntryByAddress on top of lower_bound (PR #127799)

2025-02-27 Thread Pavel Labath via lldb-commits
labath wrote: I'm not sure what to think about that. The principal "result" of this function is the `LineEntry` object (most of the call sites don't even use the index), so the functional programmer in me wants to make this return an `optional`. However, that doesn't sit very well with the cod

[Lldb-commits] [lldb] [lldb-dap] Use existing lldb::IOObjectSP for DAP IO (NFC). (PR #128750)

2025-02-27 Thread Pavel Labath via lldb-commits
labath wrote: > The one issue with this is that MainLoop on Windows only supports sockets, > not Files. At the moment we primarily work over stdin/stdout for > communication, although the `--connection` flag is in now, so we can support > sockets. Okay, I think I understand what you're saying

[Lldb-commits] [lldb] [lldb] Restore register state if PrepareTrivialCall fails (PR #129038)

2025-02-27 Thread David Spickett via lldb-commits
DavidSpickett wrote: Existing GCS test case is here - https://github.com/llvm/llvm-project/blob/f6262fa035d8b942bf76e084fa875409bc8ff83a/lldb/test/API/linux/aarch64/gcs/TestAArch64LinuxGCS.py#L286 These don't run on bots yet, only Arm's simulator. https://github.com/llvm/llvm-project/pull/1290

[Lldb-commits] [lldb] [lldb] Restore register state if PrepareTrivialCall fails (PR #129038)

2025-02-27 Thread David Spickett via lldb-commits
https://github.com/DavidSpickett created https://github.com/llvm/llvm-project/pull/129038 Fixes #124269 PrepareTrivalCall always had the possibility of failing, but given that it only wrote to general purpose registers, if it did, you had bigger problems. When it failed, we did not mark the t

[Lldb-commits] [lldb] [lldb] Restore register state if PrepareTrivialCall fails (PR #129038)

2025-02-27 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: David Spickett (DavidSpickett) Changes Fixes #124269 PrepareTrivalCall always had the possibility of failing, but given that it only wrote to general purpose registers, if it did, you had bigger problems. When it failed, we did not mark t

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

2025-02-27 Thread Hu Jialun via lldb-commits
@@ -24,41 +30,95 @@ using namespace llvm; namespace lldb_dap { -FifoFile::FifoFile(StringRef path) : m_path(path) {} +std::error_code EC; +FifoFile::FifoFile(StringRef path) +: m_path(path), m_file(fopen(path.data(), "r+")) { + if (m_file == nullptr) { +EC = std::e

[Lldb-commits] [lldb] [lldb] Prepare UnwindPlans for discontinuous functions (PR #127661)

2025-02-27 Thread Pavel Labath via lldb-commits
https://github.com/labath updated https://github.com/llvm/llvm-project/pull/127661 >From 8419178c265d64ee07fe72089421f500f4bb5452 Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Tue, 18 Feb 2025 16:14:30 +0100 Subject: [PATCH] [lldb] s/ValidRange/ValidRanges in UnwindPlan To be able to descr

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

2025-02-27 Thread Hu Jialun via lldb-commits
https://github.com/SuibianP edited https://github.com/llvm/llvm-project/pull/121269 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] 0865a38 - [lldb] Re-skip PipeTest on windows for now

2025-02-27 Thread Pavel Labath via lldb-commits
Author: Pavel Labath Date: 2025-02-27T13:22:18+01:00 New Revision: 0865a3872ceb65af2660baf6951a4cee44b65fb1 URL: https://github.com/llvm/llvm-project/commit/0865a3872ceb65af2660baf6951a4cee44b65fb1 DIFF: https://github.com/llvm/llvm-project/commit/0865a3872ceb65af2660baf6951a4cee44b65fb1.diff

[Lldb-commits] [lldb] [lldb] Prepare UnwindPlans for discontinuous functions (PR #127661)

2025-02-27 Thread Pavel Labath via lldb-commits
https://github.com/labath updated https://github.com/llvm/llvm-project/pull/127661 >From f64b9615f8ff1c144d28ca20311c96b67732f52e Mon Sep 17 00:00:00 2001 From: Pavel Labath Date: Tue, 18 Feb 2025 16:14:30 +0100 Subject: [PATCH] [lldb] s/ValidRange/ValidRanges in UnwindPlan To be able to descr

[Lldb-commits] [lldb] [llvm] Modify the localCache API to require an explicit commit on CachedFile… (PR #115331)

2025-02-27 Thread via lldb-commits
https://github.com/anjenner updated https://github.com/llvm/llvm-project/pull/115331 >From 3fdba46d41ad9668a114766fe892af497f121cd5 Mon Sep 17 00:00:00 2001 From: Andrew Jenner Date: Thu, 7 Nov 2024 10:47:42 -0500 Subject: [PATCH 1/4] Modify the localCache API to require an explicit commit on

[Lldb-commits] [lldb] [lldb] Assorted improvements to the Pipe class (PR #128719)

2025-02-27 Thread Pavel Labath via lldb-commits
labath wrote: It looks like that the windows timeout fix didn't work -- the new test woke ended up waking slightly sooner than expected (198 vs 200ms). At this point I'm guessing that this is due to the use different clocks in the test (`chrono::steady_clock`) and in `WaitForSingleObject` (I h

[Lldb-commits] [lldb] [lldb] Restore register state if PrepareTrivialCall fails (PR #129038)

2025-02-27 Thread David Spickett via lldb-commits
DavidSpickett wrote: Our policy for the GCS registers is documented here - https://lldb.llvm.org/use/aarch64-linux.html#id3 - but for the GCS enable bit, we restore all of them after an expression. https://github.com/llvm/llvm-project/pull/129038 ___

[Lldb-commits] [lldb] [lldb] s/ValidRange/ValidRanges in UnwindPlan (PR #127661)

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

[Lldb-commits] [lldb] [lldb] s/ValidRange/ValidRanges in UnwindPlan (PR #127661)

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

[Lldb-commits] [lldb] [lldb] s/ValidRange/ValidRanges in UnwindPlan (PR #127661)

2025-02-27 Thread Pavel Labath via lldb-commits
labath wrote: After chewing through #129030, I started to think that the map isn't really necessary and it's often better construct the unwind plan using an auxiliary structure. The new version reverts the container change and the removal of AppendRow. I've kept the AddressRanges change and th

[Lldb-commits] [lldb] fb191ef - [lldb-dap] Adaptor -> Adapter (NFC) (#129110)

2025-02-27 Thread via lldb-commits
Author: Jonas Devlieghere Date: 2025-02-27T19:56:56-06:00 New Revision: fb191efa70ba92c44c57dc53c1b9a2d1915dcabe URL: https://github.com/llvm/llvm-project/commit/fb191efa70ba92c44c57dc53c1b9a2d1915dcabe DIFF: https://github.com/llvm/llvm-project/commit/fb191efa70ba92c44c57dc53c1b9a2d1915dcabe.d

[Lldb-commits] [lldb] [LLDB] Enable TLS Variable Debugging Without Location Info on AArch64 (PR #110822)

2025-02-27 Thread Greg Clayton via lldb-commits
@@ -438,6 +438,19 @@ Status Variable::GetValuesForVariableExpressionPath( return error; } +bool Variable::IsThreadLocal() const { + ModuleSP module_sp(m_owner_scope->CalculateSymbolContextModule()); + // Give the symbol vendor a chance to add to the unified section list. +

[Lldb-commits] [lldb] [lldb-dap] Adding server mode support to lldb-dap VSCode extension. (PR #128957)

2025-02-27 Thread Jonas Devlieghere via lldb-commits
JDevlieghere wrote: > Some thoughts: > > * The server could shut itself down if the process gets a low memory warning > and there are no active clients. There is `SBDebugger::MemoryPressureDetected` that removes modules with a zero refcount. That might be a good API to wire up first. > * Th

[Lldb-commits] [lldb] [LLDB] Enable TLS Variable Debugging Without Location Info on AArch64 (PR #110822)

2025-02-27 Thread Greg Clayton via lldb-commits
https://github.com/clayborg edited https://github.com/llvm/llvm-project/pull/110822 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [LLDB] Enable TLS Variable Debugging Without Location Info on AArch64 (PR #110822)

2025-02-27 Thread Greg Clayton via lldb-commits
@@ -254,7 +254,38 @@ bool ValueObjectVariable::UpdateValue() { m_resolved_value.SetContext(Value::ContextType::Invalid, nullptr); } } - + if (m_error.Fail() && variable->IsThreadLocal()) { +ExecutionContext exe_ctx(GetExecutionContextRef()); +Thread *thread

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

2025-02-27 Thread Hu Jialun via lldb-commits
https://github.com/SuibianP updated https://github.com/llvm/llvm-project/pull/121269 >From fd85cd7225ff5ddb861dbda8f0ace84e53b021bf Mon Sep 17 00:00:00 2001 From: Jialun Hu Date: Mon, 24 Feb 2025 22:10:17 +0800 Subject: [PATCH] [lldb-dap] Implement runInTerminal for Windows Currently, the name

[Lldb-commits] [lldb] [LLDB][Telemetry]Define DebuggerTelemetryInfo and related methods (PR #127696)

2025-02-27 Thread Vy Nguyen via lldb-commits
https://github.com/oontvoo updated https://github.com/llvm/llvm-project/pull/127696 >From 24e9f78744f98ecf3ac01f1f719f1eac9b3479f0 Mon Sep 17 00:00:00 2001 From: Vy Nguyen Date: Tue, 18 Feb 2025 15:58:08 -0500 Subject: [PATCH 01/22] [LLDB][Telemetry]Define DebuggerTelemetryInfo and related met

[Lldb-commits] [lldb] [LLDB] Add DIL code for handling plain variable names. (PR #120971)

2025-02-27 Thread via lldb-commits
cmtice wrote: I think I have addressed all the current review comments. Please take another look now. Thanks! https://github.com/llvm/llvm-project/pull/120971 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[Lldb-commits] [lldb] [lldb-dap] Adaptor -> Adapter (NFC) (PR #129110)

2025-02-27 Thread Jonas Devlieghere via lldb-commits
https://github.com/JDevlieghere updated https://github.com/llvm/llvm-project/pull/129110 >From 1e5b4a5b5ae47f1cd44611d2d8933c33ad04c709 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Thu, 27 Feb 2025 14:11:05 -0600 Subject: [PATCH 1/2] [lldb-dap] Adaptor -> Adapter (NFC) Both spellings

[Lldb-commits] [lldb] 10a9dca - [LLDB][SBProgress] Fix bad optional in sbprogress (#128971)

2025-02-27 Thread via lldb-commits
Author: Jacob Lalonde Date: 2025-02-27T11:08:20-08:00 New Revision: 10a9dcab0a5904ce6c12efb3555a2e31017bce92 URL: https://github.com/llvm/llvm-project/commit/10a9dcab0a5904ce6c12efb3555a2e31017bce92 DIFF: https://github.com/llvm/llvm-project/commit/10a9dcab0a5904ce6c12efb3555a2e31017bce92.diff

[Lldb-commits] [lldb] [LLDB][Telemetry]Define DebuggerTelemetryInfo and related methods (PR #127696)

2025-02-27 Thread Jonas Devlieghere via lldb-commits
@@ -761,12 +764,27 @@ void Debugger::InstanceInitialize() { DebuggerSP Debugger::CreateInstance(lldb::LogOutputCallback log_callback, void *baton) { + lldb_private::telemetry::ScopeTelemetryCollector helper; DebuggerSP debugger_sp(new De

[Lldb-commits] [lldb] [lldb-dap] Adaptor -> Adapter (NFC) (PR #129110)

2025-02-27 Thread Jorge Gorbe Moya via lldb-commits
https://github.com/slackito approved this pull request. Thank you! https://github.com/llvm/llvm-project/pull/129110 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [LLDB][SBProgress] Add a finalize method (PR #128966)

2025-02-27 Thread Jacob Lalonde via lldb-commits
https://github.com/Jlalond updated https://github.com/llvm/llvm-project/pull/128966 >From 7597ee080abcaaa8b88af316409feb849fb6d7f2 Mon Sep 17 00:00:00 2001 From: Jacob Lalonde Date: Wed, 26 Feb 2025 15:38:24 -0800 Subject: [PATCH 1/3] Add a finalize method to the sbprogress, with an associated

[Lldb-commits] [lldb] [LLDB][Telemetry]Define DebuggerTelemetryInfo and related methods (PR #127696)

2025-02-27 Thread Vy Nguyen via lldb-commits
@@ -73,9 +100,50 @@ class TelemetryManager : public llvm::telemetry::Manager { private: std::unique_ptr m_config; + // Each instance of a TelemetryManager is assigned a unique ID. + const std::string m_id; oontvoo wrote: What use case do you have in mind?

[Lldb-commits] [lldb] [LLDB][SBProgress] Add a finalize method (PR #128966)

2025-02-27 Thread Jonas Devlieghere via lldb-commits
@@ -12,3 +12,10 @@ and will always send an initial progress update, updates when Progress::Increment() is called, and also will make sure that a progress completed update is reported even if the user doesn't explicitly cause one to be sent.") lldb::SBProgress; + +%feature("docs

[Lldb-commits] [lldb] [lldb-dap] Creating a dedicated Transport class for DAP communication. (PR #128972)

2025-02-27 Thread Jonas Devlieghere via lldb-commits
@@ -0,0 +1,48 @@ +//===-- Transport.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: Apa

[Lldb-commits] [lldb] [LLDB][Telemetry]Define DebuggerTelemetryInfo and related methods (PR #127696)

2025-02-27 Thread Jonas Devlieghere via lldb-commits
@@ -73,9 +104,46 @@ class TelemetryManager : public llvm::telemetry::Manager { private: std::unique_ptr m_config; + // Each instance of a TelemetryManager is assigned a unique ID. + const std::string m_id; + static std::unique_ptr g_instance; }; +/// Helper RAII clas

[Lldb-commits] [lldb] [LLDB][Telemetry]Define DebuggerTelemetryInfo and related methods (PR #127696)

2025-02-27 Thread Jonas Devlieghere via lldb-commits
https://github.com/JDevlieghere edited https://github.com/llvm/llvm-project/pull/127696 ___ 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 DebuggerTelemetryInfo and related methods (PR #127696)

2025-02-27 Thread Jonas Devlieghere via lldb-commits
@@ -73,9 +104,46 @@ class TelemetryManager : public llvm::telemetry::Manager { private: std::unique_ptr m_config; + // Each instance of a TelemetryManager is assigned a unique ID. + const std::string m_id; + static std::unique_ptr g_instance; }; +/// Helper RAII clas

[Lldb-commits] [lldb] [LLDB][Telemetry]Define DebuggerTelemetryInfo and related methods (PR #127696)

2025-02-27 Thread Jonas Devlieghere via lldb-commits
@@ -73,9 +104,46 @@ class TelemetryManager : public llvm::telemetry::Manager { private: std::unique_ptr m_config; + // Each instance of a TelemetryManager is assigned a unique ID. + const std::string m_id; + static std::unique_ptr g_instance; }; +/// Helper RAII clas

[Lldb-commits] [lldb] [LLDB][SBProgress] Fix bad optional in sbprogress (PR #128971)

2025-02-27 Thread Jacob Lalonde via lldb-commits
https://github.com/Jlalond updated https://github.com/llvm/llvm-project/pull/128971 >From ac90ec73ccfb02923ff0343189d2efaeb6108fa3 Mon Sep 17 00:00:00 2001 From: Jacob Lalonde Date: Wed, 26 Feb 2025 15:48:14 -0800 Subject: [PATCH 1/4] Fix bad optional access in sbprogress --- lldb/source/API/

[Lldb-commits] [lldb] [lldb] Preparation for DWARF indexing speedup (PR #123732)

2025-02-27 Thread Greg Clayton via lldb-commits
https://github.com/clayborg commented: IIUC this is just moving funtionality around right now so that we can eventually plug-in a different `IndexSet` where T is an improved version that doesn't use `ConstString` objects? https://github.com/llvm/llvm-project/pull/123732 ___

[Lldb-commits] [lldb] [LLDB] Enable TLS Variable Debugging Without Location Info on AArch64 (PR #110822)

2025-02-27 Thread Greg Clayton via lldb-commits
@@ -73,19 +73,20 @@ #undef DECLARE_REGISTER_INFOS_ARM64_STRUCT static lldb_private::RegisterInfo g_register_infos_pauth[] = { -DEFINE_EXTENSION_REG(data_mask), DEFINE_EXTENSION_REG(code_mask)}; +DEFINE_EXTENSION_REG(data_mask, KIND_ALL_INVALID), +DEFINE_EXTENSION_R

[Lldb-commits] [lldb] [LLDB] Enable TLS Variable Debugging Without Location Info on AArch64 (PR #110822)

2025-02-27 Thread Greg Clayton via lldb-commits
@@ -254,7 +254,38 @@ bool ValueObjectVariable::UpdateValue() { m_resolved_value.SetContext(Value::ContextType::Invalid, nullptr); } } - + if (m_error.Fail() && variable->IsThreadLocal()) { +ExecutionContext exe_ctx(GetExecutionContextRef()); +Thread *thread

[Lldb-commits] [lldb] [lldb-dap] Adaptor -> Adapter (NFC) (PR #129110)

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

[Lldb-commits] [lldb] [lldb] fix(lldb/**.py): fix invalid escape sequences (PR #94034)

2025-02-27 Thread Eisuke Kawashima via lldb-commits
https://github.com/e-kwsm updated https://github.com/llvm/llvm-project/pull/94034 >From 10dd5f4273efe6288ace38227561d2122d1ff05e Mon Sep 17 00:00:00 2001 From: Eisuke Kawashima Date: Sat, 11 May 2024 02:39:21 +0900 Subject: [PATCH] fix(lldb/**.py): fix invalid escape sequences --- lldb/exampl

[Lldb-commits] [lldb] [LLDB] Enable TLS Variable Debugging Without Location Info on AArch64 (PR #110822)

2025-02-27 Thread Greg Clayton via lldb-commits
https://github.com/clayborg requested changes to this pull request. How is the DWARF encoded differently for a thread local variable for arm64? Normally there is just one location attribute that specifies a TLS address. Why do we need to lookup symbols by name if the DWARF has TLS info in it al

[Lldb-commits] [lldb] [LLDB] Enable TLS Variable Debugging Without Location Info on AArch64 (PR #110822)

2025-02-27 Thread Greg Clayton via lldb-commits
@@ -438,6 +438,19 @@ Status Variable::GetValuesForVariableExpressionPath( return error; } +bool Variable::IsThreadLocal() const { + ModuleSP module_sp(m_owner_scope->CalculateSymbolContextModule()); + // Give the symbol vendor a chance to add to the unified section list. +

[Lldb-commits] [lldb] [LLDB] Enable TLS Variable Debugging Without Location Info on AArch64 (PR #110822)

2025-02-27 Thread Greg Clayton via lldb-commits
@@ -790,9 +793,12 @@ DynamicLoaderPOSIXDYLD::GetThreadLocalData(const lldb::ModuleSP module_sp, LLDB_LOGF(log, "GetThreadLocalData error: fail to read modid"); return LLDB_INVALID_ADDRESS; } - + const llvm::Triple &triple_ref = + m_process->GetTarget().GetArchi

[Lldb-commits] [lldb] [LLDB] Enable TLS Variable Debugging Without Location Info on AArch64 (PR #110822)

2025-02-27 Thread Greg Clayton via lldb-commits
@@ -254,7 +254,38 @@ bool ValueObjectVariable::UpdateValue() { m_resolved_value.SetContext(Value::ContextType::Invalid, nullptr); } } - + if (m_error.Fail() && variable->IsThreadLocal()) { +ExecutionContext exe_ctx(GetExecutionContextRef()); +Thread *thread

[Lldb-commits] [lldb] [lldb-dap] Add process picker command to VS Code extension (PR #128943)

2025-02-27 Thread Jonas Devlieghere via lldb-commits
JDevlieghere wrote: Thanks for the additional perspective. I was on the fence when I mentioned it and it sounds like sticking with the TS approach avoids some complications, plus it matches what other VSCode plugins are doing. https://github.com/llvm/llvm-project/pull/128943 _

[Lldb-commits] [lldb] [lldb-dap] Creating a dedicated Transport class for DAP communication. (PR #128972)

2025-02-27 Thread Jonas Devlieghere via lldb-commits
@@ -0,0 +1,192 @@ +//===-- Protocol.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: Ap

[Lldb-commits] [lldb] [lldb-dap] Creating a dedicated Transport class for DAP communication. (PR #128972)

2025-02-27 Thread Jonas Devlieghere via lldb-commits
@@ -0,0 +1,110 @@ +//===-- Transport.cpp ---*- C++ -*-===// JDevlieghere wrote: The `*- C++ -*` was only meant to go into headers (to tell emacs they were C++ rather than C headers) but there was an RFC to drop it altoget

[Lldb-commits] [lldb] [lldb-dap] Creating a dedicated Transport class for DAP communication. (PR #128972)

2025-02-27 Thread Jonas Devlieghere via lldb-commits
https://github.com/JDevlieghere commented: This PR feels like it combines 3 different changes: - Introducing the Transport class - Using LLDB's logging - Introducing the protocol class Would it be a lot of work to split this up into 3 separate PRs? If not I'm happy to review everything to

[Lldb-commits] [lldb] [lldb-dap] Creating a dedicated Transport class for DAP communication. (PR #128972)

2025-02-27 Thread Jonas Devlieghere via lldb-commits
@@ -0,0 +1,192 @@ +//===-- Protocol.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: Ap

[Lldb-commits] [lldb] [lldb-dap] Creating a dedicated Transport class for DAP communication. (PR #128972)

2025-02-27 Thread Jonas Devlieghere via lldb-commits
https://github.com/JDevlieghere edited https://github.com/llvm/llvm-project/pull/128972 ___ 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 process picker command to VS Code extension (PR #128943)

2025-02-27 Thread Jonas Devlieghere via lldb-commits
JDevlieghere wrote: Adding Adrian and Walter as reviewers and tagging @Da-Viper as they might want to take a look. To me this looks good. https://github.com/llvm/llvm-project/pull/128943 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https

[Lldb-commits] [lldb] [lldb-dap] Creating a new set of types for handling DAP messages. (PR #129155)

2025-02-27 Thread John Harrison via lldb-commits
ashgti wrote: For reference, this is part of a larger refactor to support 'cancel' requests. I have a working prototype in https://github.com/ashgti/llvm-project/tree/lldb-dap-cancel that I am splitting up into smaller individual patches. https://github.com/llvm/llvm-project/pull/129155 _

[Lldb-commits] [lldb] [lldb-dap] Creating a dedicated Transport class for DAP communication. (PR #128972)

2025-02-27 Thread John Harrison via lldb-commits
https://github.com/ashgti converted_to_draft https://github.com/llvm/llvm-project/pull/128972 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Creating well defined structures for DAP messages. (PR #129155)

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

[Lldb-commits] [lldb] [lldb-dap] Creating a new set of types for handling DAP messages. (PR #129155)

2025-02-27 Thread John Harrison via lldb-commits
https://github.com/ashgti created https://github.com/llvm/llvm-project/pull/129155 This adds a new `Protocol.{h,cpp}` for defining structured types that represent Debug Adapter Protocol messages. This adds static types to define well structure messages for the protocol. This iteration include

[Lldb-commits] [lldb] [lldb-dap] Creating well defined structures for DAP messages. (PR #129155)

2025-02-27 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: John Harrison (ashgti) Changes This adds a new `Protocol.{h,cpp}` for defining structured types that represent Debug Adapter Protocol messages. This adds static types to define well structure messages for the protocol. This iteration incl

[Lldb-commits] [lldb] [lldb-dap] Creating a dedicated Transport class for DAP communication. (PR #128972)

2025-02-27 Thread John Harrison via lldb-commits
https://github.com/ashgti closed https://github.com/llvm/llvm-project/pull/128972 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Creating a dedicated Transport class for DAP communication. (PR #128972)

2025-02-27 Thread John Harrison via lldb-commits
ashgti wrote: Replacing this with https://github.com/llvm/llvm-project/pull/129155 for a smaller set of files to review. https://github.com/llvm/llvm-project/pull/128972 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/

[Lldb-commits] [lldb] [lldb-dap] Creating well defined structures for DAP messages. (PR #129155)

2025-02-27 Thread John Harrison via lldb-commits
https://github.com/ashgti ready_for_review https://github.com/llvm/llvm-project/pull/129155 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Creating well defined structures for DAP messages. (PR #129155)

2025-02-27 Thread John Harrison via lldb-commits
https://github.com/ashgti edited https://github.com/llvm/llvm-project/pull/129155 ___ 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 DebuggerTelemetryInfo and related methods (PR #127696)

2025-02-27 Thread Jonas Devlieghere via lldb-commits
@@ -73,9 +104,46 @@ class TelemetryManager : public llvm::telemetry::Manager { private: std::unique_ptr m_config; + // Each instance of a TelemetryManager is assigned a unique ID. + const std::string m_id; + static std::unique_ptr g_instance; }; +/// Helper RAII clas

[Lldb-commits] [lldb] [lldb-dap] Adding server mode support to lldb-dap VSCode extension. (PR #128957)

2025-02-27 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/128957 >From e95459a73ad5a1448841ed6c2422f66b23f6b486 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Wed, 26 Feb 2025 14:56:10 -0800 Subject: [PATCH 1/3] [lldb-dap] Adding server mode support to lldb-dap VSCode ext

[Lldb-commits] [lldb] [lldb-dap] Adding server mode support to lldb-dap VSCode extension. (PR #128957)

2025-02-27 Thread John Harrison via lldb-commits
@@ -88,6 +88,12 @@ "additionalProperties": { "type": "string" } +}, +"lldb-dap.serverMode": { + "scope": "resource", + "type": "boolean", + "description": "Run lldb-dap in server mode. When enabled, lldb

[Lldb-commits] [lldb] [LLDB][SBProgress] Add a finalize method (PR #128966)

2025-02-27 Thread Jacob Lalonde via lldb-commits
https://github.com/Jlalond updated https://github.com/llvm/llvm-project/pull/128966 >From 7597ee080abcaaa8b88af316409feb849fb6d7f2 Mon Sep 17 00:00:00 2001 From: Jacob Lalonde Date: Wed, 26 Feb 2025 15:38:24 -0800 Subject: [PATCH 1/3] Add a finalize method to the sbprogress, with an associated

[Lldb-commits] [lldb] [LLDB][Telemetry]Define DebuggerTelemetryInfo and related methods (PR #127696)

2025-02-27 Thread Vy Nguyen via lldb-commits
https://github.com/oontvoo updated https://github.com/llvm/llvm-project/pull/127696 >From 24e9f78744f98ecf3ac01f1f719f1eac9b3479f0 Mon Sep 17 00:00:00 2001 From: Vy Nguyen Date: Tue, 18 Feb 2025 15:58:08 -0500 Subject: [PATCH 01/18] [LLDB][Telemetry]Define DebuggerTelemetryInfo and related met

[Lldb-commits] [lldb] [LLDB][Telemetry]Define DebuggerTelemetryInfo and related methods (PR #127696)

2025-02-27 Thread Jonas Devlieghere via lldb-commits
@@ -73,9 +100,50 @@ class TelemetryManager : public llvm::telemetry::Manager { private: std::unique_ptr m_config; + // Each instance of a TelemetryManager is assigned a unique ID. + const std::string m_id; + static std::unique_ptr g_instance; }; +/// Helper RAII clas

[Lldb-commits] [lldb] [LLDB][Telemetry]Define DebuggerTelemetryInfo and related methods (PR #127696)

2025-02-27 Thread Jonas Devlieghere via lldb-commits
https://github.com/JDevlieghere commented: A few more small comments but the overall approach LGTM. https://github.com/llvm/llvm-project/pull/127696 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[Lldb-commits] [lldb] [LLDB][Telemetry]Define DebuggerTelemetryInfo and related methods (PR #127696)

2025-02-27 Thread Jonas Devlieghere via lldb-commits
@@ -41,6 +42,7 @@ struct LLDBBaseTelemetryInfo : public llvm::telemetry::TelemetryInfo { std::optional end_time; // TBD: could add some memory stats here too? + uint64_t debugger_id = LLDB_INVALID_UID; JDevlieghere wrote: ```suggestion lldb::user_id_t

[Lldb-commits] [lldb] [LLDB][Telemetry]Define DebuggerTelemetryInfo and related methods (PR #127696)

2025-02-27 Thread Vy Nguyen via lldb-commits
https://github.com/oontvoo updated https://github.com/llvm/llvm-project/pull/127696 >From 24e9f78744f98ecf3ac01f1f719f1eac9b3479f0 Mon Sep 17 00:00:00 2001 From: Vy Nguyen Date: Tue, 18 Feb 2025 15:58:08 -0500 Subject: [PATCH 01/20] [LLDB][Telemetry]Define DebuggerTelemetryInfo and related met

[Lldb-commits] [lldb] [lldb-dap] Gardening in lldb-dap.cpp (NFC) (PR #128949)

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

[Lldb-commits] [lldb] 8f8529c - [lldb-dap] Gardening in lldb-dap.cpp (NFC) (#128949)

2025-02-27 Thread via lldb-commits
Author: Jonas Devlieghere Date: 2025-02-27T12:42:54-06:00 New Revision: 8f8529c137b1f659595e1064f5c8806eeb628b36 URL: https://github.com/llvm/llvm-project/commit/8f8529c137b1f659595e1064f5c8806eeb628b36 DIFF: https://github.com/llvm/llvm-project/commit/8f8529c137b1f659595e1064f5c8806eeb628b36.d

[Lldb-commits] [lldb] [LLDB][Telemetry]Define DebuggerTelemetryInfo and related methods (PR #127696)

2025-02-27 Thread Vy Nguyen via lldb-commits
@@ -761,12 +764,27 @@ void Debugger::InstanceInitialize() { DebuggerSP Debugger::CreateInstance(lldb::LogOutputCallback log_callback, void *baton) { + lldb_private::telemetry::ScopeTelemetryCollector helper; DebuggerSP debugger_sp(new De

[Lldb-commits] [lldb] [LLDB][Telemetry]Define DebuggerTelemetryInfo and related methods (PR #127696)

2025-02-27 Thread Vy Nguyen via lldb-commits
@@ -73,9 +104,46 @@ class TelemetryManager : public llvm::telemetry::Manager { private: std::unique_ptr m_config; + // Each instance of a TelemetryManager is assigned a unique ID. + const std::string m_id; + static std::unique_ptr g_instance; }; +/// Helper RAII clas

[Lldb-commits] [lldb] [LLDB][Telemetry]Define DebuggerTelemetryInfo and related methods (PR #127696)

2025-02-27 Thread Vy Nguyen via lldb-commits
https://github.com/oontvoo updated https://github.com/llvm/llvm-project/pull/127696 >From 24e9f78744f98ecf3ac01f1f719f1eac9b3479f0 Mon Sep 17 00:00:00 2001 From: Vy Nguyen Date: Tue, 18 Feb 2025 15:58:08 -0500 Subject: [PATCH 01/14] [LLDB][Telemetry]Define DebuggerTelemetryInfo and related met

[Lldb-commits] [lldb] [lldb] Handle improperly nested blocks differently (PR #117725)

2025-02-27 Thread Greg Clayton via lldb-commits
https://github.com/clayborg commented: Will this patch cause us to be able to have a `DW_TAG_subprogram` whose range is `[0x1000-0x2000)` and then have a `DW_AT_lexical_block` whose range doesn't exist within the `DW_TAG_subprogram` range and we will add it to the `DW_TAG_subprogram`? I worry

[Lldb-commits] [lldb] [LLDB][Telemetry]Define DebuggerTelemetryInfo and related methods (PR #127696)

2025-02-27 Thread Vy Nguyen via lldb-commits
oontvoo wrote: @labath @JDevlieghere I think I've resolved all the comments + added test. Please have a look when you can. Thanks! https://github.com/llvm/llvm-project/pull/127696 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lis

[Lldb-commits] [lldb] [LLDB][SBProgress] Add a finalize method (PR #128966)

2025-02-27 Thread Jacob Lalonde via lldb-commits
https://github.com/Jlalond updated https://github.com/llvm/llvm-project/pull/128966 >From 7597ee080abcaaa8b88af316409feb849fb6d7f2 Mon Sep 17 00:00:00 2001 From: Jacob Lalonde Date: Wed, 26 Feb 2025 15:38:24 -0800 Subject: [PATCH 1/4] Add a finalize method to the sbprogress, with an associated

[Lldb-commits] [lldb] [LLDB][Telemetry]Define DebuggerTelemetryInfo and related methods (PR #127696)

2025-02-27 Thread Vy Nguyen via lldb-commits
https://github.com/oontvoo updated https://github.com/llvm/llvm-project/pull/127696 >From 24e9f78744f98ecf3ac01f1f719f1eac9b3479f0 Mon Sep 17 00:00:00 2001 From: Vy Nguyen Date: Tue, 18 Feb 2025 15:58:08 -0500 Subject: [PATCH 01/19] [LLDB][Telemetry]Define DebuggerTelemetryInfo and related met

[Lldb-commits] [lldb] [lldb-dap] Adaptor -> Adapter (NFC) (PR #129110)

2025-02-27 Thread John Harrison via lldb-commits
https://github.com/ashgti approved this pull request. https://github.com/llvm/llvm-project/pull/129110 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Creating a dedicated Transport class for DAP communication. (PR #128972)

2025-02-27 Thread John Harrison via lldb-commits
ashgti wrote: > This PR feels like it combines 3 different changes: > > * Introducing the Transport class > * Using LLDB's logging > * Introducing the protocol class > > Would it be a lot of work to split this up into 3 separate PRs? If not I'm > happy to review everything together here. The T

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

2025-02-27 Thread Mikhail Zakharov via lldb-commits
https://github.com/real-mikhail created https://github.com/llvm/llvm-project/pull/129092 This change prevents invalidating and updating values in `ValueObject::UpdateValueIfNeeded` when only "internal" debugger memory is updated. Writing to "internal" debugger memory happens when, for instance

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

2025-02-27 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Mikhail Zakharov (real-mikhail) Changes This change prevents invalidating and updating values in `ValueObject::UpdateValueIfNeeded` when only "internal" debugger memory is updated. Writing to "internal" debugger memory happens when, for in

[Lldb-commits] [lldb] [LLDB][Telemetry]Define DebuggerTelemetryInfo and related methods (PR #127696)

2025-02-27 Thread Vy Nguyen via lldb-commits
@@ -73,9 +104,46 @@ class TelemetryManager : public llvm::telemetry::Manager { private: std::unique_ptr m_config; + // Each instance of a TelemetryManager is assigned a unique ID. + const std::string m_id; + static std::unique_ptr g_instance; }; +/// Helper RAII clas

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

2025-02-27 Thread via lldb-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[Lldb-commits] [lldb] [LLDB][SBProgress] Fix bad optional in sbprogress (PR #128971)

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

[Lldb-commits] [lldb] Push down the swig module to avoid an import cycle (PR #129135)

2025-02-27 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: wieDasDing (dingxiangfei2009) Changes Fix #92603 This replaces #113066. I finally came back to this issue and it seems that this approach is still very promising. As requested, I have added a short explanation as to why CPython module sho

[Lldb-commits] [lldb] [lldb] Make ELF files able to load section headers from memory. (PR #129166)

2025-02-27 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Greg Clayton (clayborg) Changes When we don't specify the size of an ELF image when loading from memory, our data for the ELF file might end up being truncated to only include the ELF header and the program headers. The ObjectFileELF class

[Lldb-commits] [lldb] [lldb] Make ELF files able to load section headers from memory. (PR #129166)

2025-02-27 Thread Greg Clayton via lldb-commits
https://github.com/clayborg created https://github.com/llvm/llvm-project/pull/129166 When we don't specify the size of an ELF image when loading from memory, our data for the ELF file might end up being truncated to only include the ELF header and the program headers. The ObjectFileELF class w

[Lldb-commits] [lldb] [lldb] Make ELF files able to load section headers from memory. (PR #129166)

2025-02-27 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 1199bbb396fb9554401ad5ae1816b6648bab76a9 d653c41231ab7dd2ee649ea6ebef3d12aed4d4b9 --e

[Lldb-commits] [lldb] [lldb-dap] Creating a dedicated Transport class for DAP communication. (PR #128972)

2025-02-27 Thread John Harrison via lldb-commits
https://github.com/ashgti ready_for_review https://github.com/llvm/llvm-project/pull/128972 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Creating a dedicated Transport class for DAP communication. (PR #128972)

2025-02-27 Thread John Harrison via lldb-commits
https://github.com/ashgti edited https://github.com/llvm/llvm-project/pull/128972 ___ 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 DebuggerTelemetryInfo and related methods (PR #127696)

2025-02-27 Thread Vy Nguyen via lldb-commits
https://github.com/oontvoo updated https://github.com/llvm/llvm-project/pull/127696 >From 24e9f78744f98ecf3ac01f1f719f1eac9b3479f0 Mon Sep 17 00:00:00 2001 From: Vy Nguyen Date: Tue, 18 Feb 2025 15:58:08 -0500 Subject: [PATCH 01/17] [LLDB][Telemetry]Define DebuggerTelemetryInfo and related met

[Lldb-commits] [lldb] [lldb-dap] Adaptor -> Adapter (NFC) (PR #129110)

2025-02-27 Thread John Harrison via lldb-commits
ashgti wrote: There are a few other places where `Adaptor` is used: ``` $ rg -i adaptor lldb lldb/packages/Python/lldbsuite/test/test_categories.py 34:"lldb-dap": "Tests for the Debug Adaptor Protocol with lldb-dap", lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py 79:

[Lldb-commits] [lldb] [lldb-dap] Adaptor -> Adapter (NFC) (PR #129110)

2025-02-27 Thread John Harrison via lldb-commits
https://github.com/ashgti approved this pull request. https://github.com/llvm/llvm-project/pull/129110 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Adaptor -> Adapter (NFC) (PR #129110)

2025-02-27 Thread Jonas Devlieghere via lldb-commits
https://github.com/JDevlieghere created https://github.com/llvm/llvm-project/pull/129110 Both spellings are considered correct and acceptable, with adapter being more common in American English. Given that DAP stands for Debug Adapter Protocol (with an e) let's go with that as the canonical sp

  1   2   >