[PATCHv2 01/10] gdb: have remote_target::extended_remote_run take the exec filename
Andrew Burgess
aburgess@redhat.com
Fri Aug 25 15:34:34 GMT 2023
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(-)
diff --git a/gdb/remote.c b/gdb/remote.c
index 7abe08439b5..bbe81ccb54f 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -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
--
2.25.4
More information about the Gdb-patches
mailing list