[RFA 1/2] Fix two regressions in scalar printing
Tom Tromey
tom@tromey.com
Mon Aug 14 15:22:00 GMT 2017
>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
Pedro> Sorry for dropping the ball on this. I wanted to be sure that
Pedro> we have tests for the
Pedro> (gdb) p /u -1
Pedro> $1 = 4294967295
Pedro> (gdb) p /d (unsigned long long) -1
Pedro> $2 = -1
Pedro> etc. issues discussed earlier. Do you know whether there's some tests for
Pedro> that already somewhere, but might have simply been missed before for
Pedro> running both patches together?
Good question. I think what happened is that this change had some
fallout elsewhere, which is why there are also some test changes in the
patch.
However, these are kind of indirect, so I added tests for
"print/d (unsigned char) -1" and "print/u (char) -1".
>> +# 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\[^.\]"
Pedro> What's the reason for the "\[^.\]" part of the regexes?
Pedro> What's that trying to match? Why not simply " = 1" ?
I was worried that this would erroneously match "1.5" or the like; but I
tried it and I see my fears are unfounded. So, I changed these to " = 1".
Tom
More information about the Gdb-patches
mailing list