public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] gdb/arm: Don't use special treatment for PC
@ 2022-05-31 13:47 Yvan Roux
  2022-06-01 10:00 ` Luis Machado
  0 siblings, 1 reply; 2+ messages in thread
From: Yvan Roux @ 2022-05-31 13:47 UTC (permalink / raw)
  To: gdb-patches, Luis Machado; +Cc: Torbjorn SVENSSON

Hi,

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 | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
index 49664093f00..4ef10ec214d 100644
--- a/gdb/arm-tdep.c
+++ b/gdb/arm-tdep.c
@@ -3558,15 +3558,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);
 }
-- 
2.17.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] gdb/arm: Don't use special treatment for PC
  2022-05-31 13:47 [PATCH] gdb/arm: Don't use special treatment for PC Yvan Roux
@ 2022-06-01 10:00 ` Luis Machado
  0 siblings, 0 replies; 2+ messages in thread
From: Luis Machado @ 2022-06-01 10:00 UTC (permalink / raw)
  To: Yvan Roux, gdb-patches; +Cc: Torbjorn SVENSSON

On 5/31/22 14:47, Yvan Roux wrote:
> Hi,
> 
> 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 | 9 ---------
>   1 file changed, 9 deletions(-)
> 
> diff --git a/gdb/arm-tdep.c b/gdb/arm-tdep.c
> index 49664093f00..4ef10ec214d 100644
> --- a/gdb/arm-tdep.c
> +++ b/gdb/arm-tdep.c
> @@ -3558,15 +3558,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);
>   }

Thanks. This is OK as well.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-06-01 10:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-31 13:47 [PATCH] gdb/arm: Don't use special treatment for PC Yvan Roux
2022-06-01 10:00 ` Luis Machado

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).