2011-03-01 Michael Snyder <msnyder@vmware.com>
authorMichael Snyder <msnyder@vmware.com>
Tue, 1 Mar 2011 21:51:35 +0000 (21:51 +0000)
committerMichael Snyder <msnyder@vmware.com>
Tue, 1 Mar 2011 21:51:35 +0000 (21:51 +0000)
* std-regs.c (value_of_builtin_frame_pc_reg): Frame can't be null.
(value_of_builtin_frame_fp_reg): Ditto.

gdb/ChangeLog
gdb/std-regs.c

index 3a75b80065bbda349780f81621ec9bdfef81cfdc..6531dc265cfbddeaa2e51b7974afbcda0c09b60a 100644 (file)
@@ -1,6 +1,7 @@
 2011-03-01  Michael Snyder  <msnyder@vmware.com>
 
        * std-regs.c (value_of_builtin_frame_pc_reg): Frame can't be null.
+       (value_of_builtin_frame_fp_reg): Ditto.
 
        * event-top.c (display_gdb_prompt): Remove superfluous null check.
 
index 486b919a6583441bc8a48731af72d7fd0148b69d..1054b89b8f02188ac854b1edce195510f3ee1f2c 100644 (file)
@@ -48,11 +48,8 @@ value_of_builtin_frame_fp_reg (struct frame_info *frame, const void *baton)
       struct value *val = allocate_value (data_ptr_type);
       gdb_byte *buf = value_contents_raw (val);
 
-      if (frame == NULL)
-       memset (buf, 0, TYPE_LENGTH (value_type (val)));
-      else
-       gdbarch_address_to_pointer (gdbarch, data_ptr_type,
-                                   buf, get_frame_base_address (frame));
+      gdbarch_address_to_pointer (gdbarch, data_ptr_type,
+                                 buf, get_frame_base_address (frame));
       return val;
     }
 }