Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* overloading 'print' command.
@ 2009-05-14 11:46 Paweł Sikora
  2009-05-14 23:17 ` Paul Pluzhnikov
  0 siblings, 1 reply; 6+ messages in thread
From: Paweł Sikora @ 2009-05-14 11:46 UTC (permalink / raw)
  To: gdb

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.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-05-15 15:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-14 11:46 overloading 'print' command Paweł Sikora
2009-05-14 23:17 ` Paul Pluzhnikov
2009-05-15  7:06   ` Eli Zaretskii
2009-05-15 14:07     ` Paul Pluzhnikov
2009-05-15 14:42       ` Eli Zaretskii
2009-05-15 15:53         ` Joel Brobecker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox