Skip to content

[lldbremote] Implement support for MultiBreakpoint packet#192919

Merged
felipepiovezan merged 2 commits into
mainfrom
users/felipepiovezan/lldbserver_multibreakpoint_p2
Apr 27, 2026
Merged

[lldbremote] Implement support for MultiBreakpoint packet#192919
felipepiovezan merged 2 commits into
mainfrom
users/felipepiovezan/lldbserver_multibreakpoint_p2

Conversation

@llvmbot

llvmbot commented Apr 20, 2026

Copy link
Copy Markdown
Member

@llvm/pr-subscribers-lldb

Author: Felipe de Azevedo Piovezan (felipepiovezan)

Changes

This is fairly straightfoward, thanks to the helper functions created in the previous commit.

#192910


Full diff: https://github.com/llvm/llvm-project/pull/192919.diff

6 Files Affected:

  • (modified) lldb/include/lldb/Utility/StringExtractorGDBRemote.h (+1)
  • (modified) lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py (+1)
  • (modified) lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp (+59)
  • (modified) lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h (+2)
  • (modified) lldb/source/Utility/StringExtractorGDBRemote.cpp (+2)
  • (modified) lldb/test/API/functionalities/multi-breakpoint/TestMultiBreakpoint.py (-1)
diff --git a/lldb/include/lldb/Utility/StringExtractorGDBRemote.h b/lldb/include/lldb/Utility/StringExtractorGDBRemote.h
index 439245fdc3083..1fdf913ccf3ae 100644
--- a/lldb/include/lldb/Utility/StringExtractorGDBRemote.h
+++ b/lldb/include/lldb/Utility/StringExtractorGDBRemote.h
@@ -162,6 +162,7 @@ class StringExtractorGDBRemote : public StringExtractor {
     eServerPacketType_X,
     eServerPacketType_Z,
     eServerPacketType_z,
+    eServerPacketType_MultiBreakpoint,
 
     eServerPacketType__M,
     eServerPacketType__m,
diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
index 5ba642bbedf74..020649bd0023c 100644
--- a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
+++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/gdbremote_testcase.py
@@ -932,6 +932,7 @@ def add_qSupported_packets(self, client_features=[]):
         "SupportedWatchpointTypes",
         "SupportedCompressions",
         "MultiMemRead",
+        "MultiBreakpoint",
     ]
 
     def parse_qSupported_response(self, context):
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
index 4c77de9f34adc..8dc0656fc9de8 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
@@ -198,6 +198,9 @@ void GDBRemoteCommunicationServerLLGS::RegisterPacketHandlers() {
                                 &GDBRemoteCommunicationServerLLGS::Handle_Z);
   RegisterMemberFunctionHandler(StringExtractorGDBRemote::eServerPacketType_z,
                                 &GDBRemoteCommunicationServerLLGS::Handle_z);
+  RegisterMemberFunctionHandler(
+      StringExtractorGDBRemote::eServerPacketType_MultiBreakpoint,
+      &GDBRemoteCommunicationServerLLGS::Handle_MultiBreakpoint);
   RegisterMemberFunctionHandler(
       StringExtractorGDBRemote::eServerPacketType_QPassSignals,
       &GDBRemoteCommunicationServerLLGS::Handle_QPassSignals);
@@ -3123,6 +3126,61 @@ GDBRemoteCommunicationServerLLGS::Handle_z(StringExtractorGDBRemote &packet) {
                                 ExecuteRemoveBreakpoint(packet.GetStringRef()));
 }
 
