Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA] Patch for THUMB skip_prologue code
@ 2002-01-18 15:49 Fred Fish
  2002-01-18 16:33 ` Michael Snyder
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Fred Fish @ 2002-01-18 15:49 UTC (permalink / raw)
  To: gdb-patches; +Cc: fnf

The current THUMB prologue skipping code does not stop until
it reaches either the end of the function, or an address that
is the function start address plus 40.  This patch fixes it.
The gdb testsuite results for thumb code after applying this
patch have the following diff:

  10694c10694
  < FAIL: gdb.base/nodebug.exp: running to middle in runto
  ---
  > PASS: gdb.base/nodebug.exp: backtrace from middle in nodebug.exp
  15907,15908c15907,15908
  < # of expected passes        7469
  < # of unexpected failures    104
  ---
  > # of expected passes        7470
  > # of unexpected failures    103

-Fred

============================================================

2002-01-18  Fred Fish  <fnf@redhat.com>

	* arm-tdep.c (thumb_skip_prologue): Quit scanning prologue
	when we have found all instructions we are looking for.

Index: arm-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/arm-tdep.c,v
retrieving revision 1.26
diff -u -p -r1.26 arm-tdep.c
--- arm-tdep.c	2002/01/09 18:07:48	1.26
+++ arm-tdep.c	2002/01/18 23:26:14
@@ -376,6 +376,10 @@ thumb_skip_prologue (CORE_ADDR pc, CORE_
 	{
 	  findmask |= 2;  /* setting of r7 found */
 	}
+      else if (findmask == (4+2+1))
+	{
+	  break;	/* We have found one of each type of prologue instruction */
+	}
       else
 	continue;	/* something in the prolog that we don't care about or some
 	  		   instruction from outside the prolog scheduled here for optimization */


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

* Re: [RFA] Patch for THUMB skip_prologue code
  2002-01-18 15:49 [RFA] Patch for THUMB skip_prologue code Fred Fish
@ 2002-01-18 16:33 ` Michael Snyder
  2002-01-20 16:33 ` Andrew Cagney
  2002-01-21  8:35 ` Fernando Nasser
  2 siblings, 0 replies; 4+ messages in thread
From: Michael Snyder @ 2002-01-18 16:33 UTC (permalink / raw)
  To: fnf; +Cc: gdb-patches

Fred Fish wrote:
> 
> The current THUMB prologue skipping code does not stop until
> it reaches either the end of the function, or an address that
> is the function start address plus 40.  This patch fixes it.
> The gdb testsuite results for thumb code after applying this
> patch have the following diff:
> 
>   10694c10694
>   < FAIL: gdb.base/nodebug.exp: running to middle in runto
>   ---
>   > PASS: gdb.base/nodebug.exp: backtrace from middle in nodebug.exp
>   15907,15908c15907,15908
>   < # of expected passes        7469
>   < # of unexpected failures    104
>   ---
>   > # of expected passes        7470
>   > # of unexpected failures    103
> 
> -Fred

Cool -- did you measure a marked performance increase?

