Skip to content

Commit a3f7907

Browse files
committed
Add deleted syscall dependency
1 parent 708081e commit a3f7907

File tree

5 files changed

+7
-13
lines changed

5 files changed

+7
-13
lines changed

attach/syscall_trace_attach_impl/src/syscall_trace_attach_impl.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,8 @@ int64_t syscall_trace_attach_impl::dispatch_syscall(int64_t sys_nr,
1616
int64_t arg3, int64_t arg4,
1717
int64_t arg5, int64_t arg6)
1818
{
19-
#if __linux__
2019
if (sys_nr == __NR_exit_group || sys_nr == __NR_exit)
2120
return orig_syscall(sys_nr, arg1, arg2, arg3, arg4, arg5, arg6);
22-
#endif
2321
SPDLOG_DEBUG("Syscall callback {} {} {} {} {} {} {}", sys_nr, arg1,
2422
arg2, arg3, arg4, arg5, arg6);
2523
// Indicate whether the return value is overridden

attach/text_segment_transformer/agent-transformer.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,7 @@ extern "C" void bpftime_agent_main(const gchar *data, gboolean *stay_resident)
7373
cs_arch_register_x86();
7474
bpftime::setup_syscall_tracer();
7575
SPDLOG_DEBUG("Loading dynamic library..");
76-
#if __linux__
77-
auto next_handle =
78-
dlmopen(LM_ID_NEWLM, agent_so, RTLD_NOW | RTLD_LOCAL);
79-
#elif __APPLE__
80-
auto next_handle = dlopen(agent_so, RTLD_NOW | RTLD_LOCAL);
81-
#endif
76+
auto next_handle = dlmopen(LM_ID_NEWLM, agent_so, RTLD_NOW | RTLD_LOCAL);
8277
if (next_handle == nullptr) {
8378
SPDLOG_ERROR("Failed to open agent: {}", dlerror());
8479
exit(1);

cmake/StandardSettings.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ endif()
5353

5454
option(BPFTIME_ENABLE_CCACHE "Enable the usage of Ccache, in order to speed up rebuild times." OFF)
5555
find_program(CCACHE_FOUND ccache)
56-
# if(CCACHE_FOUND)
57-
# set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
58-
# set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
59-
# endif()
56+
if(CCACHE_FOUND)
57+
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
58+
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
59+
endif()
6060

6161
option(BPFTIME_ENABLE_ASAN "Enable Address Sanitize to detect memory error." OFF)
6262
if(BPFTIME_ENABLE_ASAN)

cmake/frida.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ elseif(${FRIDA_OS_ARCH} MATCHES "linux-arm.*")
2626
set(FRIDA_GUM_DEVKIT_SHA256 "6b5963eb740062aec6c22c46ec2944a68006f72d290f714fb747ffe75b448a60")
2727
# Frida only has armhf builds..
2828
set(FRIDA_OS_ARCH "linux-armhf")
29-
elseif(${FRIDA_OS_ARCH} MATCHES "darwin-arm.*")
29+
elseif(${FRIDA_OS_ARCH} MATCHES "darwin-arm64")
3030
set(FRIDA_CORE_DEVKIT_SHA256 "7811e516e6b7bbc0153d30095560e0b1133f154060c5542764100d3e0eb2ab2b")
3131
set(FRIDA_GUM_DEVKIT_SHA256 "03f6085ae5330cf38e0a498784500675fc5bd7361bb551a9097ba5fe397aceda")
3232
# for macos-arm m* chip series

runtime/agent/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ target_link_libraries(bpftime-agent
2525
-ldl
2626
spdlog::spdlog
2727
bpftime_frida_uprobe_attach_impl
28+
bpftime_syscall_trace_attach_impl
2829
)
2930

3031
else()

0 commit comments

Comments
 (0)