summaryrefslogtreecommitdiff
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
commitb2586c7c56fe183a663ffee177057bb00355beae (patch)
tree9e236cc486776c60929df3e6198bb6199112ee04 /gdb/hppa-hpux-nat.c
parent2e378b36e13fa9eb1be9f24342bad237ebb589dd (diff)
downloadgdb-b2586c7c56fe183a663ffee177057bb00355beae.tar.gz
* 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 9f77b4d63f9..df925d052ab 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);
}