Skip to content

Commit c1050a9

Browse files
UkalninsUldis Kalniņš
and
Uldis Kalniņš
authored
fix lldb script on xcode 12 (#464)
Co-authored-by: Uldis Kalniņš <[email protected]>
1 parent dadab25 commit c1050a9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/scripts/lldb.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def connect_command(debugger, command, result, internal_dict):
2222
lldb.SBTarget.GetBroadcasterClassName(),
2323
lldb.SBProcess.eBroadcastBitStateChanged | lldb.SBProcess.eBroadcastBitSTDOUT | lldb.SBProcess.eBroadcastBitSTDERR)
2424

25-
process = lldb.target.ConnectRemote(listener, connect_url, None, error)
25+
process = debugger.GetSelectedTarget().ConnectRemote(listener, connect_url, None, error)
2626

2727
# Wait for connection to succeed
2828
events = []
@@ -42,7 +42,7 @@ def connect_command(debugger, command, result, internal_dict):
4242
def run_command(debugger, command, result, internal_dict):
4343
device_app = internal_dict['fruitstrap_device_app']
4444
args = command.split('--',1)
45-
lldb.target.modules[0].SetPlatformFileSpec(lldb.SBFileSpec(device_app))
45+
debugger.GetSelectedTarget().modules[0].SetPlatformFileSpec(lldb.SBFileSpec(device_app))
4646
args_arr = []
4747
if len(args) > 1:
4848
args_arr = shlex.split(args[1])
@@ -62,7 +62,7 @@ def run_command(debugger, command, result, internal_dict):
6262
envs_arr = envs_arr + shlex.split('{envs}')
6363
launchInfo.SetEnvironmentEntries(envs_arr, True)
6464

65-
lldb.target.Launch(launchInfo, startup_error)
65+
debugger.GetSelectedTarget().Launch(launchInfo, startup_error)
6666
lockedstr = ': Locked'
6767
if lockedstr in str(startup_error):
6868
print('\\nDevice Locked\\n')
@@ -71,7 +71,7 @@ def run_command(debugger, command, result, internal_dict):
7171
print(str(startup_error))
7272

7373
def safequit_command(debugger, command, result, internal_dict):
74-
process = lldb.target.process
74+
process = debugger.GetSelectedTarget().process
7575
state = process.GetState()
7676
if state == lldb.eStateRunning:
7777
process.Detach()
@@ -84,7 +84,7 @@ def safequit_command(debugger, command, result, internal_dict):
8484

8585
def autoexit_command(debugger, command, result, internal_dict):
8686
global listener
87-
process = lldb.target.process
87+
process = debugger.GetSelectedTarget().process
8888
if not startup_error.Success():
8989
print('\\nPROCESS_NOT_STARTED\\n')
9090
os._exit({exitcode_app_crash})

0 commit comments

Comments
 (0)