diff options
author | Zachary Turner <zturner@google.com> | 2017-03-03 20:57:05 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2017-03-03 20:57:05 +0000 |
commit | 29cb868aa4d0279449b56288fde0358adade1a68 (patch) | |
tree | 697a72f9a7f9f37b5715cd75eb0b164216fcce6e /lldb/source/Commands/CommandObjectMemory.cpp | |
parent | 6f9e690199edd68b20bac92983a216459bc568ed (diff) | |
download | bcm5719-llvm-29cb868aa4d0279449b56288fde0358adade1a68.tar.gz bcm5719-llvm-29cb868aa4d0279449b56288fde0358adade1a68.zip |
Isolate Target-specific functionality of DataExtractor.
In an effort to move the various DataBuffer / DataExtractor
classes from Core -> Utility, we have to separate the low-level
functionality from the higher level functionality. Only a
few functions required anything other than reading/writing
raw bytes, so those functions are separated out into a
more appropriate area. Specifically, Dump() and DumpHexBytes()
are moved into free functions in Core/DumpDataExtractor.cpp,
and GetGNUEHPointer is moved into a static function in the
only file that it's referenced from.
Differential Revision: https://reviews.llvm.org/D30560
llvm-svn: 296910
Diffstat (limited to 'lldb/source/Commands/CommandObjectMemory.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectMemory.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lldb/source/Commands/CommandObjectMemory.cpp b/lldb/source/Commands/CommandObjectMemory.cpp index 236c7bf2c43..971b68a60c1 100644 --- a/lldb/source/Commands/CommandObjectMemory.cpp +++ b/lldb/source/Commands/CommandObjectMemory.cpp @@ -18,8 +18,8 @@ #include "CommandObjectMemory.h" #include "Plugins/ExpressionParser/Clang/ClangPersistentVariables.h" #include "lldb/Core/DataBufferHeap.h" -#include "lldb/Core/DataExtractor.h" #include "lldb/Core/Debugger.h" +#include "lldb/Core/DumpDataExtractor.h" #include "lldb/Core/Module.h" #include "lldb/Core/Section.h" #include "lldb/Core/ValueObjectMemory.h" @@ -861,10 +861,10 @@ protected: } assert(output_stream); - size_t bytes_dumped = - data.Dump(output_stream, 0, format, item_byte_size, item_count, - num_per_line / target->GetArchitecture().GetDataByteSize(), - addr, 0, 0, exe_scope); + size_t bytes_dumped = DumpDataExtractor( + data, output_stream, 0, format, item_byte_size, item_count, + num_per_line / target->GetArchitecture().GetDataByteSize(), addr, 0, 0, + exe_scope); m_next_addr = addr + bytes_dumped; output_stream->EOL(); return true; @@ -1131,10 +1131,10 @@ protected: DataExtractor data(dumpbuffer.GetBytes(), dumpbuffer.GetByteSize(), process->GetByteOrder(), process->GetAddressByteSize()); - data.Dump(&result.GetOutputStream(), 0, lldb::eFormatBytesWithASCII, 1, - dumpbuffer.GetByteSize(), 16, - found_location + m_memory_options.m_offset.GetCurrentValue(), - 0, 0); + DumpDataExtractor( + data, &result.GetOutputStream(), 0, lldb::eFormatBytesWithASCII, 1, + dumpbuffer.GetByteSize(), 16, + found_location + m_memory_options.m_offset.GetCurrentValue(), 0, 0); result.GetOutputStream().EOL(); } |