diff options
Diffstat (limited to 'lldb/source/Plugins')
3 files changed, 31 insertions, 22 deletions
diff --git a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp index 27f80cb3cb5..b8cf0d50120 100644 --- a/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp +++ b/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp @@ -65,9 +65,11 @@ ItaniumABILanguageRuntime::GetDynamicTypeAndAddress (ValueObject &in_value, lldb::addr_t original_ptr = in_value.GetPointerValue(&address_type); if (original_ptr == LLDB_INVALID_ADDRESS) return false; - - Target *target = in_value.GetUpdatePoint().GetTargetSP().get(); - Process *process = in_value.GetUpdatePoint().GetProcessSP().get(); + + ExecutionContext exe_ctx (in_value.GetExecutionContextRef()); + + Target *target = exe_ctx.GetTargetPtr(); + Process *process = exe_ctx.GetProcessPtr(); char memory_buffer[16]; DataExtractor data(memory_buffer, sizeof(memory_buffer), diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp index 43c9aa60442..eaae268eb59 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp @@ -39,22 +39,23 @@ using namespace lldb; using namespace lldb_private; bool -AppleObjCRuntime::GetObjectDescription (Stream &str, ValueObject &object) +AppleObjCRuntime::GetObjectDescription (Stream &str, ValueObject &valobj) { bool is_signed; // ObjC objects can only be pointers, but we extend this to integer types because an expression might just // result in an address, and we should try that to see if the address is an ObjC object. - if (!(object.IsPointerType() || object.IsIntegerType(is_signed))) + if (!(valobj.IsPointerType() || valobj.IsIntegerType(is_signed))) return NULL; // Make the argument list: we pass one arg, the address of our pointer, to the print function. Value val; - if (!object.ResolveValue(val.GetScalar())) + if (!valobj.ResolveValue(val.GetScalar())) return NULL; - - return GetObjectDescription(str, val, object.GetExecutionContextScope()); + + ExecutionContext exe_ctx (valobj.GetExecutionContextRef()); + return GetObjectDescription(str, val, exe_ctx.GetBestExecutionContextScope()); } bool diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp index e3341c95a27..618ccf295fa 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp @@ -237,8 +237,9 @@ AppleObjCRuntimeV2::GetDynamicTypeAndAddress (ValueObject &in_value, Address &address) { // The Runtime is attached to a particular process, you shouldn't pass in a value from another process. - assert (in_value.GetUpdatePoint().GetProcessSP().get() == m_process); - + assert (in_value.GetProcessSP().get() == m_process); + assert (m_process != NULL); + // Make sure we can have a dynamic value before starting... if (CouldHaveDynamicValue (in_value)) { @@ -309,10 +310,10 @@ AppleObjCRuntimeV2::GetDynamicTypeAndAddress (ValueObject &in_value, // If the class address didn't point into the binary, or // it points into the right section but there wasn't a symbol // there, try to look it up by calling the class method in the target. - ExecutionContextScope *exe_scope = in_value.GetExecutionContextScope(); - Thread *thread_to_use; - if (exe_scope) - thread_to_use = exe_scope->CalculateThread(); + + ExecutionContext exe_ctx (in_value.GetExecutionContextRef()); + + Thread *thread_to_use = exe_ctx.GetThreadPtr(); if (thread_to_use == NULL) thread_to_use = m_process->GetThreadList().GetSelectedThread().get(); @@ -592,15 +593,20 @@ AppleObjCRuntimeV2::GetISA(ValueObject& valobj) if (IsTaggedPointer(isa_pointer)) return g_objc_Tagged_ISA; - uint8_t pointer_size = valobj.GetUpdatePoint().GetProcessSP()->GetAddressByteSize(); + ExecutionContext exe_ctx (valobj.GetExecutionContextRef()); + + Process *process = exe_ctx.GetProcessPtr(); + if (process) + { + uint8_t pointer_size = process->GetAddressByteSize(); - Error error; - ObjCLanguageRuntime::ObjCISA isa = - valobj.GetUpdatePoint().GetProcessSP()->ReadUnsignedIntegerFromMemory(isa_pointer, - pointer_size, - 0, - error); - return isa; + Error error; + return process->ReadUnsignedIntegerFromMemory (isa_pointer, + pointer_size, + 0, + error); + } + return 0; } // TODO: should we have a transparent_kvo parameter here to say if we |