[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Support invoking the debugger over the serial console
From: |
Samuel Thibault |
Subject: |
Re: [PATCH] Support invoking the debugger over the serial console |
Date: |
Thu, 21 Aug 2014 13:16:01 +0200 |
User-agent: |
Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30) |
Hello,
Thanks for sharing, I've had this kind of patch in my tree for a long
with another, easier to parse, keypress, but this implementation seems
nice as it keeps it ctrl-alt-d.
Justus Winter, le Thu 21 Aug 2014 12:14:50 +0200, a écrit :
> if (tp->t_state&TS_ISOPEN) {
> + int escape = 0;
> while ((line = inb(LINE_STAT(addr))) & iDR) {
> c = inb(TXRX(addr));
> - ttyinput(c, tp);
> +
> + if (c == 0x1b) {
> + escape = 1;
> + continue;
> + }
Mmm, but this means that an escape alone will be lost, which is a real
problem for e.g. using vim :) Can't escape rather be an static array
indexed by unit number?
> +#if MACH_KDB
> + if (escape && c == 4)
I like using 'C'-'@' instead of the magic-looking 4 :)
Samuel