From: Andrew Burgess Date: Thu, 20 Jul 2023 09:20:33 +0000 (+0100) Subject: gdb: have remote_target::extended_remote_run take the exec filename X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fe601010c3b922be5d7d9310b161321dffdd6420;p=thirdparty%2Fbinutils-gdb.git gdb: have remote_target::extended_remote_run take the exec filename Small refactor, have remote_target::extended_remote_run take the name of the executable to run rather than looking it up directly, the one caller of this function has already looked up the remote-exec filename. There should be no user visible changes after this commit. Approved-By: Tom Tromey --- diff --git a/gdb/remote.c b/gdb/remote.c index aa7e6e490b7..e108e982902 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -1396,7 +1396,8 @@ public: /* Remote specific methods. */ void remote_kill_k (); void extended_remote_disable_randomization (int val); - int extended_remote_run (const std::string &args); + int extended_remote_run (const char *remote_exec_file, + const std::string &args); void send_environment_packet (const char *action, const char *packet, @@ -10862,11 +10863,11 @@ remote_target::extended_remote_disable_randomization (int val) } int -remote_target::extended_remote_run (const std::string &args) +remote_target::extended_remote_run (const char *remote_exec_file, + const std::string &args) { struct remote_state *rs = get_remote_state (); int len; - const char *remote_exec_file = get_remote_exec_file (); /* If the user has disabled vRun support, or we have detected that support is not available, do not try it. */ @@ -11073,7 +11074,7 @@ Remote replied unexpectedly while setting startup-with-shell: %s"), extended_remote_set_inferior_cwd (); /* Now restart the remote server. */ - run_worked = extended_remote_run (args) != -1; + run_worked = extended_remote_run (remote_exec_file, args) != -1; if (!run_worked) { /* vRun was not supported. Fail if we need it to do what the