public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Richard Henderson <rth@redhat.com>,
	Jason Merrill <jason@redhat.com>,
	       Cary Coutant <ccoutant@google.com>,
	gcc-patches@gcc.gnu.org,
	       Roland McGrath <roland@hack.frob.com>,
	       Jan Kratochvil <jkratoch@redhat.com>,
	Mark Wielaard <mjw@redhat.com>
Subject: Re: [RFC PATCH] Typed DWARF stack
Date: Wed, 04 May 2011 18:22:00 -0000	[thread overview]
Message-ID: <m38vum1gw7.fsf@fleche.redhat.com> (raw)
In-Reply-To: <20110325113237.GY18914@tyan-ft48-01.lab.bos.redhat.com> (Jakub	Jelinek's message of "Fri, 25 Mar 2011 12:32:37 +0100")

>>>>> "Jakub" == Jakub Jelinek <jakub@redhat.com> writes:

Jakub> This patch on top of
Jakub> http://gcc.gnu.org/ml/gcc-patches/2011-03/msg01224.html
Jakub> and
Jakub> http://gcc.gnu.org/ml/gcc-patches/2011-03/msg01723.html
Jakub> implements parts of Cary's typed DWARF stack proposal:
Jakub> http://www.dwarfstd.org/doc/040408.1.html

I've been implementing this in GDB and I have a couple of questions.

Should DW_OP_bra be restricted to integral types?  Several other opcodes
are restricted in this way, and it seems like an oversight to me that
DW_OP_bra is lacking this restriction.  (I've added this restriction in
GDB.)

Currently, the comparison operators are all defined as performing signed
operations.  So, what should happen in this case:

   DW_OP_lit0
   DW_OP_GNU_convert <unsigned int>
   DW_OP_GNU_const_type <unsigned int> -1
   DW_OP_gt

That is, should this ignore the type (perhaps just using the type
width), or is this a bug in the spec?

Either answer here has problems.

You can't really ignore the type, because that rules out floating point
comparisons.  I suppose you could special-case integral types.

However, since "ordinary" (that is, pre-typed-DWARF) DWARF values do not
have a consistent type, I think answering "bug" means having a special
case for such values -- because they are treated as unsigned in most
places, but signed in a few, and signed/unsigned type conversion should
presumably only be done for such "typeless" values, not all values.

I think I will implement the latter ("bug") approach.

Tom

  parent reply	other threads:[~2011-05-04 18:05 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-25 11:33 Jakub Jelinek
2011-03-25 16:48 ` Roland McGrath
2011-03-28  9:25   ` Jakub Jelinek
2011-03-25 17:51 ` Cary Coutant
2011-04-16  9:28 ` [PATCH] " Jakub Jelinek
2011-04-29 21:01   ` Jason Merrill
2011-05-03 13:34   ` H.J. Lu
2011-05-08 18:57     ` H.J. Lu
2011-05-04 18:22 ` Tom Tromey [this message]
2011-05-04 18:30   ` [RFC PATCH] " Cary Coutant
2011-05-04 18:37   ` Jakub Jelinek
2011-05-04 20:27     ` Tom Tromey
2011-05-12 21:16       ` Tom Tromey
2011-05-12 21:37         ` Tom Tromey
2011-06-09 15:47 ` Typed DWARF stack and convert to untyped Jakub Jelinek
2011-06-09 18:34   ` Jakub Jelinek
2011-06-13 15:34   ` Tom Tromey

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=m38vum1gw7.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=ccoutant@google.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    --cc=jason@redhat.com \
    --cc=jkratoch@redhat.com \
    --cc=mjw@redhat.com \
    --cc=roland@hack.frob.com \
    --cc=rth@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).