From a8298d3ba5de355b00886767835df2c13c215b06 Mon Sep 17 00:00:00 2001 From: Jim Ingham Date: Tue, 28 Sep 2010 16:06:31 +0000 Subject: [PATCH] Make sure we've read in the ObjC runtime library data before trying to use it... llvm-svn: 114956 --- .../ObjC/AppleObjCRuntimeV2/AppleObjCRuntimeV2.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntimeV2/AppleObjCRuntimeV2.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntimeV2/AppleObjCRuntimeV2.cpp index 6d9d302653a8..7ba7a9b6e1ac 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntimeV2/AppleObjCRuntimeV2.cpp +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntimeV2/AppleObjCRuntimeV2.cpp @@ -37,6 +37,10 @@ static const char *pluginShort = "language.apple.objc.v2"; bool AppleObjCRuntimeV2::GetObjectDescription (Stream &str, ValueObject &object, ExecutionContextScope *exe_scope) { + + if (!m_read_objc_library) + return false; + ExecutionContext exe_ctx; exe_scope->Calculate(exe_ctx); @@ -186,7 +190,8 @@ ThreadPlanSP AppleObjCRuntimeV2::GetStepThroughTrampolinePlan (Thread &thread, bool stop_others) { ThreadPlanSP thread_plan_sp; - thread_plan_sp = m_objc_trampoline_handler_ap->GetStepThroughDispatchPlan (thread, stop_others); + if (m_objc_trampoline_handler_ap.get()) + thread_plan_sp = m_objc_trampoline_handler_ap->GetStepThroughDispatchPlan (thread, stop_others); return thread_plan_sp; }