This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Implement pahole-like 'ptype /o' option
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Sergio Durigan Junior <sergiodj at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 21 Nov 2017 18:50:37 +0200
- Subject: Re: [PATCH] Implement pahole-like 'ptype /o' option
- Authentication-results: sourceware.org; auth=none
- References: <20171121160709.23248-1-sergiodj@redhat.com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> From: Sergio Durigan Junior <sergiodj@redhat.com>
> Cc: Sergio Durigan Junior <sergiodj@redhat.com>
> Date: Tue, 21 Nov 2017 11:07:09 -0500
>
> gdb/NEWS | 3 +
> gdb/c-typeprint.c | 144 ++++++++++++++++++++++++++++---
> gdb/doc/gdb.texinfo | 4 +
> gdb/testsuite/gdb.base/ptype-offsets.cc | 77 +++++++++++++++++
> gdb/testsuite/gdb.base/ptype-offsets.exp | 52 +++++++++++
> gdb/typeprint.c | 8 +-
> gdb/typeprint.h | 3 +
> 7 files changed, 276 insertions(+), 15 deletions(-)
> create mode 100644 gdb/testsuite/gdb.base/ptype-offsets.cc
> create mode 100644 gdb/testsuite/gdb.base/ptype-offsets.exp
The documentation parts are okay, but ...
> +@item o
> +Print the offsets and sizes of fields in a struct, similar to what the
> +@command{pahole} tool does.
... how about an example showing the output of this? I, for one, have
never heard of 'pahole', so the reference to it won't help the likes
of myself to understand what will be produced.
And here:
> + /o print offsets and sizes of fields in a struct (like pahole)\n"));
I wonder whether we should mention 'pahole' at all.
Thanks.