Merge "Uses lldb wrapper if exists for gdbclient.py" am: 06a46b45a5

Original change: https://android-review.googlesource.com/c/platform/development/+/1371359

Change-Id: I9da516367ca3655f7c01f8bf14d65721908302fc
This commit is contained in:
Haibo Huang
2020-07-23 02:56:09 +00:00
committed by Automerger Merge Worker

View File

@@ -62,6 +62,14 @@ def get_gdbserver_path(root, arch):
return path.format(root, arch, "")
def get_lldb_path(toolchain_path):
for lldb_name in ['lldb.sh', 'lldb.cmd', 'lldb', 'lldb.exe']:
debugger_path = os.path.join(toolchain_path, "bin", lldb_name)
if os.path.isfile(debugger_path):
return debugger_path
return None
def get_lldb_server_path(root, clang_base, clang_version, arch):
arch = {
'arm': 'arm',
@@ -457,7 +465,7 @@ def do_main():
remote="tcp:{}".format(args.port))
if use_lldb:
debugger_path = os.path.join(toolchain_path, "bin", "lldb")
debugger_path = get_lldb_path(toolchain_path)
debugger = 'lldb'
else:
debugger_path = os.path.join(