Index: gdb/gdbserver/target.h |
diff --git a/gdb/gdbserver/target.h b/gdb/gdbserver/target.h |
index 03dff0f628de7dabcc5efeee89adc855858aff95..0cf5687f20abc9575011e0ea5795b7a946b529da 100644 |
--- a/gdb/gdbserver/target.h |
+++ b/gdb/gdbserver/target.h |
@@ -53,7 +53,7 @@ struct thread_resume |
thread. If stopping a thread, and this is 0, the target should |
stop the thread however it best decides to (e.g., SIGSTOP on |
linux; SuspendThread on win32). This is a host signal value (not |
- enum target_signal). */ |
+ enum gdb_signal). */ |
int sig; |
}; |
@@ -97,7 +97,7 @@ struct target_waitstatus |
union |
{ |
int integer; |
- enum target_signal sig; |
+ enum gdb_signal sig; |
ptid_t related_pid; |
char *execd_pathname; |
} |
@@ -394,6 +394,9 @@ struct target_ops |
int (*qxfer_libraries_svr4) (const char *annex, unsigned char *readbuf, |
unsigned const char *writebuf, |
CORE_ADDR offset, int len); |
+ |
+ /* Return true if target supports debugging agent. */ |
+ int (*supports_agent) (void); |
}; |
extern struct target_ops *the_target; |
@@ -514,6 +517,10 @@ void set_target_ops (struct target_ops *); |
(the_target->supports_disable_randomization ? \ |
(*the_target->supports_disable_randomization) () : 0) |
+#define target_supports_agent() \ |
+ (the_target->supports_agent ? \ |
+ (*the_target->supports_agent) () : 0) |
+ |
/* Start non-stop mode, returns 0 on success, -1 on failure. */ |
int start_non_stop (int nonstop); |
@@ -533,6 +540,10 @@ ptid_t mywait (ptid_t ptid, struct target_waitstatus *ourstatus, int options, |
(*the_target->done_accessing_memory) (); \ |
} while (0) |
+#define target_core_of_thread(ptid) \ |
+ (the_target->core_of_thread ? (*the_target->core_of_thread) (ptid) \ |
+ : -1) |
+ |
int read_inferior_memory (CORE_ADDR memaddr, unsigned char *myaddr, int len); |
int write_inferior_memory (CORE_ADDR memaddr, const unsigned char *myaddr, |