46 res = (*the_target->
read_memory) (memaddr, myaddr, len);
74 static unsigned char *
buffer = 0;
81 memcpy (buffer, myaddr, len);
83 res = (*the_target->
write_memory) (memaddr, buffer, len);
107 ret = (*the_target->
wait) (ptid, ourstatus, options);
111 if (ourstatus->kind == TARGET_WAITKIND_LOADED)
112 ourstatus->kind = TARGET_WAITKIND_STOPPED;
122 if (ourstatus->kind == TARGET_WAITKIND_EXITED)
124 "\nChild exited with status %d\n", ourstatus->value.integer);
125 else if (ourstatus->kind == TARGET_WAITKIND_SIGNALLED)
126 fprintf (stderr,
"\nChild terminated with signal = 0x%x (%s)\n",
142 struct target_waitstatus status;
146 resume_info.
thread = ptid;
147 resume_info.
kind = resume_stop;
148 resume_info.
sig = GDB_SIGNAL_0;
149 (*the_target->
resume) (&resume_info, 1);
152 mywait (ptid, &status, 0, 0);
163 resume_info.
thread = ptid;
164 resume_info.
kind = resume_continue;
165 resume_info.
sig = GDB_SIGNAL_0;
166 (*the_target->
resume) (&resume_info, 1);
187 memcpy (the_target, target,
sizeof (*the_target));
198 xsnprintf (buf,
sizeof (buf),
"<all threads>");
200 xsnprintf (buf,
sizeof (buf),
"<null thread>");
202 xsnprintf (buf,
sizeof (buf),
"Thread %d.0x%lx",
205 xsnprintf (buf,
sizeof (buf),
"LWP %d.%ld",
208 xsnprintf (buf,
sizeof (buf),
"Process %d",
219 return (*the_target->
kill) (pid);
void check_mem_read(CORE_ADDR mem_addr, unsigned char *buf, int mem_len)
struct thread_info * current_thread
struct thread_info * find_thread_ptid(ptid_t ptid)
int ptid_equal(ptid_t ptid1, ptid_t ptid2)
void set_desired_thread(int use_general)
int target_read_memory(CORE_ADDR memaddr, gdb_byte *myaddr, ssize_t len)
struct target_ops * the_target
int remote_connection_is_stdio(void)
int(* write_memory)(CORE_ADDR memaddr, const unsigned char *myaddr, int len)
int read_inferior_memory(CORE_ADDR memaddr, unsigned char *myaddr, int len)
int gdb_signal_to_host(enum gdb_signal)
int target_read_uint32(CORE_ADDR memaddr, uint32_t *result)
void target_continue_no_signal(ptid_t ptid)
const char * gdb_signal_to_name(enum gdb_signal)
void set_target_ops(struct target_ops *target)
void check_mem_write(CORE_ADDR mem_addr, unsigned char *buf, const unsigned char *myaddr, int mem_len)
int kill_inferior(int pid)
ptid_t mywait(ptid_t ptid, struct target_waitstatus *ourstatus, int options, int connected_wait)
struct thread_info * get_first_thread(void)
int write_inferior_memory(CORE_ADDR memaddr, const unsigned char *myaddr, int len)
int ptid_get_pid(ptid_t ptid)
ptid_t(* wait)(ptid_t ptid, struct target_waitstatus *status, int options)
long ptid_get_tid(ptid_t ptid)
int xsnprintf(char *str, size_t size, const char *format,...)
void target_stop_and_wait(ptid_t ptid)
const char * target_pid_to_str(ptid_t ptid)
void(* resume)(struct thread_resume *resume_info, size_t n)
int(* read_memory)(CORE_ADDR memaddr, unsigned char *myaddr, int len)
int(* start_non_stop)(int)
int target_write_memory(CORE_ADDR memaddr, const gdb_byte *myaddr, ssize_t len)
long ptid_get_lwp(ptid_t ptid)
void gdb_agent_about_to_close(int pid)
int start_non_stop(int nonstop)