+/// Split a MultiBreakpoint packet body into individual breakpoint requests. A
+/// ';' starts a new request only if it is followed by [Zz].
+static std::vector<llvm::StringRef>
+SplitBreakpointRequests(llvm::StringRef packet) {
+  std::vector<llvm::StringRef> requests;
+  size_t request_start = 0;
+  for (size_t i = 0; i + 1 < packet.size(); ++i) {
+    if (packet[i] != ';')
+      continue;
+    char next_char = packet[i + 1];
+    if (next_char == 'Z' || next_char == 'z') {
+      requests.push_back(packet.substr(request_start, i - request_start));
+      request_start = i + 1;
+    }
+  }
+  requests.push_back(packet.substr(request_start));
+  return requests;
+}
+
+GDBRemoteCommunication::PacketResult
+GDBRemoteCommunicationServerLLGS::Handle_MultiBreakpoint(
+    StringExtractorGDBRemote &packet) {
+  llvm::StringRef packet_str = packet.GetStringRef();
+  if (!packet_str.consume_front("MultiBreakpoint:"))
+    return SendIllFormedResponse(packet,
+                                 "Invalid MultiBreakpoint packet prefix");
+
+  if (packet_str.empty())
+    return SendIllFormedResponse(packet, "MultiBreakpoint has no requests");
+
+  StreamString response;
+  bool first = true;
+  for (llvm::StringRef request : SplitBreakpointRequests(packet_str)) {
+    BreakpointResult result = request.starts_with("Z")
+                                  ? ExecuteSetBreakpoint(request)
+                                  : ExecuteRemoveBreakpoint(request);
+    if (!first)
+      response.PutChar(';');
+    switch (result.kind) {
+    case BreakpointResult::Kind::OK:
+      response.PutCString("OK");
+      break;
+    case BreakpointResult::Kind::Error:
+      response.Format("E{0:X-2}", result.error_code);
+      break;
+    case BreakpointResult::Kind::IllFormed:
+      response.PutCString("E03");
+      break;
+    }
+    first = false;
+  }
+
+  return SendPacketNoLock(response.GetString());
+}
+
 GDBRemoteCommunication::PacketResult
 GDBRemoteCommunicationServerLLGS::Handle_s(StringExtractorGDBRemote &packet) {
   Log *log = GetLog(LLDBLog::Process | LLDBLog::Thread);
@@ -4338,6 +4396,7 @@ std::vector<std::string> GDBRemoteCommunicationServerLLGS::HandleFeatures(
                             "QListThreadsInStopReply+",
                             "qXfer:features:read+",
                             "QNonStop+",
+                            "MultiBreakpoint+",
                         });
 
   // report server-only features
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h
index a663c0b949744..f375f2f7ca24f 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h
@@ -216,6 +216,8 @@ class GDBRemoteCommunicationServerLLGS
 
   PacketResult Handle_z(StringExtractorGDBRemote &packet);
 
+  PacketResult Handle_MultiBreakpoint(StringExtractorGDBRemote &packet);
+
   PacketResult Handle_s(StringExtractorGDBRemote &packet);
 
   PacketResult Handle_qXfer(StringExtractorGDBRemote &packet);
