/usr/share/systemtap/tapset/ucontext.stp is in systemtap-common 1.6-1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | // User context tapset
// Copyright (C) 2010-2011 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.
%{
#ifndef STP_NEED_VMA_TRACKER
#define STP_NEED_VMA_TRACKER 1
#endif
%}
/**
* sfunction umodname - Returns the (short) name of the user module. EXPERIMENTAL!
* @addr: User-space address
*
* Returns the short name of the user space module for the current task that
* that the given address is part of. Returns "<unknown>" when the address
* isn't in a (mapped in) module, or the module cannot be found for some reason.
*/
function umodname:string (addr:long) %{
/* pure */ /* myproc-unprivileged */ /* pragma:vma */
const char *name = NULL;
_stp_umod_lookup(THIS->addr, current, &name, NULL, NULL);
if (!name)
name = "<unknown>";
strlcpy (THIS->__retvalue, name, MAXSTRINGLEN);
%}
|