summaryrefslogtreecommitdiffstats
path: root/lldb/source/API/SBTarget.cpp
diff options
context:
space:
mode:
authorAlexander Polyakov <polyakov.alx@gmail.com>2018-07-03 14:22:44 +0000
committerAlexander Polyakov <polyakov.alx@gmail.com>2018-07-03 14:22:44 +0000
commitda0c081f7e363497a150f3bb14b9460bfc495a6d (patch)
tree0cb7bc7a67f0979577219aefe84b8abaf1a0f84b /lldb/source/API/SBTarget.cpp
parentb5d6e76bb7baba6885e92d0f8d639bf2b1da379d (diff)
downloadbcm5719-llvm-da0c081f7e363497a150f3bb14b9460bfc495a6d.tar.gz
bcm5719-llvm-da0c081f7e363497a150f3bb14b9460bfc495a6d.zip
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/SBTarget.cpp')
-rw-r--r--lldb/source/API/SBTarget.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/lldb/source/API/SBTarget.cpp b/lldb/source/API/SBTarget.cpp
index 7af3e55dce9..550d336906d 100644
--- a/lldb/source/API/SBTarget.cpp
+++ b/lldb/source/API/SBTarget.cpp
@@ -1544,6 +1544,18 @@ SBModule SBTarget::FindModule(const SBFileSpec &sb_file_spec) {
return sb_module;
}
+SBSymbolContextList
+SBTarget::FindCompileUnits(const SBFileSpec &sb_file_spec) {
+ SBSymbolContextList sb_sc_list;
+ const TargetSP target_sp(GetSP());
+ if (target_sp && sb_file_spec.IsValid()) {
+ const bool append = true;
+ target_sp->GetImages().FindCompileUnits(*sb_file_spec,
+ append, *sb_sc_list);
+ }
+ return sb_sc_list;
+}
+
lldb::ByteOrder SBTarget::GetByteOrder() {
TargetSP target_sp(GetSP());
if (target_sp)
OpenPOWER on IntegriCloud