This is the mail archive of the systemtap@sourceware.org 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]

feature request: DWARF-based sizeof(), array_size(), typeof()


Hello,

recently, I found myself needing to loop over the elements of a
kernel array
(http://stackoverflow.com/questions/29034267/get-size-of-target-array-in-systemtap)

Though there are ways to get that information (parse symdata(),
use C code relying on internal APIs), none of them are
straighforward or ideal.

It would be nice if operators like sizeof(addr) (to retrieve the
size of a symbol at a given address) and array_size(addr) (to
retrieve the number of elements if that is an array). be added
to systemtap.

A typeof() one could be nice as well (especially if we can
combine it with @cast).

What do you think?
Stephane


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