diff --git a/run/backtrace.run b/run/backtrace.run new file mode 100644 index 000000000..e8a192a7d --- /dev/null +++ b/run/backtrace.run @@ -0,0 +1,66 @@ +build "core init timer test/backtrace" + +create_boot_directory + +install_config { + + + + + + + + + + + + + + + + + + + + + + + + + + 2019-08-20 15:01 + + + + + + + + + + + + + + + + + + + + + + +} + +exec ln -sf ../debug/test-backtrace bin/test-backtrace.debug + +build_boot_image { + core init timer test-backtrace + ld.lib.so libc.lib.so vfs.lib.so libm.lib.so posix.lib.so + test-backtrace.debug +} + +append qemu_args " -nographic " + +run_genode_until "child .* exited with exit value 0.*\n" 30 diff --git a/src/test/backtrace/main.cc b/src/test/backtrace/main.cc new file mode 100644 index 000000000..7eaa6bc79 --- /dev/null +++ b/src/test/backtrace/main.cc @@ -0,0 +1,24 @@ +/* + * \brief libbacktrace test + * \author Christian Prochaska + * \date 2023-01-28 + */ + +/* + * Copyright (C) 2023 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU Affero General Public License version 3. + */ + +#include + +int main(int argc, char **argv) +{ + struct backtrace_state *state = + backtrace_create_state(NULL, 0, NULL, NULL); + + backtrace_print(state, 0, stdout); + + return 0; +} diff --git a/src/test/backtrace/target.mk b/src/test/backtrace/target.mk new file mode 100644 index 000000000..54761cef6 --- /dev/null +++ b/src/test/backtrace/target.mk @@ -0,0 +1,5 @@ +TARGET = test-backtrace +SRC_CC = main.cc +LIBS = posix backtrace + +CC_CXX_WARN_STRICT =