mirror of
https://github.com/netdata/netdata.git
synced 2025-04-24 13:14:11 +00:00
more compilation flags for stack traces (#19899)
This commit is contained in:
parent
2198965ed5
commit
10f1f9b4a8
2 changed files with 6 additions and 4 deletions
|
@ -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()
|
||||
|
||||
#
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue