[lldb-dev] enumerating the SBTypes from an SBModule
Sebastien Metrot
meeloo at gmail.com
Mon Jun 17 06:56:04 PDT 2013
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: GetAllTypes.diff
Type: application/octet-stream
Size: 1602 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20130617/b4751095/attachment.obj>
-------------- next part --------------
--
Sebastien Metrot
On Jun 17, 2013, at 12:32 , Sebastien Metrot <meeloo at gmail.com> 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
> lldb-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-dev
More information about the lldb-dev
mailing list