From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29940 invoked by alias); 15 Mar 2004 22:48:27 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 29932 invoked from network); 15 Mar 2004 22:48:25 -0000 Received: from unknown (HELO walton.kettenis.dyndns.org) (213.93.115.144) by sources.redhat.com with SMTP; 15 Mar 2004 22:48:25 -0000 Received: from elgar.kettenis.dyndns.org (elgar.kettenis.dyndns.org [192.168.0.2]) by walton.kettenis.dyndns.org (8.12.6p3/8.12.6) with ESMTP id i2FMmOrp000310 for ; Mon, 15 Mar 2004 23:48:24 +0100 (CET) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: from elgar.kettenis.dyndns.org (localhost [127.0.0.1]) by elgar.kettenis.dyndns.org (8.12.6p3/8.12.6) with ESMTP id i2FMmOSL008200 for ; Mon, 15 Mar 2004 23:48:24 +0100 (CET) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: (from kettenis@localhost) by elgar.kettenis.dyndns.org (8.12.6p3/8.12.6/Submit) id i2FMmOlH008197; Mon, 15 Mar 2004 23:48:24 +0100 (CET) Date: Fri, 19 Mar 2004 00:09:00 -0000 Message-Id: <200403152248.i2FMmOlH008197@elgar.kettenis.dyndns.org> From: Mark Kettenis To: gdb-patches@sources.redhat.com Subject: [PATCH] Introduce i387_collect_fsave X-SW-Source: 2004-03/txt/msg00344.txt.bz2 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 * 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); } 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. */ From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29940 invoked by alias); 15 Mar 2004 22:48:27 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 29932 invoked from network); 15 Mar 2004 22:48:25 -0000 Received: from unknown (HELO walton.kettenis.dyndns.org) (213.93.115.144) by sources.redhat.com with SMTP; 15 Mar 2004 22:48:25 -0000 Received: from elgar.kettenis.dyndns.org (elgar.kettenis.dyndns.org [192.168.0.2]) by walton.kettenis.dyndns.org (8.12.6p3/8.12.6) with ESMTP id i2FMmOrp000310 for ; Mon, 15 Mar 2004 23:48:24 +0100 (CET) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: from elgar.kettenis.dyndns.org (localhost [127.0.0.1]) by elgar.kettenis.dyndns.org (8.12.6p3/8.12.6) with ESMTP id i2FMmOSL008200 for ; Mon, 15 Mar 2004 23:48:24 +0100 (CET) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: (from kettenis@localhost) by elgar.kettenis.dyndns.org (8.12.6p3/8.12.6/Submit) id i2FMmOlH008197; Mon, 15 Mar 2004 23:48:24 +0100 (CET) Date: Mon, 15 Mar 2004 22:48:00 -0000 Message-ID: <200403152248.i2FMmOlH008197@elgar.kettenis.dyndns.org> From: Mark Kettenis To: gdb-patches@sources.redhat.com Subject: [PATCH] Introduce i387_collect_fsave X-SW-Source: 2004-03.o/txt/msg00344.txt Message-ID: <20040315224800.V6jBcPUXxsvNH1KmR6wg-mLHm9kmjVUSCn8e_1RSffs@z> 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 * 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); } 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. */