diff options
author | Greg Clayton <gclayton@apple.com> | 2011-04-28 20:55:26 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2011-04-28 20:55:26 +0000 |
commit | 68ebae61d1e51c2741c14bc9f1995270c84f51a6 (patch) | |
tree | 3b8d40d496747c4526cba0082267cd09c590d698 /lldb/source/Core/DataExtractor.cpp | |
parent | d36bdb5208dc7a9d7eab8e210606d459976d7fb3 (diff) | |
download | bcm5719-llvm-68ebae61d1e51c2741c14bc9f1995270c84f51a6.tar.gz bcm5719-llvm-68ebae61d1e51c2741c14bc9f1995270c84f51a6.zip |
Added the ability to specify dumping options (show types, show location,
depth control, pointer depth, and more) when dumping memory and viewing as
a type.
llvm-svn: 130436
Diffstat (limited to 'lldb/source/Core/DataExtractor.cpp')
-rw-r--r-- | lldb/source/Core/DataExtractor.cpp | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/lldb/source/Core/DataExtractor.cpp b/lldb/source/Core/DataExtractor.cpp index 4119828fca5..10a2029527d 100644 --- a/lldb/source/Core/DataExtractor.cpp +++ b/lldb/source/Core/DataExtractor.cpp @@ -1446,24 +1446,20 @@ DataExtractor::Dump { assert (item_bit_size == 0 && item_bit_offset == 0); s->PutCString("0x"); - int32_t start_idx, end_idx, delta; - if (m_byte_order == eByteOrderBig) - { - start_idx = offset; - end_idx = offset + item_byte_size; - delta = 1; - } - else - { - start_idx = offset + item_byte_size - 1; - end_idx = -1; - delta = -1; - } const uint8_t *bytes = (const uint8_t* )GetData(&offset, item_byte_size); if (bytes) { - for (int32_t idx = start_idx; idx != end_idx; idx += delta) - s->Printf("%2.2x", bytes[idx]); + uint32_t idx; + if (m_byte_order == eByteOrderBig) + { + for (idx = 0; idx < item_byte_size; ++idx) + s->Printf("%2.2x", bytes[idx]); + } + else + { + for (idx = 0; idx < item_byte_size; ++idx) + s->Printf("%2.2x", bytes[item_byte_size - 1 - idx]); + } } } break; |