aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/remote.c')
-rw-r--r--gdb/remote.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/gdb/remote.c b/gdb/remote.c
index a61469c..7c5fe87 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -9526,7 +9526,7 @@ extended_remote_disable_randomization (int val)
}
static int
-extended_remote_run (char *args)
+extended_remote_run (const std::string &args)
{
struct remote_state *rs = get_remote_state ();
int len;
@@ -9545,14 +9545,13 @@ extended_remote_run (char *args)
len += 2 * bin2hex ((gdb_byte *) remote_exec_file, rs->buf + len,
strlen (remote_exec_file));
- gdb_assert (args != NULL);
- if (*args)
+ if (!args.empty ())
{
struct cleanup *back_to;
int i;
char **argv;
- argv = gdb_buildargv (args);
+ argv = gdb_buildargv (args.c_str ());
back_to = make_cleanup_freeargv (argv);
for (i = 0; argv[i] != NULL; i++)
{
@@ -9597,7 +9596,8 @@ extended_remote_run (char *args)
static void
extended_remote_create_inferior (struct target_ops *ops,
- char *exec_file, char *args,
+ const char *exec_file,
+ const std::string &args,
char **env, int from_tty)
{
int run_worked;
@@ -9622,7 +9622,7 @@ extended_remote_create_inferior (struct target_ops *ops,
user requested. */
if (remote_exec_file[0])
error (_("Remote target does not support \"set remote exec-file\""));
- if (args[0])
+ if (!args.empty ())
error (_("Remote target does not support \"set args\" or run <ARGS>"));
/* Fall back to "R". */