Product SiteDocumentation Site

4.2. Accessing User-Space Target Variables

You can access user-space target variables in the same manner as described in Section 3.3.2, “Target Variables”. In Linux, however, there are separate address spaces for the user and kernel code. When using the -> operator, SystemTap accesses the appropriate address space.
For pointers to base types such as integers and strings, there are a number of functions listed below to access user-space data. The first argument for each functions is the pointer to the data item.
user_char(address)
Obtains the character at address for the current user process.
user_short(address)
Obtains the short integer at address for the current user process.
user_int(address)
Obtains the integer at address for the current user process.
user_long(address)
Obtains the long integer at address for the current user process.
user_string(address)
Obtains the string at address for the current user process.
user_string_n(address, n)
Obtains the string at address for the current user process and limits the string to n bytes.