diff options
author | Mark Kettenis <kettenis@gnu.org> | 2004-03-15 22:44:12 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@gnu.org> | 2004-03-15 22:44:12 +0000 |
commit | 63b6c53fc1bc6b3c9a2fb7c1cf478241ad70c030 (patch) | |
tree | 22466ef81bdc28e734253ec529cf88b2855c7c1f /gdb | |
parent | 871fbe6a506496c6123d753e54bc91ab3b597daf (diff) | |
download | gdb-63b6c53fc1bc6b3c9a2fb7c1cf478241ad70c030.zip gdb-63b6c53fc1bc6b3c9a2fb7c1cf478241ad70c030.tar.gz gdb-63b6c53fc1bc6b3c9a2fb7c1cf478241ad70c030.tar.bz2 |
* i387-tdep.h (i387_collect_fsave): New prototype.
* i387-tdep.c (i387_collect_fsave): New function containing most
of the code from i387_fill_fsave.
(i387_fill_fsave): Call i387_fill_fsave.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 7 | ||||
-rw-r--r-- | gdb/i387-tdep.c | 20 | ||||
-rw-r--r-- | gdb/i387-tdep.h | 8 |
3 files changed, 30 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index e095359..aa8c62c 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,10 @@ +2004-03-15 Mark Kettenis <m.kettenis@osp.nl> + + * i387-tdep.h (i387_collect_fsave): New prototype. + * i387-tdep.c (i387_collect_fsave): New function containing most + of the code from i387_fill_fsave. + (i387_fill_fsave): Call i387_fill_fsave. + 2004-03-15 Mark Kettenis <kettenis@gnu.org> * i386-linux-tdep.c: Update copyright year. diff --git a/gdb/i387-tdep.c b/gdb/i387-tdep.c index 21386fb..4b212c4 100644 --- a/gdb/i387-tdep.c +++ b/gdb/i387-tdep.c @@ -424,14 +424,13 @@ i387_supply_fsave (struct regcache *regcache, int regnum, const void *fsave) } /* Fill register REGNUM (if it is a floating-point register) in *FSAVE - with the value in GDB's register cache. If REGNUM is -1, do this - for all registers. This function doesn't touch any of the reserved - bits in *FSAVE. */ + with the value from REGCACHE. If REGNUM is -1, do this for all + registers. This function doesn't touch any of the reserved bits in + *FSAVE. */ void -i387_fill_fsave (void *fsave, int regnum) +i387_collect_fsave (const struct regcache *regcache, int regnum, void *fsave) { - struct regcache *regcache = current_regcache; struct gdbarch_tdep *tdep = gdbarch_tdep (current_gdbarch); char *regs = fsave; int i; @@ -468,6 +467,17 @@ i387_fill_fsave (void *fsave, int regnum) } #undef I387_ST0_REGNUM } + +/* Fill register REGNUM (if it is a floating-point register) in *FSAVE + with the value in GDB's register cache. If REGNUM is -1, do this + for all registers. This function doesn't touch any of the reserved + bits in *FSAVE. */ + +void +i387_fill_fsave (void *fsave, int regnum) +{ + i387_collect_fsave (current_regcache, regnum, fsave); +} /* At fxsave_offset[REGNUM] you'll find the offset to the location in diff --git a/gdb/i387-tdep.h b/gdb/i387-tdep.h index 978fdf99..38e6755 100644 --- a/gdb/i387-tdep.h +++ b/gdb/i387-tdep.h @@ -82,6 +82,14 @@ extern void i387_supply_fsave (struct regcache *regcache, int regnum, const void *fsave); /* Fill register REGNUM (if it is a floating-point register) in *FSAVE + with the value from REGCACHE. If REGNUM is -1, do this for all + registers. This function doesn't touch any of the reserved bits in + *FSAVE. */ + +extern void i387_collect_fsave (const struct regcache *regcache, int regnum, + void *fsave); + +/* Fill register REGNUM (if it is a floating-point register) in *FSAVE with the value in GDB's register cache. If REGNUM is -1, do this for all registers. This function doesn't touch any of the reserved bits in *FSAVE. */ |