diff --git a/repos/base/include/base/trace/buffer.h b/repos/base/include/base/trace/buffer.h index 59222f5e89..4ad84bb640 100644 --- a/repos/base/include/base/trace/buffer.h +++ b/repos/base/include/base/trace/buffer.h @@ -257,6 +257,9 @@ class Genode::Trace::Simple_buffer size_t length() const { return _entry->len; } char const *data() const { return _entry->data; } + template + T const &object() const { return *reinterpret_cast(data()); } + /* return whether entry is valid, i.e. length field is present */ bool last() const { return _entry == 0; }