Skip to content

Commit e2d24f2

Browse files
DavidSpickettgithub-actions[bot]
authored andcommitted
Automerge: [lldb][docs] State that the extension packets doc should be alphabetised
I did this when I converted it but never stated so. Adding a comment stating so. We'll probably forget at some point but might as well. Also moved the x packet to the last place, after wasm which was added to the end recently.
2 parents 6152134 + fca40b3 commit e2d24f2

File tree

1 file changed

+40
-37
lines changed

1 file changed

+40
-37
lines changed

lldb/docs/resources/lldbgdbremote.md

Lines changed: 40 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
<!-- Packets are listed in alpabetical order, and if in a section, alphabetical
2+
order within that section. -->
3+
14
# GDB Remote Protocol Extensions
25

36
LLDB has added new GDB server packets to better support multi-threaded and
@@ -2427,43 +2430,6 @@ Response is `F` plus the return value of `unlink()`, base 16 encoding.
24272430
Return value may optionally be followed by a comma and the base16
24282431
value of errno if unlink failed.
24292432
2430-
## "x" - Binary memory read
2431-
2432-
> **Warning:** The format of this packet was decided before GDB 16
2433-
> introduced its own format for `x`. Future versions of LLDB may not
2434-
> support the format described here, and new code should produce and
2435-
> expect the format used by GDB.
2436-
2437-
Like the `m` (read) and `M` (write) packets, this is a partner to the
2438-
`X` (write binary data) packet, `x`.
2439-
2440-
It is called like
2441-
```
2442-
xADDRESS,LENGTH
2443-
```
2444-
2445-
where both `ADDRESS` and `LENGTH` are big-endian base 16 values.
2446-
2447-
To test if this packet is available, send a addr/len of 0:
2448-
```
2449-
x0,0
2450-
```
2451-
You will get an `OK` response if it is supported.
2452-
2453-
The reply will be the data requested in 8-bit binary data format.
2454-
The standard quoting is applied to the payload. Characters `} # $ *`
2455-
will all be escaped with `}` (`0x7d`) character and then XOR'ed with `0x20`.
2456-
2457-
A typical use to read 512 bytes at 0x1000 would look like:
2458-
```
2459-
x0x1000,0x200
2460-
```
2461-
The `0x` prefixes are optional - like most of the gdb-remote packets,
2462-
omitting them will work fine; these numbers are always base 16.
2463-
2464-
The length of the payload is not provided. A reliable, 8-bit clean,
2465-
transport layer is assumed.
2466-
24672433
## Wasm Packets
24682434
24692435
The packet below are supported by the
@@ -2530,3 +2496,40 @@ read packet: $e0030100#b9
25302496
25312497
**Priority to Implement:** Only required for Wasm support. Necessary to show
25322498
variables.
2499+
2500+
## "x" - Binary memory read
2501+
2502+
> **Warning:** The format of this packet was decided before GDB 16
2503+
> introduced its own format for `x`. Future versions of LLDB may not
2504+
> support the format described here, and new code should produce and
2505+
> expect the format used by GDB.
2506+
2507+
Like the `m` (read) and `M` (write) packets, this is a partner to the
2508+
`X` (write binary data) packet, `x`.
2509+
2510+
It is called like
2511+
```
2512+
xADDRESS,LENGTH
2513+
```
2514+
2515+
where both `ADDRESS` and `LENGTH` are big-endian base 16 values.
2516+
2517+
To test if this packet is available, send a addr/len of 0:
2518+
```
2519+
x0,0
2520+
```
2521+
You will get an `OK` response if it is supported.
2522+
2523+
The reply will be the data requested in 8-bit binary data format.
2524+
The standard quoting is applied to the payload. Characters `} # $ *`
2525+
will all be escaped with `}` (`0x7d`) character and then XOR'ed with `0x20`.
2526+
2527+
A typical use to read 512 bytes at 0x1000 would look like:
2528+
```
2529+
x0x1000,0x200
2530+
```
2531+
The `0x` prefixes are optional - like most of the gdb-remote packets,
2532+
omitting them will work fine; these numbers are always base 16.
2533+
2534+
The length of the payload is not provided. A reliable, 8-bit clean,
2535+
transport layer is assumed.

0 commit comments

Comments
 (0)