diff --git a/lldb/source/Symbol/Function.cpp b/lldb/source/Symbol/Function.cpp index 160d455a9c28..be94a112d7c4 100644 --- a/lldb/source/Symbol/Function.cpp +++ b/lldb/source/Symbol/Function.cpp @@ -305,8 +305,19 @@ Function::GetBlock (bool can_create) { SymbolContext sc; CalculateSymbolContext(&sc); - assert(sc.module_sp); - sc.module_sp->GetSymbolVendor()->ParseFunctionBlocks(sc); + if (sc.module_sp) + { + sc.module_sp->GetSymbolVendor()->ParseFunctionBlocks(sc); + } + else + { + ::fprintf (stderr, + "unable to find module shared pointer for function '%s' in %s%s%s\n", + GetName().GetCString(), + m_comp_unit->GetDirectory().GetCString(), + m_comp_unit->GetDirectory() ? "/" : "", + m_comp_unit->GetFilename().GetCString()); + } m_block.SetBlockInfoHasBeenParsed (true, true); } return m_block;