mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-01-30 12:44:10 +08:00
* i386-tdep.c (i386_register_convert_to_virtual): Replace
assertion with a warning if we're asked to convert towards a non-floating-point type. Zero out the the buffer where the data is supposed to be stored in that case.
This commit is contained in:
parent
65a4f13c67
commit
8d7f6b4a80
@ -1,3 +1,10 @@
|
||||
2001-07-30 Mark Kettenis <kettenis@gnu.org>
|
||||
|
||||
* i386-tdep.c (i386_register_convert_to_virtual): Replace
|
||||
assertion with a warning if we're asked to convert towards a
|
||||
non-floating-point type. Zero out the the buffer where the data
|
||||
is supposed to be stored in that case.
|
||||
|
||||
2001-07-29 Eli Zaretskii <eliz@is.elta.co.il>
|
||||
|
||||
* config/djgpp/djconfig.sh: Unset CDPATH.
|
||||
|
@ -1046,7 +1046,13 @@ i386_register_convert_to_virtual (int regnum, struct type *type,
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user