summaryrefslogtreecommitdiff
path: root/scripts/interface/SBDebugger.i
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2016-07-23 20:50:09 +0000
committerDimitry Andric <dim@FreeBSD.org>2016-07-23 20:50:09 +0000
commitf3fbd1c0586ff6ec7895991e6c28f61a503c36a8 (patch)
tree48d008fd3df8c0e73271a4b18474e0aac6dbfe33 /scripts/interface/SBDebugger.i
parent2fc5d2d1dfaf623ce4e24cd8590565902f8c557c (diff)
Notes
Diffstat (limited to 'scripts/interface/SBDebugger.i')
-rw-r--r--scripts/interface/SBDebugger.i10
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/interface/SBDebugger.i b/scripts/interface/SBDebugger.i
index 89b2882aeb91..db774d350e9c 100644
--- a/scripts/interface/SBDebugger.i
+++ b/scripts/interface/SBDebugger.i
@@ -105,6 +105,16 @@ if target:
else:
print('Unexpected process state: %s, killing process...' % debugger.StateAsCString (state))
process.Kill()
+
+Sometimes you need to create an empty target that will get filled in later. The most common use for this
+is to attach to a process by name or pid where you don't know the executable up front. The most convenient way
+to do this is:
+
+target = debugger.CreateTarget('')
+error = lldb.SBError()
+process = target.AttachToProcessWithName(debugger.GetListener(), 'PROCESS_NAME', False, error)
+
+or the equivalent arguments for AttachToProcessWithID.
") SBDebugger;
class SBDebugger
{