[Lldb-commits] [PATCH] D41745: Handle O reply packets during qRcmd

Owen Shaw via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Jan 4 16:32:24 PST 2018


owenpshaw created this revision.
owenpshaw added a reviewer: clayborg.

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


https://reviews.llvm.org/D41745

Files:
  source/Plugins/Process/gdb-remote/GDBRemoteClientBase.cpp
  source/Plugins/Process/gdb-remote/GDBRemoteClientBase.h
  source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
  source/Plugins/Process/gdb-remote/GDBRemoteCommunication.h
  source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41745.128672.patch
Type: text/x-patch
Size: 5142 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180105/e73fcd94/attachment.bin>


More information about the lldb-commits mailing list