Changes between Initial Version and Version 1 of Ticket #5495, comment 7


Ignore:
Timestamp:
Jun 29, 2011, 2:03:05 AM (13 years ago)
Author:
anevilyak

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #5495, comment 7

    initial v1  
    77When resolving the base type of the typedef, it would correctly find the struct, but when creating the type object for that, it would try to look up an existing type by the name only, and would find the typedef again, leading into an endless recursion repeating that process.
    88 
    9 Attaching a patch which fixes the issue by adding a parameter to GlobalTypeLookup::GetType() so we can match by both name and expected entry type. This fixes the problem since the typedef is then skipped. Since in this case there is no actual definition for the struct in question, we consequently fall back to _CreateTypeInternal(), which in turn creates a compound type with no bases/members for it, which is what we want. The only question is the type of the parameter being passed to GlobalTypeLookup, since this should be independent of the underlying debug format. Ingo, should we make that a void* in order to accomodate potentially more complex types in other formats? For DWARF an int32 is sufficient since the tags are simple integers, but I don't know if that's the case for the debug formats used with PECOFF and other binary formats.
     9
     10Attaching a patch which fixes the issue by adding a parameter to GlobalTypeLookup::GetType() so we can match by both name and expected entry type. This fixes the problem since the typedef is then skipped. Since in this case there is no actual definition for the struct in question, we consequently fall back to _CreateTypeInternal(), which in turn creates a compound type with no bases/members for it, which is what we want.
     11
     12
     13The only question is the type of the parameter being passed to GlobalTypeLookup, since this should be independent of the underlying debug format. Ingo, should we make that a void* in order to accomodate potentially more complex types in other formats? For DWARF an int32 is sufficient since the tags are simple integers, but I don't know if that's the case for the debug formats used with PECOFF and other binary formats.