This is an archive of the discontinued LLVM Phabricator instance.

Bug in LLDB RSP client causes '$O' packets to be decoded incorrectly
ClosedPublic

Authored by evgeny777 on Sep 1 2015, 3:52 AM.

Details

Summary

Character with ASCII code 0 is incorrectly treated by LLDB as the end of RSP packet. The left of the debugger server output is silently ignored.

Diff Detail

Repository
rL LLVM

Event Timeline

evgeny777 updated this revision to Diff 33673.Sep 1 2015, 3:52 AM
evgeny777 retitled this revision from to Bug in LLDB RSP client causes '$O' packets to be decoded incorrectly .
evgeny777 updated this object.
evgeny777 added a reviewer: clayborg.
clayborg requested changes to this revision.Sep 1 2015, 9:53 AM
clayborg edited edge metadata.

Why did we introduce StringExtractor::GetHexU8Ex() if the only place that calls it is StringExtractor::GetHexU8() and other places that should just call StringExtractor::GetHexU8()? Seems like you should just fix StringExtractor::GetHexU8() to contain the contents of StringExtractor::GetHexU8Ex() and get rid of StringExtractor::GetHexU8Ex().

This revision now requires changes to proceed.Sep 1 2015, 9:53 AM

GetHexU8Ex is called from SendContinuePacketAndWaitForResponse() in GDBRemoteCommunicationClient.cpp. Please take a look at the patch

clayborg accepted this revision.Sep 1 2015, 11:32 AM
clayborg edited edge metadata.

Ah yes, just the fail_value is the difference.

This revision is now accepted and ready to land.Sep 1 2015, 11:32 AM

Thanks. Could you please commit my changes, as I do not have write access

dawn added a subscriber: dawn.Sep 17 2015, 9:43 AM

Thanks for the patch, I will commit it.

This revision was automatically updated to reflect the committed changes.