mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 16:48:52 +08:00
platforms: remove px4_backtrace
This commit is contained in:
@@ -42,9 +42,6 @@
|
||||
|
||||
#include <px4_log.h>
|
||||
#if defined(__PX4_POSIX)
|
||||
#if !defined(__PX4_CYGWIN)
|
||||
#include <execinfo.h>
|
||||
#endif
|
||||
#include <px4_daemon/server_io.h>
|
||||
#endif
|
||||
|
||||
@@ -78,27 +75,6 @@ void px4_log_initialize(void)
|
||||
}
|
||||
}
|
||||
|
||||
void px4_backtrace()
|
||||
{
|
||||
#if defined(__PX4_POSIX) && !defined(__PX4_CYGWIN)
|
||||
void *buffer[10];
|
||||
char **callstack;
|
||||
int bt_size;
|
||||
int idx;
|
||||
|
||||
bt_size = backtrace(buffer, 10);
|
||||
callstack = backtrace_symbols(buffer, bt_size);
|
||||
|
||||
PX4_INFO("Backtrace: %d", bt_size);
|
||||
|
||||
for (idx = 0; idx < bt_size; idx++) {
|
||||
PX4_INFO("%s", callstack[idx]);
|
||||
}
|
||||
|
||||
free(callstack);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
__EXPORT void px4_log_modulename(int level, const char *moduleName, const char *fmt, ...)
|
||||
{
|
||||
|
||||
@@ -127,7 +127,6 @@ __BEGIN_DECLS
|
||||
|
||||
__EXPORT extern const char *__px4_log_level_str[_PX4_LOG_LEVEL_PANIC + 1];
|
||||
__EXPORT extern const char *__px4_log_level_color[_PX4_LOG_LEVEL_PANIC + 1];
|
||||
__EXPORT extern void px4_backtrace(void);
|
||||
__EXPORT void px4_log_modulename(int level, const char *moduleName, const char *fmt, ...)
|
||||
__attribute__((format(printf, 3, 4)));
|
||||
__EXPORT void px4_log_raw(int level, const char *fmt, ...)
|
||||
|
||||
Reference in New Issue
Block a user