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

2025-05-22 Thread David Spickett via lldb-commits
DavidSpickett wrote: Such a hack might be breaking on a place that does have debug information and stepping into one that doesn't, then placing a breakpoint on subsequent assembly lines. Might be. Didn't try it because it seemed like it might defeat the point of the test as it wouldn't place t

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

2025-05-22 Thread David Spickett via lldb-commits
DavidSpickett wrote: Looks like a Windows/PDB/COFF vs. Linux/DWARF/ELF difference. We can't break on a function when there's no debug information. It's not due to the architecture. So if you feel like coming up with a hack to make it work, the failure should reproduce on x64 Windows as well. P

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

2025-05-22 Thread David Spickett via lldb-commits
DavidSpickett wrote: This is failing on Windows on Arm, started here: https://lab.llvm.org/buildbot/#/builders/141/builds/8891 ``` AssertionError: False is not true : breakpoint not hit, stopped_events=[{'body': {'exitCode': 0}, 'event': 'exited', 'seq': 0, 'type': 'event'}] Config=aarch64-C:

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

2025-05-22 Thread David Spickett via lldb-commits
DavidSpickett wrote: Let's see what I find first, sometimes these things are quite simple to fix. 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] [lldb-dap] assembly breakpoints (PR #139969)

2025-05-22 Thread Ely Ronnen via lldb-commits
eronnen wrote: I Haven't attempted, unfortunately I only own a x64 laptop, I can attempt to reproduce on a VM later https://github.com/llvm/llvm-project/pull/139969 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-b

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

2025-05-20 Thread Ely Ronnen via lldb-commits
eronnen wrote: @JDevlieghere Fixed comments, sorry for the trouble. I'll try to pay extra attention next time :) https://github.com/llvm/llvm-project/pull/139969 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

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