diff --git a/lldb/source/Utility/StringExtractorGDBRemote.cpp b/lldb/source/Utility/StringExtractorGDBRemote.cpp
index 40b5d037d0463..1c89545bf1616 100644
--- a/lldb/source/Utility/StringExtractorGDBRemote.cpp
+++ b/lldb/source/Utility/StringExtractorGDBRemote.cpp
@@ -431,6 +431,8 @@ StringExtractorGDBRemote::GetServerPacketType() const {
     return eServerPacketType_m;
 
   case 'M':
+    if (PACKET_STARTS_WITH("MultiBreakpoint:"))
+      return eServerPacketType_MultiBreakpoint;
     return eServerPacketType_M;
 
   case 'p':
diff --git a/lldb/test/API/functionalities/multi-breakpoint/TestMultiBreakpoint.py b/lldb/test/API/functionalities/multi-breakpoint/TestMultiBreakpoint.py
index 0978a499c7112..e7f87efd0419e 100644
--- a/lldb/test/API/functionalities/multi-breakpoint/TestMultiBreakpoint.py
+++ b/lldb/test/API/functionalities/multi-breakpoint/TestMultiBreakpoint.py
@@ -9,7 +9,6 @@
 from lldbsuite.test import lldbutil
 
 
-@skipUnlessDarwin # Remove once lldbsever support is implemented.
 @skipIfOutOfTreeDebugserver
 class TestMultiBreakpoint(TestBase):
     def send_packet(self, packet_str):

@github-actions

github-actions Bot commented Apr 20, 2026

Copy link
Copy Markdown

🐧 Linux x64 Test Results

  • 33422 tests passed
  • 532 tests skipped

✅ The build succeeded and all tests passed.

@felipepiovezan felipepiovezan marked this pull request as draft April 20, 2026 08:52
@felipepiovezan felipepiovezan force-pushed the users/felipepiovezan/lldbserver_multibreakpoint_p2 branch from 6bf0eda to 8265e86 Compare April 20, 2026 11:15
@felipepiovezan felipepiovezan changed the title [lldbserver] Implement support for MultiBreakpoint packet [lldbremote] Implement support for MultiBreakpoint packet Apr 20, 2026
@felipepiovezan felipepiovezan marked this pull request as ready for review April 21, 2026 10:03
@felipepiovezan

Copy link
Copy Markdown
Contributor Author

Linux bots aren't too happy with the tests, will investigate.

@felipepiovezan felipepiovezan force-pushed the users/felipepiovezan/lldbserver_multibreakpoint_p1 branch 2 times, most recently from 8427d0c to 8c83175 Compare April 22, 2026 14:08
@felipepiovezan felipepiovezan force-pushed the users/felipepiovezan/lldbserver_multibreakpoint_p2 branch from 8265e86 to a490b93 Compare April 22, 2026 14:21
@felipepiovezan felipepiovezan force-pushed the users/felipepiovezan/lldbserver_multibreakpoint_p1 branch from 8c83175 to 62420e3 Compare April 23, 2026 11:54
@felipepiovezan felipepiovezan force-pushed the users/felipepiovezan/lldbserver_multibreakpoint_p2 branch from a490b93 to 7fe5090 Compare April 23, 2026 11:55
@felipepiovezan felipepiovezan force-pushed the users/felipepiovezan/lldbserver_multibreakpoint_p1 branch from 62420e3 to c3b8061 Compare April 23, 2026 12:36
@felipepiovezan felipepiovezan force-pushed the users/felipepiovezan/lldbserver_multibreakpoint_p2 branch from 7fe5090 to 9070524 Compare April 23, 2026 12:44
@felipepiovezan felipepiovezan force-pushed the users/felipepiovezan/lldbserver_multibreakpoint_p1 branch from c3b8061 to 7d292a5 Compare April 23, 2026 14:31
@felipepiovezan felipepiovezan force-pushed the users/felipepiovezan/lldbserver_multibreakpoint_p2 branch from 9070524 to a47c0ae Compare April 23, 2026 14:31
@felipepiovezan felipepiovezan force-pushed the users/felipepiovezan/lldbserver_multibreakpoint_p1 branch from 7d292a5 to 86cf048 Compare April 23, 2026 16:31
@felipepiovezan felipepiovezan force-pushed the users/felipepiovezan/lldbserver_multibreakpoint_p2 branch 2 times, most recently from 3561fc7 to ca11aac Compare April 23, 2026 17:31
@felipepiovezan

Copy link
Copy Markdown
Contributor Author

This keeps timing out ever since I made the response also be a dictionary...

@felipepiovezan felipepiovezan force-pushed the users/felipepiovezan/lldbserver_multibreakpoint_p2 branch from ca11aac to 738715a Compare April 24, 2026 12:15
@github-actions

github-actions Bot commented Apr 24, 2026

Copy link
Copy Markdown

✅ With the latest revision this PR passed the C/C++ code formatter.

@DavidSpickett DavidSpickett left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

And I do clearly see where we would easily be able to refactor this to support other packets of the same design pattern if that ever happens.

felipepiovezan added a commit that referenced this pull request Apr 25, 2026
This describes the packet discussed in the RFC:
https://discourse.llvm.org/t/rfc-a-new-packet-to-set-remove-multiple-breakpoints/90623

The following PRs are related:

* [[lldb] Propose MultiBreakpoint extension to GDB
Remote](#192910)
* [[debugserver] Implement
MultiBreakpoint](#192914)
* [[lldb-server][NFC] Factor out code handling breakpoint
packets](#192915)
* [[lldb-server] Implement support for MultiBreakpoint
packet](#192919)
* [[lldb][GDBRemote] Parse MultiBreakpoint+
capability](#192962)
* [[lldb][NFC] Move BreakpointSite::IsEnabled/SetEnabled into
Process](#192964)
* [[lldb] Implement delayed
breakpoints](#192971)
* [[lldb] Override UpdateBreakpointSites in ProcessGDBRemote to use
MultiBreakpoint](#192988)
@felipepiovezan felipepiovezan deleted the users/felipepiovezan/lldbserver_multibreakpoint_p2 branch April 27, 2026 16:17
cpullvm-upstream-sync Bot pushed a commit to navaneethshan/cpullvm-toolchain-1 that referenced this pull request Apr 27, 2026
cpullvm-upstream-sync Bot pushed a commit to navaneethshan/cpullvm-toolchain-1 that referenced this pull request Apr 27, 2026
…ets (#192915)

This commit extracts the code handling breakpoint packets into a helper
function that can be used by a future implementation of the
MultiBreakpointPacket.

It is meant to be purely NFC.

There are two functions handling breakpoint packets (`handle_Z` and
`handle_z`) with a lot of repeated code. This commit did not attempt to
merge the two, as that would make the diff much larger due to subtle
differences in the error message produced by the two. The only
deduplication done is in the code processing a GDBStoppointType, where a
helper struct (`BreakpointKind`) and function
(`std::optional<BreakpointKind> getBreakpointKind(GDBStoppointType
stoppoint_type)`) was created.

The following PRs are related to the MultiBreakpoint feature:

* llvm/llvm-project#192910
* llvm/llvm-project#192914
* llvm/llvm-project#192915
* llvm/llvm-project#192919
* llvm/llvm-project#192962
* llvm/llvm-project#192964
* llvm/llvm-project#192971
* llvm/llvm-project#192988
llvm-sync Bot pushed a commit to arm/arm-toolchain that referenced this pull request Apr 27, 2026
…(#192919)

This is fairly straightforward, thanks to the helper functions created
in the previous commit.

The following PRs are related to the MultiBreakpoint feature:

* llvm/llvm-project#192910
* llvm/llvm-project#192914
* llvm/llvm-project#192915
* llvm/llvm-project#192919
* llvm/llvm-project#192962
* llvm/llvm-project#192964
* llvm/llvm-project#192971
* llvm/llvm-project#192988
llvm-upstreamsync Bot pushed a commit to qualcomm/cpullvm-toolchain that referenced this pull request Apr 27, 2026
…(#192919)

This is fairly straightforward, thanks to the helper functions created
in the previous commit.

The following PRs are related to the MultiBreakpoint feature:

* llvm/llvm-project#192910
* llvm/llvm-project#192914
* llvm/llvm-project#192915
* llvm/llvm-project#192919
* llvm/llvm-project#192962
* llvm/llvm-project#192964
* llvm/llvm-project#192971
* llvm/llvm-project#192988
felipepiovezan added a commit that referenced this pull request Apr 27, 2026
The Process class is the one responsible for managing the state of a
BreakpointSite inside the process. As such, it should be the one
answering questions about the state of the site.

Future patches will make this even more important by introducing a
"logical" is enabled, by delaying the moment in which breakpoints are
actually updated in the process.

The following PRs are related to the MultiBreakpoint feature:

* #192910
* #192914
* #192915
* #192919
* #192962
* #192964
* #192971
* #192988

#192910
cpullvm-upstream-sync Bot pushed a commit to navaneethshan/cpullvm-toolchain-1 that referenced this pull request Apr 27, 2026
…(#192919)

This is fairly straightforward, thanks to the helper functions created
in the previous commit.

The following PRs are related to the MultiBreakpoint feature:

* llvm/llvm-project#192910
* llvm/llvm-project#192914
* llvm/llvm-project#192915
* llvm/llvm-project#192919
* llvm/llvm-project#192962
* llvm/llvm-project#192964
* llvm/llvm-project#192971
* llvm/llvm-project#192988
@skipUnlessDarwin # Remove once lldbsever support is implemented.
@skipIfOutOfTreeDebugserver
# Runs on systems where we can always predict the software break size
@skipIf(archs=no_match(["x86_64", "arm64", "aarch64"]))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need a skipIfWindows too because we debug in process on Windows. - https://lab.llvm.org/buildbot/#/builders/141/builds/17796

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The buildbot lldb-x86_64-win is broken too
https://lab.llvm.org/buildbot/#/builders/211/builds/7814

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, let me fix that now. Thank you for flagging this

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yingopq pushed a commit to yingopq/llvm-project that referenced this pull request Apr 29, 2026
This describes the packet discussed in the RFC:
https://discourse.llvm.org/t/rfc-a-new-packet-to-set-remove-multiple-breakpoints/90623

The following PRs are related:

* [[lldb] Propose MultiBreakpoint extension to GDB
Remote](llvm#192910)
* [[debugserver] Implement
MultiBreakpoint](llvm#192914)
* [[lldb-server][NFC] Factor out code handling breakpoint
packets](llvm#192915)
* [[lldb-server] Implement support for MultiBreakpoint
packet](llvm#192919)
* [[lldb][GDBRemote] Parse MultiBreakpoint+
capability](llvm#192962)
* [[lldb][NFC] Move BreakpointSite::IsEnabled/SetEnabled into
Process](llvm#192964)
* [[lldb] Implement delayed
breakpoints](llvm#192971)
* [[lldb] Override UpdateBreakpointSites in ProcessGDBRemote to use
MultiBreakpoint](llvm#192988)
yingopq pushed a commit to yingopq/llvm-project that referenced this pull request Apr 29, 2026
This implements the packet as described in
llvm#192910

The following PRs are related to the MultiBreakpoint feature:

* llvm#192910
* llvm#192914
* llvm#192915
* llvm#192919
* llvm#192962
* llvm#192964
* llvm#192971
* llvm#192988
yingopq pushed a commit to yingopq/llvm-project that referenced this pull request Apr 29, 2026
…92915)

This commit extracts the code handling breakpoint packets into a helper
function that can be used by a future implementation of the
MultiBreakpointPacket.

It is meant to be purely NFC.

There are two functions handling breakpoint packets (`handle_Z` and
`handle_z`) with a lot of repeated code. This commit did not attempt to
merge the two, as that would make the diff much larger due to subtle
differences in the error message produced by the two. The only
deduplication done is in the code processing a GDBStoppointType, where a
helper struct (`BreakpointKind`) and function
(`std::optional<BreakpointKind> getBreakpointKind(GDBStoppointType
stoppoint_type)`) was created.

The following PRs are related to the MultiBreakpoint feature:

* llvm#192910
* llvm#192914
* llvm#192915
* llvm#192919
* llvm#192962
* llvm#192964
* llvm#192971
* llvm#192988
yingopq pushed a commit to yingopq/llvm-project that referenced this pull request Apr 29, 2026
This is fairly straightforward, thanks to the helper functions created
in the previous commit.

The following PRs are related to the MultiBreakpoint feature:

* llvm#192910
* llvm#192914
* llvm#192915
* llvm#192919
* llvm#192962
* llvm#192964
* llvm#192971
* llvm#192988
felipepiovezan added a commit that referenced this pull request Apr 29, 2026
The following PRs are related to the MultiBreakpoint feature:

* #192910
* #192914
* #192915
* #192919
* #192962
* #192964
* #192971
* #192988
felipepiovezan added a commit that referenced this pull request Apr 29, 2026
The Process class is the one responsible for managing the state of a
BreakpointSite inside the process. As such, it should be the one
answering questions about the state of the site.

Future patches will make this even more important by introducing a
"logical" is enabled, by delaying the moment in which breakpoints are
actually updated in the process.

The following PRs are related to the MultiBreakpoint feature:

* #192910
* #192914
* #192915
* #192919
* #192962
* #192964
* #192971
* #192988

#192910
felipepiovezan added a commit that referenced this pull request Apr 30, 2026
…192964)

The Process class is the one responsible for managing the state of a
BreakpointSite inside the process. As such, it should be the one
answering questions about the state of the site.

Future patches will make this even more important by introducing a
"logical" is enabled, by delaying the moment in which breakpoints are
actually updated in the process.


The following PRs are related to the MultiBreakpoint feature:

* #192910
* #192914
* #192915
* #192919
* #192962
* #192964
* #192971
* #192988
llvm-sync Bot pushed a commit to arm/arm-toolchain that referenced this pull request Apr 30, 2026
… Process (#192964)

The Process class is the one responsible for managing the state of a
BreakpointSite inside the process. As such, it should be the one
answering questions about the state of the site.

Future patches will make this even more important by introducing a
"logical" is enabled, by delaying the moment in which breakpoints are
actually updated in the process.

The following PRs are related to the MultiBreakpoint feature:

* llvm/llvm-project#192910
* llvm/llvm-project#192914
* llvm/llvm-project#192915
* llvm/llvm-project#192919
* llvm/llvm-project#192962
* llvm/llvm-project#192964
* llvm/llvm-project#192971
* llvm/llvm-project#192988
llvm-upstreamsync Bot pushed a commit to qualcomm/cpullvm-toolchain that referenced this pull request Apr 30, 2026
… Process (#192964)

The Process class is the one responsible for managing the state of a
BreakpointSite inside the process. As such, it should be the one
answering questions about the state of the site.

Future patches will make this even more important by introducing a
"logical" is enabled, by delaying the moment in which breakpoints are
actually updated in the process.

The following PRs are related to the MultiBreakpoint feature:

* llvm/llvm-project#192910
* llvm/llvm-project#192914
* llvm/llvm-project#192915
* llvm/llvm-project#192919
* llvm/llvm-project#192962
* llvm/llvm-project#192964
* llvm/llvm-project#192971
* llvm/llvm-project#192988
kirthana14m pushed a commit to ROCm/llvm-project that referenced this pull request Apr 30, 2026
cpullvm-upstream-sync Bot pushed a commit to navaneethshan/cpullvm-toolchain-1 that referenced this pull request Apr 30, 2026
… Process (#192964)

The Process class is the one responsible for managing the state of a
BreakpointSite inside the process. As such, it should be the one
answering questions about the state of the site.

Future patches will make this even more important by introducing a
"logical" is enabled, by delaying the moment in which breakpoints are
actually updated in the process.

The following PRs are related to the MultiBreakpoint feature:

* llvm/llvm-project#192910
* llvm/llvm-project#192914
* llvm/llvm-project#192915
* llvm/llvm-project#192919
* llvm/llvm-project#192962
* llvm/llvm-project#192964
* llvm/llvm-project#192971
* llvm/llvm-project#192988
KHicketts pushed a commit to KHicketts/llvm-project that referenced this pull request Apr 30, 2026
This describes the packet discussed in the RFC:
https://discourse.llvm.org/t/rfc-a-new-packet-to-set-remove-multiple-breakpoints/90623

The following PRs are related:

* [[lldb] Propose MultiBreakpoint extension to GDB
Remote](llvm#192910)
* [[debugserver] Implement
MultiBreakpoint](llvm#192914)
* [[lldb-server][NFC] Factor out code handling breakpoint
packets](llvm#192915)
* [[lldb-server] Implement support for MultiBreakpoint
packet](llvm#192919)
* [[lldb][GDBRemote] Parse MultiBreakpoint+
capability](llvm#192962)
* [[lldb][NFC] Move BreakpointSite::IsEnabled/SetEnabled into
Process](llvm#192964)
* [[lldb] Implement delayed
breakpoints](llvm#192971)
* [[lldb] Override UpdateBreakpointSites in ProcessGDBRemote to use
MultiBreakpoint](llvm#192988)
KHicketts pushed a commit to KHicketts/llvm-project that referenced this pull request Apr 30, 2026
This implements the packet as described in
llvm#192910

The following PRs are related to the MultiBreakpoint feature:

* llvm#192910
* llvm#192914
* llvm#192915
* llvm#192919
* llvm#192962
* llvm#192964
* llvm#192971
* llvm#192988
KHicketts pushed a commit to KHicketts/llvm-project that referenced this pull request Apr 30, 2026
…92915)

This commit extracts the code handling breakpoint packets into a helper
function that can be used by a future implementation of the
MultiBreakpointPacket.

It is meant to be purely NFC.

There are two functions handling breakpoint packets (`handle_Z` and
`handle_z`) with a lot of repeated code. This commit did not attempt to
merge the two, as that would make the diff much larger due to subtle
differences in the error message produced by the two. The only
deduplication done is in the code processing a GDBStoppointType, where a
helper struct (`BreakpointKind`) and function
(`std::optional<BreakpointKind> getBreakpointKind(GDBStoppointType
stoppoint_type)`) was created.

The following PRs are related to the MultiBreakpoint feature:

* llvm#192910
* llvm#192914
* llvm#192915
* llvm#192919
* llvm#192962
* llvm#192964
* llvm#192971
* llvm#192988
KHicketts pushed a commit to KHicketts/llvm-project that referenced this pull request Apr 30, 2026
This is fairly straightforward, thanks to the helper functions created
in the previous commit.

The following PRs are related to the MultiBreakpoint feature:

* llvm#192910
* llvm#192914
* llvm#192915
* llvm#192919
* llvm#192962
* llvm#192964
* llvm#192971
* llvm#192988
felipepiovezan added a commit that referenced this pull request May 1, 2026
This patch changes the Process class so that it delays *physically*
enabling/disabling breakpoints until the process is about to
resume/detach/be destroyed, potentially reducing the packets transmitted
by batching all breakpoints together.

Most classes only need to know whether a breakpoint is "logically"
enabled, as opposed to "physically" enabled (i.e. the remote server has
actually enabled the breakpoint). However, lower level classes like
derived Process classes, or StopInfo may actually need to know whether
the breakpoint was physically enabled. As such, this commit also adds a
"IsPhysicallyEnabled" API.

The following PRs are related to the MultiBreakpoint feature:

* #192910
* #192914
* #192915
* #192919
* #192962
* #192964
* #192971
* #192988
cpullvm-upstream-sync Bot pushed a commit to navaneethshan/cpullvm-toolchain-1 that referenced this pull request May 1, 2026
This patch changes the Process class so that it delays *physically*
enabling/disabling breakpoints until the process is about to
resume/detach/be destroyed, potentially reducing the packets transmitted
by batching all breakpoints together.

Most classes only need to know whether a breakpoint is "logically"
enabled, as opposed to "physically" enabled (i.e. the remote server has
actually enabled the breakpoint). However, lower level classes like
derived Process classes, or StopInfo may actually need to know whether
the breakpoint was physically enabled. As such, this commit also adds a
"IsPhysicallyEnabled" API.

The following PRs are related to the MultiBreakpoint feature:

* llvm/llvm-project#192910
* llvm/llvm-project#192914
* llvm/llvm-project#192915
* llvm/llvm-project#192919
* llvm/llvm-project#192962
* llvm/llvm-project#192964
* llvm/llvm-project#192971
* llvm/llvm-project#192988
llvm-sync Bot pushed a commit to arm/arm-toolchain that referenced this pull request May 1, 2026
This patch changes the Process class so that it delays *physically*
enabling/disabling breakpoints until the process is about to
resume/detach/be destroyed, potentially reducing the packets transmitted
by batching all breakpoints together.

Most classes only need to know whether a breakpoint is "logically"
enabled, as opposed to "physically" enabled (i.e. the remote server has
actually enabled the breakpoint). However, lower level classes like
derived Process classes, or StopInfo may actually need to know whether
the breakpoint was physically enabled. As such, this commit also adds a
"IsPhysicallyEnabled" API.

The following PRs are related to the MultiBreakpoint feature:

* llvm/llvm-project#192910
* llvm/llvm-project#192914
* llvm/llvm-project#192915
* llvm/llvm-project#192919
* llvm/llvm-project#192962
* llvm/llvm-project#192964
* llvm/llvm-project#192971
* llvm/llvm-project#192988
llvm-upstreamsync Bot pushed a commit to qualcomm/cpullvm-toolchain that referenced this pull request May 1, 2026
This patch changes the Process class so that it delays *physically*
enabling/disabling breakpoints until the process is about to
resume/detach/be destroyed, potentially reducing the packets transmitted
by batching all breakpoints together.

Most classes only need to know whether a breakpoint is "logically"
enabled, as opposed to "physically" enabled (i.e. the remote server has
actually enabled the breakpoint). However, lower level classes like
derived Process classes, or StopInfo may actually need to know whether
the breakpoint was physically enabled. As such, this commit also adds a
"IsPhysicallyEnabled" API.

The following PRs are related to the MultiBreakpoint feature:

* llvm/llvm-project#192910
* llvm/llvm-project#192914
* llvm/llvm-project#192915
* llvm/llvm-project#192919
* llvm/llvm-project#192962
* llvm/llvm-project#192964
* llvm/llvm-project#192971
* llvm/llvm-project#192988
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants