From: Michael Snyder Date: Tue, 1 Mar 2011 21:46:42 +0000 (+0000) Subject: 2011-03-01 Michael Snyder X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=18ea20acd440eb578fd9e38f26e52e53c0fd6428;p=binutils-gdb.git 2011-03-01 Michael Snyder * std-regs.c (value_of_builtin_frame_pc_reg): Frame can't be null. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 756a4c17812..3a75b80065b 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,5 +1,7 @@ 2011-03-01 Michael Snyder + * std-regs.c (value_of_builtin_frame_pc_reg): Frame can't be null. + * event-top.c (display_gdb_prompt): Remove superfluous null check. * python/py-prettyprint.c (apply_val_pretty_printer): VAL may diff --git a/gdb/std-regs.c b/gdb/std-regs.c index 647dd0d0267..486b919a658 100644 --- a/gdb/std-regs.c +++ b/gdb/std-regs.c @@ -70,11 +70,8 @@ value_of_builtin_frame_pc_reg (struct frame_info *frame, const void *baton) struct value *val = allocate_value (func_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, func_ptr_type, - buf, get_frame_pc (frame)); + gdbarch_address_to_pointer (gdbarch, func_ptr_type, + buf, get_frame_pc (frame)); return val; } }