2025-05-20 Thread Jonas Devlieghere via lldb-commits
@@ -1620,6 +1620,88 @@ void DAP::EventThread() { } } +std::vector DAP::SetSourceBreakpoints( +const protocol::Source &source, +const std::optional> &breakpoints) { + std::vector response_breakpoints; + if (source.sourceReference) { +// breakpoint set by assemb

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

2025-05-20 Thread Jonas Devlieghere via lldb-commits
@@ -33,16 +36,51 @@ 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) { +llvm::Error SourceBreakpoint::S

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

2025-05-20 Thread Jonas Devlieghere via lldb-commits
@@ -219,6 +218,9 @@ struct DAP { llvm::StringSet<> modules; /// @} + /// Number of lines of assembly code to show when no debug info is available. + static constexpr uint32_t number_of_assembly_lines_for_nodebug = 32; JDevlieghere wrote: Constants use a

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

2025-05-20 Thread Jonas Devlieghere via lldb-commits
@@ -1620,6 +1620,88 @@ void DAP::EventThread() { } } +std::vector DAP::SetSourceBreakpoints( +const protocol::Source &source, +const std::optional> &breakpoints) { + std::vector response_breakpoints; + if (source.sourceReference) { +// breakpoint set by assemb

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

2025-05-20 Thread Jonas Devlieghere via lldb-commits
@@ -33,16 +36,51 @@ 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) { +llvm::Error SourceBreakpoint::S

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

2025-05-20 Thread Jonas Devlieghere via lldb-commits
@@ -1620,6 +1620,88 @@ void DAP::EventThread() { } } +std::vector DAP::SetSourceBreakpoints( +const protocol::Source &source, +const std::optional> &breakpoints) { + std::vector response_breakpoints; + if (source.sourceReference) { +// breakpoint set by assemb

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

2025-05-20 Thread Jonas Devlieghere via lldb-commits
@@ -1620,6 +1620,88 @@ void DAP::EventThread() { } } +std::vector DAP::SetSourceBreakpoints( +const protocol::Source &source, +const std::optional> &breakpoints) { + std::vector response_breakpoints; + if (source.sourceReference) { +// breakpoint set by assemb

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

2025-05-20 Thread Jonas Devlieghere via lldb-commits
@@ -72,21 +99,31 @@ BreakpointLocationsRequestHandler::Run( } } - // The line entries are sorted by addresses, but we must return the list - // ordered by line / column position. - std::sort(locations.begin(), locations.end()); - locations.erase(llvm::unique(location

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

2025-05-20 Thread Jonas Devlieghere via lldb-commits
@@ -19,19 +19,46 @@ namespace lldb_dap { llvm::Expected BreakpointLocationsRequestHandler::Run( const protocol::BreakpointLocationsArguments &args) const { - std::string path = args.source.path.value_or(""); uint32_t start_line = args.line; uint32_t start_column = ar

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

2025-05-20 Thread Jonas Devlieghere via lldb-commits
https://github.com/JDevlieghere edited 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-20 Thread Jonas Devlieghere via lldb-commits
https://github.com/JDevlieghere commented: Mostly style nits at this point. The comments and braces are relatively easy to spot, so in the future please do a review pass over your own PRs. I bet you'll be able to catch most of these yourself. https://github.com/llvm/llvm-project/pull/139969 __

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

2025-05-20 Thread Jonas Devlieghere via lldb-commits
@@ -63,14 +65,31 @@ protocol::Breakpoint Breakpoint::ToProtocolBreakpoint() { std::string formatted_addr = "0x" + llvm::utohexstr(bp_addr.GetLoadAddress(m_bp.GetTarget())); breakpoint.instructionReference = formatted_addr; + +lldb::StopDisassemblyType stop_d

[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 Ely Ronnen via lldb-commits
@@ -72,21 +99,29 @@ BreakpointLocationsRequestHandler::Run( } } - // The line entries are sorted by addresses, but we must return the list - // ordered by line / column position. - std::sort(locations.begin(), locations.end()); - locations.erase(llvm::unique(location

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

2025-05-19 Thread Ely Ronnen 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-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 Ely Ronnen 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-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 Ebuka Ezike via lldb-commits
@@ -72,21 +99,29 @@ BreakpointLocationsRequestHandler::Run( } } - // The line entries are sorted by addresses, but we must return the list - // ordered by line / column position. - std::sort(locations.begin(), locations.end()); - locations.erase(llvm::unique(location

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

2025-05-19 Thread Ebuka Ezike via lldb-commits
@@ -0,0 +1,16 @@ +#include da-viper wrote: Maybe the file was not saved, as it it is not empty, if not make you could make it a cpp file. https://github.com/llvm/llvm-project/pull/139969 ___ lldb-commits mailing list

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

2025-05-19 Thread Ebuka Ezike via lldb-commits
@@ -72,21 +99,29 @@ BreakpointLocationsRequestHandler::Run( } } - // The line entries are sorted by addresses, but we must return the list - // ordered by line / column position. - std::sort(locations.begin(), locations.end()); - locations.erase(llvm::unique(location

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

2025-05-19 Thread Ely Ronnen 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 Ely Ronnen 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 Ely Ronnen 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; eronnen wrote: I think it should be pretty simplifie

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

2025-05-19 Thread Ely Ronnen via lldb-commits
https://github.com/eronnen deleted 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 Ely Ronnen via lldb-commits
https://github.com/eronnen edited 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 Ely Ronnen via lldb-commits
@@ -34,26 +36,22 @@ SourceRequestHandler::Run(const protocol::SourceArguments &args) const { return llvm::make_error( "invalid arguments, expected source.sourceReference to be set"); - lldb::SBProcess process = dap.target.GetProcess(); - // Upper 32 bits is the

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

2025-05-19 Thread Ely Ronnen via lldb-commits
@@ -72,21 +99,29 @@ BreakpointLocationsRequestHandler::Run( } } - // The line entries are sorted by addresses, but we must return the list - // ordered by line / column position. - std::sort(locations.begin(), locations.end()); - locations.erase(llvm::unique(location

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

2025-05-19 Thread Ely Ronnen via lldb-commits
@@ -72,21 +99,29 @@ BreakpointLocationsRequestHandler::Run( } } - // The line entries are sorted by addresses, but we must return the list - // ordered by line / column position. - std::sort(locations.begin(), locations.end()); - locations.erase(llvm::unique(location

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

2025-05-19 Thread Ely Ronnen 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-dap] assembly breakpoints (PR #139969)

2025-05-19 Thread Ely Ronnen via lldb-commits
@@ -0,0 +1,16 @@ +#include eronnen wrote: fixed, for some reason I'm getting a warning `ISO C requires a translation unit to contain at least one declarationclang(-Wempty-translation-unit)` but I can ignore https://github.com/llvm/llvm-project/pull/139969 ___

[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-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
@@ -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
@@ -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 Ebuka Ezike 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-dap] assembly breakpoints (PR #139969)

2025-05-19 Thread Ebuka Ezike via lldb-commits
@@ -34,26 +36,22 @@ SourceRequestHandler::Run(const protocol::SourceArguments &args) const { return llvm::make_error( "invalid arguments, expected source.sourceReference to be set"); - lldb::SBProcess process = dap.target.GetProcess(); - // Upper 32 bits is the

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

2025-05-19 Thread Ebuka Ezike via lldb-commits
@@ -72,21 +99,29 @@ BreakpointLocationsRequestHandler::Run( } } - // The line entries are sorted by addresses, but we must return the list - // ordered by line / column position. - std::sort(locations.begin(), locations.end()); - locations.erase(llvm::unique(location

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

2025-05-19 Thread Ebuka Ezike via lldb-commits
@@ -72,21 +99,29 @@ BreakpointLocationsRequestHandler::Run( } } - // The line entries are sorted by addresses, but we must return the list - // ordered by line / column position. - std::sort(locations.begin(), locations.end()); - locations.erase(llvm::unique(location

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

2025-05-19 Thread Ebuka Ezike via lldb-commits
@@ -0,0 +1,16 @@ +#include da-viper wrote: ```suggestion ``` not needed to reduce test times https://github.com/llvm/llvm-project/pull/139969 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llv

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

2025-05-19 Thread Ebuka Ezike via lldb-commits
https://github.com/da-viper requested changes to 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-18 Thread Ely Ronnen via lldb-commits
@@ -60,7 +60,7 @@ namespace lldb_dap { -typedef llvm::DenseMap, SourceBreakpoint> +typedef std::map, SourceBreakpoint> eronnen wrote: changed to `std::map` because I'm not sure how to remove from the map while iterating it with `DenseMap` https://github.c

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

2025-05-18 Thread Ely Ronnen via lldb-commits
https://github.com/eronnen edited 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-18 Thread Ely Ronnen via lldb-commits
https://github.com/eronnen updated https://github.com/llvm/llvm-project/pull/139969 >From d6325b3f6a8602fc96ad72acecfcccda1120614d Mon Sep 17 00:00:00 2001 From: Ely Ronnen Date: Sat, 10 May 2025 20:45:17 +0200 Subject: [PATCH 01/15] support assembly in BreakpointLocationsRequestHandler --- .

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

2025-05-18 Thread Ely Ronnen via lldb-commits
https://github.com/eronnen updated https://github.com/llvm/llvm-project/pull/139969 >From d6325b3f6a8602fc96ad72acecfcccda1120614d Mon Sep 17 00:00:00 2001 From: Ely Ronnen Date: Sat, 10 May 2025 20:45:17 +0200 Subject: [PATCH 01/14] support assembly in BreakpointLocationsRequestHandler --- .

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

2025-05-18 Thread Ely Ronnen via lldb-commits
https://github.com/eronnen updated https://github.com/llvm/llvm-project/pull/139969 >From d6325b3f6a8602fc96ad72acecfcccda1120614d Mon Sep 17 00:00:00 2001 From: Ely Ronnen Date: Sat, 10 May 2025 20:45:17 +0200 Subject: [PATCH 01/13] support assembly in BreakpointLocationsRequestHandler --- .

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

2025-05-18 Thread Ely Ronnen via lldb-commits
https://github.com/eronnen updated https://github.com/llvm/llvm-project/pull/139969 >From d6325b3f6a8602fc96ad72acecfcccda1120614d Mon Sep 17 00:00:00 2001 From: Ely Ronnen Date: Sat, 10 May 2025 20:45:17 +0200 Subject: [PATCH 01/11] support assembly in BreakpointLocationsRequestHandler --- .

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

2025-05-18 Thread Ely Ronnen via lldb-commits
https://github.com/eronnen updated https://github.com/llvm/llvm-project/pull/139969 >From d6325b3f6a8602fc96ad72acecfcccda1120614d Mon Sep 17 00:00:00 2001 From: Ely Ronnen Date: Sat, 10 May 2025 20:45:17 +0200 Subject: [PATCH 01/12] support assembly in BreakpointLocationsRequestHandler --- .

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

2025-05-18 Thread Ely Ronnen via lldb-commits
@@ -53,6 +54,8 @@ class LLDB_API SBFileSpec { uint32_t GetPath(char *dst_path, size_t dst_len) const; + bool GetPath(lldb::SBStream &dst_path) const; eronnen wrote: moved to LLDBUtils https://github.com/llvm/llvm-project/pull/139969 _

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

2025-05-18 Thread Ely Ronnen via lldb-commits
@@ -73,7 +87,64 @@ SetBreakpointsRequestHandler::Run( } } - return protocol::SetBreakpointsResponseBody{std::move(response_breakpoints)}; + return response_breakpoints; +} + +std::vector +SetBreakpointsRequestHandler::SetAssemblyBreakpoints( +const protocol::Source

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

2025-05-18 Thread Ely Ronnen via lldb-commits
https://github.com/eronnen edited 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-18 Thread Ely Ronnen via lldb-commits
@@ -73,7 +87,64 @@ SetBreakpointsRequestHandler::Run( } } - return protocol::SetBreakpointsResponseBody{std::move(response_breakpoints)}; + return response_breakpoints; +} + +std::vector +SetBreakpointsRequestHandler::SetAssemblyBreakpoints( +const protocol::Source

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

2025-05-18 Thread Ely Ronnen via lldb-commits
https://github.com/eronnen updated https://github.com/llvm/llvm-project/pull/139969 >From d6325b3f6a8602fc96ad72acecfcccda1120614d Mon Sep 17 00:00:00 2001 From: Ely Ronnen Date: Sat, 10 May 2025 20:45:17 +0200 Subject: [PATCH 01/10] support assembly in BreakpointLocationsRequestHandler --- .

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

2025-05-18 Thread Ely Ronnen via lldb-commits
https://github.com/eronnen edited 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-18 Thread Ely Ronnen via lldb-commits
@@ -19,19 +18,50 @@ namespace lldb_dap { llvm::Expected BreakpointLocationsRequestHandler::Run( const protocol::BreakpointLocationsArguments &args) const { - std::string path = args.source.path.value_or(""); uint32_t start_line = args.line; uint32_t start_column = ar

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

2025-05-18 Thread Ely Ronnen via lldb-commits
@@ -73,7 +87,64 @@ SetBreakpointsRequestHandler::Run( } } - return protocol::SetBreakpointsResponseBody{std::move(response_breakpoints)}; + return response_breakpoints; +} + +std::vector +SetBreakpointsRequestHandler::SetAssemblyBreakpoints( +const protocol::Source

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

2025-05-18 Thread Ely Ronnen via lldb-commits
@@ -19,19 +18,50 @@ namespace lldb_dap { llvm::Expected BreakpointLocationsRequestHandler::Run( const protocol::BreakpointLocationsArguments &args) const { - std::string path = args.source.path.value_or(""); uint32_t start_line = args.line; uint32_t start_column = ar

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

2025-05-18 Thread Ely Ronnen via lldb-commits
@@ -73,7 +87,64 @@ SetBreakpointsRequestHandler::Run( } } - return protocol::SetBreakpointsResponseBody{std::move(response_breakpoints)}; + return response_breakpoints; +} + +std::vector +SetBreakpointsRequestHandler::SetAssemblyBreakpoints( +const protocol::Source

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

2025-05-18 Thread Ely Ronnen via lldb-commits
@@ -71,22 +101,26 @@ BreakpointLocationsRequestHandler::Run( locations.emplace_back(line, column); } } +} - // The line entries are sorted by addresses, but we must return the list - // ordered by line / column position. - std::sort(locations.begin(), locations

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

2025-05-18 Thread Ely Ronnen via lldb-commits
@@ -219,6 +221,9 @@ struct DAP { llvm::StringSet<> modules; /// @} + /// Number of lines of assembly code to show when no debug info is available. + uint32_t number_of_assembly_lines_for_nodebug = 32; eronnen wrote: :100: https://github.com/llvm/llvm-

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

2025-05-18 Thread Ely Ronnen via lldb-commits
@@ -53,6 +54,8 @@ class LLDB_API SBFileSpec { uint32_t GetPath(char *dst_path, size_t dst_len) const; + bool GetPath(lldb::SBStream &dst_path) const; eronnen wrote: makes sense, I was trying to avoid the potential problem of the path being longer than `M

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

2025-05-17 Thread Jonas Devlieghere via lldb-commits
@@ -71,22 +101,26 @@ BreakpointLocationsRequestHandler::Run( locations.emplace_back(line, column); } } +} - // The line entries are sorted by addresses, but we must return the list - // ordered by line / column position. - std::sort(locations.begin(), locations

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

2025-05-17 Thread Jonas Devlieghere via lldb-commits
@@ -53,6 +54,8 @@ class LLDB_API SBFileSpec { uint32_t GetPath(char *dst_path, size_t dst_len) const; + bool GetPath(lldb::SBStream &dst_path) const; JDevlieghere wrote: I have mixed feelings about adding this API. Generally, we usually use streams when

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

2025-05-17 Thread Jonas Devlieghere via lldb-commits
@@ -19,19 +18,50 @@ namespace lldb_dap { llvm::Expected BreakpointLocationsRequestHandler::Run( const protocol::BreakpointLocationsArguments &args) const { - std::string path = args.source.path.value_or(""); uint32_t start_line = args.line; uint32_t start_column = ar

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

2025-05-17 Thread Jonas Devlieghere via lldb-commits
@@ -73,7 +87,64 @@ SetBreakpointsRequestHandler::Run( } } - return protocol::SetBreakpointsResponseBody{std::move(response_breakpoints)}; + return response_breakpoints; +} + +std::vector +SetBreakpointsRequestHandler::SetAssemblyBreakpoints( +const protocol::Source

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

2025-05-17 Thread Jonas Devlieghere via lldb-commits
@@ -219,6 +221,9 @@ struct DAP { llvm::StringSet<> modules; /// @} + /// Number of lines of assembly code to show when no debug info is available. + uint32_t number_of_assembly_lines_for_nodebug = 32; JDevlieghere wrote: Is this a constant? ```suggesti

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

2025-05-17 Thread Jonas Devlieghere via lldb-commits
@@ -73,7 +87,64 @@ SetBreakpointsRequestHandler::Run( } } - return protocol::SetBreakpointsResponseBody{std::move(response_breakpoints)}; + return response_breakpoints; +} + +std::vector +SetBreakpointsRequestHandler::SetAssemblyBreakpoints( +const protocol::Source

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

2025-05-17 Thread Jonas Devlieghere via lldb-commits
@@ -19,19 +18,50 @@ namespace lldb_dap { llvm::Expected BreakpointLocationsRequestHandler::Run( const protocol::BreakpointLocationsArguments &args) const { - std::string path = args.source.path.value_or(""); uint32_t start_line = args.line; uint32_t start_column = ar

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

2025-05-17 Thread Jonas Devlieghere via lldb-commits
@@ -73,7 +87,64 @@ SetBreakpointsRequestHandler::Run( } } - return protocol::SetBreakpointsResponseBody{std::move(response_breakpoints)}; + return response_breakpoints; +} + +std::vector +SetBreakpointsRequestHandler::SetAssemblyBreakpoints( +const protocol::Source

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

2025-05-17 Thread Jonas Devlieghere via lldb-commits
@@ -73,7 +87,64 @@ SetBreakpointsRequestHandler::Run( } } - return protocol::SetBreakpointsResponseBody{std::move(response_breakpoints)}; + return response_breakpoints; +} + +std::vector +SetBreakpointsRequestHandler::SetAssemblyBreakpoints( +const protocol::Source

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

2025-05-17 Thread Jonas Devlieghere via lldb-commits
@@ -71,22 +101,26 @@ BreakpointLocationsRequestHandler::Run( locations.emplace_back(line, column); } } +} - // The line entries are sorted by addresses, but we must return the list - // ordered by line / column position. - std::sort(locations.begin(), locations

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

2025-05-17 Thread via lldb-commits
github-actions[bot] wrote: :warning: Python code formatter, darker found issues in your code. :warning: You can test this locally with the following command: ``bash darker --check --diff -r HEAD~1...HEAD lldb/test/API/tools/lldb-dap/breakpoint-assembly/TestDAP_breakpointAssembly.

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

2025-05-17 Thread via lldb-commits
llvmbot wrote: @llvm/pr-subscribers-lldb Author: Ely Ronnen (eronnen) Changes * Support assembly source breakpoints * Change `sourceReference` to be the load address for simplicity and consistency across threads/frames [Screencast From 2025-05-17 23-57-30.webm](https://github.com/user-a

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

2025-05-17 Thread Ely Ronnen via lldb-commits
https://github.com/eronnen ready_for_review 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-17 Thread Ely Ronnen via lldb-commits
https://github.com/eronnen updated https://github.com/llvm/llvm-project/pull/139969 >From d6325b3f6a8602fc96ad72acecfcccda1120614d Mon Sep 17 00:00:00 2001 From: Ely Ronnen Date: Sat, 10 May 2025 20:45:17 +0200 Subject: [PATCH 1/6] support assembly in BreakpointLocationsRequestHandler --- ...

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

2025-05-17 Thread Ely Ronnen via lldb-commits
https://github.com/eronnen updated https://github.com/llvm/llvm-project/pull/139969 >From a705fec9e42d209ff64be3588ca74567d4319361 Mon Sep 17 00:00:00 2001 From: Ely Ronnen Date: Sat, 10 May 2025 20:45:17 +0200 Subject: [PATCH 1/6] support assembly in BreakpointLocationsRequestHandler --- ...

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

2025-05-17 Thread Ely Ronnen via lldb-commits
https://github.com/eronnen edited 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-17 Thread Ely Ronnen via lldb-commits
https://github.com/eronnen edited 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-17 Thread Ely Ronnen via lldb-commits
https://github.com/eronnen updated https://github.com/llvm/llvm-project/pull/139969 >From a705fec9e42d209ff64be3588ca74567d4319361 Mon Sep 17 00:00:00 2001 From: Ely Ronnen Date: Sat, 10 May 2025 20:45:17 +0200 Subject: [PATCH 1/5] support assembly in BreakpointLocationsRequestHandler --- ...

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

2025-05-15 Thread Ely Ronnen via lldb-commits
https://github.com/eronnen updated https://github.com/llvm/llvm-project/pull/139969 >From ae324862f516ebb5be3206485476b586b22488b7 Mon Sep 17 00:00:00 2001 From: Ely Ronnen Date: Sat, 10 May 2025 20:45:17 +0200 Subject: [PATCH 1/4] support assembly in BreakpointLocationsRequestHandler --- ...

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

2025-05-14 Thread Ely Ronnen via lldb-commits
https://github.com/eronnen edited 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-14 Thread Ely Ronnen via lldb-commits
https://github.com/eronnen edited 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-14 Thread Ely Ronnen via lldb-commits
https://github.com/eronnen edited 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