mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v4 0/5] kdb: Cleanup code to read user input and handle escape sequences
@ 2019-10-25  7:33 Daniel Thompson
  2019-10-25  7:33 ` [PATCH v4 1/5] kdb: Tidy up code to " Daniel Thompson
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Daniel Thompson @ 2019-10-25  7:33 UTC (permalink / raw)
  To: Douglas Anderson, Jason Wessel
  Cc: Daniel Thompson, kgdb-bugreport, linux-kernel, patches

I've been meaning to repost this for some time, and inspired by
having someone keen to review it, I dug it out again!

I split this as carefully as I could into small pieces but the original
code was complex so even in small bits it doesn't make for light
reading.  Things do make more sense once you realize/remember that
escape_delay is a count down timer that expires the escape sequences!

Most of the patches are simple tidy ups although patches 4 and 5
introduce new behaviours. Patch 4 shouldn't be controversial but
perhaps patch 5 is (although hopefully not ;-) ).

Mostly this is auto tested, see here:
https://github.com/daniel-thompson/kgdbtest/commit/c65e28d99357c2df6dac2cebe195574e634d04dc

Changes in v4:

 - Sorry this is late. Looks like I got so distracted by testing the
   series I forgot to post it to the lists.
 - Introduced kdb_handle_escape() in patch 1 (instead of renaming it
   in the middle of the patch series) and documented it in kernel doc
   format.
 - Adopted do {} while for the character fetch loop in kdb_bt.c
 - Added Doug's reviewed-by to the remaining patches. The kept them
   despite the subtle internal reorg w.r.t. kdb_handle_escape() since
   the whole patchset has changed little since he last saw it (beyond
   fixing his review comments).

Changes in v3:

 - Accepted all review comments from Doug (except the return type
   of kdb_getchar() as discussed in the mail threads). In particular
   this fixes a bug in the handling of the btaprompt.
 - Added Doug's reviewed-by to patches 1 and 2.

Changes in v2:

 - Improve comment in patch 4 to better describe what is happening
 - Rebase on v5.4-rc2

Daniel Thompson (5):
  kdb: Tidy up code to handle escape sequences
  kdb: Simplify code to fetch characters from console
  kdb: Remove special case logic from kdb_read()
  kdb: Improve handling of characters from different input sources
  kdb: Tweak escape handling for vi users

 kernel/debug/kdb/kdb_bt.c      |  22 ++--
 kernel/debug/kdb/kdb_io.c      | 231 ++++++++++++++++-----------------
 kernel/debug/kdb/kdb_private.h |   1 +
 3 files changed, 125 insertions(+), 129 deletions(-)

--
2.21.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-10-25  7:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-25  7:33 [PATCH v4 0/5] kdb: Cleanup code to read user input and handle escape sequences Daniel Thompson
2019-10-25  7:33 ` [PATCH v4 1/5] kdb: Tidy up code to " Daniel Thompson
2019-10-25  7:33 ` [PATCH v4 2/5] kdb: Simplify code to fetch characters from console Daniel Thompson
2019-10-25  7:33 ` [PATCH v4 3/5] kdb: Remove special case logic from kdb_read() Daniel Thompson
2019-10-25  7:33 ` [PATCH v4 4/5] kdb: Improve handling of characters from different input sources Daniel Thompson
2019-10-25  7:33 ` [PATCH v4 5/5] kdb: Tweak escape handling for vi users Daniel Thompson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®