Skip to content

Commit

Permalink
platforms: remove px4_backtrace
Browse files Browse the repository at this point in the history
  • Loading branch information
julianoes committed Jun 4, 2019
1 parent 5334d34 commit e2244c6
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 25 deletions.
24 changes: 0 additions & 24 deletions src/platforms/common/px4_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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, ...)
{
Expand Down
1 change: 0 additions & 1 deletion src/platforms/px4_log.h
Original file line number Diff line number Diff line change
Expand Up @@ -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, ...)
Expand Down

0 comments on commit e2244c6

Please sign in to comment.