From 23ce9890d5abe0d19cda24998bb25b0ae2dfeaf9 Mon Sep 17 00:00:00 2001 From: Michael Snyder Date: Tue, 1 Mar 2011 21:51:35 +0000 Subject: [PATCH] 2011-03-01 Michael Snyder * std-regs.c (value_of_builtin_frame_pc_reg): Frame can't be null. (value_of_builtin_frame_fp_reg): Ditto. --- gdb/ChangeLog | 1 + gdb/std-regs.c | 7 ++----- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 3a75b80065b..6531dc265cf 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,6 +1,7 @@ 2011-03-01 Michael Snyder * 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. diff --git a/gdb/std-regs.c b/gdb/std-regs.c index 486b919a658..1054b89b8f0 100644 --- a/gdb/std-regs.c +++ b/gdb/std-regs.c @@ -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; } } -- 2.30.2