* target.h (store_waitstatus): Move declaration ...
* inf-child.h (store_waitstatus): ... here.
* target.c: Move inclusion of gdb_wait.h, and ...
(store_waitstatus): ... this ...
* inf-child.c: ... here.
* linux-nat.c: Include inf-child.h.
* rs6000-nat.c: Include inf-child.h.
* spu-linux-nat.c: Include inf-child.h.
+2012-05-22 Pedro Alves <palves@redhat.com>
+
+ * target.h (store_waitstatus): Move declaration ...
+ * inf-child.h (store_waitstatus): ... here.
+ * target.c: Move inclusion of gdb_wait.h, and ...
+ (store_waitstatus): ... this ...
+ * inf-child.c: ... here.
+ * linux-nat.c: Include inf-child.h.
+ * rs6000-nat.c: Include inf-child.h.
+ * spu-linux-nat.c: Include inf-child.h.
+
2012-05-22 Pierre Muller <muller@ics.u-strasbg.fr>
* tracepoint.c (start_tracing): Add missing i18n markup.
#include "inf-child.h"
#include "gdb/fileio.h"
#include "agent.h"
+#include "gdb_wait.h"
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h> /* for MAXPATHLEN */
#include <fcntl.h>
#include <unistd.h>
+/* Helper function for child_wait and the derivatives of child_wait.
+ HOSTSTATUS is the waitstatus from wait() or the equivalent; store our
+ translation of that in OURSTATUS. */
+void
+store_waitstatus (struct target_waitstatus *ourstatus, int hoststatus)
+{
+ if (WIFEXITED (hoststatus))
+ {
+ ourstatus->kind = TARGET_WAITKIND_EXITED;
+ ourstatus->value.integer = WEXITSTATUS (hoststatus);
+ }
+ else if (!WIFSTOPPED (hoststatus))
+ {
+ ourstatus->kind = TARGET_WAITKIND_SIGNALLED;
+ ourstatus->value.sig = target_signal_from_host (WTERMSIG (hoststatus));
+ }
+ else
+ {
+ ourstatus->kind = TARGET_WAITKIND_STOPPED;
+ ourstatus->value.sig = target_signal_from_host (WSTOPSIG (hoststatus));
+ }
+}
+
/* Fetch register REGNUM from the inferior. If REGNUM is -1, do this
for all registers. */
extern struct target_ops *inf_child_target (void);
+/* Functions for helping to write a native target. */
+
+/* This is for native targets which use a unix/POSIX-style waitstatus. */
+extern void store_waitstatus (struct target_waitstatus *, int);
+
#endif
#include "gdbcmd.h"
#include "regcache.h"
#include "regset.h"
+#include "inf-child.h"
#include "inf-ptrace.h"
#include "auxv.h"
#include <sys/param.h> /* for MAXPATHLEN */
#include "gdb-stabs.h"
#include "regcache.h"
#include "arch-utils.h"
+#include "inf-child.h"
#include "inf-ptrace.h"
#include "ppc-tdep.h"
#include "rs6000-tdep.h"
#include "gdb_string.h"
#include "target.h"
#include "inferior.h"
+#include "inf-child.h"
#include "inf-ptrace.h"
#include "regcache.h"
#include "symfile.h"
#include "bfd.h"
#include "symfile.h"
#include "objfiles.h"
-#include "gdb_wait.h"
#include "dcache.h"
#include <signal.h>
#include "regcache.h"
deprecated_detach_hook ();
}
\f
-/* Helper function for child_wait and the derivatives of child_wait.
- HOSTSTATUS is the waitstatus from wait() or the equivalent; store our
- translation of that in OURSTATUS. */
-void
-store_waitstatus (struct target_waitstatus *ourstatus, int hoststatus)
-{
- if (WIFEXITED (hoststatus))
- {
- ourstatus->kind = TARGET_WAITKIND_EXITED;
- ourstatus->value.integer = WEXITSTATUS (hoststatus);
- }
- else if (!WIFSTOPPED (hoststatus))
- {
- ourstatus->kind = TARGET_WAITKIND_SIGNALLED;
- ourstatus->value.sig = target_signal_from_host (WTERMSIG (hoststatus));
- }
- else
- {
- ourstatus->kind = TARGET_WAITKIND_STOPPED;
- ourstatus->value.sig = target_signal_from_host (WSTOPSIG (hoststatus));
- }
-}
-\f
/* Convert a normal process ID to a string. Returns the string in a
static buffer. */
extern int remote_timeout;
\f
-/* Functions for helping to write a native target. */
-
-/* This is for native targets which use a unix/POSIX-style waitstatus. */
-extern void store_waitstatus (struct target_waitstatus *, int);
/* Set the show memory breakpoints mode to show, and installs a cleanup
to restore it back to the current value. */