diff options
author | Greg Clayton <gclayton@apple.com> | 2011-05-15 23:56:52 +0000 |
---|---|---|
committer | Greg Clayton <gclayton@apple.com> | 2011-05-15 23:56:52 +0000 |
commit | 1cfca1dc090416bd681508d3a3d8de0e1fa83e7d (patch) | |
tree | 9b0748fbecde5aa76ba9b355d044514751a1f913 /lldb/source/Expression/ClangExpressionParser.cpp | |
parent | 17a0cb68c97eb551e50431470d68ab17b58e9ccc (diff) | |
download | bcm5719-llvm-1cfca1dc090416bd681508d3a3d8de0e1fa83e7d.tar.gz bcm5719-llvm-1cfca1dc090416bd681508d3a3d8de0e1fa83e7d.zip |
Dump JIT memory requirements when "log enable lldb expr" logging is enabled.
Correctly handle invalid 32-bit mmap fail return value in ProcessGDBRemote.
llvm-svn: 131394
Diffstat (limited to 'lldb/source/Expression/ClangExpressionParser.cpp')
-rw-r--r-- | lldb/source/Expression/ClangExpressionParser.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lldb/source/Expression/ClangExpressionParser.cpp b/lldb/source/Expression/ClangExpressionParser.cpp index 2ba15fe4581..0c07bcb6a50 100644 --- a/lldb/source/Expression/ClangExpressionParser.cpp +++ b/lldb/source/Expression/ClangExpressionParser.cpp @@ -620,9 +620,14 @@ ClangExpressionParser::MakeJIT (lldb::addr_t &func_allocation_addr, std::map<uint8_t *, uint8_t *>::iterator fun_pos = jit_memory_manager->m_functions.begin(); std::map<uint8_t *, uint8_t *>::iterator fun_end = jit_memory_manager->m_functions.end(); - + for (; fun_pos != fun_end; ++fun_pos) - alloc_size += (*fun_pos).second - (*fun_pos).first; + { + size_t mem_size = fun_pos->second - fun_pos->first; + if (log) + log->Printf ("JIT memory: [%p - %p) size = %zu", fun_pos->first, fun_pos->second, mem_size); + alloc_size += mem_size; + } Error alloc_error; func_allocation_addr = exc_context.process->AllocateMemory (alloc_size, |