This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[RFA] Improve rs6000-tdep.c prologue skipping
- From: Fred Fish <fnf at specifixinc dot com>
- To: gdb-patches at sources dot redhat dot com
- Cc: fnf at specifixinc dot com
- Date: Wed, 24 Nov 2004 10:43:32 -0700
- Subject: [RFA] Improve rs6000-tdep.c prologue skipping
- Organization: Specifix Inc
- Reply-to: fnf at specifixinc dot com
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);