From: Fred Fish <fnf@specifixinc.com>
To: gdb-patches@sources.redhat.com
Cc: fnf@specifixinc.com
Subject: [RFA] Improve rs6000-tdep.c prologue skipping
Date: Wed, 24 Nov 2004 17:43:00 -0000 [thread overview]
Message-ID: <200411241043.32944.fnf@specifixinc.com> (raw)
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);
next reply other threads:[~2004-11-24 17:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-24 17:43 Fred Fish [this message]
2004-11-24 18:11 ` Kevin Buettner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200411241043.32944.fnf@specifixinc.com \
--to=fnf@specifixinc.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox