Author: cwittich
Date: Mon Sep 15 02:09:05 2008
New Revision: 36254
URL:
http://svn.reactos.org/svn/reactos?rev=36254&view=rev
Log:
display traces when kdbg is entered
Modified:
trunk/tools/sysreg2/console.c
trunk/tools/sysreg2/utils.c
Modified: trunk/tools/sysreg2/console.c
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/sysreg2/console.c?rev=36254&…
==============================================================================
--- trunk/tools/sysreg2/console.c [iso-8859-1] (original)
+++ trunk/tools/sysreg2/console.c [iso-8859-1] Mon Sep 15 02:09:05 2008
@@ -7,6 +7,7 @@
int ttyfd, i;
struct termios ttyattr, rawattr;
bool Ret = true;
+ bool KdbgHit = false;
if ((ttyfd = open(tty, O_NOCTTY | O_RDWR)) < 0)
{
@@ -64,8 +65,22 @@
got = readln(fds[i].fd, buf, sizeof(buf));
if (got == -2) /* kernel debugger */
{
- Ret = false;
- goto cleanup;
+ if (KdbgHit)
+ {
+ Ret = false;
+ goto cleanup;
+ }
+ else
+ {
+ KdbgHit = true;
+ safewrite(ttyfd, "bt\r", 3);
+ continue;
+ }
+ }
+ else if (got == -3) /* kernel debugger */
+ {
+ safewrite(ttyfd, "\r", 1);
+ continue;
}
if (got < 0) {
goto cleanup;
Modified: trunk/tools/sysreg2/utils.c
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/sysreg2/utils.c?rev=36254&am…
==============================================================================
--- trunk/tools/sysreg2/utils.c [iso-8859-1] (original)
+++ trunk/tools/sysreg2/utils.c [iso-8859-1] Mon Sep 15 02:09:05 2008
@@ -17,6 +17,8 @@
{
if (strstr(buffer, "kdb:>"))
return -2;
+ if (strstr(buffer, "--- Press q"))
+ return -3;
}
if (*bp++ == '\n')
return (bp - buffer);