While debugging why TestProcessList.py failed during passive replay, I remembered that we don't serialize the arguments for ProcessInfo. This is necessary to make the test pass and to make platform process list -v behave the same during capture and replay.
$ ./bin/lldb --capture (lldb) platform process list -v 303 matching processes were found on "host" PID PARENT USER GROUP EFF USER EFF GROUP TRIPLE ARGUMENTS ====== ====== ========== ========== ========== ========== ============================== ============================ 40118 40116 jonas staff jonas staff x86_64-apple-macosx -fish 40116 2502 jonas staff jonas staff x86_64-apple-macosx fish -c reattach-to-user-namespace -l fish ...
$./bin/lldb --replay /var/folders/n4/g9s84l4125s3x9fqjjmncxzh0000gn/T/reproducer-71d635 (lldb) platform process list -v 303 matching processes were found on "host" PID PARENT USER GROUP EFF USER EFF GROUP TRIPLE ARGUMENTS ====== ====== ========== ========== ========== ========== ============================== ============================ 40118 40116 jonas staff jonas staff x86_64-apple-macosx 40116 2502 jonas staff jonas staff x86_64-apple-macosx
The GetCommandString -> SetCommandString roundtrip is very lossy (mainly because of the Get part). That may be enough for platform process list, but I don't think it's a good general representation. I think it would be better to represent this as a vector of (string, quote_char) pairs.