fjricci created this revision. fjricci added reviewers: vharron, clayborg, jasonmolenda. fjricci added a subscriber: lldb-commits.
The StringExtractor functions using stroull will already skip leading whitespace (ie GetU64). Make sure that the manual hex parsing functions also skip leading whitespace. This is important for members of the gdb protocol which are defined as using whitespace separators (ie qfThreadInfo, qC, etc). While lldb-server does not use the whitespace separators, gdb-remotes should work if they do, as the whitespace is defined by the gdb-remote protocol. http://reviews.llvm.org/D20509 Files: source/Utility/StringExtractor.cpp Index: source/Utility/StringExtractor.cpp =================================================================== --- source/Utility/StringExtractor.cpp +++ source/Utility/StringExtractor.cpp @@ -104,6 +104,7 @@ int StringExtractor::DecodeHexU8() { + SkipSpaces(); if (GetBytesLeft() < 2) { return -1; @@ -230,6 +231,7 @@ uint32_t result = 0; uint32_t nibble_count = 0; + SkipSpaces(); if (little_endian) { uint32_t shift_amount = 0; @@ -292,6 +294,7 @@ uint64_t result = 0; uint32_t nibble_count = 0; + SkipSpaces(); if (little_endian) { uint32_t shift_amount = 0;
Index: source/Utility/StringExtractor.cpp =================================================================== --- source/Utility/StringExtractor.cpp +++ source/Utility/StringExtractor.cpp @@ -104,6 +104,7 @@ int StringExtractor::DecodeHexU8() { + SkipSpaces(); if (GetBytesLeft() < 2) { return -1; @@ -230,6 +231,7 @@ uint32_t result = 0; uint32_t nibble_count = 0; + SkipSpaces(); if (little_endian) { uint32_t shift_amount = 0; @@ -292,6 +294,7 @@ uint64_t result = 0; uint32_t nibble_count = 0; + SkipSpaces(); if (little_endian) { uint32_t shift_amount = 0;
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits