From 8db1d0fc064b25babb3979c26e828dca0adeaf2e Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Fri, 12 Apr 2013 23:22:28 -0400 Subject: [PATCH] Add function for creating derived array types. --- src/apps/debugger/model/Type.cpp | 9 +++++++++ src/apps/debugger/model/Type.h | 13 ++++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/apps/debugger/model/Type.cpp b/src/apps/debugger/model/Type.cpp index cf81243118..ebdd4e594e 100644 --- a/src/apps/debugger/model/Type.cpp +++ b/src/apps/debugger/model/Type.cpp @@ -104,6 +104,15 @@ Type::CreateDerivedAddressType(address_type_kind kind, } +status_t +Type::CreateDerivedArrayType(uint64 elementCount, + bool extendExisting, ArrayType*& _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 5c097da5e8..b3e018b0af 100644 --- a/src/apps/debugger/model/Type.h +++ b/src/apps/debugger/model/Type.h @@ -60,6 +60,7 @@ enum { class AddressType; class ArrayIndexPath; +class ArrayType; class BString; class Type; class ValueLocation; @@ -135,11 +136,21 @@ public: // if requested) - // TODO: also need the ability to derive array types virtual status_t CreateDerivedAddressType( address_type_kind kind, AddressType*& _resultType); + virtual status_t CreateDerivedArrayType( + uint64 elementCount, + bool extendExisting, + // if the current object is already + // an array type, attach an extra + // dimension to it rather than + // creating a new encapsulating + // type object + ArrayType*& _resultType); + + virtual status_t ResolveObjectDataLocation( const ValueLocation& objectLocation, ValueLocation*& _location) = 0;