more compilation flags for stack traces (#19899)
Costa Tsaousis committed
Mar 19, 2025 at 01:01 UTC
10f1f9b4a8dc0724b165cf801d0b6160f10f63a1
2 files changed
+6
-4
CMakeLists.txt
+5
-3
@@ -488,10 +488,12 @@ check_function_exists(sysinfo HAVE_SYSINFO)
488
check_function_exists(timegm HAVE_TIMEGM)
489
490
if(CMAKE_C_COMPILER_ID MATCHES "GNU|Clang")
491
- add_compile_options(-funwind-tables)
492
- add_compile_options(-fno-omit-frame-pointer)
491
+ # -fno-omit-frame-pointer = add frame pointers to all functions
492
+ # -funwind-tables = generate unwind tables for all functions
493
+ # -fasynchronous-unwind-tables = the unwind table generated is precise at instruction boundary, instead of function boundary
494
+ add_compile_options(-fno-omit-frame-pointer -funwind-tables -fasynchronous-unwind-tables)
495
add_link_options(-rdynamic)
494
- message(STATUS "Adding -rdynamic (link) and -funwind-tables (compile) for better stack trace support")
496
+ message(STATUS "Added compiler and linker flags for better stack trace support")
497
endif()
498
499
#
src/daemon/daemon-status-file.h
+1
-1
@@ -7,7 +7,7 @@
7
#include "daemon/config/netdata-conf-profile.h"
8
#include "database/rrd-database-mode.h"
9
10
-#define STATUS_FILE_VERSION 18
10
+#define STATUS_FILE_VERSION 19
11
12
typedef enum {
13
DAEMON_STATUS_NONE,