[01/10] gdb: have remote_target::extended_remote_run take the exec filename
Checks
Commit Message
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.
---
gdb/remote.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
Comments
On Wed, Aug 16, 2023 at 5:55 PM Andrew Burgess via Gdb-patches <
gdb-patches@sourceware.org> wrote:
> 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.
>
> A nice clean up patch.
@@ -1223,7 +1223,8 @@ class remote_target : public process_stratum_target
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,
@@ -10448,11 +10449,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. */
@@ -10647,7 +10648,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