@@ -737,29 +737,31 @@ packet can be retrieved using a combination of `qThreadStopInfo` and `m` packets
737737
738738### MultiMemRead
739739
740- Read memory from multiple memory addresses .
740+ Read memory from multiple memory ranges .
741741
742- There are two arguments to the request :
742+ This packet has one argument :
743743
744- * `ranges`: a list of base-16 pairs of numbers. Each pair is separated by a
745- `,`, as is each number in the pair. The first number of the pair denotes the
746- base address of the memory read, the second denotes the number of bytes to be
747- read.
748- * `options`: an optional string of options. If present, it may be empty. If
749- present, it is the last argument of the request.
744+ * `ranges`: a list of pairs of numbers, formatted in base-16. Each pair is
745+ separated by a `,`, as is each number in each pair. The first number of the
746+ pair denotes the base address of the memory read, the second denotes the number
747+ of bytes to be read. The list must end with a `;`.
750748
751- Both arguments must end with a `;`.
749+ The reply packet starts with a comma-separated list of numbers formatted in
750+ base-16, denoting how many bytes were read from each range, in the same order
751+ as the request packet. The list is followed by a `;`, followed by a sequence of
752+ bytes containing binary encoded data for all memory that was read. The length
753+ of this sequence must be equal to the sum of the numbers provided at the start
754+ of the reply. The order of the binary data is the same as the order of the
755+ ranges in the request packet.
752756
753- The reply packet starts with a comma-separated list of base-16 numbers,
754- denoting how many bytes were read from each address, followed by a `;`,
755- followed by a sequence of bytes containing the memory data. The length of this
756- sequence must be equal to the sum of the numbers provided at the start of the
757- reply.
757+ If an entire range is not readable, the stub may perform a partial read of a
758+ prefix of the range.
758759
759- If the stub is unable to read from any individual address, it should return a
760- length of "zero" for that address in the reply packet.
760+ If the stub is unable to read any bytes from a particular range, it must return
761+ a length of "zero" for that range in the reply packet; no bytes for this memory
762+ range are included in the sequence of bytes that follows.
761763
762- A stub that supports this packet should return `MultiMemRead+` in the reply to
764+ A stub that supports this packet must include `MultiMemRead+` in the reply to
763765`qSupported`.
764766
765767```
@@ -768,10 +770,20 @@ read packet: $4,0,2;<binary encoding of abcd1000><binary encoding of eeff>
768770```
769771
770772In the example above, the first read produced `abcd1000`, the read of `a0`
771- bytes from address `200200` failed, and the third read produced two bytes –
772- `eeff` – out of the four requested.
773+ bytes from address `200200` failed to read any bytes , and the third read
774+ produced two bytes – `eeff` – out of the four requested.
773775
774- **Priority to Implement:** Only required for performance.
776+ ```
777+ send packet: $MultiMemRead:ranges:100a00,0;
778+ read packet: $0;
779+ ```
780+
781+ In the example above, a read of zero bytes was requested. A zero-length request
782+ provides an alternative way of testing whether the stub supports
783+ `MultiMemRead`.
784+
785+ **Priority to Implement:** Only required for performance, the debugger will
786+ fall back to doing separate read requests if this packet is unavailable.
775787
776788## QEnvironment:NAME=VALUE
777789
0 commit comments