How can a thread map memory to itself

Martin Schröder martin.schroeder at openlimit.com
Thu Aug 21 18:57:47 CEST 2014


Hi,

Am 20.08.2014 um 22:15 schrieb Björn Döbel:
> Fiasco has a kernel debugger which you can enter by pressing <ESC> at
> runtime. Pressing <h> will give you a list of commands.

the invocation of jdb by pressing <ESC> is IMHO not the very best choice since it makes l4linux virtually impossible to use. So I 
patched the debug-key into pressing <ESC> twice quickly.

Martin


--- src/kernel/fiasco/src/kern/vkey.cpp	2014-05-31 11:17:09.000000000 +0200
+++ src/kernel/fiasco/src/kern/vkey.cpp	2014-08-21 18:25:44.583864015 +0200
@@ -31,6 +31,7 @@ IMPLEMENTATION [debug && serial && !ux]:
  #include "globals.h"
  #include "kernel_console.h"
  #include "keycodes.h"
+#include "delayloop.h"

  static Vkey::Echo_type vkey_echo;
  static char     vkey_buffer[256];
@@ -113,8 +114,21 @@ Vkey::check_()

        if (c == KEY_ESC)
  	{
-	  ret = 0;  // break into kernel debugger
-	  break;
+	  int timeout=250;
+	  while ((c = Kconsole::console()->getchar(false)) == -1 && timeout--)
+	    Delay::delay(1);
+	  if (c != -1)
+	    {
+	      if (c == KEY_ESC)  // ESC pressed twice
+	        {
+	          ret = 0;  // break into kernel debugger
+	          break;
+	        }
+	      else
+	          hit |= add(27);
+	    }
+	  else
+	    c = KEY_ESC;
  	}

        switch (c)
-- 




More information about the l4-hackers mailing list