From cd7612700d19b37825c50dcdb43ae125abb49730 Mon Sep 17 00:00:00 2001 From: tqcq <99722391+tqcq@users.noreply.github.com> Date: Tue, 30 Apr 2024 09:44:13 +0800 Subject: [PATCH] feat update --- CMakeLists.txt | 3 ++- src/sled/system/hot_reloader_test_dynamic.cc | 6 ++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8028ed8..af601c1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -228,7 +228,8 @@ if(SLED_BUILD_TESTS) add_library(hot_reloader_test_dynamic SHARED src/sled/system/hot_reloader_test_dynamic.cc) - target_link_libraries(hot_reloader_test_dynamic PRIVATE sled) + target_include_directories(hot_reloader_test_dynamic PRIVATE src/) + # target_link_libraries(hot_reloader_test_dynamic PRIVATE sled) message( STATUS "HOT_RELOADER_TEST_DYNAMIC_LOCATION ${hot_reloader_test_dynamic}") get_target_property(HOT_RELOADER_TEST_DYNAMIC_LOCATION diff --git a/src/sled/system/hot_reloader_test_dynamic.cc b/src/sled/system/hot_reloader_test_dynamic.cc index 3434f3b..adee00f 100644 --- a/src/sled/system/hot_reloader_test_dynamic.cc +++ b/src/sled/system/hot_reloader_test_dynamic.cc @@ -1,4 +1,5 @@ -#include +#include "sled/lang/attributes.h" +#include void crash() @@ -19,7 +20,8 @@ sled_hot_loader_main(void *ctx, int op) int *value_ptr = reinterpret_cast(userdata); int crash_type = *value_ptr; *value_ptr = -1; - LOGD("plugin ", "sled_hot_loader_main: op={}, crash={}", op, crash_type); + fprintf(stderr, "plugin sled_hot_loader_main: op=%d, crash=%d\n", op, crash_type); + // LOGD("plugin ", "sled_hot_loader_main: op={}, crash={}", op, crash_type); switch (op) { // On Load