Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA] arm_skip_prologue: recognize "str r(0123), [r11, #-nn]"
@ 2002-04-22 16:29 Michael Snyder
  2002-04-23  2:36 ` Richard Earnshaw
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Snyder @ 2002-04-22 16:29 UTC (permalink / raw)
  To: gdb-patches; +Cc: cagney, rearnsha


GCC sometimes generates these stores as discrete instructions.

2002-04-22  Michael Snyder  <msnyder@redhat.com>

	* arm-tdep.c (arm_skip_prologue): Recognize str r(0123), [r11, #-nn].

Index: arm-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/arm-tdep.c,v
retrieving revision 1.51
diff -p -r1.51 arm-tdep.c
*** arm-tdep.c	22 Apr 2002 23:22:04 -0000	1.51
--- arm-tdep.c	22 Apr 2002 23:27:36 -0000
*************** arm_skip_prologue (CORE_ADDR pc)
*** 485,491 ****
      }
  
    if ((inst & 0xfffff000) == 0xe24cb000)	/* sub fp, ip, #nn */
!     skip_pc += 4;
  
    return skip_pc;
  }
--- 485,500 ----
      }
  
    if ((inst & 0xfffff000) == 0xe24cb000)	/* sub fp, ip, #nn */
!     {
!       skip_pc += 4;
!       inst = read_memory_integer (skip_pc, 4);
!     }
! 
!   while ((inst & 0xffffcfc0) == 0xe50b0000)     /* str r(0123), [r11, #-nn] */
!     {
!       skip_pc += 4;
!       inst = read_memory_integer (skip_pc, 4);
!     }
  
    return skip_pc;
  }


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

* Re: [RFA] arm_skip_prologue: recognize "str r(0123), [r11, #-nn]"
  2002-04-22 16:29 [RFA] arm_skip_prologue: recognize "str r(0123), [r11, #-nn]" Michael Snyder
@ 2002-04-23  2:36 ` Richard Earnshaw
  2002-04-23  2:55   ` Richard Earnshaw
  2002-04-23 10:46   ` Michael Snyder
  0 siblings, 2 replies; 7+ messages in thread
From: Richard Earnshaw @ 2002-04-23  2:36 UTC (permalink / raw)
  To: Michael Snyder; +Cc: gdb-patches, cagney, rearnsha

