diff --git a/lib/examples/CMakeLists.txt b/lib/examples/CMakeLists.txt index 3577af08e..2ab3d45fa 100644 --- a/lib/examples/CMakeLists.txt +++ b/lib/examples/CMakeLists.txt @@ -63,10 +63,10 @@ endif(SRSGUI_FOUND) if(RF_FOUND) add_executable(cell_search cell_search.c) - target_link_libraries(cell_search srslte_phy srslte_rf) + target_link_libraries(cell_search srslte_phy srslte_common srslte_rf) add_executable(cell_measurement cell_measurement.c) - target_link_libraries(cell_measurement srslte_phy srslte_rf) + target_link_libraries(cell_measurement srslte_phy srslte_common srslte_rf) add_executable(usrp_capture usrp_capture.c) target_link_libraries(usrp_capture srslte_phy srslte_rf) diff --git a/lib/examples/cell_measurement.c b/lib/examples/cell_measurement.c index 3185b74f1..d21716776 100644 --- a/lib/examples/cell_measurement.c +++ b/lib/examples/cell_measurement.c @@ -40,6 +40,7 @@ #include "srslte/srslte.h" #include "srslte/phy/rf/rf.h" #include "srslte/phy/rf/rf_utils.h" +#include "srslte/common/debug.h" cell_search_cfg_t cell_detect_config = { SRSLTE_DEFAULT_MAX_FRAMES_PBCH, diff --git a/lib/examples/pdsch_enodeb.c b/lib/examples/pdsch_enodeb.c index 2ecfee771..122067176 100644 --- a/lib/examples/pdsch_enodeb.c +++ b/lib/examples/pdsch_enodeb.c @@ -33,6 +33,7 @@ #include #include #include +#include "srslte/common/debug.h" #include #include #include "srslte/common/gen_mch_tables.h" diff --git a/lib/examples/pdsch_ue.c b/lib/examples/pdsch_ue.c index 3b84afb71..4918a52d7 100644 --- a/lib/examples/pdsch_ue.c +++ b/lib/examples/pdsch_ue.c @@ -37,6 +37,7 @@ #include #include #include "srslte/common/gen_mch_tables.h" +#include "srslte/common/debug.h" #include #include "srslte/phy/io/filesink.h" #include "srslte/srslte.h" diff --git a/lib/include/srslte/phy/utils/debug.h b/lib/include/srslte/phy/utils/debug.h index 7fe532eb4..748134284 100644 --- a/lib/include/srslte/phy/utils/debug.h +++ b/lib/include/srslte/phy/utils/debug.h @@ -32,8 +32,8 @@ * Reference: *****************************************************************************/ -#ifndef SRSLTE_DEBUG_H -#define SRSLTE_DEBUG_H +#ifndef SRSLTE_PHY_DEBUG_H +#define SRSLTE_PHY_DEBUG_H #include #include "srslte/config.h" diff --git a/lib/include/srslte/srslte.h b/lib/include/srslte/srslte.h index f87a1bf2c..0304e34ca 100644 --- a/lib/include/srslte/srslte.h +++ b/lib/include/srslte/srslte.h @@ -31,7 +31,7 @@ #ifdef __cplusplus extern "C" { #endif - + #include #include @@ -49,7 +49,8 @@ #include "srslte/phy/common/sequence.h" #include "srslte/phy/common/phy_common.h" #include "srslte/phy/common/phy_logger.h" - +#include "srslte/common/debug.h" + #include "srslte/phy/ch_estimation/chest_ul.h" #include "srslte/phy/ch_estimation/chest_dl.h" #include "srslte/phy/ch_estimation/refsignal_dl.h" @@ -104,7 +105,7 @@ #include "srslte/phy/phch/regs.h" #include "srslte/phy/phch/sch.h" #include "srslte/phy/phch/uci.h" - + #include "srslte/phy/ue/ue_sync.h" #include "srslte/phy/ue/ue_mib.h" #include "srslte/phy/ue/ue_cell_search.h" diff --git a/lib/src/common/debug.c b/lib/src/common/debug.c index 5eeda27bc..e577c8740 100644 --- a/lib/src/common/debug.c +++ b/lib/src/common/debug.c @@ -41,6 +41,7 @@ static void crash_handler(int sig) { void *array[128]; int size; + /* Get all stack traces */ size = backtrace(array, 128); diff --git a/lib/src/phy/utils/debug.c b/lib/src/phy/utils/debug.c index 17d6a79c2..dc37800cd 100644 --- a/lib/src/phy/utils/debug.c +++ b/lib/src/phy/utils/debug.c @@ -24,14 +24,8 @@ * */ -#include -#include -#include -#include #include - #include "srslte/phy/utils/debug.h" -#include "srslte/version.h" int srslte_verbose = 0; int handler_registered = 0; diff --git a/srsenb/src/main.cc b/srsenb/src/main.cc index eab5d4bcf..5c86570d8 100644 --- a/srsenb/src/main.cc +++ b/srsenb/src/main.cc @@ -31,6 +31,7 @@ #include #include "srslte/common/config_file.h" +#include "srslte/common/debug.h" #include #include diff --git a/srsue/src/main.cc b/srsue/src/main.cc index f71f9ac6f..4279c8286 100644 --- a/srsue/src/main.cc +++ b/srsue/src/main.cc @@ -38,6 +38,7 @@ #include "srsue/hdr/ue.h" #include "srslte/common/config_file.h" +#include "srslte/common/debug.h" #include "srslte/srslte.h" #include "srsue/hdr/metrics_stdout.h" #include "srsue/hdr/metrics_csv.h"