lx_emul: add lx_emul_backtrace()

Issue #4542
This commit is contained in:
Christian Helmuth
2022-06-15 09:33:19 +02:00
parent 3b3eef5307
commit 0f009ecbdd
2 changed files with 12 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
/*
* \brief Lx_emul support to debug Linux kernel ports
* \author Stefan Kalkowski
* \author Christian Helmuth
* \date 2021-03-16
*/
@@ -22,6 +23,8 @@ __attribute__((noreturn)) void lx_emul_trace_and_stop(const char * func);
void lx_emul_trace(const char * func);
void lx_emul_backtrace(void);
#ifdef __cplusplus
}
#endif

View File

@@ -1,6 +1,7 @@
/*
* \brief Lx_emul backend for Linux kernel' debug functions
* \author Stefan Kalkowski
* \author Christian Helmuth
* \date 2021-03-16
*/
@@ -17,10 +18,10 @@
#include <lx_emul/debug.h>
using namespace Genode;
extern "C" void lx_emul_trace_and_stop(const char * func)
{
using namespace Genode;
error("Function ", func, " not implemented yet!");
log("Backtrace follows:");
backtrace();
@@ -30,3 +31,9 @@ extern "C" void lx_emul_trace_and_stop(const char * func)
extern "C" void lx_emul_trace(const char *) {}
extern "C" void lx_emul_backtrace()
{
backtrace();
}