summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/Module.cpp
diff options
context:
space:
mode:
authorAndrew MacPherson <andrew.macp@gmail.com>2014-03-05 10:12:43 +0000
committerAndrew MacPherson <andrew.macp@gmail.com>2014-03-05 10:12:43 +0000
commit17220c188635721e948cf02d2b6ad36b267ea393 (patch)
tree0cebe606271d0bacf3c3994fe8fead07fd36e092 /lldb/source/Core/Module.cpp
parent05511fd3e61f476c142eec090d5a36869ad90db1 (diff)
downloadbcm5719-llvm-17220c188635721e948cf02d2b6ad36b267ea393.tar.gz
bcm5719-llvm-17220c188635721e948cf02d2b6ad36b267ea393.zip
Add support for JIT debugging on Linux using the GDB JIT interface. Patch written with Keno Fischer.
llvm-svn: 202956
Diffstat (limited to 'lldb/source/Core/Module.cpp')
-rw-r--r--lldb/source/Core/Module.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lldb/source/Core/Module.cpp b/lldb/source/Core/Module.cpp
index 6ce76dc825b..45ce08f6aab 100644
--- a/lldb/source/Core/Module.cpp
+++ b/lldb/source/Core/Module.cpp
@@ -284,7 +284,7 @@ Module::~Module()
}
ObjectFile *
-Module::GetMemoryObjectFile (const lldb::ProcessSP &process_sp, lldb::addr_t header_addr, Error &error)
+Module::GetMemoryObjectFile (const lldb::ProcessSP &process_sp, lldb::addr_t header_addr, Error &error, size_t size_to_read)
{
if (m_objfile_sp)
{
@@ -296,13 +296,13 @@ Module::GetMemoryObjectFile (const lldb::ProcessSP &process_sp, lldb::addr_t hea
if (process_sp)
{
m_did_load_objfile = true;
- std::unique_ptr<DataBufferHeap> data_ap (new DataBufferHeap (512, 0));
+ std::unique_ptr<DataBufferHeap> data_ap (new DataBufferHeap (size_to_read, 0));
Error readmem_error;
const size_t bytes_read = process_sp->ReadMemory (header_addr,
data_ap->GetBytes(),
data_ap->GetByteSize(),
readmem_error);
- if (bytes_read == 512)
+ if (bytes_read == size_to_read)
{
DataBufferSP data_sp(data_ap.release());
m_objfile_sp = ObjectFile::FindPlugin(shared_from_this(), process_sp, header_addr, data_sp);
OpenPOWER on IntegriCloud