@@ -738,6 +738,52 @@ This is a performance optimization, which speeds up debugging by avoiding
738738multiple round-trips for retrieving thread information. The information from this
739739packet can be retrieved using a combination of `qThreadStopInfo` and `m` packets.
740740
741+ ## MultiBreakpoint
742+
743+ This packet allows setting and removing multiple breakpoints in one go. It
744+ concatenates multiple `Z` and `z` packets, separating them with a `;`.
745+ Formally:
746+
747+ ```
748+ $MultiBreakpoint: breakpoint_request [ ;breakpoint_request] *
749+ ```
750+
751+ Where each `breakpoint_request` is one of:
752+
753+ ```
754+ * z0,addr,kind
755+ * z1,addr,kind
756+ * z2,addr,kind
757+ * z3,addr,kind
758+ * z4,addr,kind
759+ * Z0,addr,kind[ ;cond_list…] [ ;cmds:persist,cmd_list… ]
760+ * Z1,addr,kind[ ;cond_list…] [ ;cmds:persist,cmd_list… ]
761+ * Z2,addr,kind
762+ * Z3,addr,kind
763+ * Z4,addr,kind
764+ ```
765+
766+ Each field has the same meaning as the corresponding packet in the GDB Remote
767+ Protocol.
768+
769+ Note: there is no ambiguity in using `;` as a separator between
770+ `breakpoint_request`s. According to the GDB Remote Protocol specification, both
771+ `cond_list` and `cmd_list` start with an `X` character and contain no
772+ separators; it follows that a ";z" or ";Z" always indicate the start of a new
773+ request.
774+
775+ The stub must execute the sequence of `breakpoint_request`s in the order they
776+ appear in the `MultiBreakpoint` packet. This is not an atomic operation:
777+ individual requests may fail, and the stub must process subsequent requests
778+ upon failure.
779+
780+ The reply consists of a `;`-separated sequence of `OK`s or `E` strings, one per
781+ `breakpoint_request`, representing whether the `breakpoint_request` was
782+ successful.
783+
784+ A stub that supports this packet must include `MultiBreakpoint+` in the reply
785+ to `qSupported`.
786+
741787### MultiMemRead
742788
743789Read memory from multiple memory ranges.
0 commit comments