Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

integrated retrace with libnereon #353

Open
jjr840430 opened this issue Jul 4, 2018 · 6 comments
Open

integrated retrace with libnereon #353

jjr840430 opened this issue Jul 4, 2018 · 6 comments
Assignees

Comments

@jjr840430
Copy link
Contributor

Here is the libnereon

@jjr840430
Copy link
Contributor Author

jjr840430 commented Jul 4, 2018

@ronaldtse @ikolomi
Can you give the guide on how to use retrace_v2?

@ghost
Copy link

ghost commented Jul 4, 2018 via email

@jjr840430
Copy link
Contributor Author

@ikolomi
I did execute the following commands to test retrace_v2

cd retrace/src/retrace_v2
make
cd examples/getenv
make
LD_PRELOAD=$(pwd)/../../retrace_v2.so ./getenv_exmpl

Then it shows the following result:

dev@dev-virtual-machine:~/work/ribose/retrace/src/retrace_v2/examples/getenv$ ./getenv_exmpl LD_PRELOAD
[CONF][WARN]: config file not set, using the default conf
[FUNCS][DEBUG]: sizeof(struct FuncPrototype)=2412
[FUNCS][DEBUG]: Adding prototype for 'setlocale', hash: 21
[FUNCS][DEBUG]: New entry at hash: 21
[FUNCS][DEBUG]: Adding prototype for 'localeconv', hash: 85
[FUNCS][DEBUG]: New entry at hash: 85
[FUNCS][DEBUG]: Adding prototype for 'isalnum', hash: 42
[FUNCS][DEBUG]: New entry at hash: 42
[FUNCS][DEBUG]: Adding prototype for 'isalpha', hash: 13
[FUNCS][DEBUG]: New entry at hash: 13
[FUNCS][DEBUG]: Adding prototype for 'isblank', hash: 3
[FUNCS][DEBUG]: New entry at hash: 3
[FUNCS][DEBUG]: Adding prototype for 'iscntrl', hash: 18
[FUNCS][DEBUG]: New entry at hash: 18
[FUNCS][DEBUG]: Adding prototype for 'isdigit', hash: 92
[FUNCS][DEBUG]: New entry at hash: 92
[FUNCS][DEBUG]: Adding prototype for 'isgraph', hash: 125
[FUNCS][DEBUG]: New entry at hash: 125
[FUNCS][DEBUG]: Adding prototype for 'islower', hash: 48
[FUNCS][DEBUG]: New entry at hash: 48
[FUNCS][DEBUG]: Adding prototype for 'isprint', hash: 92
[FUNCS][DEBUG]: Added 'isprint' at hash: 92
[FUNCS][DEBUG]: Adding prototype for 'ispunct', hash: 105
[FUNCS][DEBUG]: New entry at hash: 105
[FUNCS][DEBUG]: Adding prototype for 'isspace', hash: 53
[FUNCS][DEBUG]: New entry at hash: 53
[FUNCS][DEBUG]: Adding prototype for 'isupper', hash: 81
[FUNCS][DEBUG]: New entry at hash: 81
[FUNCS][DEBUG]: Adding prototype for 'isxdigit', hash: 102
[FUNCS][DEBUG]: New entry at hash: 102
[FUNCS][DEBUG]: Adding prototype for 'toupper', hash: 32
[FUNCS][DEBUG]: New entry at hash: 32
[FUNCS][DEBUG]: Adding prototype for 'tolower', hash: 127
[FUNCS][DEBUG]: New entry at hash: 127
[FUNCS][DEBUG]: Adding prototype for 'signal', hash: 111
[FUNCS][DEBUG]: New entry at hash: 111
[FUNCS][DEBUG]: Adding prototype for 'raise', hash: 69
[FUNCS][DEBUG]: New entry at hash: 69
[FUNCS][DEBUG]: Adding prototype for 'fclose', hash: 25
[FUNCS][DEBUG]: New entry at hash: 25
[FUNCS][DEBUG]: Adding prototype for 'clearerr', hash: 127
[FUNCS][DEBUG]: Added 'clearerr' at hash: 127
[FUNCS][DEBUG]: Adding prototype for 'feof', hash: 93
[FUNCS][DEBUG]: New entry at hash: 93
[FUNCS][DEBUG]: Adding prototype for 'ferror', hash: 41
[FUNCS][DEBUG]: New entry at hash: 41
[FUNCS][DEBUG]: Adding prototype for 'fflush', hash: 37
[FUNCS][DEBUG]: New entry at hash: 37
[FUNCS][DEBUG]: Adding prototype for 'fgetpos', hash: 61
[FUNCS][DEBUG]: New entry at hash: 61
[FUNCS][DEBUG]: Adding prototype for 'fopen', hash: 9
[FUNCS][DEBUG]: New entry at hash: 9
[FUNCS][DEBUG]: Adding prototype for 'fread', hash: 85
[FUNCS][DEBUG]: Added 'fread' at hash: 85
[FUNCS][DEBUG]: Adding prototype for 'freopen', hash: 124
[FUNCS][DEBUG]: New entry at hash: 124
[FUNCS][DEBUG]: Adding prototype for 'fseek', hash: 55
[FUNCS][DEBUG]: New entry at hash: 55
[FUNCS][DEBUG]: Adding prototype for 'fsetpos', hash: 49
[FUNCS][DEBUG]: New entry at hash: 49
[FUNCS][DEBUG]: Adding prototype for 'ftell', hash: 112
[FUNCS][DEBUG]: New entry at hash: 112
[FUNCS][DEBUG]: Adding prototype for 'fwrite', hash: 0
[FUNCS][DEBUG]: New entry at hash: 0
[FUNCS][DEBUG]: Adding prototype for 'remove', hash: 75
[FUNCS][DEBUG]: New entry at hash: 75
[FUNCS][DEBUG]: Adding prototype for 'rename', hash: 5
[FUNCS][DEBUG]: New entry at hash: 5
[FUNCS][DEBUG]: Adding prototype for 'rewind', hash: 2
[FUNCS][DEBUG]: New entry at hash: 2
[FUNCS][DEBUG]: Adding prototype for 'setbuf', hash: 24
[FUNCS][DEBUG]: New entry at hash: 24
[FUNCS][DEBUG]: Adding prototype for 'setvbuf', hash: 56
[FUNCS][DEBUG]: New entry at hash: 56
[FUNCS][DEBUG]: Adding prototype for 'tmpfile', hash: 44
[FUNCS][DEBUG]: New entry at hash: 44
[FUNCS][DEBUG]: Adding prototype for 'tmpnam', hash: 106
[FUNCS][DEBUG]: New entry at hash: 106
[FUNCS][DEBUG]: Adding prototype for 'fgetc', hash: 12
[FUNCS][DEBUG]: New entry at hash: 12
[FUNCS][DEBUG]: Adding prototype for 'fgets', hash: 28
[FUNCS][DEBUG]: New entry at hash: 28
[FUNCS][DEBUG]: Adding prototype for 'fputc', hash: 115
[FUNCS][DEBUG]: New entry at hash: 115
[FUNCS][DEBUG]: Adding prototype for 'fputs', hash: 3
[FUNCS][DEBUG]: Added 'fputs' at hash: 3
[FUNCS][DEBUG]: Adding prototype for 'getc', hash: 84
[FUNCS][DEBUG]: New entry at hash: 84
[FUNCS][DEBUG]: Adding prototype for 'getchar', hash: 69
[FUNCS][DEBUG]: Added 'getchar' at hash: 69
[FUNCS][DEBUG]: Adding prototype for 'gets', hash: 100
[FUNCS][DEBUG]: New entry at hash: 100
[FUNCS][DEBUG]: Adding prototype for 'putc', hash: 59
[FUNCS][DEBUG]: New entry at hash: 59
[FUNCS][DEBUG]: Adding prototype for 'putchar', hash: 126
[FUNCS][DEBUG]: New entry at hash: 126
[FUNCS][DEBUG]: Adding prototype for 'puts', hash: 75
[FUNCS][DEBUG]: Added 'puts' at hash: 75
[FUNCS][DEBUG]: Adding prototype for 'ungetc', hash: 45
[FUNCS][DEBUG]: New entry at hash: 45
[FUNCS][DEBUG]: Adding prototype for 'perror', hash: 95
[FUNCS][DEBUG]: New entry at hash: 95
[FUNCS][DEBUG]: Adding prototype for 'atoi', hash: 84
[FUNCS][DEBUG]: Added 'atoi' at hash: 84
[FUNCS][DEBUG]: Adding prototype for 'atol', hash: 87
[FUNCS][DEBUG]: New entry at hash: 87
[FUNCS][DEBUG]: Adding prototype for 'strtol', hash: 71
[FUNCS][DEBUG]: New entry at hash: 71
[FUNCS][DEBUG]: Adding prototype for 'strtoul', hash: 28
[FUNCS][DEBUG]: Added 'strtoul' at hash: 28
[FUNCS][DEBUG]: Adding prototype for 'calloc', hash: 121
[FUNCS][DEBUG]: New entry at hash: 121
[FUNCS][DEBUG]: Adding prototype for 'free', hash: 115
[FUNCS][DEBUG]: Added 'free' at hash: 115
[FUNCS][DEBUG]: Adding prototype for 'malloc', hash: 47
[FUNCS][DEBUG]: New entry at hash: 47
[FUNCS][DEBUG]: Adding prototype for 'realloc', hash: 123
[FUNCS][DEBUG]: New entry at hash: 123
[FUNCS][DEBUG]: Adding prototype for 'abort', hash: 9
[FUNCS][DEBUG]: Added 'abort' at hash: 9
[FUNCS][DEBUG]: Adding prototype for 'atexit', hash: 24
[FUNCS][DEBUG]: Added 'atexit' at hash: 24
[FUNCS][DEBUG]: Adding prototype for 'exit', hash: 37
[FUNCS][DEBUG]: Added 'exit' at hash: 37
[FUNCS][DEBUG]: Adding prototype for 'getenv', hash: 30
[FUNCS][DEBUG]: New entry at hash: 30
[FUNCS][DEBUG]: Adding prototype for 'system', hash: 118
[FUNCS][DEBUG]: New entry at hash: 118
[FUNCS][DEBUG]: Adding prototype for 'bsearch', hash: 35
[FUNCS][DEBUG]: New entry at hash: 35
[FUNCS][DEBUG]: Adding prototype for 'qsort', hash: 104
[FUNCS][DEBUG]: New entry at hash: 104
[FUNCS][DEBUG]: Adding prototype for 'abs', hash: 11
[FUNCS][DEBUG]: New entry at hash: 11
[FUNCS][DEBUG]: Adding prototype for 'div', hash: 42
[FUNCS][DEBUG]: Added 'div' at hash: 42
[FUNCS][DEBUG]: Adding prototype for 'labs', hash: 13
[FUNCS][DEBUG]: Added 'labs' at hash: 13
[FUNCS][DEBUG]: Adding prototype for 'ldiv', hash: 44
[FUNCS][DEBUG]: Added 'ldiv' at hash: 44
[FUNCS][DEBUG]: Adding prototype for 'rand', hash: 44
[FUNCS][DEBUG]: Passing 'tmpfile' at hash: 44
[FUNCS][DEBUG]: Added 'rand' at hash: 44
[FUNCS][DEBUG]: Adding prototype for 'srand', hash: 113
[FUNCS][DEBUG]: New entry at hash: 113
[FUNCS][DEBUG]: Adding prototype for 'mblen', hash: 57
[FUNCS][DEBUG]: New entry at hash: 57
[FUNCS][DEBUG]: Adding prototype for 'mbstowcs', hash: 21
[FUNCS][DEBUG]: Added 'mbstowcs' at hash: 21
[FUNCS][DEBUG]: Adding prototype for 'mbtowc', hash: 99
[FUNCS][DEBUG]: New entry at hash: 99
[FUNCS][DEBUG]: Adding prototype for 'wcstombs', hash: 99
[FUNCS][DEBUG]: Added 'wcstombs' at hash: 99
[FUNCS][DEBUG]: Adding prototype for 'wctomb', hash: 99
[FUNCS][DEBUG]: Passing 'mbtowc' at hash: 99
[FUNCS][DEBUG]: Added 'wctomb' at hash: 99
[FUNCS][DEBUG]: Adding prototype for 'writev', hash: 62
[FUNCS][DEBUG]: New entry at hash: 62
[FUNCS][DEBUG]: Adding prototype for 'readv', hash: 121
[FUNCS][DEBUG]: Added 'readv' at hash: 121
[FUNCS][DEBUG]: Adding prototype for 'access', hash: 43
[FUNCS][DEBUG]: New entry at hash: 43
[FUNCS][DEBUG]: Adding prototype for 'alarm', hash: 42
[FUNCS][DEBUG]: Passing 'isalnum' at hash: 42
[FUNCS][DEBUG]: Added 'alarm' at hash: 42
[FUNCS][DEBUG]: Adding prototype for 'brk', hash: 52
[FUNCS][DEBUG]: New entry at hash: 52
[FUNCS][DEBUG]: Adding prototype for 'chdir', hash: 97
[FUNCS][DEBUG]: New entry at hash: 97
[FUNCS][DEBUG]: Adding prototype for 'chroot', hash: 14
[FUNCS][DEBUG]: New entry at hash: 14
[FUNCS][DEBUG]: Adding prototype for 'chown', hash: 90
[FUNCS][DEBUG]: New entry at hash: 90
[FUNCS][DEBUG]: Adding prototype for 'close', hash: 81
[FUNCS][DEBUG]: Added 'close' at hash: 81
[FUNCS][DEBUG]: Adding prototype for 'confstr', hash: 38
[FUNCS][DEBUG]: New entry at hash: 38
[FUNCS][DEBUG]: Adding prototype for 'crypt', hash: 71
[FUNCS][DEBUG]: Added 'crypt' at hash: 71
[FUNCS][DEBUG]: Adding prototype for 'ctermid', hash: 67
[FUNCS][DEBUG]: New entry at hash: 67
[FUNCS][DEBUG]: Adding prototype for 'cuserid', hash: 98
[FUNCS][DEBUG]: New entry at hash: 98
[FUNCS][DEBUG]: Adding prototype for 'dup', hash: 24
[FUNCS][DEBUG]: Passing 'setbuf' at hash: 24
[FUNCS][DEBUG]: Added 'dup' at hash: 24
[FUNCS][DEBUG]: Adding prototype for 'dup2', hash: 26
[FUNCS][DEBUG]: New entry at hash: 26
[FUNCS][DEBUG]: Adding prototype for 'encrypt', hash: 126
[FUNCS][DEBUG]: Added 'encrypt' at hash: 126
[FUNCS][DEBUG]: Adding prototype for 'execv', hash: 94
[FUNCS][DEBUG]: New entry at hash: 94
[FUNCS][DEBUG]: Adding prototype for 'execve', hash: 71
[FUNCS][DEBUG]: Passing 'strtol' at hash: 71
[FUNCS][DEBUG]: Added 'execve' at hash: 71
[FUNCS][DEBUG]: Adding prototype for 'execvp', hash: 82
[FUNCS][DEBUG]: New entry at hash: 82
[FUNCS][DEBUG]: Adding prototype for '_exit', hash: 86
[FUNCS][DEBUG]: New entry at hash: 86
[FUNCS][DEBUG]: Adding prototype for 'fchown', hash: 34
[FUNCS][DEBUG]: New entry at hash: 34
[FUNCS][DEBUG]: Adding prototype for 'fchdir', hash: 41
[FUNCS][DEBUG]: Added 'fchdir' at hash: 41
[FUNCS][DEBUG]: Adding prototype for 'fork', hash: 73
[FUNCS][DEBUG]: New entry at hash: 73
[FUNCS][DEBUG]: Adding prototype for 'fpathconf', hash: 8
[FUNCS][DEBUG]: New entry at hash: 8
[FUNCS][DEBUG]: Adding prototype for 'fsync', hash: 90
[FUNCS][DEBUG]: Added 'fsync' at hash: 90
[FUNCS][DEBUG]: Adding prototype for 'ftruncate', hash: 37
[FUNCS][DEBUG]: Passing 'fflush' at hash: 37
[FUNCS][DEBUG]: Added 'ftruncate' at hash: 37
[FUNCS][DEBUG]: Adding prototype for 'getcwd', hash: 33
[FUNCS][DEBUG]: New entry at hash: 33
[FUNCS][DEBUG]: Adding prototype for 'getdtablesize', hash: 26
[FUNCS][DEBUG]: Added 'getdtablesize' at hash: 26
[FUNCS][DEBUG]: Adding prototype for 'getegid', hash: 44
[FUNCS][DEBUG]: Passing 'tmpfile' at hash: 44
[FUNCS][DEBUG]: Passing 'ldiv' at hash: 44
[FUNCS][DEBUG]: Added 'getegid' at hash: 44
[FUNCS][DEBUG]: Adding prototype for 'geteuid', hash: 58
[FUNCS][DEBUG]: New entry at hash: 58
[FUNCS][DEBUG]: Adding prototype for 'getgid', hash: 115
[FUNCS][DEBUG]: Passing 'fputc' at hash: 115
[FUNCS][DEBUG]: Added 'getgid' at hash: 115
[FUNCS][DEBUG]: Adding prototype for 'getgroups', hash: 3
[FUNCS][DEBUG]: Passing 'isblank' at hash: 3
[FUNCS][DEBUG]: Added 'getgroups' at hash: 3
[FUNCS][DEBUG]: Adding prototype for 'gethostid', hash: 114
[FUNCS][DEBUG]: New entry at hash: 114
[FUNCS][DEBUG]: Adding prototype for 'getlogin', hash: 90
[FUNCS][DEBUG]: Passing 'chown' at hash: 90
[FUNCS][DEBUG]: Added 'getlogin' at hash: 90
[FUNCS][DEBUG]: Adding prototype for 'getlogin_r', hash: 77
[FUNCS][DEBUG]: New entry at hash: 77
[FUNCS][DEBUG]: Adding prototype for 'getopt', hash: 100
[FUNCS][DEBUG]: Added 'getopt' at hash: 100
[FUNCS][DEBUG]: Adding prototype for 'getpagesize', hash: 127
[FUNCS][DEBUG]: Passing 'tolower' at hash: 127
[FUNCS][DEBUG]: Added 'getpagesize' at hash: 127
[FUNCS][DEBUG]: Adding prototype for 'getpass', hash: 0
[FUNCS][DEBUG]: Added 'getpass' at hash: 0
[FUNCS][DEBUG]: Adding prototype for 'getpgid', hash: 65
[FUNCS][DEBUG]: New entry at hash: 65
[FUNCS][DEBUG]: Adding prototype for 'getpgrp', hash: 100
[FUNCS][DEBUG]: Passing 'gets' at hash: 100
[FUNCS][DEBUG]: Added 'getpgrp' at hash: 100
[FUNCS][DEBUG]: Adding prototype for 'getpid', hash: 60
[FUNCS][DEBUG]: New entry at hash: 60
[FUNCS][DEBUG]: Adding prototype for 'getppid', hash: 10
[FUNCS][DEBUG]: New entry at hash: 10
[FUNCS][DEBUG]: Adding prototype for 'getsid', hash: 127
[FUNCS][DEBUG]: Passing 'tolower' at hash: 127
[FUNCS][DEBUG]: Passing 'clearerr' at hash: 127
[FUNCS][DEBUG]: Added 'getsid' at hash: 127
[FUNCS][DEBUG]: Adding prototype for 'getuid', hash: 1
[FUNCS][DEBUG]: New entry at hash: 1
[FUNCS][DEBUG]: Adding prototype for 'getwd', hash: 124
[FUNCS][DEBUG]: Added 'getwd' at hash: 124
[FUNCS][DEBUG]: Adding prototype for 'isatty', hash: 105
[FUNCS][DEBUG]: Added 'isatty' at hash: 105
[FUNCS][DEBUG]: Adding prototype for 'lchown', hash: 92
[FUNCS][DEBUG]: Passing 'isdigit' at hash: 92
[FUNCS][DEBUG]: Added 'lchown' at hash: 92
[FUNCS][DEBUG]: Adding prototype for 'link', hash: 1
[FUNCS][DEBUG]: Added 'link' at hash: 1
[FUNCS][DEBUG]: Adding prototype for 'lockf', hash: 116
[FUNCS][DEBUG]: New entry at hash: 116
[FUNCS][DEBUG]: Adding prototype for 'lseek', hash: 61
[FUNCS][DEBUG]: Added 'lseek' at hash: 61
[FUNCS][DEBUG]: Adding prototype for 'nice', hash: 100
[FUNCS][DEBUG]: Passing 'gets' at hash: 100
[FUNCS][DEBUG]: Passing 'getopt' at hash: 100
[FUNCS][DEBUG]: Added 'nice' at hash: 100
[FUNCS][DEBUG]: Adding prototype for 'pathconf', hash: 80
[FUNCS][DEBUG]: New entry at hash: 80
[FUNCS][DEBUG]: Adding prototype for 'pause', hash: 79
[FUNCS][DEBUG]: New entry at hash: 79
[FUNCS][DEBUG]: Adding prototype for 'pipe', hash: 53
[FUNCS][DEBUG]: Added 'pipe' at hash: 53
[FUNCS][DEBUG]: Adding prototype for 'pread', hash: 95
[FUNCS][DEBUG]: Added 'pread' at hash: 95
[FUNCS][DEBUG]: Adding prototype for 'pthread_atfork', hash: 33
[FUNCS][DEBUG]: Added 'pthread_atfork' at hash: 33
[FUNCS][DEBUG]: Adding prototype for 'pwrite', hash: 54
[FUNCS][DEBUG]: New entry at hash: 54
[FUNCS][DEBUG]: Adding prototype for 'read', hash: 29
[FUNCS][DEBUG]: New entry at hash: 29
[FUNCS][DEBUG]: Adding prototype for 'readlink', hash: 23
[FUNCS][DEBUG]: New entry at hash: 23
[FUNCS][DEBUG]: Adding prototype for 'rmdir', hash: 75
[FUNCS][DEBUG]: Passing 'remove' at hash: 75
[FUNCS][DEBUG]: Added 'rmdir' at hash: 75
[FUNCS][DEBUG]: Adding prototype for 'sbrk', hash: 79
[FUNCS][DEBUG]: Added 'sbrk' at hash: 79
[FUNCS][DEBUG]: Adding prototype for 'setgid', hash: 103
[FUNCS][DEBUG]: New entry at hash: 103
[FUNCS][DEBUG]: Adding prototype for 'setpgid', hash: 77
[FUNCS][DEBUG]: Added 'setpgid' at hash: 77
[FUNCS][DEBUG]: Adding prototype for 'setpgrp', hash: 112
[FUNCS][DEBUG]: Added 'setpgrp' at hash: 112
[FUNCS][DEBUG]: Adding prototype for 'setregid', hash: 20
[FUNCS][DEBUG]: New entry at hash: 20
[FUNCS][DEBUG]: Adding prototype for 'setreuid', hash: 34
[FUNCS][DEBUG]: Added 'setreuid' at hash: 34
[FUNCS][DEBUG]: Adding prototype for 'setsid', hash: 115
[FUNCS][DEBUG]: Passing 'fputc' at hash: 115
[FUNCS][DEBUG]: Passing 'free' at hash: 115
[FUNCS][DEBUG]: Added 'setsid' at hash: 115
[FUNCS][DEBUG]: Adding prototype for 'setuid', hash: 117
[FUNCS][DEBUG]: New entry at hash: 117
[FUNCS][DEBUG]: Adding prototype for 'sleep', hash: 48
[FUNCS][DEBUG]: Added 'sleep' at hash: 48
[FUNCS][DEBUG]: Adding prototype for 'swab', hash: 12
[FUNCS][DEBUG]: Added 'swab' at hash: 12
[FUNCS][DEBUG]: Adding prototype for 'symlink', hash: 90
[FUNCS][DEBUG]: Passing 'chown' at hash: 90
[FUNCS][DEBUG]: Passing 'fsync' at hash: 90
[FUNCS][DEBUG]: Added 'symlink' at hash: 90
[FUNCS][DEBUG]: Adding prototype for 'sync', hash: 34
[FUNCS][DEBUG]: Passing 'fchown' at hash: 34
[FUNCS][DEBUG]: Added 'sync' at hash: 34
[FUNCS][DEBUG]: Adding prototype for 'sysconf', hash: 10
[FUNCS][DEBUG]: Added 'sysconf' at hash: 10
[FUNCS][DEBUG]: Adding prototype for 'tcgetpgrp', hash: 85
[FUNCS][DEBUG]: Passing 'localeconv' at hash: 85
[FUNCS][DEBUG]: Added 'tcgetpgrp' at hash: 85
[FUNCS][DEBUG]: Adding prototype for 'truncate', hash: 109
[FUNCS][DEBUG]: New entry at hash: 109
[FUNCS][DEBUG]: Adding prototype for 'ttyname', hash: 29
[FUNCS][DEBUG]: Added 'ttyname' at hash: 29
[FUNCS][DEBUG]: Adding prototype for 'ttyname_r', hash: 80
[FUNCS][DEBUG]: Added 'ttyname_r' at hash: 80
[FUNCS][DEBUG]: Adding prototype for 'ualarm', hash: 67
[FUNCS][DEBUG]: Added 'ualarm' at hash: 67
[FUNCS][DEBUG]: Adding prototype for 'unlink', hash: 90
[FUNCS][DEBUG]: Passing 'chown' at hash: 90
[FUNCS][DEBUG]: Passing 'fsync' at hash: 90
[FUNCS][DEBUG]: Passing 'getlogin' at hash: 90
[FUNCS][DEBUG]: Added 'unlink' at hash: 90
[FUNCS][DEBUG]: Adding prototype for 'usleep', hash: 73
[FUNCS][DEBUG]: Added 'usleep' at hash: 73
[FUNCS][DEBUG]: Adding prototype for 'vfork', hash: 17
[FUNCS][DEBUG]: New entry at hash: 17
[FUNCS][DEBUG]: Adding prototype for 'write', hash: 56
[FUNCS][DEBUG]: Added 'write' at hash: 56
[TYPES][DEBUG]: Adding data type 'int', hash: 8
[TYPES][DEBUG]: New entry at hash: 8
[TYPES][DEBUG]: Adding data type 'unsigned int', hash: 11
[TYPES][DEBUG]: New entry at hash: 11
[TYPES][DEBUG]: Adding data type 'int16_t', hash: 2
[TYPES][DEBUG]: New entry at hash: 2
[TYPES][DEBUG]: Adding data type 'long int', hash: 2
[TYPES][DEBUG]: Added 'long int' at hash: 2
[TYPES][DEBUG]: Adding data type 'unsigned long int', hash: 15
[TYPES][DEBUG]: New entry at hash: 15
[TYPES][DEBUG]: Adding data type 'sz', hash: 14
[TYPES][DEBUG]: New entry at hash: 14
[TYPES][DEBUG]: Adding data type 'size_t', hash: 13
[TYPES][DEBUG]: New entry at hash: 13
[TYPES][DEBUG]: Adding data type 'char', hash: 13
[TYPES][DEBUG]: Added 'char' at hash: 13
[TYPES][DEBUG]: Adding data type 'ptr', hash: 7
[TYPES][DEBUG]: New entry at hash: 7
[TYPES][DEBUG]: Adding data type 'intptr_t', hash: 11
[TYPES][DEBUG]: Added 'intptr_t' at hash: 11
[TYPES][DEBUG]: Adding data type 'iovec', hash: 7
[TYPES][DEBUG]: Added 'iovec' at hash: 7
[TYPES][DEBUG]: Adding data type 'useconds_t', hash: 6
[TYPES][DEBUG]: New entry at hash: 6
[TYPES][DEBUG]: Adding data type 'gid_t', hash: 0
[TYPES][DEBUG]: New entry at hash: 0
[TYPES][DEBUG]: Adding data type 'pid_t', hash: 9
[TYPES][DEBUG]: New entry at hash: 9
[TYPES][DEBUG]: Adding data type 'uid_t', hash: 14
[TYPES][DEBUG]: Added 'uid_t' at hash: 14
[TYPES][DEBUG]: Adding data type 'off_t', hash: 13
[TYPES][DEBUG]: Passing 'size_t' at hash: 13
[TYPES][DEBUG]: Added 'off_t' at hash: 13
[ACT][DEBUG]: Adding action 'log_params', hash: 8
[ACT][DEBUG]: New entry at hash: 8
[ACT][DEBUG]: Adding action 'call_real', hash: 24
[ACT][DEBUG]: New entry at hash: 24
[ACT][DEBUG]: Adding action 'modify_in_param_str', hash: 3
[ACT][DEBUG]: New entry at hash: 3
[ACT][DEBUG]: Adding action 'modify_in_param_int', hash: 1
[ACT][DEBUG]: New entry at hash: 1
[ACT][DEBUG]: Adding action 'modify_in_param_arr', hash: 19
[ACT][DEBUG]: New entry at hash: 19
[MAIN][INFO]: retrace init success
[FUNCS][DEBUG]: Seraching for prototype for 'getenv', hash: 30
[FUNCS][DEBUG]: Found 'getenv' at hash: 30
[ACT][DEBUG]: Seraching for action for 'log_params', hash: 8
[ACT][DEBUG]: Found 'log_params' at hash: 8
[ENGINE][DEBUG]: Running action log_params, for getenv:(nil), tpid 0x7f9474379700...
[TYPES][DEBUG]: Seraching for datatype for 'ptr', hash: 7
[TYPES][DEBUG]: Found 'ptr' at hash: 7
[TYPES][DEBUG]: Seraching for datatype for 'sz', hash: 14
[TYPES][DEBUG]: Found 'sz' at hash: 14
[ACT][INFO]: {
    "name": "0x7ffcc2fb9186",
    "*name": [
        "LD_PRELOAD"
    ]
}
[ACT][DEBUG]: Seraching for action for 'call_real', hash: 24
[ACT][DEBUG]: Found 'call_real' at hash: 24
[ENGINE][DEBUG]: Running action call_real, for getenv:(nil), tpid 0x7f9474379700...
[ACT][DEBUG]: calling real at 0x7f9473b3e770 for getenv...
[ACT][DEBUG]: real returned val=0x7ffcc2fb92ac
[FUNCS][DEBUG]: Seraching for prototype for 'printf', hash: 32
[FUNCS][DEBUG]: Not found 'printf'
'LD_PRELOAD' = '/home/dev/work/ribose/retrace/src/retrace_v2/examples/getenv/../../retrace_v2.so

Is that expected?

@ghost
Copy link

ghost commented Jul 4, 2018 via email

@jjr840430
Copy link
Contributor Author

@ikolomi Thanks for your help!

@ghost
Copy link

ghost commented Jul 4, 2018 via email

@jjr840430 jjr840430 self-assigned this Jul 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant