X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=gdb%2Fi386-tdep.c;h=c55757e76a69a318507fdb6e91852dfd612b9bcb;hb=56e2d25ab5b69584198204090fe049e920cd57db;hp=3aa8cb543448cd370051cc77cd8251712d893652;hpb=85540d8c4ad4df82637ddc835173c80d4dcdac08;p=binutils-gdb.git diff --git a/gdb/i386-tdep.c b/gdb/i386-tdep.c index 3aa8cb54344..c55757e76a6 100644 --- 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 "doublest.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. */ - 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);