[arm] Don't use special treatment for PC
authorYvan Roux <yvan.roux@foss.st.com>
Wed, 1 Jun 2022 11:08:00 +0000 (11:08 +0000)
committerLuis Machado <luis.machado@arm.com>
Wed, 1 Jun 2022 10:14:39 +0000 (11:14 +0100)
In an exception frame the PC register is extracted from the stack
just like other base registers, so there is no need for a special
treatment.

Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@st.com>
Signed-off-by: Yvan Roux <yvan.roux@foss.st.com>
gdb/arm-tdep.c

index 5fbd730c5a5adb999610dfdf443a370b8ac31ee2..50ec41a66b1f9802c03d9af6dba40cde8bd1d11f 100644 (file)
@@ -3559,15 +3559,6 @@ arm_m_exception_prev_register (struct frame_info *this_frame,
       return frame_unwind_got_constant (this_frame, prev_regnum, sp_value);
     }
 
-  if (prev_regnum == ARM_PC_REGNUM)
-    {
-      CORE_ADDR lr = frame_unwind_register_unsigned (this_frame, ARM_LR_REGNUM);
-      struct gdbarch *gdbarch = get_frame_arch (this_frame);
-
-      return frame_unwind_got_constant (this_frame, prev_regnum,
-                                       arm_addr_bits_remove (gdbarch, lr));
-    }
-
   return trad_frame_get_prev_register (this_frame, cache->saved_regs,
                                       prev_regnum);
 }