aboutsummaryrefslogtreecommitdiff
path: root/gdb/hppa-hpux-nat.c
diff options
context:
space:
mode:
authorDave Anglin <dave.anglin@nrc.ca>2004-11-23 01:01:59 +0000
committerDave Anglin <dave.anglin@nrc.ca>2004-11-23 01:01:59 +0000
commit3f6306ec32b715d16968a54f97e75136f978d7de (patch)
treea0cb13a1803a821b05be8c89ae2b8de88d676129 /gdb/hppa-hpux-nat.c
parent55903abd03093c6cf94d705f6aae6df9f133114f (diff)
downloadgdb-3f6306ec32b715d16968a54f97e75136f978d7de.zip
gdb-3f6306ec32b715d16968a54f97e75136f978d7de.tar.gz
gdb-3f6306ec32b715d16968a54f97e75136f978d7de.tar.bz2
* hppa-hpux-nat.c (child_suppress_run): Add variable to allow
hpux-thread.c to suppress children from running. (hppa_hpux_child_can_run): New function. (_initialize_hppa_hpux_nat): Use hppa_hpux_child_can_run. * hpux-thread.c: Include string.h and hppa-tdep.h. (FLAGS_REGNUM, SP_REGNUM, PC_REGNUM): Rename to HPPA_FLAGS_REGNUM, HPPA_SP_REGNUM and HPPA_PCOQ_HEAD_REGNUM, respectively. (hpux_thread_store_registers): Replace deprecated_registers with calls to regcache_raw_read. * config/pa/hpux11.mh, config/pa/hpux11w.mh: Delete HOST_IPC.
Diffstat (limited to 'gdb/hppa-hpux-nat.c')
-rw-r--r--gdb/hppa-hpux-nat.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gdb/hppa-hpux-nat.c b/gdb/hppa-hpux-nat.c
index 9f77b4d..df925d0 100644
--- a/gdb/hppa-hpux-nat.c
+++ b/gdb/hppa-hpux-nat.c
@@ -31,6 +31,9 @@
#include "hppa-tdep.h"
#include "inf-ptrace.h"
+int child_suppress_run = 0; /* Non-zero if we should pretend not to be
+ a runnable target. */
+
static int hppa_hpux_save_state_offset[] =
{
ssoff(ss_flags),
@@ -273,6 +276,16 @@ hppa_hpux_store_inferior_registers (int regnum)
else
hppa_hpux_store_register (regnum);
}
+
+static int
+hppa_hpux_child_can_run (void)
+{
+ /* This variable is controlled by modules that layer their own process
+ structure atop that provided here. hpux-thread.c does this because
+ of the HP-UX user-mode level thread model. */
+
+ return !child_suppress_run;
+}
/* Prevent warning from -Wmissing-prototypes. */
@@ -286,5 +299,6 @@ _initialize_hppa_hpux_nat (void)
t = inf_ptrace_target ();
t->to_fetch_registers = hppa_hpux_fetch_inferior_registers;
t->to_store_registers = hppa_hpux_store_inferior_registers;
+ t->to_can_run = hppa_hpux_child_can_run;
add_target (t);
}