[RFC PATCH 0/3] Pretty-printing for errno

Pedro Alves palves@redhat.com
Thu Jun 29 17:28:00 GMT 2017


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



More information about the Gdb mailing list