Gdb servers like openocd may send many $O reply packets for the client to output during a qRcmd command sequence. Currently, lldb interprets the first O packet as an unexpected response. Besides generating no output, this causes lldb to get out of sync with future commands because it continues reading O packets from the first command as response to subsequent commands.
This patch handles any O packets during an qRcmd, treating the first non-O packet as the true response.
Looking for guidance on how best to write test cases, haven't found anything currently testing qRcmd but may have just missed it.
Preliminary discussion at http://lists.llvm.org/pipermail/lldb-dev/2018-January/013078.html