Skip to content

Commit e89d00d

Browse files
committed
Fix crash in GDB RSP adapter when connecting to winedbg. Fix #819
1 parent 82833db commit e89d00d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

core/adapters/rspconnector.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,11 @@ std::unordered_map<std::string, std::uint64_t> RspConnector::PacketToUnorderedMa
108108
if (key_value.size() == 2)
109109
{
110110
value = RspConnector::DecodeRLE(RspData(key_value[1])).AsString();
111+
// This is hack for registers wider than 8 bytes. We could parse it here like how we handle wide registers
112+
// in ReadAllRegisters(), but since we do not really use the returned information anywhere, it is fine to
113+
// just truncate the string
114+
if (value.length() > 16)
115+
value = value.substr(0, 16);
111116

112117
if (key == "thread") {
113118
if (value[0] == 'p' && value.find('.') != std::string::npos) {

0 commit comments

Comments
 (0)