Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA] Improve rs6000-tdep.c prologue skipping
@ 2004-11-24 17:43 Fred Fish
  2004-11-24 18:11 ` Kevin Buettner
  0 siblings, 1 reply; 2+ messages in thread
From: Fred Fish @ 2004-11-24 17:43 UTC (permalink / raw)
  To: gdb-patches; +Cc: fnf

Recently there was some discussion about the handling of prologues, with
some good long term suggestions.  But I wanted to see if any significant
improvements could be made in the powerpc-eabi target I'm working on, so
I've been digging around in the prologue handling code in rs6000-tdep.c.

The attached patch makes a dramatic difference in the number of testsuite
failures for the powerpc-eabi tests:

  < # of expected passes        8558
  < # of unexpected failures    288
  < # of known failures         25
  ---
  > # of expected passes        8719
  > # of unexpected failures    125
  > # of known failures         27

(Note I suppressed the running of the gdbtk tests completely so your
numbers may vary)

-Fred


2004-11-24  Fred Fish  <fnf@specifixinc.com>

 * rs6000-tdep.c (skip_prologue): Use line table info to skip over
 compiler generated function calls made as part of a prologue.

Index: rs6000-tdep.c
===================================================================
RCS file: /cvs/src/src/gdb/rs6000-tdep.c,v
retrieving revision 1.232
diff -c -p -r1.232 rs6000-tdep.c
*** rs6000-tdep.c 12 Nov 2004 21:45:07 -0000 1.232
--- rs6000-tdep.c 24 Nov 2004 17:34:30 -0000
*************** skip_prologue (CORE_ADDR pc, CORE_ADDR l
*** 1048,1056 ****
  
     fdata->frameless = 0;
     /* Don't skip over the subroutine call if it is not within
!       the first three instructions of the prologue.  */
     if ((pc - orig_pc) > 8)
!      break;
  
     op = read_memory_integer (pc + 4, 4);
  
--- 1048,1065 ----
  
     fdata->frameless = 0;
     /* Don't skip over the subroutine call if it is not within
!       the first three instructions of the prologue and either
!       we have no line table information or the line info tells
!       us that the subroutine call is not part of the line
!       associated with the prologue.  */
     if ((pc - orig_pc) > 8)
!      {
!        struct symtab_and_line prologue_sal = find_pc_line (orig_pc, 0);
!        struct symtab_and_line this_sal = find_pc_line (pc, 0);
! 
!        if ((prologue_sal.line == 0) || (prologue_sal.line != this_sal.line))
!   break;
!      }
  
     op = read_memory_integer (pc + 4, 4);
  


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

end of thread, other threads:[~2004-11-24 18:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-24 17:43 [RFA] Improve rs6000-tdep.c prologue skipping Fred Fish
2004-11-24 18:11 ` Kevin Buettner

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