Author: dreimer
Date: Tue Jan 26 10:49:57 2010
New Revision: 45259
URL:
http://svn.reactos.org/svn/reactos?rev=45259&view=rev
Log:
PS Port of the kdbg command. Not working yet, because PS seems to dislike the <
operator in the log2lines line
Added:
trunk/tools/RosBE/RosBE-Windows/Powershell/kdbg.ps1 (with props)
Modified:
trunk/tools/RosBE/RosBE-Windows/Powershell/Help.ps1
trunk/tools/RosBE/RosBE-Windows/Powershell/RosBE.ps1
Modified: trunk/tools/RosBE/RosBE-Windows/Powershell/Help.ps1
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Powershe…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Powershell/Help.ps1 [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Powershell/Help.ps1 [iso-8859-1] Tue Jan 26 10:49:57
2010
@@ -44,6 +44,11 @@
" help [COMMAND] - Display the available commands or give help on
a"
" specific command."
+ if (Test-Path "$_ROSBE_BASEDIR\kdbg.ps1") {
+ " kdbg [OPTIONS] - Outputs KDBG Debug Output and lets you
give"
+ " debug commands to it."
+ }
+
if (Test-Path "$_ROSBE_BASEDIR\reladdr2line.ps1") {
" raddr2line [OPTIONS] - Translates program addresses into file names
and"
" line numbers to assist developers with
finding"
@@ -170,6 +175,15 @@
} elseif ("$args" -eq "help") {
" Usage: help [COMMAND]"
" Shows help for the specified command or lists all available commands."
+
+} elseif ("$args" -eq "kdbg") {
+ if (Test-Path "$_ROSBE_BASEDIR\kdbg.ps1") {
+ " Usage: kdbg [LOGFILE] [PIPE]"
+ " Outputs KDBG Debug Output and lets you give debug commands to it."
+ ""
+ " WRITELOG - Outputs the Log File to
"".\DBG-%DATE%-%TIME%.txt""."
+ ""
+ }
} elseif ("$args" -eq "raddr2line") {
if (Test-Path "$_ROSBE_BASEDIR\reladdr2line.ps1") {
" Usage: raddr2line [FILE] [ADDRESS]"
Modified: trunk/tools/RosBE/RosBE-Windows/Powershell/RosBE.ps1
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Powershe…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Powershell/RosBE.ps1 [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Powershell/RosBE.ps1 [iso-8859-1] Tue Jan 26 10:49:57
2010
@@ -117,6 +117,10 @@
set-alias SCUT "$_ROSBE_BASEDIR\scut.ps1" -scope Global
}
+ if (Test-Path "$_ROSBE_BASEDIR\kdbg.ps1") {
+ set-alias KDBG "$_ROSBE_BASEDIR\kdbg.ps1" -scope Global
+ }
+
if (Test-Path "$_ROSBE_BASEDIR\sSVN.ps1") {
set-alias SSVN "$_ROSBE_BASEDIR\sSVN.ps1" -scope Global
}
Added: trunk/tools/RosBE/RosBE-Windows/Powershell/kdbg.ps1
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Powershe…
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Powershell/kdbg.ps1 (added)
+++ trunk/tools/RosBE/RosBE-Windows/Powershell/kdbg.ps1 [iso-8859-1] Tue Jan 26 10:49:57
2010
@@ -1,0 +1,29 @@
+#
+# PROJECT: RosBE - ReactOS Build Environment for Windows
+# LICENSE: GNU General Public License v2. (see LICENSE.txt)
+# FILE: Root/kdbg.ps1
+# PURPOSE: Displays a KDBG Session Interactively.
+# COPYRIGHT: Copyright 2010 Daniel Reimer <reimer.daniel(a)freenet.de>
+#
+
+$DATENAME = get-date -f dyMMyyyy
+$TIMENAME = get-date -f HHmm
+
+$host.ui.RawUI.WindowTitle = "kdbg Session..."
+
+if ("$($args[0])" -eq "writelog") {
+ if ("$($args[1])" -eq "") {
+ $LOGFILE = "-l DBG-$datename-$timename.txt"
+ } else {
+ $LOGFILE = "-l ""$($args[1])"""
+ }
+} else {
+ $LOGFILE = $null
+}
+
+"Now Start your VM with COM1 set to \\.\pipe\kdbg"
+read-host 'Press any key to continue . . .'
+
+log2lines -c $LOGFILE < \\.\pipe\kdbg
+
+$host.ui.RawUI.WindowTitle = "ReactOS Build Environment $_ROSBE_VERSION"
Propchange: trunk/tools/RosBE/RosBE-Windows/Powershell/kdbg.ps1
------------------------------------------------------------------------------
svn:eol-style = native