From: "Paweł Sikora" <pluto@agmk.net>
To: gdb@sourceware.org
Subject: overloading 'print' command.
Date: Thu, 14 May 2009 11:46:00 -0000 [thread overview]
Message-ID: <QXEMlZRc.1242301597.2053650.pluto@agmk.net> (raw)
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.
next reply other threads:[~2009-05-14 11:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-14 11:46 Paweł Sikora [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=QXEMlZRc.1242301597.2053650.pluto@agmk.net \
--to=pluto@agmk.net \
--cc=gdb@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox