Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@redhat.com>
To: Andrew Cagney <ac131313@redhat.com>, Jim Blandy <jimb@redhat.com>
Cc: gdb@sources.redhat.com
Subject: Re: IBM S/390 prologue analysis revisited
Date: Tue, 01 Jul 2003 12:28:00 -0000	[thread overview]
Message-ID: <3F017E6B.90003@redhat.com> (raw)
In-Reply-To: <3F00DC8C.5040908@redhat.com>

> You mean: [just for the record]: new prologue analyzer for S/390
> http://sources.redhat.com/ml/gdb-patches/2003-04/msg00352.html

One PS,

Since this was posted (but you'd declined to commit) I added 
trad-frame.[hc].  This provides functionality that overlaps what is 
found in the s390 patch (it's slightly more compact).

> /* A traditional saved regs table, indexed by REGNUM, encoding where
>    the value of REGNUM for the previous frame can be found in this
>    frame.
> 
>    The table is initialized with an identity encoding (ADDR == -1,
>    REALREG == REGNUM) indicating that the value of REGNUM in the
>    previous frame can be found in register REGNUM (== REALREG) in this
>    frame.
> 
>    The initial encoding can then be changed:
> 
>    Modify ADDR (REALREG >= 0, ADDR != -1) to indicate that the value
>    of register REGNUM in the previous frame can be found in memory at
>    ADDR in this frame (addr_p, !realreg_p, !value_p).
> 
>    Modify REALREG (REALREG >= 0, ADDR == -1) to indicate that the
>    value of register REGNUM in the previous frame is found in register
>    REALREG in this frame (!addr_p, realreg_p, !value_p).
> 
>    Call trad_frame_register_value (REALREG == -1) to indicate that the
>    value of register REGNUM in the previous frame is found in ADDR
>    (!addr_p, !realreg_p, value_p).  */

Editor note: It's missing the undefined state.  I'll add it.

> struct trad_frame_saved_reg
> {
>   LONGEST addr; /* A CORE_ADDR fits in a longest.  */
>   int realreg;
> };
> 

Vs:

> ! struct prologue_value {
> ! 
> !   /* What sort of value is this?  This determines the interpretation
> !      of subsequent fields.  */
> !   enum {
> ! 
> !     /* We don't know anything about the value.  This is also used for
> !        values we could have kept track of, when doing so would have
> !        been too complex and we don't want to bother.  The bottom of
> !        our lattice.  */
> !     pv_unknown,
> ! 
> !     /* A known constant.  K is its value.  */
> !     pv_constant,
> ! 
> !     /* The value that register REG originally had *UPON ENTRY TO THE
> !        FUNCTION*, plus K.  If K is zero, this means, obviously, just
> !        the value REG had upon entry to the function.  REG is a GDB
> !        register number.  Before we start interpreting, we initialize
> !        every register R to { pv_register, R, 0 }.  */
> !     pv_register,
> ! 
> !   } kind;
> ! 
> !   /* The meanings of the following fields depend on 'kind'; see the
> !      comments for the specific 'kind' values.  */
> !   int reg;
> !   CORE_ADDR k;
> ! };

Given I'm, in the background, converting the old unwinders to the 
trad-frame framework (I've an i386 patch in my sandbox), it would 
probably be a good idea to merge the two.

(note that I need to commit the above revised version to trunk and branch)

enjoy,
Andrew



  reply	other threads:[~2003-07-01 12:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <vt2d6gv2lt3.fsf@zenia.home>
     [not found] ` <1030630233621.ZM27669@localhost.localdomain>
2003-07-01  0:14   ` Elena Zannoni
2003-07-01  0:57 ` Andrew Cagney
2003-07-01 12:28   ` Andrew Cagney [this message]
2003-07-02  0:06     ` Jim Blandy
2003-07-02 18:33       ` Andrew Cagney
2003-07-02 19:20         ` Daniel Jacobowitz
2003-07-01 22:51   ` Jim Blandy

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=3F017E6B.90003@redhat.com \
    --to=ac131313@redhat.com \
    --cc=gdb@sources.redhat.com \
    --cc=jimb@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