]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb: have remote_target::extended_remote_run take the exec filename
authorAndrew Burgess <aburgess@redhat.com>
Thu, 20 Jul 2023 09:20:33 +0000 (10:20 +0100)
committerAndrew Burgess <aburgess@redhat.com>
Sun, 14 Sep 2025 14:57:09 +0000 (15:57 +0100)
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 <tom@tromey.com>
gdb/remote.c

index aa7e6e490b7dd6254cd876b5cf7faa8bb4f517fc..e108e982902671fb8e5b700b9177bcac37090544 100644 (file)
@@ -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