> 
> GCC sometimes generates these stores as discrete instructions.
> 
> 2002-04-22  Michael Snyder  <msnyder@redhat.com>
> 
> 	* arm-tdep.c (arm_skip_prologue): Recognize str r(0123), [r11, #-nn].
> 

Are you sure these should really be considered part of the prologue?




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

* Re: [RFA] arm_skip_prologue: recognize "str r(0123), [r11, #-nn]"
  2002-04-23  2:36 ` Richard Earnshaw
@ 2002-04-23  2:55   ` Richard Earnshaw
  2002-04-23 10:47     ` Michael Snyder
  2002-04-23 10:46   ` Michael Snyder
  1 sibling, 1 reply; 7+ messages in thread
From: Richard Earnshaw @ 2002-04-23  2:55 UTC (permalink / raw)
  To: Michael Snyder; +Cc: gdb-patches, cagney, rearnsha

> > 
> > GCC sometimes generates these stores as discrete instructions.
> > 
> > 2002-04-22  Michael Snyder  <msnyder@redhat.com>
> > 
> > 	* arm-tdep.c (arm_skip_prologue): Recognize str r(0123), [r11, #-nn].
> > 
> 
> Are you sure these should really be considered part of the prologue?
> 
> 
> 

Ok, here's how I think we should consider this.

If a DWARF-encoded sequence would consider these as part of the prologue 
(ie they are described as prologue instructions, then the unwinder should 
consider them similarly.  If, however, it considers them as part of the 
function body then the manual unwinder should also do so.

If the latter is correct, then we should also handle storing into the 
stack so that we can also handle frameless functions.

R.


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

* Re: [RFA] arm_skip_prologue: recognize "str r(0123), [r11, #-nn]"
  2002-04-23  2:36 ` Richard Earnshaw
  2002-04-23  2:55   ` Richard Earnshaw
@ 2002-04-23 10:46   ` Michael Snyder
  1 sibling, 0 replies; 7+ messages in thread
From: Michael Snyder @ 2002-04-23 10:46 UTC (permalink / raw)
  To: Richard.Earnshaw; +Cc: Michael Snyder, gdb-patches, cagney, rearnsha

Richard Earnshaw wrote:
> 
> >
> > GCC sometimes generates these stores as discrete instructions.
> >
> > 2002-04-22  Michael Snyder  <msnyder@redhat.com>
> >
> >       * arm-tdep.c (arm_skip_prologue): Recognize str r(0123), [r11, #-nn].
> >
> 
> Are you sure these should really be considered part of the prologue?

Yes, they are copying the args registers onto the stack.


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

* Re: [RFA] arm_skip_prologue: recognize "str r(0123), [r11, #-nn]"
  2002-04-23  2:55   ` Richard Earnshaw
@ 2002-04-23 10:47     ` Michael Snyder
  2002-04-24  2:08       ` Richard Earnshaw
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Snyder @ 2002-04-23 10:47 UTC (permalink / raw)
  To: Richard.Earnshaw; +Cc: Michael Snyder, gdb-patches, cagney, rearnsha

Richard Earnshaw wrote:
> 
> > >
> > > GCC sometimes generates these stores as discrete instructions.
> > >
> > > 2002-04-22  Michael Snyder  <msnyder@redhat.com>
> > >
> > >     * arm-tdep.c (arm_skip_prologue): Recognize str r(0123), [r11, #-nn].
> > >
> >
> > Are you sure these should really be considered part of the prologue?
> >
> >
> >
> 
> Ok, here's how I think we should consider this.
> 
> If a DWARF-encoded sequence would consider these as part of the prologue
> (ie they are described as prologue instructions, then the unwinder should
> consider them similarly.  If, however, it considers them as part of the
> function body then the manual unwinder should also do so.

Richard, 

This disassembly method is only invoked if there is no dwarf info.
If we do have line numbers etc, we use those by preference.
So when we are disassembling, we cannot rely on hints from the
debug info.

I have confirmed that, when there is debug info, 
these instructions are lumped with the prologue.

> 
> If the latter is correct, then we should also handle storing into the
> stack so that we can also handle frameless functions.
> 
> R.


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

* Re: [RFA] arm_skip_prologue: recognize "str r(0123), [r11, #-nn]"
  2002-04-23 10:47     ` Michael Snyder
@ 2002-04-24  2:08       ` Richard Earnshaw
  2002-04-24 14:23         ` Michael Snyder
  0 siblings, 1 reply; 7+ messages in thread
From: Richard Earnshaw @ 2002-04-24  2:08 UTC (permalink / raw)
  To: Michael Snyder
  Cc: Richard.Earnshaw, Michael Snyder, gdb-patches, cagney, rearnsha


msnyder@redhat.com said:
> I have confirmed that, when there is debug info,  these instructions
> are lumped with the prologue. 

Ok, then as you suggest, they should be included by the manual prologue 
groveller code.

R.


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

* Re: [RFA] arm_skip_prologue: recognize "str r(0123), [r11, #-nn]"
  2002-04-24  2:08       ` Richard Earnshaw
@ 2002-04-24 14:23         ` Michael Snyder
  0 siblings, 0 replies; 7+ messages in thread
From: Michael Snyder @ 2002-04-24 14:23 UTC (permalink / raw)
  To: Richard.Earnshaw; +Cc: Michael Snyder, gdb-patches, cagney, rearnsha

Richard Earnshaw wrote:
> 
> msnyder@redhat.com said:
> > I have confirmed that, when there is debug info,  these instructions
> > are lumped with the prologue.
> 
> Ok, then as you suggest, they should be included by the manual prologue
> groveller code.

Committed.


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

end of thread, other threads:[~2002-04-24 21:23 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-22 16:29 [RFA] arm_skip_prologue: recognize "str r(0123), [r11, #-nn]" Michael Snyder
2002-04-23  2:36 ` Richard Earnshaw
2002-04-23  2:55   ` Richard Earnshaw
2002-04-23 10:47     ` Michael Snyder
2002-04-24  2:08       ` Richard Earnshaw
2002-04-24 14:23         ` Michael Snyder
2002-04-23 10:46   ` Michael Snyder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox