Geant4_10
Macros | Functions | Variables
tracer.cxx File Reference
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <iostream>
#include <sys/types.h>
#include <sys/syscall.h>
#include <sys/ptrace.h>
#include <sys/wait.h>
#include <unistd.h>
#include <errno.h>
#include <sys/user.h>
#include <assert.h>
#include <sys/select.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>
#include <pthread.h>
#include "tls.hh"
#include "memoryprotection/filter.h"
#include "memoryprotection/UDSignals.h"
#include "memoryprotection/MemorySegment.h"
Include dependency graph for tracer.cxx:

Go to the source code of this file.

Macros

#define MAXTHREADS   128
 

Functions

void FetchMap (pid_t pid)
 
char * getLibName (long int address)
 
void processParameters (int, char *argv[])
 
void test (pid_t pid, int wait_val)
 
int SingleSteps (pid_t pid)
 
int traceloop (pid_t pid)
 
voidtracer_thread (void *pid_ptr)
 
void startThreadTracers (pid_t pid)
 
void waitForAllTracers (pid_t pid)
 
void openFilter ()
 
void closeFilter ()
 
int main (int argc, char *argv[])
 

Variables

int fildes [2]
 
int status
 
char cmd [1024]
 
int protect = 0
 
pid_t filter
 
int numberOfThreads
 
pid_t threads [MAXTHREADS]
 
pthread_t tids [MAXTHREADS]
 
G4ThreadLocal struct
user_regs_struct 
regs
 
G4ThreadLocal struct
user_regs_struct 
regssinglestep
 
G4ThreadLocal int detectionFlag = 0
 
pthread_mutex_t segFaultHandlingLock = PTHREAD_MUTEX_INITIALIZER
 

Macro Definition Documentation

#define MAXTHREADS   128

Definition at line 28 of file tracer.cxx.

Function Documentation

void closeFilter ( )

Definition at line 478 of file tracer.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

void FetchMap ( pid_t  pid)

Definition at line 70 of file tracer.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

char* getLibName ( long int  address)

Definition at line 115 of file tracer.cxx.

Here is the caller graph for this function:

int main ( int  argc,
char *  argv[] 
)

Definition at line 491 of file tracer.cxx.

Here is the call graph for this function:

void openFilter ( )

Definition at line 436 of file tracer.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

void processParameters ( int  ,
char *  argv[] 
)

Definition at line 126 of file tracer.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

int SingleSteps ( pid_t  pid)

Definition at line 193 of file tracer.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

void startThreadTracers ( pid_t  pid)

Definition at line 414 of file tracer.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

void test ( pid_t  pid,
int  wait_val 
)

Definition at line 162 of file tracer.cxx.

Here is the call graph for this function:

int traceloop ( pid_t  pid)

Definition at line 236 of file tracer.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

void* tracer_thread ( void pid_ptr)

Definition at line 404 of file tracer.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

void waitForAllTracers ( pid_t  pid)

Definition at line 425 of file tracer.cxx.

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

char cmd[1024]

Definition at line 25 of file tracer.cxx.

G4ThreadLocal int detectionFlag = 0

Definition at line 64 of file tracer.cxx.

int fildes[2]

Definition at line 23 of file tracer.cxx.

pid_t filter

Definition at line 30 of file tracer.cxx.

int numberOfThreads

Definition at line 32 of file tracer.cxx.

int protect = 0

Definition at line 26 of file tracer.cxx.

G4ThreadLocal struct user_regs_struct regs

Definition at line 62 of file tracer.cxx.

G4ThreadLocal struct user_regs_struct regssinglestep

Definition at line 63 of file tracer.cxx.

pthread_mutex_t segFaultHandlingLock = PTHREAD_MUTEX_INITIALIZER

Definition at line 66 of file tracer.cxx.

int status

Definition at line 24 of file tracer.cxx.

pid_t threads[MAXTHREADS]

Definition at line 33 of file tracer.cxx.

pthread_t tids[MAXTHREADS]

Definition at line 34 of file tracer.cxx.