From: Andrew Cagney <cagney@gnu.org>
To: Kevin Buettner <kevinb@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA] inside_entry_func() related changes
Date: Sat, 22 Nov 2003 13:47:00 -0000 [thread overview]
Message-ID: <3FBF68FE.8070409@gnu.org> (raw)
In-Reply-To: <1031122000931.ZM22440@localhost.localdomain>
> This patch changes the implementation of inside_entry_func() so that
> the entry_func_{low,high}pc fields are not used.
>
> It also enables the inside_entry_func() test within frame.c because
> I need this to work for FR-V. (Note that a previous patch removed
> the inside_entry_func() call from frv-tdep.c.)
Kevin,
Re my comment:
> - /* NOTE: cagney/2003-02-25: Don't enable until someone has found
> - hard evidence that this is needed. */
The revised patch I posted:
http://sources.redhat.com/ml/gdb-patches/2003-11/msg00441.html
contains the test:
- && inside_entry_func (get_frame_pc (this_frame)))
+#if 0
+ && get_frame_func (this_frame) == entry_point_address ()
+#endif
(be it in a one line function or inline, what ever) while the patch
you've proposed also introduces the additional checks:
> if (pc == 0)
> return 1;
and:
> if (CALL_DUMMY_LOCATION == AT_ENTRY_POINT)
> {
> /* Do not stop backtracing if the pc is in the call dummy
> at the entry point. */
> /* FIXME: Won't always work with zeros for the last two arguments */
> if (DEPRECATED_PC_IN_CALL_DUMMY (pc, 0, 0))
> return 0;
> }
Rather than doing this (I assume that your frv test doesn't provide
evidence supporting their introduction and this was unintentional), why
not add a one-line function containing just the minimal test and then
call that from get_prev_frame?
Note that, per MarkK's comment:
/* Make sure we pass an address within THIS_FRAME's code block to
inside_main_func. Otherwise, we might stop unwinding at a
function which has a call instruction as its last instruction if
that function immediately precedes main(). */
so a test based on get_frame_pc won't work. Also a call to
entry_point_address() is preferable to to a reference to the global
variable.
Daniel mentioned the doco, what about a testcase for just this?
> (gdb) bt
> #0 factorial (value=5)
> at /ocotillo2/devo-frv/frv-elf/bld/../../devo/gdb/testsuite/gdb.base/break.c:96
> #1 0x00010574 in factorial (value=6)
> at /ocotillo2/devo-frv/frv-elf/bld/../../devo/gdb/testsuite/gdb.base/break.c:97
> #2 0x000104c0 in main (argc=0, argv=0x0, envp=0x0)
> at /ocotillo2/devo-frv/frv-elf/bld/../../devo/gdb/testsuite/gdb.base/break.c:79
> (gdb) set backtrace past-main
> (gdb) bt
> #0 factorial (value=5)
> at /ocotillo2/devo-frv/frv-elf/bld/../../devo/gdb/testsuite/gdb.base/break.c:96
> #1 0x00010574 in factorial (value=6)
> at /ocotillo2/devo-frv/frv-elf/bld/../../devo/gdb/testsuite/gdb.base/break.c:97
> #2 0x000104c0 in main (argc=0, argv=0x0, envp=0x0)
> at /ocotillo2/devo-frv/frv-elf/bld/../../devo/gdb/testsuite/gdb.base/break.c:79
> #3 0x00010118 in _start ()
Andrew
next prev parent reply other threads:[~2003-11-22 13:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-22 0:09 Kevin Buettner
2003-11-22 0:34 ` Daniel Jacobowitz
2003-11-22 13:47 ` Andrew Cagney [this message]
2004-02-04 16:47 ` Daniel Jacobowitz
2004-02-04 17:03 ` Andrew Cagney
2004-02-04 18:40 ` Eli Zaretskii
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=3FBF68FE.8070409@gnu.org \
--to=cagney@gnu.org \
--cc=gdb-patches@sources.redhat.com \
--cc=kevinb@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