RFC: fix std::unique_ptr pretty-printer
Tom Tromey
tromey@redhat.com
Mon Aug 13 13:31:00 GMT 2012
>>>>> "Jonathan" == Jonathan Wakely <jwakely.gcc@gmail.com> writes:
>> $11 = std::unique_ptr containing (datum *) 0x6067d0
Jonathan> It's inconsistent with the other printers in that it prints
Jonathan> the stored type, unlike e.g. std::vector<int> which just says
Jonathan> "std::vector of length ..." but I think that's an improvement.
Yeah... without this bit it was just printing
$11 = std::unique_ptr containing 0x6067d0
Ordinarily, gdb will print the type here; but it doesn't when called
from Python. I thought the typical output was easier to read.
Jonathan> Personally I'd prefer the element_type as part of the type, e.g.
Jonathan> "std::unique_ptr<datum> = 0x6067d0" but that would be even more
Jonathan> inconsistent!
I can make that change if you'd prefer.
I don't know why, but I didn't even think of it.
Tom
More information about the Gcc-patches
mailing list