diff options
Diffstat (limited to 'source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp')
-rw-r--r-- | source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp b/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp index cdb9525..2810b24 100644 --- a/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp +++ b/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp @@ -69,7 +69,20 @@ AppleObjCRuntime::GetObjectDescription (Stream &str, ValueObject &valobj) if (!valobj.ResolveValue(val.GetScalar())) return false; - ExecutionContext exe_ctx (valobj.GetExecutionContextRef()); + // Value Objects may not have a process in their ExecutionContextRef. But we need to have one + // in the ref we pass down to eventually call description. Get it from the target if it isn't + // present. + ExecutionContext exe_ctx; + if (valobj.GetProcessSP()) + { + exe_ctx = ExecutionContext(valobj.GetExecutionContextRef()); + } + else + { + exe_ctx.SetContext(valobj.GetTargetSP(), true); + if (!exe_ctx.HasProcessScope()) + return false; + } return GetObjectDescription(str, val, exe_ctx.GetBestExecutionContextScope()); } |