Subject: DDB entry via KB [Re: Booting, Debugging]
To: 'Matt Thomas' <matt@3am-software.com>
From: Cliff Neighbors <cliff@allegronetworks.com>
List: port-macppc
Date: 02/22/2001 21:23:21
last summer I hacked into DDB via the USB keyboard
via a callout from internal_command()\wscons/wskbd.c;
the diff (below) is w/ some context in case the current
sources have drifted from what I used (1.4Z).
the changes are marked #ifdef ALLEGRO.
Unfortunately, what you really want is a polling interface
to the keyboard once you're in DDB; this hack does not address
that issue, but does get you in. Hope it helps.
-cliff-
*** wskbd.c.00 Thu Mar 23 04:34:31 2000
--- wskbd.c Thu Aug 3 19:57:43 2000
***************
*** 287,292 ****
--- 287,296 ----
static void wskbd_update_layout __P((struct wskbd_internal *, kbd_t));
+ #if defined(ALLEGRO) && defined(DDB)
+ struct callout wskbd_console_debug_callout = { 0 };
+ #endif
+
static void
wskbd_update_layout(id, enc)
struct wskbd_internal *id;
***************
*** 1304,1310 ****
--- 1308,1322 ----
#ifdef DDB
case KS_Cmd_Debugger:
if (sc->sc_isconsole)
+ #if defined(ALLEGRO)
+ {
+ callout_init(&wskbd_console_debug_callout);
+ callout_reset(&wskbd_console_debug_callout, 1,
+ (void(*))cpu_Debugger, 0);
+ }
+ #else
console_debugger();
+ #endif
/* discard this key (ddb discarded command modifiers) */
*type = WSCONS_EVENT_KEY_UP;
return (1);
-----Original Message-----
From: Matt Thomas [mailto:matt@3am-software.com]
Sent: Thursday, February 22, 2001 4:53 PM
To: mjl@emsi.priv.at; port-macppc@netbsd.org
Subject: Re: Booting, Debugging
> How do I get into DDB? The "programmer's button" doesn't
>seem to have any effect. (I have here a hard hang after accessing
>a USB-scanner so I wanted DDB to find out where it hangs)
bad news, running DDB on mac with a USB keyboard doesn't seem
to work.