aboutsummaryrefslogtreecommitdiff
path: root/gdb/remote.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/remote.c')
-rw-r--r--gdb/remote.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/gdb/remote.c b/gdb/remote.c
index 66c58c8..73dc426 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -1,6 +1,6 @@
/* Remote target communications for serial-line targets in custom GDB protocol
- Copyright (C) 1988-2024 Free Software Foundation, Inc.
+ Copyright (C) 1988-2025 Free Software Foundation, Inc.
This file is part of GDB.
@@ -80,6 +80,7 @@
#include "async-event.h"
#include "gdbsupport/selftest.h"
#include "cli/cli-style.h"
+#include "gdbsupport/remote-args.h"
/* The remote target. */
@@ -4943,7 +4944,7 @@ remote_target::process_initial_stop_replies (int from_tty)
event_ptid = target_wait (waiton_ptid, &ws, TARGET_WNOHANG);
if (remote_debug)
- print_target_wait_results (waiton_ptid, event_ptid, ws);
+ print_target_wait_results (waiton_ptid, event_ptid, ws, this);
switch (ws.kind ())
{
@@ -9035,7 +9036,7 @@ remote_target::process_g_packet (struct regcache *regcache)
/* Reply describes registers byte by byte, each byte encoded as two
hex characters. Suck them all up, then supply them to the
- register cacheing/storage mechanism. */
+ register caching/storage mechanism. */
p = rs->buf.data ();
for (i = 0; i < rsa->sizeof_g_packet; i++)
@@ -10835,16 +10836,15 @@ remote_target::extended_remote_run (const std::string &args)
if (!args.empty ())
{
- int i;
+ std::vector<std::string> split_args = gdb::remote_args::split (args);
- gdb_argv argv (args.c_str ());
- for (i = 0; argv[i] != NULL; i++)
+ for (const auto &a : split_args)
{
- if (strlen (argv[i]) * 2 + 1 + len >= get_remote_packet_size ())
+ if (a.size () * 2 + 1 + len >= get_remote_packet_size ())
error (_("Argument list too long for run packet"));
rs->buf[len++] = ';';
- len += 2 * bin2hex ((gdb_byte *) argv[i], rs->buf.data () + len,
- strlen (argv[i]));
+ len += 2 * bin2hex ((gdb_byte *) a.c_str (), rs->buf.data () + len,
+ a.size ());
}
}