1 //===-- CompilerType.cpp ----------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #include "lldb/Symbol/CompilerType.h"
12 #include "lldb/Core/ConstString.h"
13 #include "lldb/Core/DataBufferHeap.h"
14 #include "lldb/Core/DataExtractor.h"
15 #include "lldb/Core/Debugger.h"
16 #include "lldb/Core/Scalar.h"
17 #include "lldb/Core/Stream.h"
18 #include "lldb/Core/StreamFile.h"
19 #include "lldb/Core/StreamString.h"
20 #include "lldb/Symbol/ClangASTContext.h"
21 #include "lldb/Symbol/ClangExternalASTSourceCommon.h"
22 #include "lldb/Symbol/Type.h"
23 #include "lldb/Target/ExecutionContext.h"
24 #include "lldb/Target/Process.h"
30 using namespace lldb_private;
32 CompilerType::CompilerType (TypeSystem *type_system,
33 lldb::opaque_compiler_type_t type) :
35 m_type_system (type_system)
39 CompilerType::CompilerType (clang::ASTContext *ast,
40 clang::QualType qual_type) :
41 m_type (qual_type.getAsOpaquePtr()),
42 m_type_system (ClangASTContext::GetASTContext(ast))
44 #ifdef LLDB_CONFIGURATION_DEBUG
46 assert(m_type_system != nullptr);
50 CompilerType::~CompilerType()
54 //----------------------------------------------------------------------
56 //----------------------------------------------------------------------
59 CompilerType::IsAggregateType () const
62 return m_type_system->IsAggregateType(m_type);
67 CompilerType::IsAnonymousType () const
70 return m_type_system->IsAnonymousType(m_type);
75 CompilerType::IsArrayType (CompilerType *element_type_ptr,
77 bool *is_incomplete) const
80 return m_type_system->IsArrayType(m_type, element_type_ptr, size, is_incomplete);
83 element_type_ptr->Clear();
87 *is_incomplete = false;
92 CompilerType::IsVectorType (CompilerType *element_type,
96 return m_type_system->IsVectorType(m_type, element_type, size);
101 CompilerType::IsRuntimeGeneratedType () const
104 return m_type_system->IsRuntimeGeneratedType(m_type);
109 CompilerType::IsCharType () const
112 return m_type_system->IsCharType(m_type);
118 CompilerType::IsCompleteType () const
121 return m_type_system->IsCompleteType(m_type);
126 CompilerType::IsConst() const
129 return m_type_system->IsConst(m_type);
134 CompilerType::IsCStringType (uint32_t &length) const
137 return m_type_system->IsCStringType(m_type, length);
142 CompilerType::IsFunctionType (bool *is_variadic_ptr) const
145 return m_type_system->IsFunctionType(m_type, is_variadic_ptr);
149 // Used to detect "Homogeneous Floating-point Aggregates"
151 CompilerType::IsHomogeneousAggregate (CompilerType* base_type_ptr) const
154 return m_type_system->IsHomogeneousAggregate(m_type, base_type_ptr);
159 CompilerType::GetNumberOfFunctionArguments () const
162 return m_type_system->GetNumberOfFunctionArguments(m_type);
167 CompilerType::GetFunctionArgumentAtIndex (const size_t index) const
170 return m_type_system->GetFunctionArgumentAtIndex(m_type, index);
171 return CompilerType();
175 CompilerType::IsFunctionPointerType () const
178 return m_type_system->IsFunctionPointerType(m_type);
183 CompilerType::IsBlockPointerType (CompilerType *function_pointer_type_ptr) const
186 return m_type_system->IsBlockPointerType(m_type, function_pointer_type_ptr);
191 CompilerType::IsIntegerType (bool &is_signed) const
194 return m_type_system->IsIntegerType(m_type, is_signed);
199 CompilerType::IsEnumerationType (bool &is_signed) const
202 return m_type_system->IsEnumerationType(m_type, is_signed);
207 CompilerType::IsIntegerOrEnumerationType (bool &is_signed) const
209 return IsIntegerType(is_signed) || IsEnumerationType(is_signed);
213 CompilerType::IsPointerType (CompilerType *pointee_type) const
217 return m_type_system->IsPointerType(m_type, pointee_type);
220 pointee_type->Clear();
226 CompilerType::IsPointerOrReferenceType (CompilerType *pointee_type) const
230 return m_type_system->IsPointerOrReferenceType(m_type, pointee_type);
233 pointee_type->Clear();
239 CompilerType::IsReferenceType (CompilerType *pointee_type, bool* is_rvalue) const
243 return m_type_system->IsReferenceType(m_type, pointee_type, is_rvalue);
246 pointee_type->Clear();
251 CompilerType::ShouldTreatScalarValueAsAddress () const
254 return m_type_system->ShouldTreatScalarValueAsAddress(m_type);
259 CompilerType::IsFloatingPointType (uint32_t &count, bool &is_complex) const
263 return m_type_system->IsFloatingPointType(m_type, count, is_complex);
272 CompilerType::IsDefined() const
275 return m_type_system->IsDefined(m_type);
280 CompilerType::IsPolymorphicClass () const
284 return m_type_system->IsPolymorphicClass(m_type);
290 CompilerType::IsPossibleDynamicType (CompilerType *dynamic_pointee_type,
291 bool check_cplusplus,
292 bool check_objc) const
295 return m_type_system->IsPossibleDynamicType(m_type, dynamic_pointee_type, check_cplusplus, check_objc);
301 CompilerType::IsScalarType () const
306 return m_type_system->IsScalarType(m_type);
310 CompilerType::IsTypedefType () const
314 return m_type_system->IsTypedefType(m_type);
318 CompilerType::IsVoidType () const
322 return m_type_system->IsVoidType(m_type);
326 CompilerType::IsPointerToScalarType () const
331 return IsPointerType() && GetPointeeType().IsScalarType();
335 CompilerType::IsArrayOfScalarType () const
337 CompilerType element_type;
338 if (IsArrayType(&element_type, nullptr, nullptr))
339 return element_type.IsScalarType();
344 CompilerType::IsBeingDefined () const
348 return m_type_system->IsBeingDefined(m_type);
351 //----------------------------------------------------------------------
353 //----------------------------------------------------------------------
356 CompilerType::GetCompleteType () const
360 return m_type_system->GetCompleteType(m_type);
363 //----------------------------------------------------------------------
364 // AST related queries
365 //----------------------------------------------------------------------
367 CompilerType::GetPointerByteSize () const
370 return m_type_system->GetPointerByteSize();
375 CompilerType::GetConstQualifiedTypeName () const
377 return GetConstTypeName ();
381 CompilerType::GetConstTypeName () const
385 ConstString type_name (GetTypeName());
389 return ConstString("<invalid>");
393 CompilerType::GetTypeName () const
397 return m_type_system->GetTypeName(m_type);
399 return ConstString("<invalid>");
403 CompilerType::GetDisplayTypeName () const
405 return GetTypeName();
409 CompilerType::GetTypeInfo (CompilerType *pointee_or_element_compiler_type) const
414 return m_type_system->GetTypeInfo(m_type, pointee_or_element_compiler_type);
420 CompilerType::GetMinimumLanguage ()
423 return lldb::eLanguageTypeC;
425 return m_type_system->GetMinimumLanguage(m_type);
429 CompilerType::GetTypeClass () const
432 return lldb::eTypeClassInvalid;
434 return m_type_system->GetTypeClass(m_type);
439 CompilerType::SetCompilerType (TypeSystem* type_system, lldb::opaque_compiler_type_t type)
441 m_type_system = type_system;
446 CompilerType::SetCompilerType (clang::ASTContext *ast, clang::QualType qual_type)
448 m_type_system = ClangASTContext::GetASTContext(ast);
449 m_type = qual_type.getAsOpaquePtr();
453 CompilerType::GetTypeQualifiers() const
456 return m_type_system->GetTypeQualifiers(m_type);
460 //----------------------------------------------------------------------
461 // Creating related types
462 //----------------------------------------------------------------------
465 CompilerType::GetArrayElementType (uint64_t *stride) const
469 return m_type_system->GetArrayElementType(m_type, stride);
472 return CompilerType();
476 CompilerType::GetCanonicalType () const
479 return m_type_system->GetCanonicalType(m_type);
480 return CompilerType();
484 CompilerType::GetFullyUnqualifiedType () const
487 return m_type_system->GetFullyUnqualifiedType(m_type);
488 return CompilerType();
493 CompilerType::GetFunctionArgumentCount () const
497 return m_type_system->GetFunctionArgumentCount(m_type);
503 CompilerType::GetFunctionArgumentTypeAtIndex (size_t idx) const
507 return m_type_system->GetFunctionArgumentTypeAtIndex(m_type, idx);
509 return CompilerType();
513 CompilerType::GetFunctionReturnType () const
517 return m_type_system->GetFunctionReturnType(m_type);
519 return CompilerType();
523 CompilerType::GetNumMemberFunctions () const
527 return m_type_system->GetNumMemberFunctions(m_type);
532 TypeMemberFunctionImpl
533 CompilerType::GetMemberFunctionAtIndex (size_t idx)
537 return m_type_system->GetMemberFunctionAtIndex(m_type, idx);
539 return TypeMemberFunctionImpl();
543 CompilerType::GetNonReferenceType () const
546 return m_type_system->GetNonReferenceType(m_type);
547 return CompilerType();
551 CompilerType::GetPointeeType () const
555 return m_type_system->GetPointeeType(m_type);
557 return CompilerType();
561 CompilerType::GetPointerType () const
565 return m_type_system->GetPointerType(m_type);
567 return CompilerType();
571 CompilerType::GetLValueReferenceType () const
574 return m_type_system->GetLValueReferenceType(m_type);
576 return CompilerType();
580 CompilerType::GetRValueReferenceType () const
583 return m_type_system->GetRValueReferenceType(m_type);
585 return CompilerType();
589 CompilerType::AddConstModifier () const
592 return m_type_system->AddConstModifier(m_type);
594 return CompilerType();
598 CompilerType::AddVolatileModifier () const
601 return m_type_system->AddVolatileModifier(m_type);
603 return CompilerType();
607 CompilerType::AddRestrictModifier () const
610 return m_type_system->AddRestrictModifier(m_type);
612 return CompilerType();
616 CompilerType::CreateTypedef (const char *name, const CompilerDeclContext &decl_ctx) const
619 return m_type_system->CreateTypedef(m_type, name, decl_ctx);
621 return CompilerType();
625 CompilerType::GetTypedefedType () const
628 return m_type_system->GetTypedefedType(m_type);
630 return CompilerType();
633 //----------------------------------------------------------------------
634 // Create related types using the current type's AST
635 //----------------------------------------------------------------------
638 CompilerType::GetBasicTypeFromAST (lldb::BasicType basic_type) const
641 return m_type_system->GetBasicTypeFromAST(basic_type);
642 return CompilerType();
644 //----------------------------------------------------------------------
645 // Exploring the type
646 //----------------------------------------------------------------------
649 CompilerType::GetBitSize (ExecutionContextScope *exe_scope) const
653 return m_type_system->GetBitSize(m_type, exe_scope);
659 CompilerType::GetByteSize (ExecutionContextScope *exe_scope) const
661 return (GetBitSize (exe_scope) + 7) / 8;
666 CompilerType::GetTypeBitAlign () const
669 return m_type_system->GetTypeBitAlign(m_type);
675 CompilerType::GetEncoding (uint64_t &count) const
678 return lldb::eEncodingInvalid;
680 return m_type_system->GetEncoding(m_type, count);
684 CompilerType::GetFormat () const
687 return lldb::eFormatDefault;
689 return m_type_system->GetFormat(m_type);
693 CompilerType::GetNumChildren (bool omit_empty_base_classes) const
697 return m_type_system->GetNumChildren(m_type, omit_empty_base_classes);
701 CompilerType::GetBasicTypeEnumeration () const
704 return m_type_system->GetBasicTypeEnumeration(m_type);
705 return eBasicTypeInvalid;
709 CompilerType::ForEachEnumerator (std::function <bool (const CompilerType &integer_type, const ConstString &name, const llvm::APSInt &value)> const &callback) const
712 return m_type_system->ForEachEnumerator (m_type, callback);
717 CompilerType::GetNumFields () const
721 return m_type_system->GetNumFields(m_type);
725 CompilerType::GetFieldAtIndex (size_t idx,
727 uint64_t *bit_offset_ptr,
728 uint32_t *bitfield_bit_size_ptr,
729 bool *is_bitfield_ptr) const
732 return CompilerType();
733 return m_type_system->GetFieldAtIndex(m_type, idx, name, bit_offset_ptr, bitfield_bit_size_ptr, is_bitfield_ptr);
737 CompilerType::GetNumDirectBaseClasses () const
740 return m_type_system->GetNumDirectBaseClasses (m_type);
745 CompilerType::GetNumVirtualBaseClasses () const
748 return m_type_system->GetNumVirtualBaseClasses (m_type);
753 CompilerType::GetDirectBaseClassAtIndex (size_t idx, uint32_t *bit_offset_ptr) const
756 return m_type_system->GetDirectBaseClassAtIndex (m_type, idx, bit_offset_ptr);
757 return CompilerType();
761 CompilerType::GetVirtualBaseClassAtIndex (size_t idx, uint32_t *bit_offset_ptr) const
764 return m_type_system->GetVirtualBaseClassAtIndex (m_type, idx, bit_offset_ptr);
765 return CompilerType();
769 CompilerType::GetIndexOfFieldWithName (const char* name,
770 CompilerType* field_compiler_type_ptr,
771 uint64_t *bit_offset_ptr,
772 uint32_t *bitfield_bit_size_ptr,
773 bool *is_bitfield_ptr) const
775 unsigned count = GetNumFields();
776 std::string field_name;
777 for (unsigned index = 0; index < count; index++)
779 CompilerType field_compiler_type (GetFieldAtIndex(index, field_name, bit_offset_ptr, bitfield_bit_size_ptr, is_bitfield_ptr));
780 if (strcmp(field_name.c_str(), name) == 0)
782 if (field_compiler_type_ptr)
783 *field_compiler_type_ptr = field_compiler_type;
792 CompilerType::GetChildCompilerTypeAtIndex (ExecutionContext *exe_ctx,
794 bool transparent_pointers,
795 bool omit_empty_base_classes,
796 bool ignore_array_bounds,
797 std::string& child_name,
798 uint32_t &child_byte_size,
799 int32_t &child_byte_offset,
800 uint32_t &child_bitfield_bit_size,
801 uint32_t &child_bitfield_bit_offset,
802 bool &child_is_base_class,
803 bool &child_is_deref_of_parent,
805 uint64_t &language_flags) const
808 return CompilerType();
809 return m_type_system->GetChildCompilerTypeAtIndex(m_type,
812 transparent_pointers,
813 omit_empty_base_classes,
818 child_bitfield_bit_size,
819 child_bitfield_bit_offset,
821 child_is_deref_of_parent,
826 // Look for a child member (doesn't include base classes, but it does include
827 // their members) in the type hierarchy. Returns an index path into "clang_type"
828 // on how to reach the appropriate member.
847 // If we have a clang type that describes "class C", and we wanted to looked
850 // With omit_empty_base_classes == false we would get an integer array back with:
852 // The first index 1 is the child index for "class A" within class C
853 // The second index 1 is the child index for "m_b" within class A
855 // With omit_empty_base_classes == true we would get an integer array back with:
857 // The first index 0 is the child index for "class A" within class C (since class B doesn't have any members it doesn't count)
858 // The second index 1 is the child index for "m_b" within class A
861 CompilerType::GetIndexOfChildMemberWithName (const char *name,
862 bool omit_empty_base_classes,
863 std::vector<uint32_t>& child_indexes) const
865 if (IsValid() && name && name[0])
867 return m_type_system->GetIndexOfChildMemberWithName(m_type, name, omit_empty_base_classes, child_indexes);
873 CompilerType::GetNumTemplateArguments () const
877 return m_type_system->GetNumTemplateArguments(m_type);
883 CompilerType::GetTemplateArgument (size_t idx,
884 lldb::TemplateArgumentKind &kind) const
888 return m_type_system->GetTemplateArgument(m_type, idx, kind);
890 return CompilerType();
894 CompilerType::GetTypeForFormatters () const
897 return m_type_system->GetTypeForFormatters(m_type);
898 return CompilerType();
902 CompilerType::ShouldPrintAsOneLiner (ValueObject* valobj) const
905 return m_type_system->ShouldPrintAsOneLiner(m_type, valobj);
906 return eLazyBoolCalculate;
910 CompilerType::IsMeaninglessWithoutDynamicResolution () const
913 return m_type_system->IsMeaninglessWithoutDynamicResolution(m_type);
917 // Get the index of the child of "clang_type" whose name matches. This function
918 // doesn't descend into the children, but only looks one level deep and name
919 // matches can include base class names.
922 CompilerType::GetIndexOfChildWithName (const char *name, bool omit_empty_base_classes) const
924 if (IsValid() && name && name[0])
926 return m_type_system->GetIndexOfChildWithName(m_type, name, omit_empty_base_classes);
932 CompilerType::ConvertStringToFloatValue (const char *s, uint8_t *dst, size_t dst_size) const
935 return m_type_system->ConvertStringToFloatValue(m_type, s, dst, dst_size);
941 //----------------------------------------------------------------------
943 //----------------------------------------------------------------------
944 #define DEPTH_INCREMENT 2
947 CompilerType::DumpValue (ExecutionContext *exe_ctx,
950 const lldb_private::DataExtractor &data,
951 lldb::offset_t data_byte_offset,
952 size_t data_byte_size,
953 uint32_t bitfield_bit_size,
954 uint32_t bitfield_bit_offset,
962 m_type_system->DumpValue(m_type, exe_ctx, s, format, data, data_byte_offset, data_byte_size, bitfield_bit_size, bitfield_bit_offset, show_types, show_summary, verbose, depth);
969 CompilerType::DumpTypeValue (Stream *s,
971 const lldb_private::DataExtractor &data,
972 lldb::offset_t byte_offset,
974 uint32_t bitfield_bit_size,
975 uint32_t bitfield_bit_offset,
976 ExecutionContextScope *exe_scope)
980 return m_type_system->DumpTypeValue(m_type, s, format, data, byte_offset, byte_size, bitfield_bit_size, bitfield_bit_offset, exe_scope);
986 CompilerType::DumpSummary (ExecutionContext *exe_ctx,
988 const lldb_private::DataExtractor &data,
989 lldb::offset_t data_byte_offset,
990 size_t data_byte_size)
993 m_type_system->DumpSummary(m_type, exe_ctx, s, data, data_byte_offset, data_byte_size);
997 CompilerType::DumpTypeDescription () const
1000 m_type_system->DumpTypeDescription(m_type);
1004 CompilerType::DumpTypeDescription (Stream *s) const
1008 m_type_system->DumpTypeDescription(m_type, s);
1013 CompilerType::GetValueAsScalar (const lldb_private::DataExtractor &data,
1014 lldb::offset_t data_byte_offset,
1015 size_t data_byte_size,
1016 Scalar &value) const
1021 if (IsAggregateType ())
1023 return false; // Aggregate types don't have scalar values
1028 lldb::Encoding encoding = GetEncoding (count);
1030 if (encoding == lldb::eEncodingInvalid || count != 1)
1033 const uint64_t byte_size = GetByteSize(nullptr);
1034 lldb::offset_t offset = data_byte_offset;
1037 case lldb::eEncodingInvalid:
1039 case lldb::eEncodingVector:
1041 case lldb::eEncodingUint:
1042 if (byte_size <= sizeof(unsigned long long))
1044 uint64_t uval64 = data.GetMaxU64 (&offset, byte_size);
1045 if (byte_size <= sizeof(unsigned int))
1047 value = (unsigned int)uval64;
1050 else if (byte_size <= sizeof(unsigned long))
1052 value = (unsigned long)uval64;
1055 else if (byte_size <= sizeof(unsigned long long))
1057 value = (unsigned long long )uval64;
1065 case lldb::eEncodingSint:
1066 if (byte_size <= sizeof(long long))
1068 int64_t sval64 = data.GetMaxS64 (&offset, byte_size);
1069 if (byte_size <= sizeof(int))
1071 value = (int)sval64;
1074 else if (byte_size <= sizeof(long))
1076 value = (long)sval64;
1079 else if (byte_size <= sizeof(long long))
1081 value = (long long )sval64;
1089 case lldb::eEncodingIEEE754:
1090 if (byte_size <= sizeof(long double))
1094 if (byte_size == sizeof(float))
1096 if (sizeof(float) == sizeof(uint32_t))
1098 u32 = data.GetU32(&offset);
1099 value = *((float *)&u32);
1102 else if (sizeof(float) == sizeof(uint64_t))
1104 u64 = data.GetU64(&offset);
1105 value = *((float *)&u64);
1110 if (byte_size == sizeof(double))
1112 if (sizeof(double) == sizeof(uint32_t))
1114 u32 = data.GetU32(&offset);
1115 value = *((double *)&u32);
1118 else if (sizeof(double) == sizeof(uint64_t))
1120 u64 = data.GetU64(&offset);
1121 value = *((double *)&u64);
1126 if (byte_size == sizeof(long double))
1128 if (sizeof(long double) == sizeof(uint32_t))
1130 u32 = data.GetU32(&offset);
1131 value = *((long double *)&u32);
1134 else if (sizeof(long double) == sizeof(uint64_t))
1136 u64 = data.GetU64(&offset);
1137 value = *((long double *)&u64);
1149 CompilerType::SetValueFromScalar (const Scalar &value, Stream &strm)
1154 // Aggregate types don't have scalar values
1155 if (!IsAggregateType ())
1157 strm.GetFlags().Set(Stream::eBinary);
1159 lldb::Encoding encoding = GetEncoding (count);
1161 if (encoding == lldb::eEncodingInvalid || count != 1)
1164 const uint64_t bit_width = GetBitSize(nullptr);
1165 // This function doesn't currently handle non-byte aligned assignments
1166 if ((bit_width % 8) != 0)
1169 const uint64_t byte_size = (bit_width + 7 ) / 8;
1172 case lldb::eEncodingInvalid:
1174 case lldb::eEncodingVector:
1176 case lldb::eEncodingUint:
1179 case 1: strm.PutHex8(value.UInt()); return true;
1180 case 2: strm.PutHex16(value.UInt()); return true;
1181 case 4: strm.PutHex32(value.UInt()); return true;
1182 case 8: strm.PutHex64(value.ULongLong()); return true;
1188 case lldb::eEncodingSint:
1191 case 1: strm.PutHex8(value.SInt()); return true;
1192 case 2: strm.PutHex16(value.SInt()); return true;
1193 case 4: strm.PutHex32(value.SInt()); return true;
1194 case 8: strm.PutHex64(value.SLongLong()); return true;
1200 case lldb::eEncodingIEEE754:
1201 if (byte_size <= sizeof(long double))
1203 if (byte_size == sizeof(float))
1205 strm.PutFloat(value.Float());
1209 if (byte_size == sizeof(double))
1211 strm.PutDouble(value.Double());
1215 if (byte_size == sizeof(long double))
1217 strm.PutDouble(value.LongDouble());
1228 CompilerType::ReadFromMemory (lldb_private::ExecutionContext *exe_ctx,
1230 AddressType address_type,
1231 lldb_private::DataExtractor &data)
1236 // Can't convert a file address to anything valid without more
1237 // context (which Module it came from)
1238 if (address_type == eAddressTypeFile)
1241 if (!GetCompleteType())
1244 const uint64_t byte_size = GetByteSize(exe_ctx ? exe_ctx->GetBestExecutionContextScope() : NULL);
1245 if (data.GetByteSize() < byte_size)
1247 lldb::DataBufferSP data_sp(new DataBufferHeap (byte_size, '\0'));
1248 data.SetData(data_sp);
1251 uint8_t* dst = const_cast<uint8_t*>(data.PeekData(0, byte_size));
1254 if (address_type == eAddressTypeHost)
1258 // The address is an address in this process, so just copy it
1259 memcpy (dst, (uint8_t*)nullptr + addr, byte_size);
1264 Process *process = nullptr;
1266 process = exe_ctx->GetProcessPtr();
1270 return process->ReadMemory(addr, dst, byte_size, error) == byte_size;
1278 CompilerType::WriteToMemory (lldb_private::ExecutionContext *exe_ctx,
1280 AddressType address_type,
1281 StreamString &new_value)
1286 // Can't convert a file address to anything valid without more
1287 // context (which Module it came from)
1288 if (address_type == eAddressTypeFile)
1291 if (!GetCompleteType())
1294 const uint64_t byte_size = GetByteSize(exe_ctx ? exe_ctx->GetBestExecutionContextScope() : NULL);
1298 if (address_type == eAddressTypeHost)
1300 // The address is an address in this process, so just copy it
1301 memcpy ((void *)addr, new_value.GetData(), byte_size);
1306 Process *process = nullptr;
1308 process = exe_ctx->GetProcessPtr();
1312 return process->WriteMemory(addr, new_value.GetData(), byte_size, error) == byte_size;
1319 //clang::CXXRecordDecl *
1320 //CompilerType::GetAsCXXRecordDecl (lldb::opaque_compiler_type_t opaque_compiler_qual_type)
1322 // if (opaque_compiler_qual_type)
1323 // return clang::QualType::getFromOpaquePtr(opaque_compiler_qual_type)->getAsCXXRecordDecl();
1328 lldb_private::operator == (const lldb_private::CompilerType &lhs, const lldb_private::CompilerType &rhs)
1330 return lhs.GetTypeSystem() == rhs.GetTypeSystem() && lhs.GetOpaqueQualType() == rhs.GetOpaqueQualType();
1335 lldb_private::operator != (const lldb_private::CompilerType &lhs, const lldb_private::CompilerType &rhs)
1337 return lhs.GetTypeSystem() != rhs.GetTypeSystem() || lhs.GetOpaqueQualType() != rhs.GetOpaqueQualType();