From c34b6bbab1da2530e6048ef2705612e011101d8d Mon Sep 17 00:00:00 2001 From: kettenis Date: Sun, 21 May 2000 21:21:20 +0000 Subject: [PATCH] * i387-tdep.c (print_i387_value): Cast &value to (char *) in pointer arithmetic. Fixes a bug which manifested itself on FreeBSD. --- gdb/ChangeLog | 6 ++++++ gdb/i387-tdep.c | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 643164dc38..7f1277413a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2000-05-21 Mark Kettenis + + * i387-tdep.c (print_i387_value): Cast &value to (char *) in + pointer arithmetic. Fixes a bug which manifested itself on + FreeBSD. + 2000-05-20 J.T. Conklin * target.h (target_memory_bfd_section): Removed declaration. diff --git a/gdb/i387-tdep.c b/gdb/i387-tdep.c index f887da95b2..f56b3d01a3 100644 --- a/gdb/i387-tdep.c +++ b/gdb/i387-tdep.c @@ -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 -- 2.11.0