aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/target.h
diff options
context:
space:
mode:
authorLuis Machado <luisgpm@br.ibm.com>2013-07-24 16:20:12 +0000
committerLuis Machado <luisgpm@br.ibm.com>2013-07-24 16:20:12 +0000
commit3360c0bf75c98188a29b2ea29183a0bdc33b5801 (patch)
tree0a1144597538d9f9a1b9c4fca782944bbb8c7128 /gdb/gdbserver/target.h
parent7e8b059be6b6b97b611b034e90f576c1479bdf75 (diff)
downloadgdb-3360c0bf75c98188a29b2ea29183a0bdc33b5801.zip
gdb-3360c0bf75c98188a29b2ea29183a0bdc33b5801.tar.gz
gdb-3360c0bf75c98188a29b2ea29183a0bdc33b5801.tar.bz2
gdb/
* Makefile.in (SFILES): Add common/target-common.c. Add common/target-common.h to headers. (COMMON_OBS): Add target-common.o. (target-common.o): New target. * linux-nat.h (resume_kind): Move to common/target-common.h. * target.c (target_waitstatus_to_string): Move to common/target-common.c. * target.h: Include target-common.h. (target_waitkind): Move to common/target-common.h. (target_waitstatus): Likewise. (TARGET_WNOHANG): Likewise. * common/target-common.c: New file. * common/target-common.h: New file. gdb/gdbserver/ * Makefile.in (SFILES): /common/target-common.c. (OBS): Add target-common.o. (server_h): Add $(srcdir)/../common/target-common.h. (target-common.o): New target. * server.c (queue_stop_reply_callback): Free status string after use. * target.c (target_waitstatus_to_string): Remove. * target.h: Include target-common.h. (resume_kind): Likewise. (target_waitkind): Likewise. (target_waitstatus): Likewise. (TARGET_WNOHANG): Likewise.
Diffstat (limited to 'gdb/gdbserver/target.h')
-rw-r--r--gdb/gdbserver/target.h69
1 files changed, 2 insertions, 67 deletions
diff --git a/gdb/gdbserver/target.h b/gdb/gdbserver/target.h
index c57cb40..d064b79 100644
--- a/gdb/gdbserver/target.h
+++ b/gdb/gdbserver/target.h
@@ -21,24 +21,12 @@
#ifndef TARGET_H
#define TARGET_H
+#include "target-common.h"
+
struct emit_ops;
struct btrace_target_info;
struct buffer;
-/* Ways to "resume" a thread. */
-
-enum resume_kind
-{
- /* Thread should continue. */
- resume_continue,
-
- /* Thread should single-step. */
- resume_step,
-
- /* Thread should be stopped. */
- resume_stop
-};
-
/* This structure describes how to resume a particular thread (or all
threads) based on the client's request. If thread is -1, then this
entry applies to all threads. These are passed around as an
@@ -68,57 +56,6 @@ struct thread_resume
CORE_ADDR step_range_end; /* Exclusive */
};
-/* Generally, what has the program done? */
-enum target_waitkind
- {
- /* The program has exited. The exit status is in
- value.integer. */
- TARGET_WAITKIND_EXITED,
-
- /* The program has stopped with a signal. Which signal is in
- value.sig. */
- TARGET_WAITKIND_STOPPED,
-
- /* The program has terminated with a signal. Which signal is in
- value.sig. */
- TARGET_WAITKIND_SIGNALLED,
-
- /* The program is letting us know that it dynamically loaded
- something. */
- TARGET_WAITKIND_LOADED,
-
- /* The program has exec'ed a new executable file. The new file's
- pathname is pointed to by value.execd_pathname. */
- TARGET_WAITKIND_EXECD,
-
- /* Nothing of interest to GDB happened, but we stopped anyway. */
- TARGET_WAITKIND_SPURIOUS,
-
- /* An event has occurred, but we should wait again. In this case,
- we want to go back to the event loop and wait there for another
- event from the inferior. */
- TARGET_WAITKIND_IGNORE
- };
-
-struct target_waitstatus
- {
- enum target_waitkind kind;
-
- /* Forked child pid, execd pathname, exit status or signal number. */
- union
- {
- int integer;
- enum gdb_signal sig;
- ptid_t related_pid;
- char *execd_pathname;
- }
- value;
- };
-
-/* Options that can be passed to target_ops->wait. */
-
-#define TARGET_WNOHANG 1
-
struct target_ops
{
/* Start a new process.
@@ -596,6 +533,4 @@ void set_desired_inferior (int id);
const char *target_pid_to_str (ptid_t);
-const char *target_waitstatus_to_string (const struct target_waitstatus *);
-
#endif /* TARGET_H */