Skip to content

Commit

Permalink
Refactor syscall logging
Browse files Browse the repository at this point in the history
 * Syscall logging has its own translation unit(s).
 * The syscall argument formats are stored in a table, which
makes them easier to maintain.
 * Removed some libc usages, just to make sure syscall_intercept
is not surprised by something unexpected going on in sprintf calls
(such as libc opening a file to read locales, other tracing, or whatnot).
 * Interpreting error codes returned by syscalls.
  • Loading branch information
GBuella committed Oct 13, 2017
1 parent a3b783b commit 50b3673
Show file tree
Hide file tree
Showing 13 changed files with 1,930 additions and 1,519 deletions.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,11 @@ set(SOURCES_C
src/disasm_wrapper.c
src/intercept.c
src/intercept_desc.c
src/intercept_log.c
src/intercept_util.c
src/patcher.c
src/magic_syscalls.c)
src/magic_syscalls.c
src/syscall_formats.c)

set(SOURCES_ASM
src/intercept_template.s
Expand Down
1 change: 1 addition & 0 deletions src/intercept.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
#include <sys/auxv.h>

#include "intercept.h"
#include "intercept_log.h"
#include "intercept_util.h"
#include "libsyscall_intercept_hook_point.h"
#include "disasm_wrapper.h"
Expand Down
Loading

0 comments on commit 50b3673

Please sign in to comment.