Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Mark Kettenis <kettenis@chello.nl>
To: gdb-patches@sources.redhat.com
Subject: [PATCH] Introduce i387_collect_fsave
Date: Fri, 19 Mar 2004 00:09:00 -0000	[thread overview]
Message-ID: <200403152248.i2FMmOlH008197@elgar.kettenis.dyndns.org> (raw)

Similar to what I already did for i387_collect_fxsave.  The old
i387_fill_fsave and i387_fill_fxsave will be eliminated somewhere in
the future.

Committed,

Mark


Index: ChangeLog
from  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.

Index: i387-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/i387-tdep.c,v
retrieving revision 1.39
diff -u -p -r1.39 i387-tdep.c
--- i387-tdep.c 28 Feb 2004 20:43:51 -0000 1.39
+++ i387-tdep.c 15 Mar 2004 22:41:24 -0000
@@ -424,14 +424,13 @@ i387_supply_fsave (struct regcache *regc
 }
 
 /* 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;
@@ -467,6 +466,17 @@ i387_fill_fsave (void *fsave, int regnum
 	  regcache_raw_collect (regcache, i, FSAVE_ADDR (regs, i));
       }
 #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);
 }
 \f
 
Index: i387-tdep.h
===================================================================
RCS file: /cvs/src/src/gdb/i387-tdep.h,v
retrieving revision 1.11
diff -u -p -r1.11 i387-tdep.h
--- i387-tdep.h 28 Feb 2004 20:43:51 -0000 1.11
+++ i387-tdep.h 15 Mar 2004 22:41:24 -0000
@@ -82,6 +82,14 @@ extern void i387_supply_fsave (struct re
 			       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.  */


WARNING: multiple messages have this Message-ID
From: Mark Kettenis <kettenis@chello.nl>
To: gdb-patches@sources.redhat.com
Subject: [PATCH] Introduce i387_collect_fsave
Date: Mon, 15 Mar 2004 22:48:00 -0000	[thread overview]
Message-ID: <200403152248.i2FMmOlH008197@elgar.kettenis.dyndns.org> (raw)
Message-ID: <20040315224800.V6jBcPUXxsvNH1KmR6wg-mLHm9kmjVUSCn8e_1RSffs@z> (raw)

Similar to what I already did for i387_collect_fxsave.  The old
i387_fill_fsave and i387_fill_fxsave will be eliminated somewhere in
the future.

Committed,

Mark


Index: ChangeLog
from  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.

Index: i387-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/i387-tdep.c,v
retrieving revision 1.39
diff -u -p -r1.39 i387-tdep.c
--- i387-tdep.c 28 Feb 2004 20:43:51 -0000 1.39
+++ i387-tdep.c 15 Mar 2004 22:41:24 -0000
@@ -424,14 +424,13 @@ i387_supply_fsave (struct regcache *regc
 }
 
 /* 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;
@@ -467,6 +466,17 @@ i387_fill_fsave (void *fsave, int regnum
 	  regcache_raw_collect (regcache, i, FSAVE_ADDR (regs, i));
       }
 #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);
 }
 \f
 
Index: i387-tdep.h
===================================================================
RCS file: /cvs/src/src/gdb/i387-tdep.h,v
retrieving revision 1.11
diff -u -p -r1.11 i387-tdep.h
--- i387-tdep.h 28 Feb 2004 20:43:51 -0000 1.11
+++ i387-tdep.h 15 Mar 2004 22:41:24 -0000
@@ -82,6 +82,14 @@ extern void i387_supply_fsave (struct re
 			       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.  */


             reply	other threads:[~2004-03-15 22:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-19  0:09 Mark Kettenis [this message]
2004-03-15 22:48 ` Mark Kettenis
2004-03-16 19:35 ` Eli Zaretskii
2004-03-19  0:09   ` Mark Kettenis
2004-03-17  0:22     ` Mark Kettenis
2004-03-19  0:09   ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200403152248.i2FMmOlH008197@elgar.kettenis.dyndns.org \
    --to=kettenis@chello.nl \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox