qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Bandan Das <bsd@redhat.com>
To: qemu-devel@nongnu.org
Cc: armbru@redhat.com
Subject: [Qemu-devel] [PATCH v5 1/4] monitor: remove debug prints
Date: Wed,  3 Jun 2015 18:38:07 -0400	[thread overview]
Message-ID: <1433371090-11781-2-git-send-email-bsd@redhat.com> (raw)
In-Reply-To: <1433371090-11781-1-git-send-email-bsd@redhat.com>

The preferred solution is to use tracepoints and there
is good chance of bitrot with the debug prints not being
enabled at compile time. Remove them.

Suggested-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Bandan Das <bsd@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
---
 monitor.c | 20 +-------------------
 1 file changed, 1 insertion(+), 19 deletions(-)

diff --git a/monitor.c b/monitor.c
index b2561e1..cc4e7d1 100644
--- a/monitor.c
+++ b/monitor.c
@@ -81,9 +81,6 @@
 #endif
 #include "hw/lm32/lm32_pic.h"
 
-//#define DEBUG
-//#define DEBUG_COMPLETION
-
 /*
  * Supported types:
  *
@@ -3707,10 +3704,6 @@ static const mon_cmd_t *monitor_parse_command(Monitor *mon,
     char buf[1024];
     char *key;
 
-#ifdef DEBUG
-    monitor_printf(mon, "command='%s', start='%d'\n", cmdline, start);
-#endif
-
     /* extract the command name */
     p = get_command_name(cmdline + start, cmdname, sizeof(cmdname));
     if (!p)
@@ -4189,10 +4182,7 @@ static void file_completion(Monitor *mon, const char *input)
         path[input_path_len] = '\0';
         pstrcpy(file_prefix, sizeof(file_prefix), p + 1);
     }
-#ifdef DEBUG_COMPLETION
-    monitor_printf(mon, "input='%s' path='%s' prefix='%s'\n",
-                   input, path, file_prefix);
-#endif
+
     ffs = opendir(path);
     if (!ffs)
         return;
@@ -4770,14 +4760,6 @@ static void monitor_find_completion(void *opaque,
     if (parse_cmdline(cmdline, &nb_args, args) < 0) {
         return;
     }
-#ifdef DEBUG_COMPLETION
-    {
-        int i;
-        for (i = 0; i < nb_args; i++) {
-            monitor_printf(mon, "arg%d = '%s'\n", i, args[i]);
-        }
-    }
-#endif
 
     /* if the line ends with a space, it means we want to complete the
        next arg */
-- 
2.1.0

  reply	other threads:[~2015-06-03 22:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-03 22:38 [Qemu-devel] [PATCH v5 0/4] monitor: suggest running "help" for command errors Bandan Das
2015-06-03 22:38 ` Bandan Das [this message]
2015-06-03 22:38 ` [Qemu-devel] [PATCH v5 2/4] monitor: cleanup parsing of cmd name and cmd arguments Bandan Das
2015-06-12  6:05   ` Markus Armbruster
2015-06-12 22:12     ` Bandan Das
2015-06-03 22:38 ` [Qemu-devel] [PATCH v5 3/4] monitor: Point to "help" command on syntax error Bandan Das
2015-06-03 22:38 ` [Qemu-devel] [PATCH v5 4/4] monitor: Fix failure path for "S" argument Bandan Das
2015-06-08  8:53 ` [Qemu-devel] [PATCH v5 0/4] monitor: suggest running "help" for command errors Markus Armbruster
2015-06-11 17:58   ` Luiz Capitulino
2015-06-16 15:10 ` Markus Armbruster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1433371090-11781-2-git-send-email-bsd@redhat.com \
    --to=bsd@redhat.com \
    --cc=armbru@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).