Debugger: Minor tweak to DwarfType.
- When creating a derived type, adjust the name accordingly to indicate the additional qualifiers. Fixes a problem where casted type names would be displayed as their base type only, even if they included pointers or array subscripts.
This commit is contained in:
parent
18bd706d85
commit
1c1ffc46d5
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright 2009-2012, Ingo Weinhold, ingo_weinhold@gmx.de.
|
||||
* Copryight 2012-2013, Rene Gollent, rene@gollent.com.
|
||||
* Copryight 2012-2014, Rene Gollent, rene@gollent.com.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
@ -242,8 +242,11 @@ status_t
|
||||
DwarfType::CreateDerivedAddressType(address_type_kind addressType,
|
||||
AddressType*& _resultType)
|
||||
{
|
||||
BString derivedName;
|
||||
derivedName.SetToFormat("%s%c", fName.String(),
|
||||
addressType == DERIVED_TYPE_POINTER ? '*' : '&');
|
||||
DwarfAddressType* resultType = new(std::nothrow)
|
||||
DwarfAddressType(fTypeContext, fName, NULL, addressType, this);
|
||||
DwarfAddressType(fTypeContext, derivedName, NULL, addressType, this);
|
||||
|
||||
if (resultType == NULL)
|
||||
return B_NO_MEMORY;
|
||||
@ -265,8 +268,10 @@ DwarfType::CreateDerivedArrayType(int64 lowerBound, int64 elementCount,
|
||||
resultType = dynamic_cast<DwarfArrayType*>(this);
|
||||
|
||||
if (resultType == NULL) {
|
||||
BString derivedName;
|
||||
derivedName.SetToFormat("%s[]", fName.String());
|
||||
resultType = new(std::nothrow)
|
||||
DwarfArrayType(fTypeContext, fName, NULL, this);
|
||||
DwarfArrayType(fTypeContext, derivedName, NULL, this);
|
||||
baseTypeReference.SetTo(resultType, true);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user