I have investigated a bit and added a hack to SBModule::FindTypes(..) to get all the types when the requested type name is null. (I have also changed lldb_private::TypeList in order to fetch all its contents in a std::vector in one go instead of calling GetTypeAtIndex which is way to slow when the list grows big).
I works in a strange way: the first time I call it I only get about 10 types, but each time I request the list the number of type gets bigger (much bigger, after about 10 call I reach a maximum of ~64K types). My guess is that it's due to lazy evaluation/parsing. I tried to understand the type parsing code but it's fairly complex and I don't really want to break anything with my little experiments. I have attached a patch showing the changes I did. I would welcome any help, thanks in advance, S.
GetAllTypes.diff
Description: Binary data
-- Sebastien Metrot On Jun 17, 2013, at 12:32 , Sebastien Metrot <[email protected]> wrote: > Hi, > > Is there a way to enumerate all the SBTypes that are defined inside an > SBModule? I see that lldb_private::Module has a method TypeList* > GetTypeList(); but it is not exposed by the official API. Is there a > workaround or did I miss something? (I have tried using SBModule::FindTypes > with "*", "" or NULL but it doesn't work that way apparently as it strictly > searches for an explicit type name). > > Cheers, > > S. > > -- > Sebastien Metrot > > _______________________________________________ > lldb-dev mailing list > [email protected] > http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
_______________________________________________ lldb-dev mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
