Skip to content

Commit 5c73c7a

Browse files
[lldb] Propose MultiBreakpoint extension to GDB Remote (#192910)
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)
1 parent 4ed3638 commit 5c73c7a

1 file changed

Lines changed: 56 additions & 0 deletions

File tree

lldb/docs/resources/lldbgdbremote.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -635,6 +635,62 @@ running, then an error message is returned.
635635
do live tracing. Specifically, the name of the plug-in should match the name
636636
of the tracing technology returned by this packet.
637637
638+
## jMultiBreakpoint
639+
640+
This packet allows setting and removing multiple breakpoints in one go. It
641+
lists multiple `Z` and `z` packets using a JSON array of strings.
642+
Formally:
643+
644+
```
645+
$jMultiBreakpoint:{"breakpoint_requests" : ["request"[,"request"]*]}
646+
```
647+
648+
Where each `request` is one of:
649+
650+
```
651+
* z0,addr,kind
652+
* z1,addr,kind
653+
* z2,addr,kind
654+
* z3,addr,kind
655+
* z4,addr,kind
656+
* Z0,addr,kind[;cond_list…][;cmds:persist,cmd_list…]
657+
* Z1,addr,kind[;cond_list…][;cmds:persist,cmd_list…]
658+
* Z2,addr,kind
659+
* Z3,addr,kind
660+
* Z4,addr,kind
661+
```
662+
663+
Each field has the same meaning as the corresponding packet in the GDB Remote
664+
Protocol.
665+
666+
For example, the packet below is a request to set one breakpoint and to remove
667+
two others:
668+
669+
```
670+
$jMultiBreakpoint: {"breakpoint_requests": ["Z0,1025783e8,4", "z0,1025783ec,4", "z0,1025783e8,4"]}
671+
```
672+
673+
The same address may be specified multiple times.
674+
675+
The stub must execute the sequence of `request`s in the order they
676+
appear in the `jMultiBreakpoint` packet. This is not an atomic operation:
677+
individual requests may fail, and the stub must process subsequent requests
678+
regardless of previous failures.
679+
680+
The reply consists of a JSON dictionary with a single entry, `results`, which
681+
is an array of strings, with the same contents allowed by a reply to a `z` or
682+
`Z` packet.
683+
684+
```
685+
{"results": ["OK", "E03", "OK"]}
686+
```
687+
688+
A stub that supports this packet must include `jMultiBreakpoint+` in the reply
689+
to `qSupported`.
690+
691+
**Priority To Implement:** Low. This is a performance optimization, reducing
692+
the number of packets sent when manipulating breakpoints.
693+
638694
## jThreadExtendedInfo
639695
640696
This packet, which takes its arguments as JSON and sends its reply as

0 commit comments

Comments
 (0)