summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/driver/ptyc_driver_ctx.c14
-rw-r--r--src/internal/ptycon_driver_impl.h1
-rw-r--r--src/skin/ptyc_skin_default.c7
3 files changed, 22 insertions, 0 deletions
diff --git a/src/driver/ptyc_driver_ctx.c b/src/driver/ptyc_driver_ctx.c
index d403a98..e21e7ab 100644
--- a/src/driver/ptyc_driver_ctx.c
+++ b/src/driver/ptyc_driver_ctx.c
@@ -193,6 +193,20 @@ int ptyc_get_driver_ctx(
case TAG_VERSION:
cctx.drvflags |= PTYC_DRIVER_VERSION;
break;
+
+ case TAG_DEBUG:
+ if (!entry->arg)
+ cctx.drvflags |= PTYC_DRIVER_DBG_EVENT;
+
+ else if (!strcmp("event",entry->arg))
+ cctx.drvflags |= PTYC_DRIVER_DBG_EVENT;
+
+ else if (!strcmp("oven",entry->arg))
+ cctx.drvflags |= PTYC_DRIVER_DBG_OVEN;
+
+ else if (!strcmp("raw",entry->arg))
+ cctx.drvflags |= PTYC_DRIVER_DBG_RAW;
+ break;
}
} else
nunits++;
diff --git a/src/internal/ptycon_driver_impl.h b/src/internal/ptycon_driver_impl.h
index 3576cd4..c2a2475 100644
--- a/src/internal/ptycon_driver_impl.h
+++ b/src/internal/ptycon_driver_impl.h
@@ -20,6 +20,7 @@ extern const ntcon_vtbl * const ptyc_ntcon;
enum app_tags {
TAG_HELP,
TAG_VERSION,
+ TAG_DEBUG,
};
struct ptyc_driver_ctx_impl {
diff --git a/src/skin/ptyc_skin_default.c b/src/skin/ptyc_skin_default.c
index 85ce12e..9d710a6 100644
--- a/src/skin/ptyc_skin_default.c
+++ b/src/skin/ptyc_skin_default.c
@@ -8,5 +8,12 @@ const struct argv_option ptyc_default_options[] = {
{"help", 'h',TAG_HELP,ARGV_OPTARG_OPTIONAL,0,"short|long",0,
"show usage information [listing %s options only]"},
+ {"debug", 'd',TAG_DEBUG,ARGV_OPTARG_OPTIONAL,0,
+ "event|oven|raw",0,
+ "start an internal thread for debugging purposes. "
+ "event: display trace information for low-level console "
+ "events; oven|raw: start a pseudo client using a pty handle "
+ "in [cooked|raw] mode. default is 'event'."},
+
{0,0,0,0,0,0,0,0}
};