overloading 'print' command.

Paul Pluzhnikov ppluzhnikov@google.com
Fri May 15 14:07:00 GMT 2009


2009/5/15 Eli Zaretskii <eliz@gnu.org>:
>> Date: Thu, 14 May 2009 16:17:07 -0700
>> From: Paul Pluzhnikov <ppluzhnikov@google.com>
>> 2009/5/14 Paweł Sikora <pluto@agmk.net>:
...
>> > Is it possible in gdb to register some hooks for
>> > type-based printing?
^^^^^^^^^^^^^^^^^^^^^^^^^
>> Support for doing *exactly* this is coming to mainline GDB, but you can
>> get it now from the archer-tromey-python branch:
>>   http://sourceware.org/gdb/wiki/PythonGdb
>
> But I think what the OP wants does not justify waiting a few months
> until GDB 7 is released.

He can get it now from the archer branch.

> To the OP: yes, you should be able to use the user-defined hooks
> machinery to do what you want.

I don't see how hook-print can help OP to do something special for
std::string. The manual says hook-print doesn't get any arguments, so
it can't even tell what is being printed. What am I missing?

Cheers,
-- 
Paul Pluzhnikov



More information about the Gdb mailing list