dwarves icon indicating copy to clipboard operation
dwarves copied to clipboard

--dwarf_offset / -O seems to be no longer supported

Open jschwinger233 opened this issue 3 years ago • 1 comments

According to man:

https://github.com/acmel/dwarves/blob/49358dfe2aaae4e90b072332c3e324019826783f/man-pages/pahole.1#L286-L288

But in the HEAD of repo, there is no reference of dwarf_offset besides man-pages:

$ ag dwarf_offset
rpm/SPECS/dwarves.spec
389:- PAHOLE: Add a newline after the --class_dwarf_offset output

man-pages/pahole.1
287:.B \-O, \-\-dwarf_offset=OFFSET

I was wondering if --dwarf_offset has been removed before by accident?

jschwinger233 avatar Jul 22 '22 03:07 jschwinger233

Em Thu, Jul 21, 2022 at 08:38:31PM -0700, zc escreveu:

According to man:

https://github.com/acmel/dwarves/blob/49358dfe2aaae4e90b072332c3e324019826783f/man-pages/pahole.1#L286-L288

But in the HEAD of repo, there is no reference of dwarf_offset besides man-pages:

$ ag dwarf_offset
rpm/SPECS/dwarves.spec
389:- PAHOLE: Add a newline after the --class_dwarf_offset output

man-pages/pahole.1
287:.B \-O, \-\-dwarf_offset=OFFSET

I was wondering if --dwarf_offset has been removed before by accident?

@.*** pahole]$ git show e924cacdf66ca60d commit e924cacdf66ca60d78138af23aedd301eb7a05cb Author: Arnaldo Carvalho de Melo @.***> Date: Tue Mar 24 18:44:43 2009 -0300

pahole: Remove --dwarf_offset/-O option

Too DWARF specific and wasn't working since I implemented type recoding and
removed the Dwarf_Off from struct tag.

To achieve the same result one can use --show_decl_info that also shows the
dwarf offset, since it needs to keep the DWARF specific line number and file
and then use a text editor to find the offset.

Signed-off-by: Arnaldo Carvalho de Melo ***@***.***>

Thanks, I'll remove it from the man page, if you need it you can, as the above cset comment says:

@.*** pahole]$ pahole --show_decl_info -C xfrm_tmpl tcp.o /* Used at: /var/home/acme/git/perf/net/ipv4/tcp.c / / <2461f> /var/home/acme/git/perf/include/net/xfrm.h:435 / struct xfrm_tmpl { struct xfrm_id id; / 0 24 */

/* XXX last struct has 3 bytes of padding */

xfrm_address_t             saddr;                /*    24    16 */
short unsigned int         encap_family;         /*    40     2 */

/* XXX 2 bytes hole, try to pack */

u32                        reqid;                /*    44     4 */
u8                         mode;                 /*    48     1 */
u8                         share;                /*    49     1 */
u8                         optional;             /*    50     1 */
u8                         allalgs;              /*    51     1 */
u32                        aalgos;               /*    52     4 */
u32                        ealgos;               /*    56     4 */
u32                        calgos;               /*    60     4 */

/* size: 64, cachelines: 1, members: 11 */
/* sum members: 62, holes: 1, sum holes: 2 */
/* paddings: 1, sum paddings: 3 */

}; pahole: tcp.o: Invalid argument @.*** pahole]$

Now to look at that EINVAL oddity :-\

-- Reply to this email directly or view it on GitHub: https://github.com/acmel/dwarves/issues/31 You are receiving this because you are subscribed to this thread.

Message ID: @.***>

--

  • Arnaldo

acmel avatar Oct 11 '22 08:10 acmel