|
| 1 | +<!-- Packets are listed in alpabetical order, and if in a section, alphabetical |
| 2 | + order within that section. --> |
| 3 | + |
1 | 4 | # GDB Remote Protocol Extensions |
2 | 5 |
|
3 | 6 | 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. |
2427 | 2430 | Return value may optionally be followed by a comma and the base16 |
2428 | 2431 | value of errno if unlink failed. |
2429 | 2432 |
|
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 | | -
|
2467 | 2433 | ## Wasm Packets |
2468 | 2434 |
|
2469 | 2435 | The packet below are supported by the |
@@ -2530,3 +2496,40 @@ read packet: $e0030100#b9 |
2530 | 2496 |
|
2531 | 2497 | **Priority to Implement:** Only required for Wasm support. Necessary to show |
2532 | 2498 | 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