Author: jmolenda
Date: Thu Feb 12 00:14:23 2015
New Revision: 228910
URL: http://llvm.org/viewvc/llvm-project?rev=228910&view=rev
Log:
Search through all memory regions of the core file for
both a user process dyld and for a kernel binary -- we
will decide which to prefer after one or both have been
located.
It would be faster to stop the search thorugh the core
segments one we've found a dyld/kernel binary - but that
may trick us into missing the one we would prefer.
<rdar://problem/19806413>
Modified:
lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp
Modified: lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp
URL:
http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp?rev=228910&r1=228909&r2=228910&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp (original)
+++ lldb/trunk/source/Plugins/Process/mach-core/ProcessMachCore.cpp Thu Feb 12
00:14:23 2015
@@ -311,10 +311,14 @@ ProcessMachCore::DoLoadCore ()
// We need to locate the main executable in the memory ranges
// we have in the core file. We need to search for both a
user-process dyld binary
// and a kernel binary in memory; we must look at all the pages in the
binary so
- // we don't miss one or the other. If we find a user-process dyld
binary, stop
- // searching -- that's the one we'll prefer over the mach kernel.
+ // we don't miss one or the other. Step through all memory segments
searching for
+ // a kernel binary and for a user process dyld -- we'll decide which
to prefer
+ // later if both are present.
+
const size_t num_core_aranges = m_core_aranges.GetSize();
- for (size_t i=0; i<num_core_aranges && m_dyld_addr ==
LLDB_INVALID_ADDRESS; ++i)
+ for (size_t i = 0;
+ i < num_core_aranges && (m_dyld_addr == LLDB_INVALID_ADDRESS ||
m_mach_kernel_addr == LLDB_INVALID_ADDRESS);
+ ++i)
{
const VMRangeToFileOffset::Entry *entry =
m_core_aranges.GetEntryAtIndex(i);
lldb::addr_t section_vm_addr_start = entry->GetRangeBase();
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits