Re: How can a thread map memory to itself

Martin Schröder <[email protected]>
Newsgroups gmane.comp.micro-kernel.l4.devel
Message-ID <[email protected]>
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)
--
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.