aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/remote.c2
-rw-r--r--gdb/std-regs.c6
-rw-r--r--sim/ppc/ChangeLog4
-rw-r--r--sim/ppc/tree.c2
5 files changed, 16 insertions, 5 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index af7cda3..580087d 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+2005-03-25 Anthony Green <green@redhat.com>
+
+ * remote.c (remote_store_registers): Fix memset usage.
+ * std-regs.c (value_of_builtin_frame_reg): Ditto.
+ (value_of_builtin_frame_fp_reg): Ditto.
+ (value_of_builtin_frame_reg): Ditto.
+
2005-03-25 Mark Mitchell <mark@codesourcery.com>
* ser-base.c (ser_unix_write): Rename to ...
diff --git a/gdb/remote.c b/gdb/remote.c
index ed57631..4c8817d 100644
--- a/gdb/remote.c
+++ b/gdb/remote.c
@@ -3501,7 +3501,7 @@ remote_store_registers (int regnum)
{
int i;
regs = alloca (rs->sizeof_g_packet);
- memset (regs, rs->sizeof_g_packet, 0);
+ memset (regs, 0, rs->sizeof_g_packet);
for (i = 0; i < NUM_REGS + NUM_PSEUDO_REGS; i++)
{
struct packet_reg *r = &rs->regs[i];
diff --git a/gdb/std-regs.c b/gdb/std-regs.c
index eaa6d26..5cb38b7 100644
--- a/gdb/std-regs.c
+++ b/gdb/std-regs.c
@@ -61,7 +61,7 @@ value_of_builtin_frame_reg (struct frame_info *frame)
val = allocate_value (builtin_type_frame_reg);
VALUE_LVAL (val) = not_lval;
buf = value_contents_raw (val);
- memset (buf, TYPE_LENGTH (value_type (val)), 0);
+ memset (buf, 0, TYPE_LENGTH (value_type (val)));
/* frame.base. */
if (frame != NULL)
ADDRESS_TO_POINTER (builtin_type_void_data_ptr, buf,
@@ -87,7 +87,7 @@ value_of_builtin_frame_fp_reg (struct frame_info *frame)
struct value *val = allocate_value (builtin_type_void_data_ptr);
char *buf = value_contents_raw (val);
if (frame == NULL)
- memset (buf, TYPE_LENGTH (value_type (val)), 0);
+ memset (buf, 0, TYPE_LENGTH (value_type (val)));
else
ADDRESS_TO_POINTER (builtin_type_void_data_ptr, buf,
get_frame_base_address (frame));
@@ -105,7 +105,7 @@ value_of_builtin_frame_pc_reg (struct frame_info *frame)
struct value *val = allocate_value (builtin_type_void_data_ptr);
char *buf = value_contents_raw (val);
if (frame == NULL)
- memset (buf, TYPE_LENGTH (value_type (val)), 0);
+ memset (buf, 0, TYPE_LENGTH (value_type (val)));
else
ADDRESS_TO_POINTER (builtin_type_void_data_ptr, buf,
get_frame_pc (frame));
diff --git a/sim/ppc/ChangeLog b/sim/ppc/ChangeLog
index 7b259e6..5b5d417 100644
--- a/sim/ppc/ChangeLog
+++ b/sim/ppc/ChangeLog
@@ -1,3 +1,7 @@
+2005-03-25 Anthony Green <green@redhat.com>
+
+ * tree.c (parse_reg_property): Fix memset usage.
+
2005-03-23 Mark Kettenis <kettenis@gnu.org>
* configure: Regenerate.
diff --git a/sim/ppc/tree.c b/sim/ppc/tree.c
index 220c62c..d4cfb71 100644
--- a/sim/ppc/tree.c
+++ b/sim/ppc/tree.c
@@ -539,7 +539,7 @@ parse_reg_property(device *current,
if (device_nr_size_cells(bus) > 0)
chp = parse_size(current, bus, chp, &regs[reg_nr].size);
else
- memset(&regs[reg_nr].size, sizeof (&regs[reg_nr].size), 0);
+ memset(&regs[reg_nr].size, 0, sizeof (&regs[reg_nr].size));
}
/* create it */