This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA 1/2] Fix two regressions in scalar printing


On 07/31/2017 11:03 PM, Tom Tromey wrote:
>>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
> 
> Pedro> Yeah, that seems OK to me GDB-output-wise.  "You get what you ask
> Pedro> for".
> 
> Here is an updated version of this patch, that (I think) implements what
> was discussed in this thread.
> 
> I regtested it on the buildbot.
> 
> Let me know what you think.

Sorry for dropping the ball on this.  I wanted to be sure that
we have tests for the

 (gdb) p /u -1
 $1 = 4294967295
 (gdb) p /d (unsigned long long) -1
 $2 = -1

etc. issues discussed earlier.  Do you know whether there's some tests for
that already somewhere, but might have simply been missed before for
running both patches together?

> +# Regression test for PR gdb/21675
> +proc test_radices {} {
> +    gdb_test "print/o 16777211" " = 077777773"
> +    gdb_test "print/d 1.5" " = 1\[^.\]"
> +    gdb_test "print/u 1.5" " = 1\[^.\]"

What's the reason for the "\[^.\]" part of the regexes?
What's that trying to match?  Why not simply " = 1" ?

> +}
> +
>  proc test_print_all_chars {} {
>      global gdb_prompt

Thanks,
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]