From 39f7ee86c8d8a81e9c1ddc1514e2db5a1778bd06 Mon Sep 17 00:00:00 2001 From: Greg Clayton Date: Fri, 1 Feb 2013 21:38:35 +0000 Subject: Fix in loading mach files from memory when using DynamicLoaderMacOSXDYLD. Removed the uuid mismatch warning that could be spit out and any time during debugging and removed the test case that was looking for that. Currently the "add-dsym" or "target symbols add" command will report an error when the UUID's don't match. Be more careful when checking and resolving section + offset addresses to make sure none of the base addresses are invalid. llvm-svn: 174222 --- lldb/source/API/SBModule.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'lldb/source/API/SBModule.cpp') diff --git a/lldb/source/API/SBModule.cpp b/lldb/source/API/SBModule.cpp index 219870c733c8..681d416c2aea 100644 --- a/lldb/source/API/SBModule.cpp +++ b/lldb/source/API/SBModule.cpp @@ -50,12 +50,14 @@ SBModule::SBModule (lldb::SBProcess &process, lldb::addr_t header_addr) : ProcessSP process_sp (process.GetSP()); if (process_sp) { - const bool add_image_to_target = true; - const bool load_image_sections_in_target = true; - m_opaque_sp = process_sp->ReadModuleFromMemory (FileSpec(), - header_addr, - add_image_to_target, - load_image_sections_in_target); + m_opaque_sp = process_sp->ReadModuleFromMemory (FileSpec(), header_addr); + if (m_opaque_sp) + { + Target &target = process_sp->GetTarget(); + bool changed = false; + m_opaque_sp->SetLoadAddress(target, 0, changed); + target.GetImages().Append(m_opaque_sp); + } } } -- cgit v1.2.3