Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: "Sean D'Epagnier" <geckosenator@gmail.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [patch] add support for debugging fixed-point numbers
Date: Wed, 07 Jan 2009 19:56:00 -0000	[thread overview]
Message-ID: <m3bpui51r6.fsf@fleche.redhat.com> (raw)
In-Reply-To: <b9d4feda0812311245m3e7143bnc8760b0b2b8dc97f@mail.gmail.com> (Sean D'Epagnier's message of "Wed\, 31 Dec 2008 14\:45\:44 -0600")

>>>>> "Sean" == Sean D'Epagnier <geckosenator@gmail.com> writes:

Sean> Thanks so much for reviewing my patch.  I am sorry for all the
Sean> inconsistencies, I will do my best to correct them, more comments
Sean> below.

Oh, don't be sorry... the coding standard is just a little hurdle
everybody has to get over when they first contribute, not a big deal.

Tom> I am not really that familiar with the fixed-point extension to C.  My
Tom> understanding is that some of the types saturate -- but I didn't see
Tom> any code here related to saturation.  Am I missing something?

Sean> If the type is _Sat, then it is a saturating type.  I did not have any
Sean> support for this, however there is currently no way for me to know if
Sean> a variable is a saturating type (nothing in the dwarf format
Sean> specifying it)  So gdb might be inconsistent in the sense that if you
Sean> add a number to a saturating variable ie: "p x+.5" and x saturates,
Sean> then gdb won't know to saturate it, but unless we add more fields to
Sean> dwarf specifying this.  What do you suggest we do about this?  At
Sean> least you can examine saturating values correctly.

This sounds like a Dwarf oversight to me.  Perhaps we can either get
something officially defined here (I don't know how to do that,
though), or define a GNU extension.  I think that, at least, this
ought to be filed as a GCC bug, and maybe a GDB bug as well, once your
patch goes in.

IMO, the absence of this information should not block your patch.

Sean> I also noticed what seems to be a quirk in gdb.  Maybe you have some
Sean> insight.  If you launch gdb and type something like:
Sean> (gdb) p ((unsigned _Accum)- 1)
Sean> $7 = -1
Sean> (gdb) p ((unsigned int)- 1)
Sean> $8 = 65535
[...]

Offhand, I have no idea what is going on here, sorry.

Sean> I'm not sure which is best, to try to add fixed-point support to stabs
Sean> format too, or to make gdb read the types from the dwarf format in
Sean> this case (or maybe both)

I also have no idea about this :).  I don't know anything about stabs,
I'm afraid.

Tom


  parent reply	other threads:[~2009-01-07 19:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-30  1:41 Sean D'Epagnier
2008-12-30 20:01 ` Tom Tromey
2008-12-31 20:46   ` Sean D'Epagnier
2009-01-06  4:40     ` Joel Brobecker
2009-01-07 19:56     ` Tom Tromey [this message]
2009-01-20  3:45       ` Joel Brobecker

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=m3bpui51r6.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=geckosenator@gmail.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