mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-19 13:47:56 +00:00
4a2319a4d6
The frame-pointer-based backtrace does not work without enabling -fno-omit-frame-pointer explicitly and in most cases leads to page faults because non-pointer stack values are dereferenced during the walk. The best we can do is to limit the backtrace walk to the stack of the current thread to prevent page faults unrelated to the system state without the use of the backtrace utility. This commit introduces a printable Backtrace class usable in Genode::log(), Genode::trace(), etc. The class is based on the new function for_each_return_address(auto const &fn) that walks the stack in its limits and calls fn() for each discovered return address on the stack in the new os/include/os/backtrace.h. Archtecture-specific stack-pointer retrieval and walk loops are implemented in dedicated os/include/spec/<arch>/os/for_each_return_address.h files. Also, the well-known Genode::backtrace() function (which logs the return-address values) is provided for backwards compatibility. Fixes #5078 |
||
---|---|---|
.. | ||
doc | ||
include | ||
lib | ||
recipes | ||
run | ||
src | ||
xsd | ||
README |
This source-code repository contains genuine low-level OS components and interfaces of Genode. It solely depends on the framework's base API.