diff options
author | 2016-01-14 02:51:02 +0000 | |
---|---|---|
committer | 2016-01-14 02:51:02 +0000 | |
commit | 44859db74bb1cc2341524c5484cc3e765ec42c42 (patch) | |
tree | 2ee50fa0fb92410de8867e7eec342e1e303ba54c /tools/aapt2/Debug.cpp | |
parent | e7d716d5e35a4e6b5fcc1ff012942e4ad4933d1a (diff) | |
parent | 52364f7ae31716d7827ea8f8566f4a28bd30a921 (diff) |
Merge "AAPT2: Variety of small fixes to get the build working"
Diffstat (limited to 'tools/aapt2/Debug.cpp')
-rw-r--r-- | tools/aapt2/Debug.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/aapt2/Debug.cpp b/tools/aapt2/Debug.cpp index 5fce2c16f630..b4e75f9be3a9 100644 --- a/tools/aapt2/Debug.cpp +++ b/tools/aapt2/Debug.cpp @@ -210,4 +210,19 @@ void Debug::printStyleGraph(ResourceTable* table, const ResourceName& targetStyl std::cout << "}" << std::endl; } +void Debug::dumpHex(const void* data, size_t len) { + const uint8_t* d = (const uint8_t*) data; + for (size_t i = 0; i < len; i++) { + std::cerr << std::hex << std::setfill('0') << std::setw(2) << (uint32_t) d[i] << " "; + if (i % 8 == 7) { + std::cerr << "\n"; + } + } + + if (len - 1 % 8 != 7) { + std::cerr << std::endl; + } +} + + } // namespace aapt |