[Lldb-commits] [lldb] r226087 - Don't crash when we can't find a block for some reason, just try and do the right thing and fail gracefully.
Greg Clayton
gclayton at apple.com
Wed Jan 14 19:13:44 PST 2015
Author: gclayton
Date: Wed Jan 14 21:13:44 2015
New Revision: 226087
URL: http://llvm.org/viewvc/llvm-project?rev=226087&view=rev
Log:
Don't crash when we can't find a block for some reason, just try and do the right thing and fail gracefully.
<rdar://problem/19196221>
Modified:
lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp?rev=226087&r1=226086&r2=226087&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Wed Jan 14 21:13:44 2015
@@ -3485,9 +3485,11 @@ SymbolFileDWARF::ResolveFunction (DWARFC
// Parse all blocks if needed
if (inlined_die)
{
- sc.block = sc.function->GetBlock (true).FindBlockByID (MakeUserID(inlined_die->GetOffset()));
- assert (sc.block != NULL);
- if (sc.block->GetStartAddress (addr) == false)
+ Block &function_block = sc.function->GetBlock (true);
+ sc.block = function_block.FindBlockByID (MakeUserID(inlined_die->GetOffset()));
+ if (sc.block == NULL)
+ sc.block = function_block.FindBlockByID (inlined_die->GetOffset());
+ if (sc.block == NULL || sc.block->GetStartAddress (addr) == false)
addr.Clear();
}
else
More information about the lldb-commits
mailing list