diff --git a/repos/base-tukija/src/core/pager.cc b/repos/base-tukija/src/core/pager.cc index e1ce660fdd..6e2151d826 100644 --- a/repos/base-tukija/src/core/pager.cc +++ b/repos/base-tukija/src/core/pager.cc @@ -15,6 +15,7 @@ /* Genode includes */ #include +#include /* base-internal includes */ #include @@ -102,18 +103,29 @@ struct Page_fault_info void print(Genode::Output &out) const { - Genode::print(out, "pd='", pd, "' " - "thread='", thread, "' " - "cpu=", cpu, " " - "ip=", Hex(ip), " " - "address=", Hex(addr), " " - "stack pointer=", Hex(sp), " " - "qualifiers=", Hex(pf_type), " ", - pf_type & Ipc_pager::ERR_I ? "I" : "i", - pf_type & Ipc_pager::ERR_R ? "R" : "r", - pf_type & Ipc_pager::ERR_U ? "U" : "u", - pf_type & Ipc_pager::ERR_W ? "W" : "w", - pf_type & Ipc_pager::ERR_P ? "P" : "p"); + Genode::print( + out, "pd='", pd, + "' " + "thread='", + thread, + "' " + "cpu=", + cpu, + " " + "ip=", + Hex(ip), + " " + "address=", + Hex(addr), + " " + "stack pointer=", + Hex(sp), + " " + "qualifiers=", + Hex(pf_type), " ", pf_type & Ipc_pager::ERR_I ? "I" : "i", + pf_type & Ipc_pager::ERR_R ? "R" : "r", pf_type & Ipc_pager::ERR_U ? "U" : "u", + pf_type & Ipc_pager::ERR_W ? "W" : "w", pf_type & Ipc_pager::ERR_P ? "P" : "p"); + Genode::backtrace(); } }; @@ -236,6 +248,8 @@ void Pager_object::exception(uint8_t exit_id) res == 0xFF ? "no signal handler" : (res == NOVA_OK ? "" : "recall failed")); + Genode::backtrace(); + Tukija::revoke(Obj_crd(exc_pt_sel_client(), NUM_INITIAL_PT_LOG2)); enum { TRAP_BREAKPOINT = 3 }; diff --git a/repos/base/src/lib/base/slab.cc b/repos/base/src/lib/base/slab.cc index 3d7f26feec..e3af031075 100644 --- a/repos/base/src/lib/base/slab.cc +++ b/repos/base/src/lib/base/slab.cc @@ -14,6 +14,7 @@ #include #include #include +#include using namespace Genode; @@ -425,6 +426,7 @@ void Slab::_free(void *addr) if (!e->used()) { error("slab address ", addr, " freed which is unused"); + Genode::backtrace(); return; } diff --git a/repos/base/src/lib/cxx/exception.cc b/repos/base/src/lib/cxx/exception.cc index 20afd9bd78..016c37a104 100644 --- a/repos/base/src/lib/cxx/exception.cc +++ b/repos/base/src/lib/cxx/exception.cc @@ -23,6 +23,8 @@ /* base-internal includes */ #include +#include + extern "C" char __eh_frame_start__[]; /* from linker script */ extern "C" void __register_frame (const void *begin); /* from libgcc_eh */ extern "C" char *__cxa_demangle(const char *mangled_name, @@ -63,9 +65,12 @@ static void terminate_handler() Genode::error("Uncaught exception of type " "'", Genode::Cstring(demangled_name), "'"); free(demangled_name); + Genode::backtrace(); } else { - Genode::error("Uncaught exception of type '", t->name(), "' " + Genode::error("Uncaught exception of type '", t->name(), + "' " "(use 'c++filt -t' to demangle)"); + Genode::backtrace(); } }