From: David Taylor <taylor@cygnus.com>
To: gdb-patches@sourceware.cygnus.com
Subject: frameless_look_for_prologue
Date: Fri, 09 Mar 2001 06:50:00 -0000 [thread overview]
Message-ID: <200103091450.JAA05215@texas.cygnus.com> (raw)
I believe that every target that does:
set_gdbarch_frameless_function_invocation (gdbarch,
frameless_look_for_prologue);
has a bug.
The function frameless_look_for_prologue invokes PROLOGUE_FRAMELESS_P
with one argument -- the pc of the *START* of the function.
For backtraces, get_prev_frame wants to know not "does this function
eventually set up a frame if I execute far enough into it", but rather
"does this function have a frame at the point where the program has
currently stopped".
If the function has to execute some instructions to set up the frame
(and if it doesn't, why are you setting FRAMELESS_FUNCTION_INVOCATION
to frameless_look_for_prologue?), then those questions potentially
have different answers.
Potential solutions include:
. change the interface of PROLOGUE_FRAMELESS_P --
==> invoke it with the current pc, not the start pc
have it call get_pc_function_start
Pro: no namespace pollution; don't need to create yet
another macro / multi-arch function
Con: need to change the PROLOGUE_FRAMELESS_P functions for all
of the targets that currently set FRAMELESS_FUNCTION_INVOCATION
to frameless_look_for_prologue.
. create a new variant of PROLOGUE_FRAMELESS_P
==> either the new variant takes one argument (the current or
'limit' pc) and calls get_pc_function_start or it takes two
arguments (the start pc and the current/limit pc).
Pro: don't need to change existing targets
Con: creates yet another multi-arch macro / function; doesn't fix
a known bug in several existing targets.
My personal preference would be --
. a new variant of PROLOGUE_FRAMELESS_P which takes two arguments
. put a comment next to the old method saying that it is deprecated
and why and suggesting that people use the new method instead
. 'encourage' maintainers to fix existing targets
If people agree, I'll try to find the time in the next few days to put
together a patch.
Comments?
next reply other threads:[~2001-03-09 6:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-03-09 6:50 David Taylor [this message]
2001-03-09 12:55 ` frameless_look_for_prologue Andrew Cagney
2001-03-09 13:48 ` frameless_look_for_prologue Michael Snyder
2001-03-13 11:33 frameless_look_for_prologue David Taylor
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=200103091450.JAA05215@texas.cygnus.com \
--to=taylor@cygnus.com \
--cc=gdb-patches@sourceware.cygnus.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