diff options
| author | Jim Ingham <jingham@apple.com> | 2016-02-01 20:05:37 +0000 |
|---|---|---|
| committer | Jim Ingham <jingham@apple.com> | 2016-02-01 20:05:37 +0000 |
| commit | 5c94f2942e33a5a294a577789b706785d921fab4 (patch) | |
| tree | 6e35bbfb23beafd8cfba9a584220364b6798e529 | |
| parent | f07bd3b72dc7c08d31a691f7bdd89c11355c2acf (diff) | |
| download | bcm5719-llvm-5c94f2942e33a5a294a577789b706785d921fab4.tar.gz bcm5719-llvm-5c94f2942e33a5a294a577789b706785d921fab4.zip | |
Add a note on how to create an empty target and use it to attach to
processes whose executables you don't know up front.
llvm-svn: 259396
| -rw-r--r-- | lldb/scripts/interface/SBDebugger.i | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lldb/scripts/interface/SBDebugger.i b/lldb/scripts/interface/SBDebugger.i index 89b2882aeb9..db774d350e9 100644 --- a/lldb/scripts/interface/SBDebugger.i +++ b/lldb/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 { |

