xref: /llvm-project/lldb/docs/resources/lldbplatformpackets.md (revision 0c42fa361d57c1f04a1026a83aceec1568baa2f7)
1# LLDB Platform Packets
2
3This is a list of the packets that an lldb platform server
4needs to implement for the lldb testsuite to be run on a remote
5target device/system.
6
7These are almost all lldb extensions to the gdb-remote serial
8protocol. Many of the `vFile:` packets are also described in the "Host
9I/O Packets" detailed in the gdb-remote protocol documentation,
10although the lldb platform extensions include packets that are not
11defined there (`vFile:size:`, `vFile:mode:`, `vFile:symlink`, `vFile:chmod:`).
12
13Most importantly, the flags that LLDB passes to `vFile:open:` are
14incompatible with the flags that GDB specifies.
15
16* [QSetWorkingDir](./lldbgdbremote.md#qsetworkingdir-ascii-hex-path)
17* [QStartNoAckMode](./lldbgdbremote.md#qstartnoackmode)
18* [qGetWorkingDir](./lldbgdbremote.md#qgetworkingdir)
19* [qHostInfo](./lldbgdbremote.md#qhostinfo)
20* [qKillSpawnedProcess](./lldbgdbremote.md#qkillspawnedprocess-platform-extension)
21* [qLaunchGDBServer](./lldbgdbremote.md#qlaunchgdbserver-platform-extension)
22* [qModuleInfo](./lldbgdbremote.md#qmoduleinfo-module-path-arch-triple)
23* [qPathComplete](./lldbgdbremote.md#qpathcomplete-platform-extension)
24* [qPlatform_mkdir](./lldbgdbremote.md#qplatform-mkdir)
25* [qPlatform_shell](./lldbgdbremote.md#qplatform-shell)
26* [qProcessInfo](./lldbgdbremote.md#qprocessinfo)
27  * The lldb test suite currently only uses `name_match:equals` and the no-criteria mode to list every process.
28* [qProcessInfoPID](./lldbgdbremote.md#qprocessinfopid-pid-platform-extension)
29  * It is likely that you only need to support the `pid` and `name` fields.
30* [vFile:chmod](./lldbgdbremote.md#vfile-chmod-qplatform-chmod)
31* [vFile:close](./lldbgdbremote.md#vfile-close)
32* [vFile:mode](./lldbgdbremote.md#vfile-mode)
33* [vFile:open](./lldbgdbremote.md#vfile-open)
34* [vFile:pread](./lldbgdbremote.md#vfile-pread)
35* [vFile:pwrite](./lldbgdbremote.md#vfile-pwrite)
36* [vFile:size](./lldbgdbremote.md#vfile-size)
37* [vFile:symlink](./lldbgdbremote.md#vfile-symlink)
38* [vFile:unlink](./lldbgdbremote.md#vfile-unlink)
39
40The remote platform must be able to launch processes so that debugserver
41can attach to them. This requires the following packets in addition to the
42previous list:
43* [A](./lldbgdbremote.md#a-launch-args-packet)
44* [QEnvironment](./lldbgdbremote.md#qenvironment-name-value)
45* [QEnvironmentHexEncoded](./lldbgdbremote.md#qenvironmenthexencoded-hex-encoding-name-value)
46* [QSetDetatchOnError](./lldbgdbremote.md#qsetdetachonerror)
47* [QSetDisableASLR](./lldbgdbremote.md#qsetdisableaslr-bool)
48* [QSetSTDIN / QSetSTDOUT / QSetSTDERR](./lldbgdbremote.md#qsetstdin-ascii-hex-path-qsetstdout-ascii-hex-path-qsetstderr-ascii-hex-path) (all 3)
49* [qLaunchSuccess](./lldbgdbremote.md#qlaunchsuccess)
50