| Server IP : 182.53.201.61 / Your IP : 216.73.217.175 Web Server : Apache/2.2.15 (Fedora) System : Linux km10.dyndns.org 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686 User : apache ( 48) PHP Version : 5.3.3 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/share/systemtap/tapset/ |
Upload File : |
/* utrace-only subset of register accessors */
%{
#include "syscall.h"
%}
function _utrace_syscall_nr:long () %{ /* pure */ /* unprivileged */
assert_is_myproc();
if (! CONTEXT->regs) {
CONTEXT->last_error = "invalid call without context registers";
} else {
THIS->__retvalue = syscall_get_nr(current, CONTEXT->regs);
}
%}
function _utrace_syscall_arg:long (n:long) %{ /* pure */ /* unprivileged */
unsigned long arg = 0;
assert_is_myproc();
if (! CONTEXT->regs) {
CONTEXT->last_error = "invalid call without context registers";
} else {
syscall_get_arguments(current, CONTEXT->regs, (int)THIS->n, 1, &arg);
}
THIS->__retvalue = arg;
%}
function _utrace_syscall_return:long () %{ /* pure */ /* unprivileged */
/*
* Here's the reason for the "unsigned long" cast. Since all
* values inside systemtap are 64-bit numbers, return values were
* getting sign extended. This caused return values to not match
* up with the same values passes as arguments.
*/
assert_is_myproc();
if (! CONTEXT->regs) {
CONTEXT->last_error = "invalid call without context registers";
} else {
THIS->__retvalue = (unsigned long)syscall_get_return_value(current,
CONTEXT->regs);
}
%}