From: Andrew Cagney <cagney@gnu.org>
To: Ulrich Weigand <weigand@i1.informatik.uni-erlangen.de>
Cc: Daniel Jacobowitz <drow@false.org>, gdb-patches@sources.redhat.com
Subject: Re: [PATCH] Fix frame ID comparison problem on s390
Date: Wed, 09 Jun 2004 14:55:00 -0000 [thread overview]
Message-ID: <40C724DC.1040306@gnu.org> (raw)
In-Reply-To: <200406091412.QAA01440@faui1d.informatik.uni-erlangen.de>
> Andrew Cagney wrote:
>
>
>>> Symbol table code often returns 0 to indicate a failed lookup (here a
>>> search for the function containing pc). That zero can end up in the
>>> frame ID. Look at calls to get_frame_func / frame_func_unwind (which
>>> I've proposed eliminating).
>>>
>>> From memory architectures that do not implement dummy ID unwind also
>>> end up with wild-card IDs (fortunatly the dummy-frame code works around
>>> this).
>>>
>>> Broken tramp unwinders often leave the .code address zero (see paragraph
>>> #1 for why).
>
>
> So, what would you recommend to solve the problem of 'wildcard zero pc'
> being confused with 'NULL pointer call'? Is my original back-end hack
> OK with or, or do you have another target-independent suggestion?
No. Not really.
The wild card mechanism is needed (for when the function entry point
address isn't known) but it needs to be made more robust. One step on
that path would be to extend the build interface:
> /* Construct a frame ID. The first parameter is the frame's constant
> stack address (typically the outer-bound), and the second the
> frame's constant code address (typically the entry point) (or zero,
> to indicate a wild card). The special identifier address is
> defaulted to zero. */
> extern struct frame_id frame_id_build (CORE_ADDR stack_addr,
> CORE_ADDR code_addr);
>
> /* Construct a special frame ID. The first parameter is the frame's constant
> stack address (typically the outer-bound), the second is the
> frame's constant code address (typically the entry point) (or zero,
> to indicate a wild card), and the third parameter is the frame's
> special identifier address (or zero to indicate a wild card or
> unused default). */
> extern struct frame_id frame_id_build_special (CORE_ADDR stack_addr,
> CORE_ADDR code_addr,
> CORE_ADDR special_addr);
with something like:
> extern struct frame_id frame_id_build_wild (CORE_ADDR stack_addr);
That way clients would explicitly build a wild-card frame ID, and the
frame code was free to implement that mechanism anyway it saw fit.
Andrew
next prev parent reply other threads:[~2004-06-09 14:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-20 13:31 Ulrich Weigand
2004-05-20 14:17 ` Daniel Jacobowitz
2004-05-24 13:45 ` Ulrich Weigand
2004-05-24 18:52 ` Andrew Cagney
2004-06-09 14:12 ` Ulrich Weigand
2004-06-09 14:55 ` Andrew Cagney [this message]
2004-06-16 13:48 ` Ulrich Weigand
2004-06-16 17:33 ` Andrew Cagney
2004-06-27 20:48 ` Ulrich Weigand
2004-06-27 21:48 ` Daniel Jacobowitz
2004-06-27 22:35 ` Ulrich Weigand
2004-06-27 22:59 ` Andreas Schwab
2004-06-27 23:11 ` Daniel Jacobowitz
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=40C724DC.1040306@gnu.org \
--to=cagney@gnu.org \
--cc=drow@false.org \
--cc=gdb-patches@sources.redhat.com \
--cc=weigand@i1.informatik.uni-erlangen.de \
/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