Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
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, 16 Jun 2004 17:33:00 -0000	[thread overview]
Message-ID: <40D08438.8090009@gnu.org> (raw)
In-Reply-To: <200406161348.PAA04636@faui1m.informatik.uni-erlangen.de>

> Andrew Cagney wrote:
> 
> 
>>> 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.
> 
> 
> The following patch adds bits to the struct frame_id that explicitly
> state whether each of the stack, code, or special addresses is valid.
> This removes the need to choose one particular address value to 
> signify the 'invalid/wildcard/...' state.
> 
> It also adds the frame_id_build_wild function you suggested.
> 
> However, it changes the behaviour in that nobody actually calls _wild
> at the moment, since I wasn't sure at what places the code address
> actually can be unknown right now.  Those places would need to be
> adapted later, if required.

Right.  To find them you'd have to analize all the code paths involving 
zero values being returned from the symbol table - outch!  As found they 
can be updated (and likely also fix the symtab interface).

I should note that I did see such calls in the wild[groan] but only 
while fixing bugs during a frame conversion.

> Tested on s390-ibm-linux and s390x-ibm-linux, fixes the signull
> test case failure.

Yes with some tweaks:

Change s/..._valid/..._p/:
It's a consistent, but slightly wierd, naming convention

Add some sort of qualifying remark (what, I don't care) to each of the 
comments:
   /* The frame's code address.  This shall be constant through out the
      lifetime of the frame.  While the PC (a.k.a. resume address)
so that its clear that the value is predicated by ..._p.

Initialize the id to null vis:
   struct frame_id id = null_frame_id;
   id.stack_addr = stack_addr;
   id.stack_addr_valid = 1;
   id.code_addr = code_addr;
   id.code_addr_valid = 1;
so that the code is more likely to be future proof.

Extend this comment:
!   if (!l.stack_addr_valid || !r.stack_addr_valid)
       /* Like a NaN, if either ID is invalid, the result is false.  */
to mention that since a null_frame_id is always invalid it always trips 
up on that test.

with those changes its ok,

Thanks!
Andrew




  reply	other threads:[~2004-06-16 17:33 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
2004-06-16 13:48           ` Ulrich Weigand
2004-06-16 17:33             ` Andrew Cagney [this message]
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=40D08438.8090009@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