0
0
Fork 0
mirror of https://github.com/netdata/netdata.git synced 2025-04-24 13:14:11 +00:00

more compilation flags for stack traces ()

This commit is contained in:
Costa Tsaousis 2025-03-19 01:01:28 +02:00 committed by GitHub
parent 2198965ed5
commit 10f1f9b4a8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 4 deletions

View file

@ -488,10 +488,12 @@ check_function_exists(sysinfo HAVE_SYSINFO)
check_function_exists(timegm HAVE_TIMEGM)
if(CMAKE_C_COMPILER_ID MATCHES "GNU|Clang")
add_compile_options(-funwind-tables)
add_compile_options(-fno-omit-frame-pointer)
# -fno-omit-frame-pointer = add frame pointers to all functions
# -funwind-tables = generate unwind tables for all functions
# -fasynchronous-unwind-tables = the unwind table generated is precise at instruction boundary, instead of function boundary
add_compile_options(-fno-omit-frame-pointer -funwind-tables -fasynchronous-unwind-tables)
add_link_options(-rdynamic)
message(STATUS "Adding -rdynamic (link) and -funwind-tables (compile) for better stack trace support")
message(STATUS "Added compiler and linker flags for better stack trace support")
endif()
#

View file

@ -7,7 +7,7 @@
#include "daemon/config/netdata-conf-profile.h"
#include "database/rrd-database-mode.h"
#define STATUS_FILE_VERSION 18
#define STATUS_FILE_VERSION 19
typedef enum {
DAEMON_STATUS_NONE,