You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
-Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "defs.h"
#include "inferior.h"
+#include "floatformat.h"
#include <stdio.h>
extern void print_387_control_word (); /* i387-tdep.h */
extern void print_387_status_word ();
-extern struct ext_format ext_format_i387;
-
#define private static
\f
#define FETCH_REGS(state, regnum, count) \
memcpy (®isters[REGISTER_BYTE (regnum)], \
REG_ADDRESS (state, regnum), \
- count*sizeof (REGISTER_TYPE))
+ count*REGISTER_SIZE)
/* Store COUNT contiguous registers to thread STATE starting from REGNUM */
#define STORE_REGS(state, regnum, count) \
memcpy (REG_ADDRESS (state, regnum), \
®isters[REGISTER_BYTE (regnum)], \
- count*sizeof (REGISTER_TYPE))
+ count*REGISTER_SIZE)
\f
/*
* Fetch inferiors registers for gdb.
&stateCnt);
if (ret != KERN_SUCCESS)
- message ("fetch_inferior_registers: %s ",
+ warning ("fetch_inferior_registers: %s ",
mach_error_string (ret));
#if 0
/* It may be more effective to store validate all of them,
if (ret != KERN_SUCCESS)
{
- message ("store_inferior_registers (get): %s",
+ warning ("store_inferior_registers (get): %s",
mach_error_string (ret));
if (must_suspend_thread)
setup_thread (current_thread, 0);
i386_THREAD_STATE_COUNT);
if (ret != KERN_SUCCESS)
- message ("store_inferior_registers (set): %s",
+ warning ("store_inferior_registers (set): %s",
mach_error_string (ret));
if (must_suspend_thread)
* core file. If your UX does something else, adapt the routine
* below to return the offset to the given register.
*
- * Called by coredep.c(fetch_core_registers)
+ * Called by core-aout.c(fetch_core_registers)
*/
unsigned int
for (i = 9; i >= 0; i--)
printf_unfiltered ("%02x", ep->regs[fpreg][i]);
- ieee_extended_to_double (&ext_format_i387, (char *)ep->regs[fpreg],
+ floatformat_to_double (&floatformat_i387_ext, (char *)ep->regs[fpreg],
&val);
printf_unfiltered (" %g\n", val);
}
if (ret != KERN_SUCCESS)
{
- message ("Can not get live floating point state: %s",
+ warning ("Can not get live floating point state: %s",
mach_error_string (ret));
return FALSE;
}
/* Clear the target then copy thread's float state there.
Make a copy of the status word, for some reason?
*/
- bzero (fstate, sizeof(struct fpstate));
+ memset (fstate, 0, sizeof (struct fpstate));
fstate->status = fsp->exc_status;
if (!valid)
{
- message("no floating point status saved");
+ warning ("no floating point status saved");
return;
}