From 2d8a4917a57acc875e471d2beceb6f76e5f0f60a Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Mon, 15 Jun 2015 20:41:03 +0200 Subject: [PATCH] base: add Trace::Subject_info::state_name Issue #813 --- repos/base/include/base/trace/types.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/repos/base/include/base/trace/types.h b/repos/base/include/base/trace/types.h index b096eddb9d..c110802231 100644 --- a/repos/base/include/base/trace/types.h +++ b/repos/base/include/base/trace/types.h @@ -71,6 +71,19 @@ class Genode::Trace::Subject_info enum State { INVALID, UNTRACED, TRACED, FOREIGN, ERROR, DEAD }; + static char const *state_name(State state) + { + switch (state) { + case INVALID: return "INVALID"; + case UNTRACED: return "UNTRACED"; + case TRACED: return "TRACED"; + case FOREIGN: return "FOREIGN"; + case ERROR: return "ERROR"; + case DEAD: return "DEAD"; + } + return "INVALID"; + } + private: Session_label _session_label;