[Lldb-commits] [lldb] Complete the Implementation of DAP modules explorer. (PR #139934)

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

[Lldb-commits] [lldb] Complete the Implementation of DAP modules explorer. (PR #139934)

2025-05-14 Thread John Harrison via lldb-commits
@@ -244,6 +244,20 @@ } } ], +"commands": [ + { +"command": "lldb-dap.modules.copyProperty", +"title": "Copy Value" + } +], +"menus": { + "view/item/context": [ ashgti wrote: Can we also disable the `

[Lldb-commits] [lldb] [lldb-dap] Setup DAP for unit testing. (PR #139937)

2025-05-14 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/139937 >From 6f947e38ad4f744754cf13c1094c4e5e3fd249b6 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Wed, 14 May 2025 10:31:40 -0700 Subject: [PATCH 1/4] [lldb-dap] Setup DAP for unit testing. This is a very simple

[Lldb-commits] [lldb] [lldb-dap] Add unit test for protocol enum types (PR #139848)

2025-05-13 Thread John Harrison via lldb-commits
https://github.com/ashgti approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/139848 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb][lldb-dap] Basic implementation of a deferred request. (PR #140260)

2025-05-16 Thread John Harrison via lldb-commits
@@ -748,7 +748,7 @@ bool DAP::HandleObject(const Message &M) { dispatcher.Set("client_data", llvm::Twine("request_command:", req->command).str()); if (handler_pos != request_handlers.end()) { - handler_pos->second->Run(*req); + defer = handl

[Lldb-commits] [lldb] [lldb][lldb-dap] Basic implementation of a deferred request. (PR #140260)

2025-05-16 Thread John Harrison via lldb-commits
@@ -46,7 +46,14 @@ class BaseRequestHandler { virtual ~BaseRequestHandler() = default; - void Run(const protocol::Request &); + /// Return `true` if the request should be deferred. + [[nodiscard]] + bool Run(const protocol::Request &); + + [[nodiscard]] + virtual bool

[Lldb-commits] [lldb] [lldb-dap] Adding additional asserts to unit tests. (PR #140107)

2025-05-16 Thread John Harrison via lldb-commits
@@ -60,7 +60,7 @@ def test_breakpoint_events(self): response = self.dap_server.request_setBreakpoints( main_source_path, [main_bp_line] ) -self.assertTrue(response) +self.assertTrue(response["success"]) ashgti wrote:

[Lldb-commits] [lldb] [lldb-dap] Adding additional asserts to unit tests. (PR #140107)

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

[Lldb-commits] [lldb] [lldb-dap] Listen for broadcast classes. (PR #140142)

2025-05-16 Thread John Harrison via lldb-commits
ashgti wrote: Okay, to summarize my previous comment, I think we could address this in the following ways: 1. Listen for the broadcast class instead of a specific broadcaster. The downside here is we may see events for targets/processes we're not directly interested in. 1. In the setBreakpoin

[Lldb-commits] [lldb] [lldb-dap] Member variable cleanup in DAP.{cpp, h} (NFC) (PR #140390)

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

[Lldb-commits] [lldb] [lldb-dap] In DAP unit tests, add helpers for loading a CoreFile. (PR #140738)

2025-05-20 Thread John Harrison via lldb-commits
https://github.com/ashgti created https://github.com/llvm/llvm-project/pull/140738 This allows us to have a SBTarget and SBProcess for creating unit tests. >From ac49fd8160b358a809be627502e1c03ad9cde08a Mon Sep 17 00:00:00 2001 From: John Harrison Date: Tue, 20 May 2025 07:34:02 -0700 Subject:

[Lldb-commits] [lldb] [lldb-dap] Test gardening, enabling tests and improving doc comments. (PR #140777)

2025-05-20 Thread John Harrison via lldb-commits
https://github.com/ashgti created https://github.com/llvm/llvm-project/pull/140777 A bit of test gardenining. Enabling tests that were marked as skipped as part of https://github.com/llvm/llvm-project/issues/137660. Fixed up some comments and doc comments and fixed some test helpers. >From e5

[Lldb-commits] [lldb] [Support] [lldb] Fix thread jump #45326 (PR #135778)

2025-05-20 Thread John Harrison via lldb-commits
@@ -1649,11 +1649,14 @@ class CommandObjectThreadJump : public CommandObjectParsed { return Status::FromErrorStringWithFormat("invalid line number: '%s'.", option_arg.str().c_str()); break; - case 'b':

[Lldb-commits] [lldb] [lldb-dap] Test gardening, enabling tests and improving doc comments. (PR #140777)

2025-05-20 Thread John Harrison via lldb-commits
@@ -1,26 +1,23 @@ """ -Test lldb-dap setBreakpoints request +Test lldb-dap console output """ -import dap_server import lldbdap_testcase -from lldbsuite.test import lldbutil from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * -def get_subproces

[Lldb-commits] [lldb] [lldb-dap] fix disassembly request instruction offset handling (PR #140486)

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

[Lldb-commits] [lldb] [lldb-dap] fix disassembly request instruction offset handling (PR #140486)

2025-05-20 Thread John Harrison via lldb-commits
@@ -349,6 +349,10 @@ class LLDB_API SBTarget { SBError SetLabel(const char *label); + uint32_t GetMinimumOpcodeByteSize() const; + + uint32_t GetMaximumOpcodeByteSize() const; ashgti wrote: Can we add a comment? ``` Architecture opcode byte size width ac

[Lldb-commits] [lldb] [lldb-dap] fix disassembly request instruction offset handling (PR #140486)

2025-05-20 Thread John Harrison via lldb-commits
https://github.com/ashgti approved this pull request. Looks good! https://github.com/llvm/llvm-project/pull/140486 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Avoid double 'new' events for dyld on Darwin (PR #140810)

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

[Lldb-commits] [lldb] [lldb-dap] Test gardening, enabling tests and improving doc comments. (PR #140777)

2025-05-20 Thread John Harrison via lldb-commits
@@ -1102,3 +1103,28 @@ def is_feature_enabled(): return "%s is not supported on this system." % feature return skipTestIfFn(is_feature_enabled) + + +def skipIfBinaryToLarge(path: Optional[str], maxSize: int): +"""Skip the test if a binary is to large. +

[Lldb-commits] [lldb] [lldb-dap] Move the command plugins out of the DAP header (PR #140396)

2025-05-18 Thread John Harrison via lldb-commits
https://github.com/ashgti approved this pull request. https://github.com/llvm/llvm-project/pull/140396 ___ 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 unit test for FifoFiles (PR #140480)

2025-05-18 Thread John Harrison via lldb-commits
https://github.com/ashgti edited https://github.com/llvm/llvm-project/pull/140480 ___ 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 unit test for FifoFiles (PR #140480)

2025-05-18 Thread John Harrison via lldb-commits
@@ -0,0 +1,102 @@ +//===-- FifoFilesTest.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-dap] Add unit test for FifoFiles (PR #140480)

2025-05-18 Thread John Harrison via lldb-commits
https://github.com/ashgti approved this pull request. LGTM, one question about the timeouts https://github.com/llvm/llvm-project/pull/140480 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-

[Lldb-commits] [lldb] [lldb-dap] Synchronously wait for breakpoints resolves in tests (PR #140470)

2025-05-18 Thread John Harrison via lldb-commits
@@ -78,8 +84,40 @@ def set_function_breakpoints(self, functions, condition=None, hitCondition=None) breakpoint_ids = [] for breakpoint in breakpoints: breakpoint_ids.append("%i" % (breakpoint["id"])) +if wait_for_resolve: +self.w

[Lldb-commits] [lldb] [lldb-dap] Synchronously wait for breakpoints resolves in tests (PR #140470)

2025-05-18 Thread John Harrison via lldb-commits
@@ -1187,15 +1187,17 @@ def request_locations(self, locationReference): } return self.send_recv(command_dict) -def request_testGetTargetBreakpoints(self): +def request_testGetTargetBreakpoints(self, only_resolved=False): ashgti wrote:

[Lldb-commits] [lldb] [lldb-dap] Synchronously wait for breakpoints resolves in tests (PR #140470)

2025-05-18 Thread John Harrison via lldb-commits
@@ -62,9 +64,13 @@ def set_source_breakpoints(self, source_path, lines, data=None): breakpoint_ids = [] for breakpoint in breakpoints: breakpoint_ids.append("%i" % (breakpoint["id"])) +if wait_for_resolve: +self.wait_for_breakpoi

[Lldb-commits] [lldb] [lldb-dap] Synchronously wait for breakpoints resolves in tests (PR #140470)

2025-05-18 Thread John Harrison via lldb-commits
@@ -78,8 +84,40 @@ def set_function_breakpoints(self, functions, condition=None, hitCondition=None) breakpoint_ids = [] for breakpoint in breakpoints: breakpoint_ids.append("%i" % (breakpoint["id"])) +if wait_for_resolve: +self.w

[Lldb-commits] [lldb] [lldb-dap] Migrate disassemble request to structured handler (PR #140482)

2025-05-18 Thread John Harrison via lldb-commits
https://github.com/ashgti commented: Should we also add unit tests to https://github.com/llvm/llvm-project/blob/main/lldb/unittests/DAP/ProtocolTypesTest.cpp for these new types as well? https://github.com/llvm/llvm-project/pull/140482 ___ lldb-commi

[Lldb-commits] [lldb] [lldb-dap] Migrate disassemble request to structured handler (PR #140482)

2025-05-18 Thread John Harrison via lldb-commits
@@ -627,6 +627,60 @@ struct InstructionBreakpoint { bool fromJSON(const llvm::json::Value &, InstructionBreakpoint &, llvm::json::Path); +/// Properties of a single disassembled instruction, returned by `disassemble` +/// request. +struct DisassembledInstruction

[Lldb-commits] [lldb] [lldb-dap] Migrate disassemble request to structured handler (PR #140482)

2025-05-18 Thread John Harrison via lldb-commits
@@ -627,6 +627,60 @@ struct InstructionBreakpoint { bool fromJSON(const llvm::json::Value &, InstructionBreakpoint &, llvm::json::Path); +/// Properties of a single disassembled instruction, returned by `disassemble` +/// request. +struct DisassembledInstruction

[Lldb-commits] [lldb] [lldb-dap] Migrate disassemble request to structured handler (PR #140482)

2025-05-18 Thread John Harrison via lldb-commits
https://github.com/ashgti edited https://github.com/llvm/llvm-project/pull/140482 ___ 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 unit test for FifoFiles (PR #140480)

2025-05-18 Thread John Harrison via lldb-commits
@@ -0,0 +1,102 @@ +//===-- FifoFilesTest.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-dap] Add unit test for FifoFiles (PR #140480)

2025-05-18 Thread John Harrison via lldb-commits
@@ -0,0 +1,102 @@ +//===-- FifoFilesTest.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-dap] Synchronously wait for breakpoints resolves in tests (PR #140470)

2025-05-19 Thread John Harrison via lldb-commits
@@ -1187,15 +1187,17 @@ def request_locations(self, locationReference): } return self.send_recv(command_dict) -def request_testGetTargetBreakpoints(self): +def request_testGetTargetBreakpoints(self, only_resolved=False): ashgti wrote:

[Lldb-commits] [lldb] [lldb-dap] Migrate disassemble request to structured handler (PR #140482)

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

[Lldb-commits] [lldb] [lldb-dap] Migrate disassemble request to structured handler (PR #140482)

2025-05-19 Thread John Harrison via lldb-commits
https://github.com/ashgti approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/140482 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Change the launch sequence (PR #138219)

2025-05-19 Thread John Harrison via lldb-commits
ashgti wrote: I'll take a look at the currently disabled DAP tests and see if we can enable more of them. https://github.com/llvm/llvm-project/pull/138219 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[Lldb-commits] [lldb] [lldb-dap] Listen for broadcast classes. (PR #140142)

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

[Lldb-commits] [lldb] [lldb-dap] Listen for broadcast classes. (PR #140142)

2025-05-19 Thread John Harrison via lldb-commits
ashgti wrote: I'll close this for now. We can revisit this in the future if we think listening more broadly for events is beneficial. https://github.com/llvm/llvm-project/pull/140142 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://li

[Lldb-commits] [lldb] [lldb-dap] Migrate disassemble request to structured handler (PR #140482)

2025-05-19 Thread John Harrison via lldb-commits
@@ -782,4 +785,89 @@ bool fromJSON(const llvm::json::Value &Params, InstructionBreakpoint &IB, O.mapOptional("mode", IB.mode); } +bool fromJSON(const llvm::json::Value &Params, + DisassembledInstruction::PresentationHint &PH, + llvm::json::P

[Lldb-commits] [lldb] [lldb-dap] Add ContinueRequestHandler unit test (PR #140566)

2025-05-19 Thread John Harrison via lldb-commits
https://github.com/ashgti approved this pull request. LGTM. Is there anyway we can make a mock or something for the SBProcess? That would be helpful for these tests, but I am not sure if we have that somewhere in the lldb testing utilities or not already. https://github.com/llvm/llvm-project/

[Lldb-commits] [lldb] [lldb-dap] assembly breakpoints (PR #139969)

2025-05-19 Thread John Harrison via lldb-commits
@@ -955,6 +955,13 @@ def request_setBreakpoints(self, file_path, line_array, data=None): """ (dir, base) = os.path.split(file_path) source_dict = {"name": base, "path": file_path} +return self.request_setBreakpoints_with_source(source_dict, lin

[Lldb-commits] [lldb] [lldb-dap] assembly breakpoints (PR #139969)

2025-05-19 Thread John Harrison via lldb-commits
@@ -0,0 +1,55 @@ +""" +Test lldb-dap setBreakpoints request ashgti wrote: `Test lldb-dap setBreakpoints in assembly source references`? https://github.com/llvm/llvm-project/pull/139969 ___ lldb-commits mailing list lld

[Lldb-commits] [lldb] [lldb-dap] assembly breakpoints (PR #139969)

2025-05-19 Thread John Harrison via lldb-commits
@@ -452,6 +475,9 @@ struct DAP { std::mutex m_active_request_mutex; const protocol::Request *m_active_request; + + llvm::StringMap m_source_breakpoints; + llvm::DenseMap m_source_assembly_breakpoints; ashgti wrote: If we made `protocol::Source` work in

[Lldb-commits] [lldb] [lldb-dap] assembly breakpoints (PR #139969)

2025-05-19 Thread John Harrison via lldb-commits
@@ -33,13 +35,42 @@ SourceBreakpoint::SourceBreakpoint(DAP &dap, m_line(breakpoint.line), m_column(breakpoint.column.value_or(LLDB_INVALID_COLUMN_NUMBER)) {} -void SourceBreakpoint::SetBreakpoint(const llvm::StringRef source_path) { +void SourceBreakpoint::SetBreak

[Lldb-commits] [lldb] [lldb-dap] assembly breakpoints (PR #139969)

2025-05-19 Thread John Harrison via lldb-commits
@@ -0,0 +1,55 @@ +""" +Test lldb-dap setBreakpoints request +""" + + +import dap_server +import shutil +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import line_number +from lldbsuite.test import lldbutil +import lldbdap_testcase +import os + + +class Test

[Lldb-commits] [lldb] [LLDB][Progress-On-Dap] Have indeterminate progress actually send events. (PR #140162)

2025-05-19 Thread John Harrison via lldb-commits
@@ -77,16 +77,19 @@ ProgressEvent::Create(uint64_t progress_id, std::optional message, if (event.GetEventType() == progressStart && event.GetEventName().empty()) return std::nullopt; - if (prev_event && prev_event->EqualsForIDE(event)) + if (prev_event && prev_event->

[Lldb-commits] [lldb] [LLDB][Progress-On-Dap] Have indeterminate progress actually send events. (PR #140162)

2025-05-19 Thread John Harrison via lldb-commits
https://github.com/ashgti approved this pull request. Looks good to me! https://github.com/llvm/llvm-project/pull/140162 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] assembly breakpoints (PR #139969)

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

[Lldb-commits] [lldb] [lldb-dap] assembly breakpoints (PR #139969)

2025-05-19 Thread John Harrison via lldb-commits
@@ -35,29 +36,34 @@ SourceBreakpoint::SourceBreakpoint(DAP &dap, m_line(breakpoint.line), m_column(breakpoint.column.value_or(LLDB_INVALID_COLUMN_NUMBER)) {} -void SourceBreakpoint::SetBreakpoint(const protocol::Source &source) { +llvm::Error SourceBreakpoint::SetB

[Lldb-commits] [lldb] [lldb-dap] assembly breakpoints (PR #139969)

2025-05-19 Thread John Harrison via lldb-commits
@@ -948,13 +956,11 @@ def request_scopes(self, frameId): command_dict = {"command": "scopes", "type": "request", "arguments": args_dict} return self.send_recv(command_dict) -def request_setBreakpoints(self, file_path, line_array, data=None): +def reque

[Lldb-commits] [lldb] [lldb][lldb-dap] show modules pane if supported by the adapter (PR #140603)

2025-05-19 Thread John Harrison via lldb-commits
@@ -70,9 +71,21 @@ export class DebugSessionTracker /** Clear information from the active session. */ private onExit(session: vscode.DebugSession) { this.modules.delete(session); +// close when there is no more sessions +if (this.modules.size <= 0) { + this

[Lldb-commits] [lldb] [lldb-dap] Remove spurious move (NFC) (PR #140641)

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

[Lldb-commits] [lldb] [lldb][lldb-dap] show modules pane if supported by the adapter (PR #140603)

2025-05-19 Thread John Harrison via lldb-commits
@@ -787,7 +787,7 @@ { "id": "lldb-dap.modules", "name": "Modules", - "when": "inDebugMode && debugType == 'lldb-dap'", + "when": "inDebugMode && debugType == 'lldb-dap' && lldb-dap.showModules", ashgti wrote: Can

[Lldb-commits] [lldb] [lldb-dap] assembly breakpoints (PR #139969)

2025-05-19 Thread John Harrison via lldb-commits
@@ -35,29 +36,34 @@ SourceBreakpoint::SourceBreakpoint(DAP &dap, m_line(breakpoint.line), m_column(breakpoint.column.value_or(LLDB_INVALID_COLUMN_NUMBER)) {} -void SourceBreakpoint::SetBreakpoint(const protocol::Source &source) { +llvm::Error SourceBreakpoint::SetB

[Lldb-commits] [lldb] [lldb-dap] assembly breakpoints (PR #139969)

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

[Lldb-commits] [lldb] [lldb] add missing cmake build type argument (PR #141427)

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

[Lldb-commits] [lldb] [lldb-dap] DisassembleRequestHandler: use a better invalid instruction (PR #141463)

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

[Lldb-commits] [lldb] [lldb-dap] Test Gardening, improving DebugCommunication. (PR #141689)

2025-05-27 Thread John Harrison via lldb-commits
ashgti wrote: This was split out from #140777 to make a smaller commit. https://github.com/llvm/llvm-project/pull/141689 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [libcxx] [lldb] [libc++][lldb-dap][test] Fix CI for bootstrapping-build (PR #141543)

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

[Lldb-commits] [lldb] [Support] [lldb] Fix thread jump #45326 (PR #135778)

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

[Lldb-commits] [libcxx] [lldb] [libc++][lldb-dap][test] Fix CI for bootstrapping-build (PR #141543)

2025-05-27 Thread John Harrison via lldb-commits
ashgti wrote: Maybe we should update https://github.com/llvm/llvm-project/blob/ff7bb17c88328276323603809d5d4549ca8bd22b/lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py#L859C9-L859C20 to default to `False` instead of `True`? https://github.com/llvm/llvm-project/pull/141543

[Lldb-commits] [lldb] [lldb][lldb-dap] Support breakpoint info bytes (PR #141122)

2025-05-27 Thread John Harrison via lldb-commits
@@ -16,12 +15,61 @@ namespace lldb_dap { +static llvm::Expected +HandleDataBreakpointBytes(DAP &dap, + const protocol::DataBreakpointInfoArguments &args) { + llvm::StringRef address = args.name; + + unsigned long long load_addr = LLDB_INVALID_ADDRES

[Lldb-commits] [lldb] [lldb-dap] Test Gardening, improving DebugCommunication. (PR #141689)

2025-05-28 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/141689 >From ad0a9cd321d260cd87b852b335da9565f8326449 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Tue, 27 May 2025 16:40:10 -0700 Subject: [PATCH 1/2] [lldb-dap] Test Gardening, improving DebugCommunication. Imp

[Lldb-commits] [lldb] [lldb-dap] Reuse source object logics (PR #141426)

2025-05-28 Thread John Harrison via lldb-commits
@@ -58,6 +59,9 @@ class LLDB_API SBAddress { // "lldb::SBAddress SBTarget::ResolveLoadAddress (...)". lldb::SBSymbolContext GetSymbolContext(uint32_t resolve_scope); + lldb::SBSymbolContext GetSymbolContext(const SBTarget &target, +

[Lldb-commits] [lldb] [lldb-dap] Reuse source object logics (PR #141426)

2025-05-28 Thread John Harrison via lldb-commits
ashgti wrote: nit: Should this live in the lldb-dap top level folder? I could go either way on that, but it matches the existing helpers. https://github.com/llvm/llvm-project/pull/141426 ___ lldb-commits mailing list

[Lldb-commits] [lldb] [lldb-dap] Test Gardening, improving DebugCommunication. (PR #141689)

2025-05-28 Thread John Harrison via lldb-commits
@@ -104,6 +103,17 @@ def waitUntil(self, condition_callback): time.sleep(0.5) return False +def assertResponseSuccess(self, response: Response): +self.assertIsNotNone(response) +if not response.get("success", False): ash

[Lldb-commits] [lldb] [lldb-dap] Test Gardening, improving DebugCommunication. (PR #141689)

2025-05-28 Thread John Harrison via lldb-commits
@@ -224,99 +265,155 @@ def collect_output(self, category, timeout_secs, pattern, clear=True): break return collected_output if collected_output else None -def _enqueue_recv_packet(self, packet: Optional[ProtocolMessage]): -self.recv_con

[Lldb-commits] [lldb] [lldb-dap] Test Gardening, improving DebugCommunication. (PR #141689)

2025-05-28 Thread John Harrison via lldb-commits
@@ -1008,12 +1084,13 @@ def request_setBreakpoints(self, source: Source, line_array, data=None): breakpoints.append(bp) args_dict["breakpoints"] = breakpoints -command_dict = { +command_dict: Request = { "command": "set

[Lldb-commits] [lldb] [LLDB][Progress-On-Dap] Have indeterminate progress actually send events. (PR #140162)

2025-05-15 Thread John Harrison via lldb-commits
@@ -77,16 +77,19 @@ ProgressEvent::Create(uint64_t progress_id, std::optional message, if (event.GetEventType() == progressStart && event.GetEventName().empty()) return std::nullopt; - if (prev_event && prev_event->EqualsForIDE(event)) + if (prev_event && prev_event->

[Lldb-commits] [lldb] [lldb-dap] Listen for broadcast classes. (PR #140142)

2025-05-15 Thread John Harrison via lldb-commits
ashgti wrote: > Summarizing the problem to make sure I understand: with the new launch/attach > flow, we set the breakpoints in the dummy target before the actual target is > created. If the target is created through launch commands, we're calling > SetTarget with the currently selected target

[Lldb-commits] [lldb] [lldb-dap] Adding additional asserts to unit tests. (PR #140107)

2025-05-15 Thread John Harrison via lldb-commits
@@ -263,46 +262,61 @@ def set_global(self, name, value, id=None): return self.dap_server.request_setVariable(2, name, str(value), id=id) def stepIn( -self, threadId=None, targetId=None, waitForStop=True, granularity="statement" +self, +thre

[Lldb-commits] [lldb] [lldb-dap] Adding additional asserts to unit tests. (PR #140107)

2025-05-15 Thread John Harrison via lldb-commits
@@ -78,13 +78,13 @@ def waitUntil(self, condition_callback): time.sleep(0.5) return False -def verify_breakpoint_hit(self, breakpoint_ids): +def verify_breakpoint_hit(self, breakpoint_ids, timeout=timeoutval): ashgti wrote: Done.

[Lldb-commits] [lldb] [lldb-dap] Adding additional asserts to unit tests. (PR #140107)

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

[Lldb-commits] [lldb] [lldb-dap] Adding additional asserts to unit tests. (PR #140107)

2025-05-15 Thread John Harrison via lldb-commits
@@ -263,46 +262,61 @@ def set_global(self, name, value, id=None): return self.dap_server.request_setVariable(2, name, str(value), id=id) def stepIn( -self, threadId=None, targetId=None, waitForStop=True, granularity="statement" +self, +thre

[Lldb-commits] [lldb] [lldb-dap] Adding additional asserts to unit tests. (PR #140107)

2025-05-15 Thread John Harrison via lldb-commits
@@ -16,8 +16,10 @@ def spawn_and_wait(program, delay): +print("spawn_and_wait started...", time.time()) ashgti wrote: Removed the extra prints. https://github.com/llvm/llvm-project/pull/140107 ___ lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Adding additional asserts to unit tests. (PR #140107)

2025-05-15 Thread John Harrison via lldb-commits
@@ -67,7 +67,7 @@ def test_core_file_source_mapping_array(self): self.create_debug_adapter() source_map = [["/home/labath/test", current_dir]] -self.attach(exe_file, coreFile=core_file, sourceMap=source_map) +self.attach(program=exe_file, coreFi

[Lldb-commits] [lldb] [lldb-dap] Adding additional asserts to unit tests. (PR #140107)

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

[Lldb-commits] [lldb] [lldb-dap] Adding additional asserts to unit tests. (PR #140107)

2025-05-15 Thread John Harrison via lldb-commits
@@ -487,115 +453,36 @@ def cleanup(): response = self.dap_server.request_launch( program, -args=args, -cwd=cwd, -env=env, stopOnEntry=stopOnEntry, -disableASLR=disableASLR, -disableSTD

[Lldb-commits] [lldb] [lldb-dap] Listen for broadcast classes. (PR #140142)

2025-05-15 Thread John Harrison via lldb-commits
https://github.com/ashgti created https://github.com/llvm/llvm-project/pull/140142 The recent change to the startup flow has highlighted a problem with breakpoint events being missed. Previously, we would handle `attach`/`launch` commands immediately, leaving the process in a suspended until

[Lldb-commits] [lldb] [lldb-dap] In DAP unit tests, add helpers for loading a CoreFile. (PR #140738)

2025-05-21 Thread John Harrison via lldb-commits
@@ -10,8 +10,16 @@ add_lldb_unittest(DAPTests VariablesTest.cpp LINK_LIBS +liblldb lldbDAP +lldbUtilityHelpers LLVMTestingSupport LINK_COMPONENTS Support ) + +set(test_inputs + linux-x86_64.out + linux-x86_64.core ashgti wrot

[Lldb-commits] [lldb] [lldb-dap] In DAP unit tests, add helpers for loading a CoreFile. (PR #140738)

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

[Lldb-commits] [lldb] [lldb-dap] Test gardening, enabling tests and improving doc comments. (PR #140777)

2025-05-22 Thread John Harrison via lldb-commits
@@ -1102,3 +1103,28 @@ def is_feature_enabled(): return "%s is not supported on this system." % feature return skipTestIfFn(is_feature_enabled) + + +def skipIfBinaryToLarge(path: Optional[str], maxSize: int): +"""Skip the test if a binary is to large. +

[Lldb-commits] [lldb] [lldb-dap] Test gardening, enabling tests and improving doc comments. (PR #140777)

2025-05-21 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/140777 >From e50ea7d279adcb181f68a7156b5fc12d1047f402 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Tue, 20 May 2025 11:09:35 -0700 Subject: [PATCH] [lldb-dap] Test gardening, enabling tests and improving doc comm

[Lldb-commits] [lldb] [lldb-dap] In DAP unit tests, add helpers for loading a CoreFile. (PR #140738)

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

[Lldb-commits] [lldb] [lldb-dap] Assorted small fixes for runInTerminal (PR #140908)

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

[Lldb-commits] [lldb] Support breakpoint info bytes (PR #141122)

2025-05-23 Thread John Harrison via lldb-commits
@@ -16,12 +15,61 @@ namespace lldb_dap { +static llvm::Expected +HandleDataBreakpointBytes(DAP &dap, + const protocol::DataBreakpointInfoArguments &args) { + llvm::StringRef address = args.name; + + unsigned long long load_addr = LLDB_INVALID_ADDRES

[Lldb-commits] [lldb] Support breakpoint info bytes (PR #141122)

2025-05-23 Thread John Harrison via lldb-commits
@@ -16,12 +15,61 @@ namespace lldb_dap { +static llvm::Expected +HandleDataBreakpointBytes(DAP &dap, + const protocol::DataBreakpointInfoArguments &args) { + llvm::StringRef address = args.name; + + unsigned long long load_addr = LLDB_INVALID_ADDRES

[Lldb-commits] [lldb] Support breakpoint info bytes (PR #141122)

2025-05-23 Thread John Harrison via lldb-commits
@@ -16,12 +15,61 @@ namespace lldb_dap { +static llvm::Expected +HandleDataBreakpointBytes(DAP &dap, + const protocol::DataBreakpointInfoArguments &args) { + llvm::StringRef address = args.name; + + unsigned long long load_addr = LLDB_INVALID_ADDRES

[Lldb-commits] [lldb] Support breakpoint info bytes (PR #141122)

2025-05-23 Thread John Harrison via lldb-commits
@@ -1042,16 +1042,30 @@ def request_setFunctionBreakpoints(self, names, condition=None, hitCondition=Non return self.send_recv(command_dict) def request_dataBreakpointInfo( -self, variablesReference, name, frameIndex=0, threadId=None +self, +

[Lldb-commits] [lldb] Support breakpoint info bytes (PR #141122)

2025-05-23 Thread John Harrison via lldb-commits
@@ -16,12 +15,61 @@ namespace lldb_dap { +static llvm::Expected +HandleDataBreakpointBytes(DAP &dap, + const protocol::DataBreakpointInfoArguments &args) { + llvm::StringRef address = args.name; + + unsigned long long load_addr = LLDB_INVALID_ADDRES

[Lldb-commits] [lldb] Support breakpoint info bytes (PR #141122)

2025-05-23 Thread John Harrison via lldb-commits
@@ -16,12 +15,61 @@ namespace lldb_dap { +static llvm::Expected +HandleDataBreakpointBytes(DAP &dap, + const protocol::DataBreakpointInfoArguments &args) { + llvm::StringRef address = args.name; + + unsigned long long load_addr = LLDB_INVALID_ADDRES

[Lldb-commits] [lldb] Support breakpoint info bytes (PR #141122)

2025-05-23 Thread John Harrison via lldb-commits
@@ -16,12 +15,61 @@ namespace lldb_dap { +static llvm::Expected +HandleDataBreakpointBytes(DAP &dap, + const protocol::DataBreakpointInfoArguments &args) { + llvm::StringRef address = args.name; + + unsigned long long load_addr = LLDB_INVALID_ADDRES

[Lldb-commits] [lldb] [lldb] Adding a new decorator for CMAKE_BUILD_TYPE. (PR #141159)

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

[Lldb-commits] [lldb] [lldb-dap] Minor change to stdio client name. (PR #141266)

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

[Lldb-commits] [lldb] Support breakpoint info bytes (PR #141122)

2025-05-23 Thread John Harrison via lldb-commits
@@ -131,9 +133,10 @@ def verify_breakpoint_hit(self, breakpoint_ids, timeout=DEFAULT_TIMEOUT): # So when looking at the description we just want to make sure # the right breakpoint matches and not worry about the actual # locatio

[Lldb-commits] [lldb] Support breakpoint info bytes (PR #141122)

2025-05-23 Thread John Harrison via lldb-commits
@@ -104,7 +104,9 @@ def waitUntil(self, condition_callback): time.sleep(0.5) return False -def verify_breakpoint_hit(self, breakpoint_ids, timeout=DEFAULT_TIMEOUT): +def verify_breakpoint_hit( +self, breakpoint_ids, timeout=DEFAULT_TIMEOUT,

[Lldb-commits] [lldb] [lldb-dap] Minor change to stdio client name. (PR #141266)

2025-05-23 Thread John Harrison via lldb-commits
https://github.com/ashgti created https://github.com/llvm/llvm-project/pull/141266 Update the stdin <-> stdout client name to `stdio`. I noticed on macOS if I get a crash report from lldb-dap the `/` in the client name causes some thread names to be reported without the full name. For example

[Lldb-commits] [lldb] [lldb-dap] Assorted small fixes for runInTerminal (PR #140908)

2025-05-22 Thread John Harrison via lldb-commits
ashgti wrote: I have a change to remove the size check on the binary and yea, these tests are broken on macOS for sure. If this is submitted, then I'll rebase my changes on this, otherwise I also have a patch that could fix this. https://github.com/llvm/llvm-project/pull/140908 __

[Lldb-commits] [lldb] [lldb-dap] Test gardening, enabling tests and improving doc comments. (PR #140777)

2025-05-22 Thread John Harrison via lldb-commits
@@ -1102,3 +1103,28 @@ def is_feature_enabled(): return "%s is not supported on this system." % feature return skipTestIfFn(is_feature_enabled) + + +def skipIfBinaryToLarge(path: Optional[str], maxSize: int): +"""Skip the test if a binary is to large. +

<    5   6   7   8   9   10   11   12   >