Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom de Vries via Gdb-patches <gdb-patches@sourceware.org>
To: Pedro Alves <pedro@palves.net>, gdb-patches@sourceware.org
Subject: Re: [PATCH][gdb/c] Fix printing -2147483648
Date: Mon, 23 May 2022 13:16:08 +0200	[thread overview]
Message-ID: <9c428856-086f-4dc5-2c2d-663357588342@suse.de> (raw)
In-Reply-To: <99bf2d3c-21ec-ab66-897f-b690194797de@palves.net>

On 5/18/22 21:15, Pedro Alves wrote:
> On 2022-05-18 18:38, Tom de Vries wrote:
> 
>> +	if { [c_like $lang] } {
>> +	    set val -2147483648
>> +	    if { $sizeof_long_long == 4 } {
>> +		set re $re_overflow
>> +	    } else {
>> +		set re $val
>> +	    }
>> +	    gdb_test "p $val" $re
>> +	}
> 
> Could you add ptype tests too?  As is, is plausible for GDB to manage to print
> the expected value, but incorrectly pick long long instead of long, for example.

Indeed, good point.

I've ended up extending the test-case in a more structural way, 
submitted here ( 
https://sourceware.org/pipermail/gdb-patches/2022-May/189309.html ), and 
that should address your comment.

Thanks,
- Tom

      reply	other threads:[~2022-05-23 11:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-18 17:38 Tom de Vries via Gdb-patches
2022-05-18 19:00 ` Andreas Schwab
2022-05-23 11:14   ` Tom de Vries via Gdb-patches
2022-05-18 19:15 ` Pedro Alves
2022-05-23 11:16   ` Tom de Vries via Gdb-patches [this message]

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=9c428856-086f-4dc5-2c2d-663357588342@suse.de \
    --to=gdb-patches@sourceware.org \
    --cc=pedro@palves.net \
    --cc=tdevries@suse.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