projects
/
binutils-gdb.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
2001-09-20 Michael Snyder <msnyder@redhat.com>
[binutils-gdb.git]
/
gdb
/
i386-tdep.c
diff --git
a/gdb/i386-tdep.c
b/gdb/i386-tdep.c
index 3aa8cb543448cd370051cc77cd8251712d893652..c55757e76a69a318507fdb6e91852dfd612b9bcb 100644
(file)
--- a/
gdb/i386-tdep.c
+++ b/
gdb/i386-tdep.c
@@
-32,6
+32,7
@@
#include "command.h"
#include "arch-utils.h"
#include "regcache.h"
#include "command.h"
#include "arch-utils.h"
#include "regcache.h"
+#include "doublest.h"
#include "gdb_assert.h"
#include "gdb_assert.h"
@@
-1046,7
+1047,13
@@
i386_register_convert_to_virtual (int regnum, struct type *type,
DOUBLEST d;
/* We only support floating-point values. */
DOUBLEST d;
/* We only support floating-point values. */
- gdb_assert (TYPE_CODE (type) == TYPE_CODE_FLT);
+ if (TYPE_CODE (type) != TYPE_CODE_FLT)
+ {
+ warning ("Cannot convert floating-point register value "
+ "to non-floating-point type.");
+ memset (to, 0, TYPE_LENGTH (type));
+ return;
+ }
/* First add the necessary padding. */
memcpy (buf, from, FPU_REG_RAW_SIZE);
/* First add the necessary padding. */
memcpy (buf, from, FPU_REG_RAW_SIZE);