This is the mail archive of the mailing list for the systemtap 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]

[Bug translator/18191] DWARF-based sizeof(), array_size(), typeof() operators

Frank Ch. Eigler <fche at redhat dot com> changed:

           What    |Removed                     |Added
                 CC|                            |fche at redhat dot com

--- Comment #2 from Frank Ch. Eigler <fche at redhat dot com> ---
(In reply to Stephane Chazelas from comment #1)

> function sizeof:long (addr:long) %{ /* pure */ /* pragma:symbols */
>   _stp_kallsyms_lookup(STAP_ARG_addr, (unsigned long*)&(STAP_RETVALUE),
> %}

Note that the above great start is not actually DWARF-based - it's just
symbol-table based.  We might want to do a few things extra:

- rename to symsize (since that's what it does)

- throw an error if the address can't be resolved to a known symbol, instead of
returning a sentinel -1

- having a user-space variant usymsize() that passes 'current' as the last
parameter to the underlying lookup function

You are receiving this mail because:
You are the assignee for the bug.

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