> 
> ============================================================
> 
> 2002-01-18  Fred Fish  <fnf@redhat.com>
> 
>         * arm-tdep.c (thumb_skip_prologue): Quit scanning prologue
>         when we have found all instructions we are looking for.
> 
> Index: arm-tdep.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/arm-tdep.c,v
> retrieving revision 1.26
> diff -u -p -r1.26 arm-tdep.c
> --- arm-tdep.c  2002/01/09 18:07:48     1.26
> +++ arm-tdep.c  2002/01/18 23:26:14
> @@ -376,6 +376,10 @@ thumb_skip_prologue (CORE_ADDR pc, CORE_
>         {
>           findmask |= 2;  /* setting of r7 found */
>         }
> +      else if (findmask == (4+2+1))
> +       {
> +         break;        /* We have found one of each type of prologue instruction */
> +       }
>        else
>         continue;       /* something in the prolog that we don't care about or some
>                            instruction from outside the prolog scheduled here for optimization */


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

* Re: [RFA] Patch for THUMB skip_prologue code
  2002-01-18 15:49 [RFA] Patch for THUMB skip_prologue code Fred Fish
  2002-01-18 16:33 ` Michael Snyder
@ 2002-01-20 16:33 ` Andrew Cagney
  2002-01-21  8:35 ` Fernando Nasser
  2 siblings, 0 replies; 4+ messages in thread
From: Andrew Cagney @ 2002-01-20 16:33 UTC (permalink / raw)
  To: Scott Bambrough, Fernando Nasser; +Cc: fnf, gdb-patches

FYI,



> The current THUMB prologue skipping code does not stop until
> it reaches either the end of the function, or an address that
> is the function start address plus 40.  This patch fixes it.
> The gdb testsuite results for thumb code after applying this
> patch have the following diff:
> 
>   10694c10694
>   < FAIL: gdb.base/nodebug.exp: running to middle in runto
>   ---
>   > PASS: gdb.base/nodebug.exp: backtrace from middle in nodebug.exp
>   15907,15908c15907,15908
>   < # of expected passes        7469
>   < # of unexpected failures    104
>   ---
>   > # of expected passes        7470
>   > # of unexpected failures    103
> 
> -Fred
> 
> ============================================================
> 
> 2002-01-18  Fred Fish  <fnf@redhat.com>
> 
> * arm-tdep.c (thumb_skip_prologue): Quit scanning prologue
> 	when we have found all instructions we are looking for.
> 
> Index: arm-tdep.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/arm-tdep.c,v
> retrieving revision 1.26
> diff -u -p -r1.26 arm-tdep.c
> --- arm-tdep.c	2002/01/09 18:07:48	1.26
> +++ arm-tdep.c	2002/01/18 23:26:14
> @@ -376,6 +376,10 @@ thumb_skip_prologue (CORE_ADDR pc, CORE_
>  	{
>  	  findmask |= 2;  /* setting of r7 found */
>  	}
> +      else if (findmask == (4+2+1))
> +	{
> +	  break;	/* We have found one of each type of prologue instruction */
> +	}
>        else
>  	continue;	/* something in the prolog that we don't care about or some
>  	  		   instruction from outside the prolog scheduled here for optimization */
> 
> 



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

* Re: [RFA] Patch for THUMB skip_prologue code
  2002-01-18 15:49 [RFA] Patch for THUMB skip_prologue code Fred Fish
  2002-01-18 16:33 ` Michael Snyder
  2002-01-20 16:33 ` Andrew Cagney
@ 2002-01-21  8:35 ` Fernando Nasser
  2 siblings, 0 replies; 4+ messages in thread
From: Fernando Nasser @ 2002-01-21  8:35 UTC (permalink / raw)
  To: fnf; +Cc: gdb-patches

Auch!  Please check it in.

Thanks for the patch.

Regards,
Fernando


Fred Fish wrote:
> 
> The current THUMB prologue skipping code does not stop until
> it reaches either the end of the function, or an address that
> is the function start address plus 40.  This patch fixes it.
> The gdb testsuite results for thumb code after applying this
> patch have the following diff:
> 
>   10694c10694
>   < FAIL: gdb.base/nodebug.exp: running to middle in runto
>   ---
>   > PASS: gdb.base/nodebug.exp: backtrace from middle in nodebug.exp
>   15907,15908c15907,15908
>   < # of expected passes        7469
>   < # of unexpected failures    104
>   ---
>   > # of expected passes        7470
>   > # of unexpected failures    103
> 
> -Fred
> 
> ============================================================
> 
> 2002-01-18  Fred Fish  <fnf@redhat.com>
> 
>         * arm-tdep.c (thumb_skip_prologue): Quit scanning prologue
>         when we have found all instructions we are looking for.
> 
> Index: arm-tdep.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/arm-tdep.c,v
> retrieving revision 1.26
> diff -u -p -r1.26 arm-tdep.c
> --- arm-tdep.c  2002/01/09 18:07:48     1.26
> +++ arm-tdep.c  2002/01/18 23:26:14
> @@ -376,6 +376,10 @@ thumb_skip_prologue (CORE_ADDR pc, CORE_
>         {
>           findmask |= 2;  /* setting of r7 found */
>         }
> +      else if (findmask == (4+2+1))
> +       {
> +         break;        /* We have found one of each type of prologue instruction */
> +       }
>        else
>         continue;       /* something in the prolog that we don't care about or some
>                            instruction from outside the prolog scheduled here for optimization */

-- 
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9


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

end of thread, other threads:[~2002-01-21 16:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-18 15:49 [RFA] Patch for THUMB skip_prologue code Fred Fish
2002-01-18 16:33 ` Michael Snyder
2002-01-20 16:33 ` Andrew Cagney
2002-01-21  8:35 ` Fernando Nasser

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