diff --git a/packages/genodelabs/core-diag.patch b/packages/genodelabs/core-diag.patch new file mode 100644 index 0000000..92444bd --- /dev/null +++ b/packages/genodelabs/core-diag.patch @@ -0,0 +1,39 @@ +From e5da4aa414e19b808e544e7bd89888cc7a3b85d3 Mon Sep 17 00:00:00 2001 +From: Emery Hemingway +Date: Sat, 7 Nov 2020 08:37:29 +0100 +Subject: [PATCH] core: log ROM requests with affirmative "diag" flag + +--- + repos/base/src/core/include/rom_session_component.h | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +diff --git a/repos/base/src/core/include/rom_session_component.h b/repos/base/src/core/include/rom_session_component.h +index c584701f5f..2c9623afcf 100644 +--- a/repos/base/src/core/include/rom_session_component.h ++++ b/repos/base/src/core/include/rom_session_component.h +@@ -35,12 +35,20 @@ namespace Genode { + { + /* extract label */ + Session_label const label = label_from_args(args); ++ auto const name = label.last_element(); ++ ++ /* extract diag flag */ ++ bool diag = session_diag_from_args(args).enabled; + + /* find ROM module for trailing label element */ +- Rom_module const * rom = rom_fs.find(label.last_element().string()); +- if (rom) ++ Rom_module const * rom = rom_fs.find(name.string()); ++ ++ if (rom) { ++ if (diag) log("serve ROM \"", name, "\" to \"", label, "\""); + return *rom; ++ } + ++ if (diag) error("ROM \"", name, "\" not found for \"", label, "\""); + throw Service_denied(); + } + +-- +2.28.0 + diff --git a/packages/genodelabs/default.nix b/packages/genodelabs/default.nix index 06f33eb..ab43ae7 100644 --- a/packages/genodelabs/default.nix +++ b/packages/genodelabs/default.nix @@ -296,7 +296,7 @@ let ''; }; - basePatches = [ ./cxx-align.patch ]; + basePatches = [ ./cxx-align.patch ./core-diag.patch ]; in makePackages // depotPackages // {