From c56bd0837378f15bbc652288c347f1cdb2b5ce8e Mon Sep 17 00:00:00 2001 From: Jason Molenda Date: Thu, 8 Nov 2012 00:19:28 +0000 Subject: [PATCH] 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. llvm-svn: 167564 --- .../Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp | 3 ++- lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp index 739a46a..3863762 100644 --- a/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp +++ b/lldb/source/Plugins/DynamicLoader/Darwin-Kernel/DynamicLoaderDarwinKernel.cpp @@ -264,7 +264,8 @@ DynamicLoaderDarwinKernel::OSKextLoadedKextSummary::LoadImageUsingMemoryModule ( 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) { diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp index 0367f50..d21753c 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugLine.cpp @@ -804,8 +804,8 @@ DWARFDebugLine::ParseStatementTable // 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: // -- 2.7.4