The GDB replay server sanity-checks that every packet it receives matches what it expects from the serialized packet log. This mechanism tripped for TestReproducerAttach.py on Linux, because one of the packets (jModulesInfo) uses run-length encoding. The replay server was comparing the expanded incoming packet with the unexpanded packet in the log. As a result, it claimed to have received an unexpected packet, which caused the test to fail.
This patch addresses that issue by expanding the run-length encoding before comparing the packets.
This line feels cryptic. Why 3 and ' '. Maybe two lines would be better, still have to think carefully about order of operations too.
The code is using three representations for characters: char literals, raw integers and hex. Maybe use hex everywhere would be more consistent.