From d4f713233b85b9834aae969653f6c382e0480cce Mon Sep 17 00:00:00 2001 From: "YiLin.Li" Date: Mon, 17 Aug 2020 09:58:53 +0000 Subject: [PATCH] rune/libenclave/skeleton: support the `debug` arg. Signed-off-by: Yilin Li --- .../internal/runtime/pal/skeleton/liberpal-skeleton.c | 3 +++ .../internal/runtime/pal/skeleton/liberpal-skeleton.h | 1 + 2 files changed, 4 insertions(+) diff --git a/rune/libenclave/internal/runtime/pal/skeleton/liberpal-skeleton.c b/rune/libenclave/internal/runtime/pal/skeleton/liberpal-skeleton.c index 8d8cb25..ce0a531 100644 --- a/rune/libenclave/internal/runtime/pal/skeleton/liberpal-skeleton.c +++ b/rune/libenclave/internal/runtime/pal/skeleton/liberpal-skeleton.c @@ -38,6 +38,7 @@ static bool initialized = false; static char *sgx_dev_path; static bool no_sgx_flc = false; static bool enclave_debug = true; +bool debugging = false; bool is_oot_driver; /* * For SGX in-tree driver, dev_fd cannot be closed until an enclave instance @@ -377,6 +378,8 @@ static void check_opts(const char *opt) { if (!strcmp(opt, "no-sgx-flc")) no_sgx_flc = true; + else if (!strcmp(opt, "debug")) + debugging = true; } static void parse_args(const char *args) diff --git a/rune/libenclave/internal/runtime/pal/skeleton/liberpal-skeleton.h b/rune/libenclave/internal/runtime/pal/skeleton/liberpal-skeleton.h index a7d5bdf..cddb492 100644 --- a/rune/libenclave/internal/runtime/pal/skeleton/liberpal-skeleton.h +++ b/rune/libenclave/internal/runtime/pal/skeleton/liberpal-skeleton.h @@ -4,6 +4,7 @@ #include extern bool is_oot_driver; +extern bool debugging; typedef struct { const char *args; -- GitLab