Make lldb default for gdbclient.py

Adds a symlink lldbclient.py that pointing to gdbclient.py

Bug: 168187078
Change-Id: I1831875812d22bb6a264b8396bc9d3b8ed7712e3
This commit is contained in:
Haibo Huang
2020-09-14 18:39:52 -07:00
parent 2bbb98ad2f
commit 6a4636a9ef
3 changed files with 13 additions and 4 deletions

View File

@@ -189,9 +189,14 @@ def start_gdbserver(device, gdbserver_local_path, gdbserver_remote_path,
if run_as_cmd: if run_as_cmd:
gdbserver_cmd = run_as_cmd + gdbserver_cmd gdbserver_cmd = run_as_cmd + gdbserver_cmd
gdbserver_output_path = os.path.join(tempfile.gettempdir(), if lldb:
"gdbclient.log") gdbserver_output_path = os.path.join(tempfile.gettempdir(),
print("Redirecting gdbserver output to {}".format(gdbserver_output_path)) "lldb-client.log")
print("Redirecting lldb-server output to {}".format(gdbserver_output_path))
else:
gdbserver_output_path = os.path.join(tempfile.gettempdir(),
"gdbclient.log")
print("Redirecting gdbserver output to {}".format(gdbserver_output_path))
gdbserver_output = file(gdbserver_output_path, 'w') gdbserver_output = file(gdbserver_output_path, 'w')
return device.shell_popen(gdbserver_cmd, stdout=gdbserver_output, return device.shell_popen(gdbserver_cmd, stdout=gdbserver_output,
stderr=gdbserver_output) stderr=gdbserver_output)

View File

@@ -437,7 +437,10 @@ def do_main():
linker_search_dir = ensure_linker(device, sysroot, interp) linker_search_dir = ensure_linker(device, sysroot, interp)
tracer_pid = get_tracer_pid(device, pid) tracer_pid = get_tracer_pid(device, pid)
use_lldb = args.lldb if os.path.basename(__file__) == 'gdbclient.py' and not args.lldb:
print("gdb is deprecated in favor of lldb. "
"If you can't use lldb, please set --no-lldb and file a bug asap.")
use_lldb = not args.no_lldb
if tracer_pid == 0: if tracer_pid == 0:
cmd_prefix = args.su_cmd cmd_prefix = args.su_cmd
if args.env: if args.env:

1
scripts/lldbclient.py Symbolic link
View File

@@ -0,0 +1 @@
gdbclient.py