From 395f2fc22d0bfcc4c994f33266ef1d21444d754a Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Mon, 30 Jun 2008 14:00:38 +0000 Subject: [PATCH] * cris-tdep.c (crisv32_single_step_through_delay): Get this frame's register, not the previous frame's. --- gdb/ChangeLog | 5 +++++ gdb/cris-tdep.c | 11 ++--------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index cea722e1013..6dcb3cd6b31 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2008-06-30 Daniel Jacobowitz + + * cris-tdep.c (crisv32_single_step_through_delay): Get this frame's + register, not the previous frame's. + 2008-06-30 Luis Machado * source.c (select_source_symtab): Make sure we skip namespace diff --git a/gdb/cris-tdep.c b/gdb/cris-tdep.c index 12ef1499908..d2c0c2ca63a 100644 --- a/gdb/cris-tdep.c +++ b/gdb/cris-tdep.c @@ -474,18 +474,11 @@ crisv32_single_step_through_delay (struct gdbarch *gdbarch, struct gdbarch_tdep *tdep = gdbarch_tdep (gdbarch); ULONGEST erp; int ret = 0; - char buf[4]; if (cris_mode () == cris_mode_guru) - { - frame_unwind_register (this_frame, NRP_REGNUM, buf); - } + erp = get_frame_register_unsigned (this_frame, NRP_REGNUM); else - { - frame_unwind_register (this_frame, ERP_REGNUM, buf); - } - - erp = extract_unsigned_integer (buf, 4); + erp = get_frame_register_unsigned (this_frame, ERP_REGNUM); if (erp & 0x1) { -- 2.30.2