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]

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


https://sourceware.org/bugzilla/show_bug.cgi?id=18191

Stephane Chazelas <stephane.chazelas+sourceware at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |stephane.chazelas+sourcewar
                   |                            |e at gmail dot com

--- Comment #1 from Stephane Chazelas <stephane.chazelas+sourceware at gmail dot com> ---
[Thanks David]

I don't know about the other ones, but a DWARF-based sizeof() (at least for
kernel symbols) should just be a matter of:

function sizeof:long (addr:long) %{ /* pure */ /* pragma:symbols */
  STAP_RETVALUE = -1;
  _stp_kallsyms_lookup(STAP_ARG_addr, (unsigned long*)&(STAP_RETVALUE), NULL,
NULL, NULL);
%}

See
http://stackoverflow.com/questions/29034267/get-size-of-target-array-in-systemtap
for where the request is coming from.

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