* i387-tdep.c (print_i387_value): Cast &value to (char *) in

pointer arithmetic.  Fixes a bug which manifested itself on
FreeBSD.
This commit is contained in:
Mark Kettenis
2000-05-21 21:31:10 +00:00
parent f3fafc2120
commit 4cd2d06ff0
2 changed files with 8 additions and 1 deletions

View File

@@ -1,3 +1,9 @@
2000-05-21 Mark Kettenis <kettenis@gnu.org>
* i387-tdep.c (print_i387_value): Cast &value to (char *) in
pointer arithmetic. Fixes a bug which manifested itself on
FreeBSD.
2000-05-17 Andrew Cagney <cagney@sourceware.cygnus.com>
* GDB 5.0 released.

View File

@@ -176,7 +176,8 @@ print_i387_value (char *raw)
{
/* Copy straight over, but take care of the padding. */
memcpy (&value, raw, FPU_REG_RAW_SIZE);
memset (&value + FPU_REG_RAW_SIZE, 0, sizeof (value) - FPU_REG_RAW_SIZE);
memset ((char *) &value + FPU_REG_RAW_SIZE, 0,
sizeof (value) - FPU_REG_RAW_SIZE);
}
else
#endif