-
Notifications
You must be signed in to change notification settings - Fork 8
Library
tmatis edited this page Mar 26, 2023
·
1 revision
The library is responsible for injecting hooks in the program to debug. It will also send the backtrace of the functions to test to the host or make them fail by return a fake error return value.
-
srcs/
: contains the source code of the library. -
srcs/backtrace/
: contains tools to get backtraces. as relative addresses usingdladdr
andbacktrace
. -
srcs/env
: contains the code that remove LD_PRELOAD from the environment variables. so the library is not loaded again if the program to debug launch another program. -
srcs/events
: contains the code to send events to the host. -
srcs/function_seach
: contains the code to search the original function in the program to debug since the real one is hooked so we search withdlsym
the original function and store it in a binary search tree so we can find it faster the next time it's called. -
srcs/hooks
: contains various utilities to hook functions. -
srcs/hooks/allocs
: contains the code to hookmalloc
,calloc
,realloc
-
srcs/hooks/functions
: contains the code to various functions to hook. see Functions.md. -
srcs/setup
: contains the code to setup the library. (open the shared memory, ...) -
srcs/shared_memory
: contains the code to interact with the shared memory. -
srcs/utils
: various utilities.