This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: [RFC PATCH 0/3] Pretty-printing for errno
- From: Pedro Alves <palves at redhat dot com>
- To: Phil Muldoon <pmuldoon at redhat dot com>, Zack Weinberg <zackw at panix dot com>, libc-alpha at sourceware dot org, gdb at sourceware dot org
- Cc: joseph at codesourcery dot com, fweimer at redhat dot com, tom at tromey dot com, siddhesh at gotplt dot org
- Date: Thu, 29 Jun 2017 18:28:24 +0100
- Subject: Re: [RFC PATCH 0/3] Pretty-printing for errno
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=palves at redhat dot com
- Dkim-filter: OpenDKIM Filter v2.11.0 mx1.redhat.com BEC8583F3F
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com BEC8583F3F
- References: <20170622224456.1358-1-zackw@panix.com> <b2e7bc3b-d914-37ec-0215-2937949a848c@redhat.com> <3a7946e9-d178-f878-9774-64ff44bcf5df@redhat.com> <9490d183-a57b-b336-3131-6580e4773818@redhat.com>
On 06/29/2017 06:02 PM, Pedro Alves wrote:
> I suspect we can do that by making "whatis" look at the top of
> the expression tree, see if it's an OP_TYPE:
That works:
With this code:
typedef int zzz;
zzz z;
gdb:
(gdb) whatis z
type = zzz
(gdb) whatis (zzz)0
type = zzz
(gdb) whatis zzz
type = int
and at least
make check TESTS="*/whatis*.exp */*ptype*.exp"
passes, which is promising.
Haven't tried this against a printer, but I think
it should start working.
We may need OP_SCOPE too.
I'll try running this against the full gdb testsuite,
and write some test.
Thanks,
Pedro Alves