From a51b4796c778ebce9a30208fd3b4511e63c5ca5f Mon Sep 17 00:00:00 2001 From: Ryan Prichard Date: Mon, 21 Sep 2020 20:46:34 -0700 Subject: [PATCH] Add "--" to separate program args from lldb/gdb server args Without this, "lldbclient.py -r ls --help" fails, because the lldb/gdb server handles the "--help" argument rather than passing it through to the program being started. Test: lldbclient.py --lldb -r /system/bin/ls --help Test: gdbclient.py --no-lldb -r /system/bin/ls --help Change-Id: I76c7e73b535125ea96f5435bbfe99099786956c1 --- python-packages/gdbrunner/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-packages/gdbrunner/__init__.py b/python-packages/gdbrunner/__init__.py index d563e9ff0..b69069d60 100644 --- a/python-packages/gdbrunner/__init__.py +++ b/python-packages/gdbrunner/__init__.py @@ -182,7 +182,7 @@ def start_gdbserver(device, gdbserver_local_path, gdbserver_remote_path, if target_pid is not None: gdbserver_cmd += ["--attach", str(target_pid)] else: - gdbserver_cmd += run_cmd + gdbserver_cmd += ["--"] + run_cmd forward_gdbserver_port(device, local=port, remote="localfilesystem:{}".format(debug_socket))