summaryrefslogtreecommitdiffstats
path: root/lldb/source/API/SBDebugger.cpp
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2011-09-13 23:25:31 +0000
committerJim Ingham <jingham@apple.com>2011-09-13 23:25:31 +0000
commite64f0dc7bf5137e2dd624511ca6bcdb144169404 (patch)
tree86dcf823508515e29fbcf14e8bdca423c97311c8 /lldb/source/API/SBDebugger.cpp
parent0378726aed7c232f2848bccb44cf9705fc69266b (diff)
downloadbcm5719-llvm-e64f0dc7bf5137e2dd624511ca6bcdb144169404.tar.gz
bcm5719-llvm-e64f0dc7bf5137e2dd624511ca6bcdb144169404.zip
Adding "-n", "-p" and "-w" flags to the lldb command-line tool to
allow attaching from the command line. llvm-svn: 139665
Diffstat (limited to 'lldb/source/API/SBDebugger.cpp')
-rw-r--r--lldb/source/API/SBDebugger.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/lldb/source/API/SBDebugger.cpp b/lldb/source/API/SBDebugger.cpp
index d0687261e83..acb69faad70 100644
--- a/lldb/source/API/SBDebugger.cpp
+++ b/lldb/source/API/SBDebugger.cpp
@@ -166,6 +166,15 @@ SBDebugger::SetAsync (bool b)
m_opaque_sp->SetAsyncExecution(b);
}
+bool
+SBDebugger::GetAsync ()
+{
+ if (m_opaque_sp)
+ return m_opaque_sp->GetAsyncExecution();
+ else
+ return false;
+}
+
void
SBDebugger::SkipLLDBInitFiles (bool b)
{
@@ -642,6 +651,24 @@ SBDebugger::GetSelectedTarget ()
}
void
+SBDebugger::SetSelectedTarget (SBTarget &sb_target)
+{
+ LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
+
+ if (m_opaque_sp)
+ {
+ m_opaque_sp->GetTargetList().SetSelectedTarget (sb_target.get());
+ }
+ if (log)
+ {
+ SBStream sstr;
+ sb_target.GetDescription (sstr, eDescriptionLevelBrief);
+ log->Printf ("SBDebugger(%p)::SetSelectedTarget () => SBTarget(%p): %s", m_opaque_sp.get(),
+ sb_target.get(), sstr.GetData());
+ }
+}
+
+void
SBDebugger::DispatchInput (void *baton, const void *data, size_t data_len)
{
LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
OpenPOWER on IntegriCloud