summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2013-03-25 10:06:14 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2013-03-25 10:06:14 +0000
commitd4494b8cc7bb21bba676fcd6c41260b1fc4058e7 (patch)
tree268f3fbe37c9fe858e5cc8f3f34678ae5bb7dc5b /usr.bin
parente34fa5f98d7f4ffaaa5562bdd75e5cddb1148036 (diff)
Add some additional debug logging.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/tmux/cfg.c3
-rw-r--r--usr.bin/tmux/cmd-queue.c7
2 files changed, 8 insertions, 2 deletions
diff --git a/usr.bin/tmux/cfg.c b/usr.bin/tmux/cfg.c
index ef244b71636..fc7bbfe9011 100644
--- a/usr.bin/tmux/cfg.c
+++ b/usr.bin/tmux/cfg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cfg.c,v 1.28 2013/03/24 09:54:10 nicm Exp $ */
+/* $OpenBSD: cfg.c,v 1.29 2013/03/25 10:06:13 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -41,6 +41,7 @@ load_cfg(const char *path, struct cmd_q *cmdq, char **cause)
size_t len, oldlen;
struct cmd_list *cmdlist;
+ log_debug("loading %s", path);
if ((f = fopen(path, "rb")) == NULL) {
xasprintf(cause, "%s: %s", path, strerror(errno));
return (-1);
diff --git a/usr.bin/tmux/cmd-queue.c b/usr.bin/tmux/cmd-queue.c
index e686b2a4b6e..88b7162b122 100644
--- a/usr.bin/tmux/cmd-queue.c
+++ b/usr.bin/tmux/cmd-queue.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-queue.c,v 1.2 2013/03/25 10:05:00 nicm Exp $ */
+/* $OpenBSD: cmd-queue.c,v 1.3 2013/03/25 10:06:13 nicm Exp $ */
/*
* Copyright (c) 2013 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -183,6 +183,7 @@ cmdq_continue(struct cmd_q *cmdq)
struct cmd_q_item *next;
enum cmd_retval retval;
int guards, empty;
+ char s[1024];
guards = 0;
if (c != NULL && c->session != NULL)
@@ -204,6 +205,10 @@ cmdq_continue(struct cmd_q *cmdq)
next = TAILQ_NEXT(cmdq->item, qentry);
while (cmdq->cmd != NULL) {
+ cmd_print(cmdq->cmd, s, sizeof s);
+ log_debug("cmdq %p: %s (client %d)", cmdq, s,
+ cmdq->client != NULL ? cmdq->client->ibuf.fd : -1);
+
if (guards)
cmdq_print(cmdq, "%%begin");
retval = cmdq->cmd->entry->exec(cmdq->cmd, cmdq);