diff options
author | Ian Rogers <irogers@google.com> | 2014-01-30 16:58:39 -0800 |
---|---|---|
committer | Ian Rogers <irogers@google.com> | 2014-01-30 16:58:39 -0800 |
commit | 43b2e0f9105848da6470458e7c04bf1fd7fcb25c (patch) | |
tree | 65406c86398c27c934169251c3a4446e99c885f7 /runtime/jdwp | |
parent | f7eedc939e9dc07b627b2f94eb132155be992883 (diff) | |
download | art-43b2e0f9105848da6470458e7c04bf1fd7fcb25c.zip art-43b2e0f9105848da6470458e7c04bf1fd7fcb25c.tar.gz art-43b2e0f9105848da6470458e7c04bf1fd7fcb25c.tar.bz2 |
Fix multi-line hex dumping and add unit test.
Change-Id: I7657018fef5d9c17410a9a634db275555f180014
Diffstat (limited to 'runtime/jdwp')
-rw-r--r-- | runtime/jdwp/jdwp_handler.cc | 5 |
1 files changed, 3 insertions, 2 deletions
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 <string> #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) << "----------"; |