From: Daniel Thompson <daniel.thompson@linaro.org>
To: Jason Wessel <jason.wessel@windriver.com>
Cc: Daniel Thompson <daniel.thompson@linaro.org>,
linux-kernel@vger.kernel.org,
kgdb-bugreport@lists.sourceforge.net,
Andrew Morton <akpm@linux-foundation.org>,
Ingo Molnar <mingo@redhat.com>,
patches@linaro.org, linaro-kernel@lists.linaro.org,
John Stultz <john.stultz@linaro.org>,
Sumit Semwal <sumit.semwal@linaro.org>
Subject: [RESEND PATCH 3.19-rc2 1/3] kdb: Fix a prompt management bug when using | grep
Date: Wed, 7 Jan 2015 16:10:12 +0000 [thread overview]
Message-ID: <1420647014-4897-2-git-send-email-daniel.thompson@linaro.org> (raw)
In-Reply-To: <1420647014-4897-1-git-send-email-daniel.thompson@linaro.org>
Currently when the "| grep" feature is used to filter the output of a
command then the prompt is not displayed for the subsequent command.
Likewise any characters typed by the user are also not echoed to the
display. This rather disconcerting problem eventually corrects itself
when the user presses Enter and the kdb_grepping_flag is cleared as
kdb_parse() tries to make sense of whatever they typed.
This patch resolves the problem by moving the clearing of this flag
from the middle of command processing to the beginning.
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
---
kernel/debug/kdb/kdb_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/debug/kdb/kdb_main.c b/kernel/debug/kdb/kdb_main.c
index 379650b984f8..9d10cb20cef1 100644
--- a/kernel/debug/kdb/kdb_main.c
+++ b/kernel/debug/kdb/kdb_main.c
@@ -872,13 +872,12 @@ int kdb_parse(const char *cmdstr)
char *cp;
char *cpp, quoted;
kdbtab_t *tp;
- int i, escaped, ignore_errors = 0, check_grep;
+ int i, escaped, ignore_errors = 0, check_grep = 0;
/*
* First tokenize the command string.
*/
cp = (char *)cmdstr;
- kdb_grepping_flag = check_grep = 0;
if (KDB_FLAG(CMD_INTERRUPT)) {
/* Previous command was interrupted, newline must not
@@ -1241,6 +1240,7 @@ static int kdb_local(kdb_reason_t reason, int error, struct pt_regs *regs,
*/
kdb_nextline = 1;
KDB_STATE_CLEAR(SUPPRESS);
+ kdb_grepping_flag = 0;
cmdbuf = cmd_cur;
*cmdbuf = '\0';
--
1.9.3
next prev parent reply other threads:[~2015-01-07 16:18 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-11 12:29 [PATCH 3.17-rc4 0/3] kdb: Improve command output searching Daniel Thompson
2014-09-11 12:29 ` [PATCH 3.17-rc4 1/3] kdb: Fix a prompt management bug when using | grep Daniel Thompson
2014-09-11 12:29 ` [PATCH 3.17-rc4 2/3] kdb: Provide forward search at more prompt Daniel Thompson
2014-09-11 12:29 ` [PATCH 3.17-rc4 3/3] kdb: Const qualifier for kdb_getstr's prompt argument Daniel Thompson
2014-11-06 16:02 ` [RESEND PATCH 3.18-rc3 0/3] kdb: Improve command output searching Daniel Thompson
2014-11-06 16:02 ` [RESEND PATCH 3.18-rc3 1/3] kdb: Fix a prompt management bug when using | grep Daniel Thompson
2014-11-06 16:02 ` [RESEND PATCH 3.18-rc3 2/3] kdb: Provide forward search at more prompt Daniel Thompson
2014-11-06 16:02 ` [RESEND PATCH 3.18-rc3 3/3] kdb: Const qualifier for kdb_getstr's prompt argument Daniel Thompson
2015-01-07 16:10 ` [RESEND PATCH 3.19-rc2 0/3] kdb: Improve command output searching Daniel Thompson
2015-01-07 16:10 ` Daniel Thompson [this message]
2015-01-07 16:10 ` [RESEND PATCH 3.19-rc2 2/3] kdb: Provide forward search at more prompt Daniel Thompson
2015-01-07 16:10 ` [RESEND PATCH 3.19-rc2 3/3] kdb: Const qualifier for kdb_getstr's prompt argument Daniel Thompson
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=1420647014-4897-2-git-send-email-daniel.thompson@linaro.org \
--to=daniel.thompson@linaro.org \
--cc=akpm@linux-foundation.org \
--cc=jason.wessel@windriver.com \
--cc=john.stultz@linaro.org \
--cc=kgdb-bugreport@lists.sourceforge.net \
--cc=linaro-kernel@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=patches@linaro.org \
--cc=sumit.semwal@linaro.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).