// User context symbols tapset // Copyright (C) 2009 Red Hat Inc. // // This file is part of systemtap, and is free software. You can // redistribute it and/or modify it under the terms of the GNU General // Public License (GPL); either version 2, or (at your option) any // later version. // // User context symbol functions provide additional information about // addresses from an application. These functions can provide // information about the user space map (library) that the event occured or // the function symbol of an address. // %{ #ifndef STP_NEED_SYMBOL_DATA #define STP_NEED_SYMBOL_DATA 1 #endif #ifndef STP_NEED_VMA_TRACKER #define STP_NEED_VMA_TRACKER 1 #endif %} /** * sfunction usymname - Return the symbol of an address in the current task. * @addr: The address to translate. * * Description: Returns the (function) symbol name associated with the * given address if known. If not known it will return the hex string * representation of addr. */ function usymname:string (addr: long) %{ /* pure */ _stp_symbol_snprint(THIS->__retvalue, MAXSTRINGLEN, THIS->addr, current, 0); %} /** * sfunction usymdata - Return the symbol and module offset of an address. * @addr: The address to translate. * * Description: Returns the (function) symbol name associated with the * given address in the current task if known, plus the module name * (between brackets) and the offset inside the module (shared library), * plus the size of the symbol function. If any element is not known it * will be ommitted and if the symbol name is unknown it will return the * hex string for the given address. */ function usymdata:string (addr: long) %{ /* pure */ _stp_symbol_snprint(THIS->__retvalue, MAXSTRINGLEN, THIS->addr, current, 1); %}