Browse Source

Ignore base class of generic types and return 'object' instead

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/2.1@2283 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
David Srbecký 19 years ago
parent
commit
57c289f5fe
  1. 15
      src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/ObjectValueClass.cs

15
src/AddIns/Misc/Debugger/Debugger.Core/Project/Src/Variables/ObjectValueClass.cs

@ -210,6 +210,21 @@ namespace Debugger
return currModule.CorModule.GetClassFromToken(superToken); return currModule.CorModule.GetClassFromToken(superToken);
} }
// TypeSpec - generic class whith 'which'
if ((superToken & 0xFF000000) == 0x1B000000) {
// Walkaround - fake 'object' type
string fullTypeName = "System.Object";
foreach (Module superModule in process.Modules) {
try {
uint token = superModule.MetaData.FindTypeDefByName(fullTypeName, 0).Token;
return superModule.CorModule.GetClassFromToken(token);
} catch {
continue;
}
}
}
// TypeRef - Referencing to external assembly // TypeRef - Referencing to external assembly
if ((superToken & 0xFF000000) == 0x01000000) { if ((superToken & 0xFF000000) == 0x01000000) {
string fullTypeName = currModule.MetaData.GetTypeRefProps(superToken).Name; string fullTypeName = currModule.MetaData.GetTypeRefProps(superToken).Name;

Loading…
Cancel
Save