[Lldb-commits] [lldb] [lldb] Propose MultiBreakpoint extension to GDB Remote (PR #192910)

Felipe de Azevedo Piovezan via lldb-commits lldb-commits at lists.llvm.org
Mon Apr 20 01:12:19 PDT 2026


https://github.com/felipepiovezan created https://github.com/llvm/llvm-project/pull/192910

This describes the packet discussed in the RFC ...link soon...

>From 97945535cd294239c4a4e1ae94c076ef87766673 Mon Sep 17 00:00:00 2001
From: Felipe de Azevedo Piovezan <fpiovezan at apple.com>
Date: Fri, 20 Mar 2026 12:59:11 +0000
Subject: [PATCH] [lldb] Propose MultiBreakpoint extension to GDB Remote

---
 lldb/docs/resources/lldbgdbremote.md | 46 ++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)

diff --git a/lldb/docs/resources/lldbgdbremote.md b/lldb/docs/resources/lldbgdbremote.md
index 9aa7ad2259a6a..2fa1c39af317f 100644
--- a/lldb/docs/resources/lldbgdbremote.md
+++ b/lldb/docs/resources/lldbgdbremote.md
@@ -738,6 +738,52 @@ This is a performance optimization, which speeds up debugging by avoiding
 multiple round-trips for retrieving thread information. The information from this
 packet can be retrieved using a combination of `qThreadStopInfo` and `m` packets.
 
+## MultiBreakpoint
+
+This packet allows setting and removing multiple breakpoints in one go. It
+concatenates multiple `Z` and `z` packets, separating them with a `;`.
+Formally:
+
+```
+$MultiBreakpoint:breakpoint_request[;breakpoint_request]*
+```
+
+Where each `breakpoint_request` is one of:
+
+```
+* z0,addr,kind
+* z1,addr,kind
+* z2,addr,kind
+* z3,addr,kind
+* z4,addr,kind
+* Z0,addr,kind[;cond_list…][;cmds:persist,cmd_list…]
+* Z1,addr,kind[;cond_list…][;cmds:persist,cmd_list…]
+* Z2,addr,kind
+* Z3,addr,kind
+* Z4,addr,kind
+```
+
+Each field has the same meaning as the corresponding packet in the GDB Remote
+Protocol.
+
+Note: there is no ambiguity in using `;` as a separator between
+`breakpoint_request`s. According to the GDB Remote Protocol specification, both
+`cond_list` and `cmd_list` start with an `X` character and contain no
+separators; it follows that a ";z" or ";Z" always indicate the start of a new
+request.
+
+The stub must execute the sequence of `breakpoint_request`s in the order they
+appear in the `MultiBreakpoint` packet. This is not an atomic operation:
+individual requests may fail, and the stub must process subsequent requests
+upon failure.
+
+The reply consists of a `;`-separated sequence of `OK`s or `E` strings, one per
+`breakpoint_request`, representing whether the `breakpoint_request` was
+successful.
+
+A stub that supports this packet must include `MultiBreakpoint+` in the reply
+to `qSupported`.
+
 ### MultiMemRead
 
 Read memory from multiple memory ranges.



More information about the lldb-commits mailing list