diff --git a/src/apps/debugger/debug_info/DwarfTypes.cpp b/src/apps/debugger/debug_info/DwarfTypes.cpp index c1544960cee..608ec1dbcf0 100644 --- a/src/apps/debugger/debug_info/DwarfTypes.cpp +++ b/src/apps/debugger/debug_info/DwarfTypes.cpp @@ -1,5 +1,6 @@ /* * Copyright 2009-2012, Ingo Weinhold, ingo_weinhold@gmx.de. + * Copryight 2012, Rene Gollent, rene@gollent.com. * Distributed under the terms of the MIT License. */ @@ -225,6 +226,21 @@ DwarfType::ByteSize() const } +status_t +DwarfType::CreateDerivedAddressType(address_type_kind addressType, + AddressType*& _resultType) +{ + DwarfAddressType* resultType = new(std::nothrow) + DwarfAddressType(fTypeContext, fName, NULL, addressType, this); + + if (resultType == NULL) + return B_NO_MEMORY; + + _resultType = resultType; + return B_OK; +} + + status_t DwarfType::ResolveObjectDataLocation(const ValueLocation& objectLocation, ValueLocation*& _location) diff --git a/src/apps/debugger/debug_info/DwarfTypes.h b/src/apps/debugger/debug_info/DwarfTypes.h index ef6c4d265e1..976f4e1baaf 100644 --- a/src/apps/debugger/debug_info/DwarfTypes.h +++ b/src/apps/debugger/debug_info/DwarfTypes.h @@ -1,5 +1,6 @@ /* * Copyright 2009, Ingo Weinhold, ingo_weinhold@gmx.de. + * Copryight 2012, Rene Gollent, rene@gollent.com. * Distributed under the terms of the MIT License. */ #ifndef DWARF_TYPES_H @@ -107,6 +108,10 @@ class DwarfType : public virtual Type { virtual const BString& Name() const; virtual target_size_t ByteSize() const; + virtual status_t CreateDerivedAddressType( + address_type_kind kind, + AddressType*& _resultType); + virtual status_t ResolveObjectDataLocation( const ValueLocation& objectLocation, ValueLocation*& _location); diff --git a/src/apps/debugger/model/Type.cpp b/src/apps/debugger/model/Type.cpp index e8986825255..83f098f1b09 100644 --- a/src/apps/debugger/model/Type.cpp +++ b/src/apps/debugger/model/Type.cpp @@ -87,6 +87,15 @@ Type::ResolveRawType(bool nextOneOnly) const } +status_t +Type::CreateDerivedAddressType(address_type_kind kind, + AddressType*& _resultType) +{ + _resultType = NULL; + return B_ERROR; +} + + // #pragma mark - PrimitiveType diff --git a/src/apps/debugger/model/Type.h b/src/apps/debugger/model/Type.h index 20ffdb901b8..44b0b2a5c13 100644 --- a/src/apps/debugger/model/Type.h +++ b/src/apps/debugger/model/Type.h @@ -52,6 +52,7 @@ enum { }; +class AddressType; class ArrayIndexPath; class BString; class Type; @@ -117,6 +118,12 @@ class Type : public BReferenceable { // strips modifiers and typedefs (only one, // if requested) + + // TODO: also need the ability to derive array types + virtual status_t CreateDerivedAddressType( + address_type_kind kind, + AddressType*& _resultType); + virtual status_t ResolveObjectDataLocation( const ValueLocation& objectLocation, ValueLocation*& _location) = 0;