genode/repos/os/include/os
Christian Helmuth 4a2319a4d6 os: limit backtrace to stack of current thread
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
2024-02-26 08:31:02 +01:00
..
attached_mmio.h Streamline exception types 2017-05-31 13:16:07 +02:00
backtrace.h os: limit backtrace to stack of current thread 2024-02-26 08:31:02 +01:00
buffered_xml.h os/buffered_xml.h: support for generating XML 2020-02-04 15:51:09 +01:00
child_policy_dynamic_rom.h os: use Mutex/Blockade 2020-04-17 12:40:12 +02:00
dither_painter.h Adjust file headers to refer to the AGPLv3 2017-02-28 12:59:29 +01:00
dynamic_rom_session.h os: use Mutex/Blockade 2020-04-17 12:40:12 +02:00
handle_registry.h os: make nitpicker compatible to C++20 2023-05-30 12:03:29 +02:00
packet_allocator.h os: avoid implicit conversions 2021-12-17 15:04:45 +01:00
packet_stream.h nic_router: packet allocation w/o exceptions 2022-08-10 13:33:03 +02:00
path.h os/path.h: fix misleading comments 2023-06-16 11:24:25 +02:00
pin_driver.h os/pin_driver: support for time-multiplexed in/out 2022-11-17 08:00:35 +01:00
pixel_alpha8.h os: avoid implicit conversions 2021-12-17 15:04:45 +01:00
pixel_rgb565.h os: avoid implicit conversions 2021-12-17 15:04:45 +01:00
pixel_rgb888.h Change pixel format to 32 bits per pixel 2020-06-29 14:22:29 +02:00
pixel_rgba.h os: avoid implicit conversions 2021-12-17 15:04:45 +01:00
reporter.h expanding_report: make expandable for XML node generation 2022-02-15 16:13:53 +01:00
ring_buffer.h os: use Mutex/Blockade 2020-04-17 12:40:12 +02:00
session_policy.h xml_node: change with_sub_node signature 2022-09-19 14:00:33 +02:00
session_requester.h os: avoid using deprecated APIs 2019-01-30 13:49:54 +01:00
static_parent_services.h os: avoid using deprecated APIs 2019-01-30 13:49:54 +01:00
static_root.h Follow practices suggested by "Effective C++" 2018-01-17 12:14:35 +01:00
surface.h Follow practices suggested by "Effective C++" 2018-01-17 12:14:35 +01:00
texture_rgb565.h Adjust file headers to refer to the AGPLv3 2017-02-28 12:59:29 +01:00
texture_rgb888.h os: avoid implicit conversions 2021-12-17 15:04:45 +01:00
texture.h os: avoid implicit conversions 2021-12-17 15:04:45 +01:00
vfs.h os/vfs.h: don't truncate File_content 2023-03-15 17:05:35 +01:00