[Lldb-commits] [lldb] r167564 - in /lldb/trunk/source/Plugins: DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp SymbolFile/DWARF/DWARFDebugLine.cpp

Jason Molenda jmolenda at apple.com
Wed Nov 7 16:19:28 PST 2012


Author: jmolenda
Date: Wed Nov  7 18:19:28 2012
New Revision: 167564

URL: http://llvm.org/viewvc/llvm-project?rev=167564&view=rev
Log:
Fix a crasher in 
DynamicLoaderDarwinKernel::OSKextLoadedKextSummary::LoadImageUsingMemoryModule
where it assumed that a kernel had been found in memory, when that may not be
the case when we're attaching to a device early in the boot process.
<rdar://problem/12638140> 


Modified:
    lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
    lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp

Modified: lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp?rev=167564&r1=167563&r2=167564&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp Wed Nov  7 18:19:28 2012
@@ -264,7 +264,8 @@
             uuid = memory_module_sp->GetUUID();
             uuid_is_valid = uuid.IsValid();
         }
-        if (memory_module_sp->GetObjectFile() 
+        if (memory_module_sp 
+            && memory_module_sp->GetObjectFile() 
             && memory_module_sp->GetObjectFile()->GetType() == ObjectFile::eTypeExecutable
             && memory_module_sp->GetObjectFile()->GetStrata() == ObjectFile::eStrataKernel)
         {

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp?rev=167564&r1=167563&r2=167564&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp Wed Nov  7 18:19:28 2012
@@ -804,8 +804,8 @@
             // field in the header, plus the value of the line_range field,
             // minus 1 (line base + line range - 1). If the desired line
             // increment is greater than the maximum line increment, a standard
-            // opcode must be used instead of a special opcode. The “address
-            // advance” is calculated by dividing the desired address increment
+            // opcode must be used instead of a special opcode. The "address
+            // advance" is calculated by dividing the desired address increment
             // by the minimum_instruction_length field from the header. The
             // special opcode is then calculated using the following formula:
             //





More information about the lldb-commits mailing list