[lldb-dev] Search C++ "virtual" objects
Lei Kong via lldb-dev
lldb-dev at lists.llvm.org
Wed Aug 17 00:24:14 PDT 2016
I’d like to add FindSymbolsByRegex, please let me know what I need to do.
Thanks.
Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10
From: Greg Clayton<mailto:gclayton at apple.com>
Sent: Tuesday, August 16, 2016 11:42 AM
To: Lei Kong<mailto:leikong at msn.com>
Cc: Lei Kong via lldb-dev<mailto:lldb-dev at lists.llvm.org>
Subject: Re: [lldb-dev] Search C++ "virtual" objects
> On Aug 15, 2016, at 4:59 PM, Lei Kong <leikong at msn.com> wrote:
>
> Should I use lldb::SBTarget::GetModuleAtIndex() to get all modules and then lldb::SBModule::GetSymbolAtIndex() to go through all symbols?
> Thanks.
This is the only way right now as we don't have a SBModule::FindSymbols that takes a regular expression. We only currently have:
lldb::SBSymbolContextList
FindSymbols (const char *name,
lldb::SymbolType type = eSymbolTypeAny);
If you want to, you can add a:
lldb::SBSymbolContextList
FindSymbolsByRegex (const char *regex, lldb::SymbolType type = eSymbolTypeAny);
Then you could call this:
SBModule module = ...;
lldb::SBSymbolContextList symbols = module.FindSymbolsByRegex("^vtable for ");
You can then also add this to SBTarget. Let me know if you are interested in adding this and I can help you do it.
Greg Clayton
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20160817/b997819c/attachment.html>
More information about the lldb-dev
mailing list