This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
overloading 'print' command.
- From: "Paweł Sikora" <pluto at agmk dot net>
- To: gdb at sourceware dot org
- Date: Thu, 14 May 2009 13:46:37 +0200
- Subject: overloading 'print' command.
- Bounce-to: "Paweł Sikora" <pluto@agmk.net>
Hi,
I'd like to ask about overloading gdb's 'print' command.
e.g. I've defined a macro 'ps' for printing std::string:
define ps
p $arg0.c_str()
end
Now, I'd like to avoid calling 'ps' and just use the 'p' command
in top-macros for printing more complex data structures.
Is it possible in gdb to register some hooks for type-based
printing?
Thanks for all hints.