static void init_extended_remote_ops (void);
-static void remote_stop (ptid_t);
+static void remote_stop (struct target_ops *self, ptid_t);
static int stubhex (int ch);
static void remote_console_output (char *msg);
-static int remote_supports_cond_breakpoints (void);
+static int remote_supports_cond_breakpoints (struct target_ops *self);
-static int remote_can_run_breakpoint_commands (void);
+static int remote_can_run_breakpoint_commands (struct target_ops *self);
/* For "remote". */
*/
static char *
-remote_threads_extra_info (struct thread_info *tp)
+remote_threads_extra_info (struct target_ops *self, struct thread_info *tp)
{
struct remote_state *rs = get_remote_state ();
int result;
/* Implement the to_get_ada_task_ptid function for the remote targets. */
static ptid_t
-remote_get_ada_task_ptid (long lwp, long thread)
+remote_get_ada_task_ptid (struct target_ops *self, long lwp, long thread)
{
return ptid_build (ptid_get_pid (inferior_ptid), 0, lwp);
}
will eventually end up here. */
static void
-remote_stop (ptid_t ptid)
+remote_stop (struct target_ops *self, ptid_t ptid)
{
if (remote_debug)
fprintf_unfiltered (gdb_stdlog, "remote_stop called\n");
}
static int
-extended_remote_supports_disable_randomization (void)
+extended_remote_supports_disable_randomization (struct target_ops *self)
{
return (remote_protocol_packets[PACKET_QDisableRandomization].support
== PACKET_ENABLE);
target_async (inferior_event_handler, 0);
/* Disable address space randomization if requested (and supported). */
- if (extended_remote_supports_disable_randomization ())
+ if (extended_remote_supports_disable_randomization (ops))
extended_remote_disable_randomization (disable_randomization);
/* Now restart the remote server. */
p += hexnumstr (p, addr);
xsnprintf (p, endbuf - p, ",%d", bpsize);
- if (remote_supports_cond_breakpoints ())
+ if (remote_supports_cond_breakpoints (ops))
remote_add_target_side_condition (gdbarch, bp_tgt, p, endbuf);
- if (remote_can_run_breakpoint_commands ())
+ if (remote_can_run_breakpoint_commands (ops))
remote_add_target_side_commands (gdbarch, bp_tgt, p);
putpkt (rs->buf);
p += hexnumstr (p, (ULONGEST) addr);
xsnprintf (p, endbuf - p, ",%x", bp_tgt->placed_size);
- if (remote_supports_cond_breakpoints ())
+ if (remote_supports_cond_breakpoints (self))
remote_add_target_side_condition (gdbarch, bp_tgt, p, endbuf);
- if (remote_can_run_breakpoint_commands ())
+ if (remote_can_run_breakpoint_commands (self))
remote_add_target_side_commands (gdbarch, bp_tgt, p);
putpkt (rs->buf);
}
static void
-remote_rcmd (char *command,
+remote_rcmd (struct target_ops *self, char *command,
struct ui_file *outbuf)
{
struct remote_state *rs = get_remote_state ();
*REMOTE_ERRNO). */
static int
-remote_hostio_open (const char *filename, int flags, int mode,
+remote_hostio_open (struct target_ops *self,
+ const char *filename, int flags, int mode,
int *remote_errno)
{
struct remote_state *rs = get_remote_state ();
set *REMOTE_ERRNO). */
static int
-remote_hostio_pwrite (int fd, const gdb_byte *write_buf, int len,
+remote_hostio_pwrite (struct target_ops *self,
+ int fd, const gdb_byte *write_buf, int len,
ULONGEST offset, int *remote_errno)
{
struct remote_state *rs = get_remote_state ();
gdb_assert (remote_filename_p (filename));
- fd = remote_hostio_open (filename + 7, FILEIO_O_RDONLY, 0, &remote_errno);
+ fd = remote_hostio_open (find_target_at (process_stratum),
+ filename + 7, FILEIO_O_RDONLY, 0, &remote_errno);
if (fd == -1)
{
errno = remote_fileio_errno_to_host (remote_errno);
perror_with_name (local_file);
back_to = make_cleanup_fclose (file);
- fd = remote_hostio_open (remote_file, (FILEIO_O_WRONLY | FILEIO_O_CREAT
+ fd = remote_hostio_open (find_target_at (process_stratum),
+ remote_file, (FILEIO_O_WRONLY | FILEIO_O_CREAT
| FILEIO_O_TRUNC),
0700, &remote_errno);
if (fd == -1)
bytes += bytes_in_buffer;
bytes_in_buffer = 0;
- retcode = remote_hostio_pwrite (fd, buffer, bytes,
+ retcode = remote_hostio_pwrite (find_target_at (process_stratum),
+ fd, buffer, bytes,
offset, &remote_errno);
if (retcode < 0)
if (!rs->remote_desc)
error (_("command can only be used with remote target"));
- fd = remote_hostio_open (remote_file, FILEIO_O_RDONLY, 0, &remote_errno);
+ fd = remote_hostio_open (find_target_at (process_stratum),
+ remote_file, FILEIO_O_RDONLY, 0, &remote_errno);
if (fd == -1)
remote_hostio_error (remote_errno);
}
static int
-remote_can_execute_reverse (void)
+remote_can_execute_reverse (struct target_ops *self)
{
if (remote_protocol_packets[PACKET_bs].support == PACKET_ENABLE
|| remote_protocol_packets[PACKET_bc].support == PACKET_ENABLE)
}
static int
-remote_supports_non_stop (void)
+remote_supports_non_stop (struct target_ops *self)
{
return 1;
}
static int
-remote_supports_disable_randomization (void)
+remote_supports_disable_randomization (struct target_ops *self)
{
/* Only supported in extended mode. */
return 0;
}
static int
-remote_supports_multi_process (void)
+remote_supports_multi_process (struct target_ops *self)
{
struct remote_state *rs = get_remote_state ();
}
static int
-remote_supports_cond_breakpoints (void)
+remote_supports_cond_breakpoints (struct target_ops *self)
{
struct remote_state *rs = get_remote_state ();
}
static int
-remote_supports_enable_disable_tracepoint (void)
+remote_supports_enable_disable_tracepoint (struct target_ops *self)
{
struct remote_state *rs = get_remote_state ();
}
static int
-remote_supports_string_tracing (void)
+remote_supports_string_tracing (struct target_ops *self)
{
struct remote_state *rs = get_remote_state ();
}
static int
-remote_can_run_breakpoint_commands (void)
+remote_can_run_breakpoint_commands (struct target_ops *self)
{
struct remote_state *rs = get_remote_state ();