This is the mail archive of the
archer@sourceware.org
mailing list for the Archer project.
Re: pretty-printing update
- From: Tom Tromey <tromey at redhat dot com>
- To: Project Archer <archer at sourceware dot org>
- Date: Thu, 02 Oct 2008 09:06:27 -0600
- Subject: Re: pretty-printing update
- References: <m3fxnhmmp7.fsf@fleche.redhat.com>
- Reply-to: Tom Tromey <tromey at redhat dot com>
>>>>> "Tom" == Tom Tromey <tromey@redhat.com> writes:
Tom> (gdb) p intmap
Tom> $2 = number of elements = 2
Tom> [5] = 0x804c057 "liver"
Tom> [23] = 0x804c046 "maude"
Tom> The internal problem is that the value-printing code does not know
Tom> that gdb printed "$2 = ".
FYI, I implemented a quick fix for this. Now the pretty-printer will
indent subsequent lines according to the indentation where it started:
(gdb) p intmap
$1 = std::map with 2 elements
[5] = 0x804c277 "liver"
[23] = 0x804c266 "maude"
I think this looks pretty good. It also looks ok inside structures:
(gdb) p val
$1 = {
x = [0] = 23
[1] = 24
[2] = 25,
s = 0x804e03c "maude"
}
Tom