diff options
author | Michael Snyder <msnyder@vmware.com> | 2000-05-10 17:38:16 +0000 |
---|---|---|
committer | Michael Snyder <msnyder@vmware.com> | 2000-05-10 17:38:16 +0000 |
commit | 60054393321258d1acc88f65169fb60589cb4b41 (patch) | |
tree | 2e14d4aa8da30649e52937f14b5da33bcc4f42e5 /gdb/procfs.c | |
parent | 598ca718d00001789f64d2669c56f87acea2b3ca (diff) | |
download | gdb-60054393321258d1acc88f65169fb60589cb4b41.zip gdb-60054393321258d1acc88f65169fb60589cb4b41.tar.gz gdb-60054393321258d1acc88f65169fb60589cb4b41.tar.bz2 |
2000-05-08 Michael Snyder <msnyder@seadog.cygnus.com>
* gdbarch.sh: Add FP0_REGNUM to list of multi-arched register numbers.
* gdbarch.c, gdbarch.h: Regenerate.
* core-regset.c: Change FP0_REGNUM to a runtime test.
* procfs.c: Ditto.
* sun3-nat.c: Ditto.
* sparc-tdep.c: Ditto.
* i386mach-nat.c: Remove unnecessary ifdef for FP0_REGNUM.
* ptx4-nat.c: Ditto.
* sol-thread.c (sol_thread_create_inferior): only add the thread
to the thread list if it is not already in there.
(prototypes for thread_db func ptrs): pretty up formatting.
Diffstat (limited to 'gdb/procfs.c')
-rw-r--r-- | gdb/procfs.c | 69 |
1 files changed, 35 insertions, 34 deletions
diff --git a/gdb/procfs.c b/gdb/procfs.c index 1a6c947..2fa825b 100644 --- a/gdb/procfs.c +++ b/gdb/procfs.c @@ -3502,19 +3502,20 @@ procfs_fetch_registers (regno) supply_gregset (gregs); -#if defined (FP0_REGNUM) /* need floating point? */ - if ((regno >= 0 && regno < FP0_REGNUM) || - regno == PC_REGNUM || - (NPC_REGNUM >= 0 && regno == NPC_REGNUM) || - regno == FP_REGNUM || - regno == SP_REGNUM) - return; /* not a floating point register */ + if (FP0_REGNUM >= 0) /* need floating point? */ + { + if ((regno >= 0 && regno < FP0_REGNUM) || + regno == PC_REGNUM || + (NPC_REGNUM >= 0 && regno == NPC_REGNUM) || + regno == FP_REGNUM || + regno == SP_REGNUM) + return; /* not a floating point register */ - if ((fpregs = proc_get_fpregs (pi)) == NULL) - proc_error (pi, "fetch_registers, get_fpregs", __LINE__); + if ((fpregs = proc_get_fpregs (pi)) == NULL) + proc_error (pi, "fetch_registers, get_fpregs", __LINE__); - supply_fpregset (fpregs); -#endif + supply_fpregset (fpregs); + } } /* Get ready to modify the registers array. On machines which store @@ -3576,21 +3577,22 @@ procfs_store_registers (regno) if (!proc_set_gregs (pi)) proc_error (pi, "store_registers, set_gregs", __LINE__); -#if defined (FP0_REGNUM) /* need floating point? */ - if ((regno >= 0 && regno < FP0_REGNUM) || - regno == PC_REGNUM || - (NPC_REGNUM >= 0 && regno == NPC_REGNUM) || - regno == FP_REGNUM || - regno == SP_REGNUM) - return; /* not a floating point register */ - - if ((fpregs = proc_get_fpregs (pi)) == NULL) - proc_error (pi, "store_registers, get_fpregs", __LINE__); - - fill_fpregset (fpregs, regno); - if (!proc_set_fpregs (pi)) - proc_error (pi, "store_registers, set_fpregs", __LINE__); -#endif + if (FP0_REGNUM >= 0) /* need floating point? */ + { + if ((regno >= 0 && regno < FP0_REGNUM) || + regno == PC_REGNUM || + (NPC_REGNUM >= 0 && regno == NPC_REGNUM) || + regno == FP_REGNUM || + regno == SP_REGNUM) + return; /* not a floating point register */ + + if ((fpregs = proc_get_fpregs (pi)) == NULL) + proc_error (pi, "store_registers, get_fpregs", __LINE__); + + fill_fpregset (fpregs, regno); + if (!proc_set_fpregs (pi)) + proc_error (pi, "store_registers, set_fpregs", __LINE__); + } } /* @@ -4111,14 +4113,13 @@ invalidate_cache (parent, pi, ptr) if (!proc_set_gregs (pi)) /* flush gregs cache */ proc_warn (pi, "target_resume, set_gregs", __LINE__); -#ifdef FP0_REGNUM - if (pi->fpregs_dirty) - if (parent == NULL || - proc_get_current_thread (parent) != pi->tid) - if (!proc_set_fpregs (pi)) /* flush fpregs cache */ - proc_warn (pi, "target_resume, set_fpregs", - __LINE__); -#endif + if (FP0_REGNUM >= 0) + if (pi->fpregs_dirty) + if (parent == NULL || + proc_get_current_thread (parent) != pi->tid) + if (!proc_set_fpregs (pi)) /* flush fpregs cache */ + proc_warn (pi, "target_resume, set_fpregs", + __LINE__); #endif if (parent != NULL) |