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


>>>>> "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


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