summaryrefslogtreecommitdiff
path: root/gdb/std-regs.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-05-03 00:26:34 +0000
committerAndrew Cagney <cagney@redhat.com>2003-05-03 00:26:34 +0000
commitcf054bce6862d043381f82865c46f308182a5568 (patch)
tree18b88fa9cb247a97259d593c3e8535b6c6831de0 /gdb/std-regs.c
parent934aafc563dd674e1870201835fdb1643aa340b1 (diff)
downloadgdb-cf054bce6862d043381f82865c46f308182a5568.tar.gz
2003-05-02 Andrew Cagney <cagney@redhat.com>
* std-regs.c (value_of_builtin_frame_pc_reg): Delete #ifdef PC_REGNUM, re-indent. * stack.c (frame_info): Use "pc" for the name of get_frame_pc when PC_REGNUM isn't set.
Diffstat (limited to 'gdb/std-regs.c')
-rw-r--r--gdb/std-regs.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/gdb/std-regs.c b/gdb/std-regs.c
index 9f6f9acb109..93d5102661c 100644
--- a/gdb/std-regs.c
+++ b/gdb/std-regs.c
@@ -98,20 +98,19 @@ value_of_builtin_frame_fp_reg (struct frame_info *frame)
static struct value *
value_of_builtin_frame_pc_reg (struct frame_info *frame)
{
-#ifdef PC_REGNUM
if (PC_REGNUM >= 0)
return value_of_register (PC_REGNUM, frame);
-#endif
- {
- 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);
- else
- ADDRESS_TO_POINTER (builtin_type_void_data_ptr, buf,
- get_frame_pc (frame));
- return val;
- }
+ else
+ {
+ 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);
+ else
+ ADDRESS_TO_POINTER (builtin_type_void_data_ptr, buf,
+ get_frame_pc (frame));
+ return val;
+ }
}
static struct value *