diff options
Diffstat (limited to 'lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp')
-rw-r--r-- | lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp index a76326eba19..b7c5df200c0 100644 --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp @@ -512,9 +512,11 @@ AppleObjCTrampolineHandler::AppleObjCVTables::RefreshTrampolines (void *baton, ClangASTContext *clang_ast_context = process->GetTarget().GetScratchClangASTContext(); ValueList argument_values; Value input_value; - void *clang_void_ptr_type = clang_ast_context->GetVoidPtrType(false); + ClangASTType clang_void_ptr_type = clang_ast_context->GetBasicType(eBasicTypeVoid).GetPointerType(); + input_value.SetValueType (Value::eValueTypeScalar); - input_value.SetContext (Value::eContextTypeClangType, clang_void_ptr_type); + //input_value.SetContext (Value::eContextTypeClangType, clang_void_ptr_type); + input_value.SetClangType (clang_void_ptr_type); argument_values.PushValue(input_value); bool success = abi->GetArgumentValues (exe_ctx.GetThreadRef(), argument_values); @@ -525,7 +527,6 @@ AppleObjCTrampolineHandler::AppleObjCVTables::RefreshTrampolines (void *baton, Error error; DataExtractor data; error = argument_values.GetValueAtIndex(0)->GetValueAsData (&exe_ctx, - clang_ast_context->getASTContext(), data, 0, NULL); @@ -783,13 +784,12 @@ AppleObjCTrampolineHandler::SetupDispatchFunction (Thread &thread, ValueList &di // Next make the runner function for our implementation utility function. if (!m_impl_function.get()) { - ClangASTContext *clang_ast_context = thread.GetProcess()->GetTarget().GetScratchClangASTContext(); - lldb::clang_type_t clang_void_ptr_type = clang_ast_context->GetVoidPtrType(false); - m_impl_function.reset(new ClangFunction (thread, - clang_ast_context, - clang_void_ptr_type, - impl_code_address, - dispatch_values)); + ClangASTContext *clang_ast_context = thread.GetProcess()->GetTarget().GetScratchClangASTContext(); + ClangASTType clang_void_ptr_type = clang_ast_context->GetBasicType(eBasicTypeVoid).GetPointerType(); + m_impl_function.reset(new ClangFunction (thread, + clang_void_ptr_type, + impl_code_address, + dispatch_values)); errors.Clear(); unsigned num_errors = m_impl_function->CompileFunction(errors); @@ -887,9 +887,10 @@ AppleObjCTrampolineHandler::GetStepThroughDispatchPlan (Thread &thread, bool sto ClangASTContext *clang_ast_context = target_sp->GetScratchClangASTContext(); ValueList argument_values; Value void_ptr_value; - lldb::clang_type_t clang_void_ptr_type = clang_ast_context->GetVoidPtrType(false); + ClangASTType clang_void_ptr_type = clang_ast_context->GetBasicType(eBasicTypeVoid).GetPointerType(); void_ptr_value.SetValueType (Value::eValueTypeScalar); - void_ptr_value.SetContext (Value::eContextTypeClangType, clang_void_ptr_type); + //void_ptr_value.SetContext (Value::eContextTypeClangType, clang_void_ptr_type); + void_ptr_value.SetClangType (clang_void_ptr_type); int obj_index; int sel_index; @@ -949,14 +950,14 @@ AppleObjCTrampolineHandler::GetStepThroughDispatchPlan (Thread &thread, bool sto Value super_value(*(argument_values.GetValueAtIndex(obj_index))); super_value.GetScalar() += process->GetAddressByteSize(); - super_value.ResolveValue (&exe_ctx, clang_ast_context->getASTContext()); + super_value.ResolveValue (&exe_ctx); if (super_value.GetScalar().IsValid()) { // isa_value now holds the class pointer. The second word of the class pointer is the super-class pointer: super_value.GetScalar() += process->GetAddressByteSize(); - super_value.ResolveValue (&exe_ctx, clang_ast_context->getASTContext()); + super_value.ResolveValue (&exe_ctx); if (super_value.GetScalar().IsValid()) isa_addr = super_value.GetScalar().ULongLong(); else @@ -979,7 +980,7 @@ AppleObjCTrampolineHandler::GetStepThroughDispatchPlan (Thread &thread, bool sto Value super_value(*(argument_values.GetValueAtIndex(obj_index))); super_value.GetScalar() += process->GetAddressByteSize(); - super_value.ResolveValue (&exe_ctx, clang_ast_context->getASTContext()); + super_value.ResolveValue (&exe_ctx); if (super_value.GetScalar().IsValid()) { @@ -1006,7 +1007,7 @@ AppleObjCTrampolineHandler::GetStepThroughDispatchPlan (Thread &thread, bool sto Value isa_value(*(argument_values.GetValueAtIndex(obj_index))); isa_value.SetValueType(Value::eValueTypeLoadAddress); - isa_value.ResolveValue(&exe_ctx, clang_ast_context->getASTContext()); + isa_value.ResolveValue(&exe_ctx); if (isa_value.GetScalar().IsValid()) { isa_addr = isa_value.GetScalar().ULongLong(); @@ -1068,10 +1069,10 @@ AppleObjCTrampolineHandler::GetStepThroughDispatchPlan (Thread &thread, bool sto dispatch_values.PushValue (*(argument_values.GetValueAtIndex(sel_index))); Value flag_value; - lldb::clang_type_t clang_int_type - = clang_ast_context->GetBuiltinTypeForEncodingAndBitSize(lldb::eEncodingSint, 32); + ClangASTType clang_int_type = clang_ast_context->GetBuiltinTypeForEncodingAndBitSize(lldb::eEncodingSint, 32); flag_value.SetValueType (Value::eValueTypeScalar); - flag_value.SetContext (Value::eContextTypeClangType, clang_int_type); + //flag_value.SetContext (Value::eContextTypeClangType, clang_int_type); + flag_value.SetClangType (clang_int_type); if (this_dispatch.stret_return) flag_value.GetScalar() = 1; |