@@ -22,7 +22,7 @@ def connect_command(debugger, command, result, internal_dict):
22
22
lldb .SBTarget .GetBroadcasterClassName (),
23
23
lldb .SBProcess .eBroadcastBitStateChanged | lldb .SBProcess .eBroadcastBitSTDOUT | lldb .SBProcess .eBroadcastBitSTDERR )
24
24
25
- process = lldb . target .ConnectRemote (listener , connect_url , None , error )
25
+ process = debugger . GetSelectedTarget () .ConnectRemote (listener , connect_url , None , error )
26
26
27
27
# Wait for connection to succeed
28
28
events = []
@@ -42,7 +42,7 @@ def connect_command(debugger, command, result, internal_dict):
42
42
def run_command (debugger , command , result , internal_dict ):
43
43
device_app = internal_dict ['fruitstrap_device_app' ]
44
44
args = command .split ('--' ,1 )
45
- lldb . target .modules [0 ].SetPlatformFileSpec (lldb .SBFileSpec (device_app ))
45
+ debugger . GetSelectedTarget () .modules [0 ].SetPlatformFileSpec (lldb .SBFileSpec (device_app ))
46
46
args_arr = []
47
47
if len (args ) > 1 :
48
48
args_arr = shlex .split (args [1 ])
@@ -62,7 +62,7 @@ def run_command(debugger, command, result, internal_dict):
62
62
envs_arr = envs_arr + shlex .split ('{envs}' )
63
63
launchInfo .SetEnvironmentEntries (envs_arr , True )
64
64
65
- lldb . target .Launch (launchInfo , startup_error )
65
+ debugger . GetSelectedTarget () .Launch (launchInfo , startup_error )
66
66
lockedstr = ': Locked'
67
67
if lockedstr in str (startup_error ):
68
68
print ('\\ nDevice Locked\\ n' )
@@ -71,7 +71,7 @@ def run_command(debugger, command, result, internal_dict):
71
71
print (str (startup_error ))
72
72
73
73
def safequit_command (debugger , command , result , internal_dict ):
74
- process = lldb . target .process
74
+ process = debugger . GetSelectedTarget () .process
75
75
state = process .GetState ()
76
76
if state == lldb .eStateRunning :
77
77
process .Detach ()
@@ -84,7 +84,7 @@ def safequit_command(debugger, command, result, internal_dict):
84
84
85
85
def autoexit_command (debugger , command , result , internal_dict ):
86
86
global listener
87
- process = lldb . target .process
87
+ process = debugger . GetSelectedTarget () .process
88
88
if not startup_error .Success ():
89
89
print ('\\ nPROCESS_NOT_STARTED\\ n' )
90
90
os ._exit ({exitcode_app_crash })
0 commit comments