Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Pedro Alves <palves@redhat.com>
Cc: tom@tromey.com, gdb-patches@sourceware.org
Subject: Re: [RFA 1/2] Fix two regressions in scalar printing
Date: Fri, 14 Jul 2017 15:20:00 -0000	[thread overview]
Message-ID: <83k23bf3kj.fsf@gnu.org> (raw)
In-Reply-To: <22c48f9e-ec2c-850d-91d3-c6a3ea8cdb11@redhat.com> (message from	Pedro Alves on Fri, 14 Jul 2017 15:56:27 +0100)

> From: Pedro Alves <palves@redhat.com>
> Date: Fri, 14 Jul 2017 15:56:27 +0100
> 
> The manual says:
> 
>  @item d
>  Print as integer in signed decimal.
> 
>  @item u
>  Print as integer in unsigned decimal.
> 
> And I see this with a gdb from before the recent print_scalar_formatted
> changes:
> 
>  (gdb) p /d (unsigned long long) -1
>  $1 = -1
> 
> while we see this with either current master, or your patch:
> 
>  (gdb) p /d (unsigned long long) -1
>  $1 = 18446744073709551615
> 
> which also doesn't look right to me.
> 
> And here:
> 
>  (gdb) p /d (unsigned) -1
>  $2 = 4294967295
> 
> I'd expect "-1", but we don't get it with any gdb version (before
> original print_scalar_formatted changes, or current master, or
> your current patch), which also looks like a bug to me.

I think I agree: we should produce what the format says, not what the
cast says.


  reply	other threads:[~2017-07-14 15:20 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20170713123400.28917-1-tom@tromey.com>
2017-07-13 12:34 ` [RFA 2/2] Remove BITS_IN_BYTES define Tom Tromey
2017-07-14 15:16   ` Pedro Alves
2017-07-14 16:15     ` Tom Tromey
2017-07-13 12:35 ` [RFA 1/2] Fix two regressions in scalar printing Tom Tromey
2017-07-14 14:56   ` Pedro Alves
2017-07-14 15:20     ` Eli Zaretskii [this message]
2017-07-14 16:50     ` Tom Tromey
2017-07-14 17:25       ` Pedro Alves
2017-07-31 22:03         ` Tom Tromey
2017-08-14 14:02           ` Pedro Alves
2017-08-14 15:22             ` Tom Tromey
2017-08-14 15:43               ` Tom Tromey
2017-08-14 15:52                 ` Pedro Alves
2017-08-17  2:24                 ` Tom Tromey
2017-12-10 14:15                   ` Regression on 32-bit: gdb.guile/scm-ports.exp [Re: [RFA 1/2] Fix two regressions in scalar printing] Jan Kratochvil
2017-07-14 15:19   ` [RFA 1/2] Fix two regressions in scalar printing Jonah Graham
2017-08-25 16:54   ` Thomas Preudhomme

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=83k23bf3kj.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    --cc=tom@tromey.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