From 43b2e0f9105848da6470458e7c04bf1fd7fcb25c Mon Sep 17 00:00:00 2001 From: Ian Rogers Date: Thu, 30 Jan 2014 16:58:39 -0800 Subject: Fix multi-line hex dumping and add unit test. Change-Id: I7657018fef5d9c17410a9a634db275555f180014 --- runtime/jdwp/jdwp_handler.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'runtime/jdwp') diff --git a/runtime/jdwp/jdwp_handler.cc b/runtime/jdwp/jdwp_handler.cc index 6522a62..a514e69 100644 --- a/runtime/jdwp/jdwp_handler.cc +++ b/runtime/jdwp/jdwp_handler.cc @@ -21,6 +21,7 @@ #include #include "atomic.h" +#include "base/hex_dump.h" #include "base/logging.h" #include "base/macros.h" #include "base/stringprintf.h" @@ -1705,7 +1706,7 @@ void JdwpState::ProcessRequest(Request& request, ExpandBuf* pReply) { } if (i == arraysize(gHandlers)) { LOG(ERROR) << "Command not implemented: " << DescribeCommand(request); - LOG(ERROR) << HexDump(request.data(), request.size()); + LOG(ERROR) << HexDump(request.data(), request.size(), false, ""); result = ERR_NOT_IMPLEMENTED; } @@ -1729,7 +1730,7 @@ void JdwpState::ProcessRequest(Request& request, ExpandBuf* pReply) { size_t respLen = expandBufGetLength(pReply) - kJDWPHeaderLen; VLOG(jdwp) << "REPLY: " << GetCommandName(request) << " " << result << " (length=" << respLen << ")"; if (false) { - VLOG(jdwp) << HexDump(expandBufGetBuffer(pReply) + kJDWPHeaderLen, respLen); + VLOG(jdwp) << HexDump(expandBufGetBuffer(pReply) + kJDWPHeaderLen, respLen, false, ""); } VLOG(jdwp) << "----------"; -- cgit v1.1