linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Doug Anderson <dianders@chromium.org>
To: Daniel Thompson <daniel.thompson@linaro.org>
Cc: Jason Wessel <jason.wessel@windriver.com>,
	kgdb-bugreport@lists.sourceforge.net,
	LKML <linux-kernel@vger.kernel.org>,
	Patch Tracking <patches@linaro.org>
Subject: Re: [PATCH v2 3/5] kdb: Remove special case logic from kdb_read()
Date: Wed, 9 Oct 2019 10:28:36 -0700	[thread overview]
Message-ID: <CAD=FV=UuLYPpkJBWbkWoJzv97A6jxRFa4QmmD-0chSrsuT_bPg@mail.gmail.com> (raw)
In-Reply-To: <20191009093049.tnz442bo54bzmzmz@holly.lan>

Hi,

On Wed, Oct 9, 2019 at 2:30 AM Daniel Thompson
<daniel.thompson@linaro.org> wrote:
>
> > > @@ -183,17 +186,7 @@ static int kdb_read_get_key(char *buffer, size_t bufsize)
> > >   *     function.  It is not reentrant - it relies on the fact
> > >   *     that while kdb is running on only one "master debug" cpu.
> > >   * Remarks:
> > > - *
> > > - * The buffer size must be >= 2.  A buffer size of 2 means that the caller only
> > > - * wants a single key.
> >
> > By removing this you broke "BTAPROMPT".  So doing:
> >
> > set BTAPROMPT=1
> > bta
> >
> > It's now impossible to quit out.  Not that I've ever used BTAPROMPT,
> > but seems like we should either get rid of it or keep it working.
>
> Thanks. Just to check I got exactly what you meant I assume this could
> also have been phrased as "it looks like you forgot to convert the
> kdb_getstr() in kdb_bt1() over to use the new kdb_getchar() function"?

Right.  Sorry for wording it in a confusing way.  ;-)


> > > @@ -741,7 +732,7 @@ int vkdb_printf(enum kdb_msgsrc src, const char *fmt, va_list ap)
> > >
> > >         /* check for having reached the LINES number of printed lines */
> > >         if (kdb_nextline >= linecount) {
> > > -               char buf1[16] = "";
> > > +               char ch;
> >
> > The type of "ch" should be the same as returned by kdb_getchar()?
> > Either "int" if you're keeping it "int" or "unsigned char"?
>
> Probably... although the assumption that kdb strings are char * is burnt
> in a lot of places so there will still be further tidy up needed.

True.  It doesn't matter a whole lot so if you think it's easier to
keep it as char that's OK too.

-Doug

  reply	other threads:[~2019-10-09 17:28 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-08 13:20 [PATCH v2 0/5] kdb: Cleanup code to read user input and handle escape sequences Daniel Thompson
2019-10-08 13:20 ` [PATCH v2 1/5] kdb: Tidy up code to " Daniel Thompson
2019-10-08 22:20   ` Doug Anderson
2019-10-08 13:20 ` [PATCH v2 2/5] kdb: Simplify code to fetch characters from console Daniel Thompson
2019-10-08 22:20   ` Doug Anderson
2019-10-08 13:20 ` [PATCH v2 3/5] kdb: Remove special case logic from kdb_read() Daniel Thompson
2019-10-08 22:21   ` Doug Anderson
2019-10-09  9:30     ` Daniel Thompson
2019-10-09 17:28       ` Doug Anderson [this message]
2019-10-10  9:50         ` Daniel Thompson
2019-10-08 13:20 ` [PATCH v2 4/5] kdb: Improve handling of characters from different input sources Daniel Thompson
2019-10-08 22:21   ` Doug Anderson
2019-10-08 13:20 ` [PATCH v2 5/5] kdb: Tweak escape handling for vi users Daniel Thompson
2019-10-08 22:21   ` Doug Anderson

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='CAD=FV=UuLYPpkJBWbkWoJzv97A6jxRFa4QmmD-0chSrsuT_bPg@mail.gmail.com' \
    --to=dianders@chromium.org \
    --cc=daniel.thompson@linaro.org \
    --cc=jason.wessel@windriver.com \
    --cc=kgdb-bugreport@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=patches@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).