This is the mail archive of the
archer@sourceware.org
mailing list for the Archer project.
Re: $n for pretty-printed elements?
- From: Tom Tromey <tromey at redhat dot com>
- To: Roland McGrath <roland at redhat dot com>
- Cc: Project Archer <archer at sourceware dot org>
- Date: Fri, 17 Jul 2009 16:05:02 -0600
- Subject: Re: $n for pretty-printed elements?
- References: <20090629000709.45C9C420F6@magilla.sf.frob.com>
- Reply-to: Tom Tromey <tromey at redhat dot com>
Sorry for the delay in replying to this.
I'm very behind :(
Roland> Consider:
Roland> (gdb) p _m_path
Roland> $161 = std::list = {
Roland> [0] = {
[...]
Roland> (gdb) p _m_path
Roland> $161 = std::list = {
Roland> [0] = $162 = {
This seems like a good idea to me.
There are some subtleties. We may be seeing the result of several
printers there. E.g., consider a std::list<std::string>. I think for
that we'd see:
$61 = std::list = {
[0] = $162 = "hi bob";
};
... where I suppose $162 would refer to the char* underneath it all.
I suppose my point is that there are some operations, like assignments,
which wouldn't always make sense.
I'll put this on my list.
Tom