Pretty printers for versioned namespace

François Dumont frs.dumont@gmail.com
Mon Nov 28 21:19:00 GMT 2016


Hi

     Here is a patch to fix pretty printers when versioned namespace is 
activated.

     You will see that I have hesitated in making the fix independant of 
the version being used. In source files you will find (__7::)? patterns 
while in xmethods.py I chose (__\d+::)? making it ready for __8 and 
forward. Do you want to generalize one option ? If so which one ?

     At the moment version namespace is visible within gdb, it displays 
for instance 'std::__7::string'. I am pretty sure we could hide it, is 
it preferable ? I would need some time to do so as I am neither a python 
nor regex expert.

     I am not fully happy with the replication in printers.py of 
StdRbtreeIteratorPrinter and StdExpAnyPrinter(SingleObjContainerPrinter 
in respectively StdVersionedRbtreeIteratorPrinter and 
StdExpVerAnyPrinter(SingleObjContainerPrinter just to adapt 2 lines 
where regex is not an option. We could surely keep only one and pass it 
'' or '__7'. But as I said I am not a python expert so any help would be 
appreciated.

     I still need to run it with versioned namespace disabled to make 
sure there is no regression.

François

-------------- next part --------------
A non-text attachment was scrubbed...
Name: prettyprinters.patch
Type: text/x-patch
Size: 58807 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/libstdc++/attachments/20161128/7c235256/attachment.bin>


More information about the Libstdc++ mailing list