This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Implement pahole-like 'ptype /o' option


> 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]