Make the hex dump more generally useful (specifically in CHECKs).
Change-Id: I78a79f64abc70496e4575f753c44c939a3cbf5fd
diff --git a/src/jdwp/jdwp_handler.cc b/src/jdwp/jdwp_handler.cc
index fb2264a..e8f9e61 100644
--- a/src/jdwp/jdwp_handler.cc
+++ b/src/jdwp/jdwp_handler.cc
@@ -1667,11 +1667,8 @@
}
}
if (i == arraysize(gHandlerMap)) {
- LOG(ERROR) << DescribeCommand(pHeader, dataLen);
- if (dataLen > 0) {
- HexDump(buf, dataLen);
- }
- LOG(ERROR) << "command not implemented";
+ LOG(ERROR) << "Command not implemented: " << DescribeCommand(pHeader, dataLen);
+ LOG(ERROR) << HexDump(buf, dataLen);
result = ERR_NOT_IMPLEMENTED;
}
@@ -1693,9 +1690,7 @@
size_t respLen = expandBufGetLength(pReply) - kJDWPHeaderLen;
if (false) {
LOG(INFO) << "reply: dataLen=" << respLen << " err=" << result << (result != ERR_NONE ? " **FAILED**" : "");
- if (respLen > 0) {
- HexDump(expandBufGetBuffer(pReply) + kJDWPHeaderLen, respLen);
- }
+ LOG(INFO) << HexDump(expandBufGetBuffer(pReply) + kJDWPHeaderLen, respLen);
}
/*