diff options
author | Alexander Polyakov <polyakov.alx@gmail.com> | 2018-07-03 14:22:44 +0000 |
---|---|---|
committer | Alexander Polyakov <polyakov.alx@gmail.com> | 2018-07-03 14:22:44 +0000 |
commit | da0c081f7e363497a150f3bb14b9460bfc495a6d (patch) | |
tree | 0cb7bc7a67f0979577219aefe84b8abaf1a0f84b /lldb/source/API/SBModule.cpp | |
parent | b5d6e76bb7baba6885e92d0f8d639bf2b1da379d (diff) | |
download | llvm-da0c081f7e363497a150f3bb14b9460bfc495a6d.zip llvm-da0c081f7e363497a150f3bb14b9460bfc495a6d.tar.gz llvm-da0c081f7e363497a150f3bb14b9460bfc495a6d.tar.bz2 |
Add new API to SBTarget and SBModule classes.
Summary: The new API allows to find a list of compile units related to target/module.
Reviewers: aprantl, clayborg
Reviewed By: aprantl
Subscribers: jingham, lldb-commits
Differential Revision: https://reviews.llvm.org/D48801
llvm-svn: 336200
Diffstat (limited to 'lldb/source/API/SBModule.cpp')
-rw-r--r-- | lldb/source/API/SBModule.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lldb/source/API/SBModule.cpp b/lldb/source/API/SBModule.cpp index ed0c75c..3dd99d5 100644 --- a/lldb/source/API/SBModule.cpp +++ b/lldb/source/API/SBModule.cpp @@ -253,6 +253,17 @@ SBCompileUnit SBModule::GetCompileUnitAtIndex(uint32_t index) { return sb_cu; } +SBSymbolContextList +SBModule::FindCompileUnits(const SBFileSpec &sb_file_spec) { + SBSymbolContextList sb_sc_list; + const ModuleSP module_sp(GetSP()); + if (sb_file_spec.IsValid() && module_sp) { + const bool append = true; + module_sp->FindCompileUnits(*sb_file_spec, append, *sb_sc_list); + } + return sb_sc_list; +} + static Symtab *GetUnifiedSymbolTable(const lldb::ModuleSP &module_sp) { if (module_sp) { SymbolVendor *symbols = module_sp->GetSymbolVendor(); |