Return 0 on success -1 otherwise. */
-static int
-nto_read_memory (CORE_ADDR memaddr, unsigned char *myaddr, int len)
+int
+nto_process_target::read_memory (CORE_ADDR memaddr, unsigned char *myaddr,
+ int len)
{
TRACE ("%s memaddr:0x%08lx, len:%d\n", __func__, memaddr, len);
Return 0 on success -1 otherwise. */
-static int
-nto_write_memory (CORE_ADDR memaddr, const unsigned char *myaddr, int len)
+int
+nto_process_target::write_memory (CORE_ADDR memaddr,
+ const unsigned char *myaddr, int len)
{
int len_written;
/* Stop inferior. We always stop all threads. */
-static void
-nto_request_interrupt (void)
+void
+nto_process_target::request_interrupt ()
{
TRACE ("%s\n", __func__);
nto_set_thread (ptid_t (nto_inferior.pid, 1, 0));
TRACE ("Error stopping inferior.\n");
}
+bool
+nto_process_target::supports_read_auxv ()
+{
+ return true;
+}
+
/* Read auxiliary vector from inferior's memory into gdbserver's buffer
MYADDR. We always read whole auxv.
Return number of bytes stored in MYADDR buffer, 0 if OFFSET > 0
or -1 on error. */
-static int
-nto_read_auxv (CORE_ADDR offset, unsigned char *myaddr, unsigned int len)
+int
+nto_process_target::read_auxv (CORE_ADDR offset, unsigned char *myaddr,
+ unsigned int len)
{
int err;
CORE_ADDR initial_stack;
return nto_read_auxv_from_initial_stack (initial_stack, myaddr, len);
}
-static int
-nto_supports_z_point_type (char z_type)
+bool
+nto_process_target::supports_z_point_type (char z_type)
{
switch (z_type)
{
case Z_PACKET_WRITE_WP:
case Z_PACKET_READ_WP:
case Z_PACKET_ACCESS_WP:
- return 1;
+ return true;
default:
- return 0;
+ return false;
}
}
static nto_process_target the_nto_target;
static process_stratum_target nto_target_ops = {
- NULL, /* prepare_to_access_memory */
- NULL, /* done_accessing_memory */
- nto_read_memory,
- nto_write_memory,
- NULL, /* nto_look_up_symbols */
- nto_request_interrupt,
- nto_read_auxv,
- nto_supports_z_point_type,
nto_insert_point,
nto_remove_point,
NULL, /* stopped_by_sw_breakpoint */