[ros-diffs] [dreimer] 37232: OK, finally found the reason for some strange errors. Thx to d0g and Colin Finck for finding the reason.

dreimer at svn.reactos.org dreimer at svn.reactos.org
Thu Nov 6 22:13:21 CET 2008


Author: dreimer
Date: Thu Nov  6 15:13:20 2008
New Revision: 37232

URL: http://svn.reactos.org/svn/reactos?rev=37232&view=rev
Log:
OK, finally found the reason for some strange errors. Thx to d0g and Colin Finck for finding the reason.

Modified:
    trunk/tools/RosBE/RosBE-Windows/Root/Build.cmd
    trunk/tools/RosBE/RosBE-Windows/Root/Clean.cmd
    trunk/tools/RosBE/RosBE-Windows/Root/Config.cmd
    trunk/tools/RosBE/RosBE-Windows/Root/Help.cmd
    trunk/tools/RosBE/RosBE-Windows/Root/RosBE.cmd
    trunk/tools/RosBE/RosBE-Windows/Root/charch.cmd
    trunk/tools/RosBE/RosBE-Windows/Root/chdefdir.cmd
    trunk/tools/RosBE/RosBE-Windows/Root/chdefgcc.cmd
    trunk/tools/RosBE/RosBE-Windows/Root/reladdr2line.cmd
    trunk/tools/RosBE/RosBE-Windows/Root/rosbe-gcc-env.cmd
    trunk/tools/RosBE/RosBE-Windows/Root/sSVN.cmd
    trunk/tools/RosBE/RosBE-Windows/Root/scut.cmd
    trunk/tools/RosBE/RosBE-Windows/Root/update.cmd

Modified: trunk/tools/RosBE/RosBE-Windows/Root/Build.cmd
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/Build.cmd?rev=37232&r1=37231&r2=37232&view=diff
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/Build.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/Build.cmd [iso-8859-1] Thu Nov  6 15:13:20 2008
@@ -62,9 +62,7 @@
     set HOST_CC=ccache gcc
     set HOST_CPP=ccache g++
 
-    ::
-    ::Target defaults to host(i386)
-    ::
+    REM Target defaults to host(i386)
 
     set TARGET_CC=ccache gcc
     set TARGET_CPP=ccache g++
@@ -84,9 +82,7 @@
     set HOST_CC=gcc
     set HOST_CPP=g++
 
-    ::
-    ::Target defaults to host(i386)
-    ::
+    REM Target defaults to host(i386)
 
     set TARGET_CC=gcc
     set TARGET_CPP=g++
@@ -162,51 +158,56 @@
 goto :EOC
 
 :BUILD
-    if %_ROSBE_SHOWTIME% == 1 (
-        if %_ROSBE_WRITELOG% == 1 (
-            "%_ROSBE_BASEDIR%\Tools\buildtime.exe" "%_ROSBE_MINGWMAKE%" %* 2>&1 | "%_ROSBE_BASEDIR%\Tools\tee.exe" "%_ROSBE_LOGDIR%\BuildLog-%_ROSBE_GCCVERSION%-%DATENAME%-%TIMENAME%.txt"
-        ) else (
-            "%_ROSBE_BASEDIR%\Tools\buildtime.exe" "%_ROSBE_MINGWMAKE%" %*
-        )
-    ) else (
-        if %_ROSBE_WRITELOG% == 1 (
-            "%_ROSBE_MINGWMAKE%" %* 2>&1 | "%_ROSBE_BASEDIR%\Tools\tee.exe" "%_ROSBE_LOGDIR%\BuildLog-%_ROSBE_GCCVERSION%-%DATENAME%-%TIMENAME%.txt"
-        ) else (
-            "%_ROSBE_MINGWMAKE%" %*
-        )
-    )
+
+if %_ROSBE_SHOWTIME% == 1 (
+    if %_ROSBE_WRITELOG% == 1 (
+        "%_ROSBE_BASEDIR%\Tools\buildtime.exe" "%_ROSBE_MINGWMAKE%" %* 2>&1 | "%_ROSBE_BASEDIR%\Tools\tee.exe" "%_ROSBE_LOGDIR%\BuildLog-%_ROSBE_GCCVERSION%-%DATENAME%-%TIMENAME%.txt"
+    ) else (
+        "%_ROSBE_BASEDIR%\Tools\buildtime.exe" "%_ROSBE_MINGWMAKE%" %*
+    )
+) else (
+    if %_ROSBE_WRITELOG% == 1 (
+        "%_ROSBE_MINGWMAKE%" %* 2>&1 | "%_ROSBE_BASEDIR%\Tools\tee.exe" "%_ROSBE_LOGDIR%\BuildLog-%_ROSBE_GCCVERSION%-%DATENAME%-%TIMENAME%.txt"
+    ) else (
+        "%_ROSBE_MINGWMAKE%" %*
+    )
+)
 goto :EOF
 
+::
+:: Get the number of CPUs in the system so we know how many jobs to execute.
+:: To modify the number used alter the options used with cpucount:
+:: No Option - Number of CPUs.
+:: -x1       - Number of CPUs, plus 1.
+:: -x2       - Number of CPUs, doubled.
+:: -a        - Determine the cpu count based on the inherited process affinity mask.
+::
+
 :BUILDMULTI
-    ::
-    :: Get the number of CPUs in the system so we know how many jobs to execute.
-    :: To modify the number used alter the options used with cpucount:
-    :: No Option - Number of CPUs.
-    :: -x1       - Number of CPUs, plus 1.
-    :: -x2       - Number of CPUs, doubled.
-    :: -a        - Determine the cpu count based on the inherited process affinity mask.
-    ::
-    for /f "usebackq" %%i in (`"%_ROSBE_BASEDIR%\Tools\cpucount.exe" -x1`) do set CPUCOUNT=%%i
-
-    if %_ROSBE_SHOWTIME% == 1 (
-        if %_ROSBE_WRITELOG% == 1 (
-            "%_ROSBE_BASEDIR%\Tools\buildtime.exe" "%_ROSBE_MINGWMAKE%" -j %CPUCOUNT% %2 %3 %4 %5 %6 %7 %8 %9 2>&1 | "%_ROSBE_BASEDIR%\Tools\tee.exe" "%_ROSBE_LOGDIR%\BuildLog-%_ROSBE_GCCVERSION%-%DATENAME%-%TIMENAME%.txt"
-        ) else (
-            "%_ROSBE_BASEDIR%\Tools\buildtime.exe" "%_ROSBE_MINGWMAKE%" -j %CPUCOUNT% %2 %3 %4 %5 %6 %7 %8 %9
-        )
-    ) else (
-        if %_ROSBE_WRITELOG% == 1 (
-            "%_ROSBE_MINGWMAKE%" -j %CPUCOUNT% %2 %3 %4 %5 %6 %7 %8 %9 2>&1 | "%_ROSBE_BASEDIR%\Tools\tee.exe" "%_ROSBE_LOGDIR%\BuildLog-%_ROSBE_GCCVERSION%-%DATENAME%-%TIMENAME%.txt"
-        ) else (
-            "%_ROSBE_MINGWMAKE%" -j %CPUCOUNT% %2 %3 %4 %5 %6 %7 %8 %9
-        )
-    )
+
+for /f "usebackq" %%i in (`"%_ROSBE_BASEDIR%\Tools\cpucount.exe" -x1`) do set CPUCOUNT=%%i
+
+if %_ROSBE_SHOWTIME% == 1 (
+    if %_ROSBE_WRITELOG% == 1 (
+        "%_ROSBE_BASEDIR%\Tools\buildtime.exe" "%_ROSBE_MINGWMAKE%" -j %CPUCOUNT% %2 %3 %4 %5 %6 %7 %8 %9 2>&1 | "%_ROSBE_BASEDIR%\Tools\tee.exe" "%_ROSBE_LOGDIR%\BuildLog-%_ROSBE_GCCVERSION%-%DATENAME%-%TIMENAME%.txt"
+    ) else (
+        "%_ROSBE_BASEDIR%\Tools\buildtime.exe" "%_ROSBE_MINGWMAKE%" -j %CPUCOUNT% %2 %3 %4 %5 %6 %7 %8 %9
+    )
+) else (
+    if %_ROSBE_WRITELOG% == 1 (
+        "%_ROSBE_MINGWMAKE%" -j %CPUCOUNT% %2 %3 %4 %5 %6 %7 %8 %9 2>&1 | "%_ROSBE_BASEDIR%\Tools\tee.exe" "%_ROSBE_LOGDIR%\BuildLog-%_ROSBE_GCCVERSION%-%DATENAME%-%TIMENAME%.txt"
+    ) else (
+        "%_ROSBE_MINGWMAKE%" -j %CPUCOUNT% %2 %3 %4 %5 %6 %7 %8 %9
+    )
+)
 goto :EOF
 
+::
+:: Highlight the fact that building has ended.
+::
+
 :EOC
-::
-:: Highlight the fact that building has ended.
-::
+
 "%_ROSBE_BASEDIR%\Tools\flash.exe"
 
 if defined _ROSBE_VERSION (

Modified: trunk/tools/RosBE/RosBE-Windows/Root/Clean.cmd
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/Clean.cmd?rev=37232&r1=37231&r2=37232&view=diff
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/Clean.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/Clean.cmd [iso-8859-1] Thu Nov  6 15:13:20 2008
@@ -33,10 +33,12 @@
     goto :EOC
 )
 
-:LOG
 ::
 :: Check if we have any logs to clean, if so, clean them.
 ::
+
+:LOG
+
 if exist "%_ROSBE_LOGDIR%\*.txt" (
     echo Cleaning build logs...
     del /f "%_ROSBE_LOGDIR%\*.txt" 1> NUL 2> NUL
@@ -46,17 +48,15 @@
 )
 goto :EOF
 
+::
+:: Check if we have something to clean, if so, clean it.
+::
+
 :DEL
 
 if .%ROS_ARCH%. == .arm. (
-    ::
-    :: Check if we have something to clean, if so, clean it.
-    ::
     if exist "obj-arm\." (
         echo Cleaning ReactOS ARM source directory...
-        ::
-        : Remove directories created by the build.
-        ::
         if exist "obj-arm\." (
             rd /s /q "obj-arm" 1> NUL 2> NUL
         )
@@ -73,14 +73,8 @@
     goto :ROS
 )
 if .%ROS_ARCH%. == .ppc. (
-    ::
-    :: Check if we have something to clean, if so, clean it.
-    ::
     if exist "obj-ppc\." (
         echo Cleaning ReactOS PPC source directory...
-        ::
-        : Remove directories created by the build.
-        ::
         if exist "obj-ppc\." (
             rd /s /q "obj-ppc" 1> NUL 2> NUL
         )
@@ -97,14 +91,8 @@
     goto :ROS
 )
 if .%ROS_ARCH%. == .amd64. (
-    ::
-    :: Check if we have something to clean, if so, clean it.
-    ::
     if exist "obj-amd64\." (
         echo Cleaning ReactOS X86_64 source directory...
-        ::
-        : Remove directories created by the build.
-        ::
         if exist "obj-amd64\." (
             rd /s /q "obj-amd64" 1> NUL 2> NUL
         )
@@ -121,14 +109,8 @@
     goto :ROS
 )
 
-::
-:: Check if we have something to clean, if so, clean it.
-::
 if exist "obj-i386\." (
     echo Cleaning ReactOS i386 source directory...
-    ::
-    : Remove directories created by the build.
-    ::
     if exist "obj-i386\." (
         rd /s /q "obj-i386" 1> NUL 2> NUL
     )
@@ -144,13 +126,14 @@
 )
 
 :ROS
+
 if exist "reactos\." (
     rd /s /q "reactos" 1> NUL 2> NUL
 )
-
 goto :EOF
 
 :EOC
+
 if defined _ROSBE_VERSION (
     title ReactOS Build Environment %_ROSBE_VERSION%
 )

Modified: trunk/tools/RosBE/RosBE-Windows/Root/Config.cmd
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/Config.cmd?rev=37232&r1=37231&r2=37232&view=diff
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/Config.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/Config.cmd [iso-8859-1] Thu Nov  6 15:13:20 2008
@@ -26,6 +26,7 @@
     goto :NOK
 
     :CONT
+
     if exist "config.rbuild" (
         del "config.rbuild"
         echo Main Configuration File was found and deleted.
@@ -47,7 +48,9 @@
     set /p YESNO="(yes), (no)"
     if /i "%YESNO%"=="yes" goto :CONT2
     if /i "%YESNO%"=="no" goto :NOK
+
     :CONT2
+
     del "%_ROSBE_BASEDIR%\*.rbuild"
     del "config.rbuild"
     copy "config.template.rbuild" "%APPDATA%\RosBE\config.rbuild"
@@ -248,6 +251,7 @@
 goto :NOK
 
 :NOK
+
 if defined _ROSBE_VERSION (
     title ReactOS Build Environment %_ROSBE_VERSION%
 )

Modified: trunk/tools/RosBE/RosBE-Windows/Root/Help.cmd
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/Help.cmd?rev=37232&r1=37231&r2=37232&view=diff
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/Help.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/Help.cmd [iso-8859-1] Thu Nov  6 15:13:20 2008
@@ -254,6 +254,7 @@
 )
 
 :EOC
+
 if defined _ROSBE_VERSION (
     title ReactOS Build Environment %_ROSBE_VERSION%
 )

Modified: trunk/tools/RosBE/RosBE-Windows/Root/RosBE.cmd
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/RosBE.cmd?rev=37232&r1=37231&r2=37232&view=diff
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/RosBE.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/RosBE.cmd [iso-8859-1] Thu Nov  6 15:13:20 2008
@@ -92,12 +92,13 @@
 cls
 call :RosBE4
 
-:EndCommandParse
-
 ::
 :: Load the base directory from srclist.txt and set it as the
 :: new source directory.
 ::
+
+:EndCommandParse
+
 if exist "%_ROSBE_BASEDIR%\scut.cmd" (
     call "%_ROSBE_BASEDIR%\scut.cmd"
 )
@@ -134,36 +135,41 @@
 :: Display the banner and set up the environment for the GCC 4.x.x build
 :: environment.
 ::
+
 :RosBE4
-    echo *******************************************************************************
-    echo *                                                                             *
-    echo *                        ReactOS Build Environment %_ROSBE_VERSION%                        *
-    echo *                                                                             *
-    echo *******************************************************************************
-    echo.
-    echo.
-    ver
-    ::
-    :: Set the correct path for the build tools and set the MinGW make.
-    ::
-    call "%_ROSBE_BASEDIR%\rosbe-gcc-env.cmd"
+
+echo *******************************************************************************
+echo *                                                                             *
+echo *                        ReactOS Build Environment %_ROSBE_VERSION%                        *
+echo *                                                                             *
+echo *******************************************************************************
+echo.
+echo.
+ver
+
+::
+:: Set the correct path for the build tools and set the MinGW make.
+::
+call "%_ROSBE_BASEDIR%\rosbe-gcc-env.cmd"
 goto :EOF
 
 ::
 :: Load the doskey macros and delete any macros for components
 :: that are not actually present.
 ::
+
 :LOADDOSKEYMACROS
-    doskey /macrofile="%_ROSBE_BASEDIR%\RosBE.mac"
 
-    if not exist "%_ROSBE_BASEDIR%\chdefdir.cmd" ( doskey CHDEFDIR= )
-    if not exist "%_ROSBE_BASEDIR%\chdefgcc.cmd" ( doskey CHDEFGCC= )
-    if not exist "%_ROSBE_BASEDIR%\charch.cmd" ( doskey CHARCH= )
-    if not exist "%_ROSBE_BASEDIR%\Config.cmd" ( doskey CONFIG= )
-    if not exist "%_ROSBE_BASEDIR%\reladdr2line.cmd" ( doskey RADDR2LINE= )
-    if not exist "%_ROSBE_BASEDIR%\scut.cmd" ( doskey SCUT= )
-    if not exist "%_ROSBE_BASEDIR%\sSVN.cmd" ( doskey SSVN= )
-    if not exist "%_ROSBE_BASEDIR%\sSVN.cmd" ( doskey SVN= )
-    if not exist "%_ROSBE_BASEDIR%\update.cmd" ( doskey UPDATE= )
-    if not exist "%_ROSBE_BASEDIR%\options.cmd" ( doskey OPTIONS= )
+doskey /macrofile="%_ROSBE_BASEDIR%\RosBE.mac"
+
+if not exist "%_ROSBE_BASEDIR%\chdefdir.cmd" ( doskey CHDEFDIR= )
+if not exist "%_ROSBE_BASEDIR%\chdefgcc.cmd" ( doskey CHDEFGCC= )
+if not exist "%_ROSBE_BASEDIR%\charch.cmd" ( doskey CHARCH= )
+if not exist "%_ROSBE_BASEDIR%\Config.cmd" ( doskey CONFIG= )
+if not exist "%_ROSBE_BASEDIR%\reladdr2line.cmd" ( doskey RADDR2LINE= )
+if not exist "%_ROSBE_BASEDIR%\scut.cmd" ( doskey SCUT= )
+if not exist "%_ROSBE_BASEDIR%\sSVN.cmd" ( doskey SSVN= )
+if not exist "%_ROSBE_BASEDIR%\sSVN.cmd" ( doskey SVN= )
+if not exist "%_ROSBE_BASEDIR%\update.cmd" ( doskey UPDATE= )
+if not exist "%_ROSBE_BASEDIR%\options.cmd" ( doskey OPTIONS= )
 goto :EOF

Modified: trunk/tools/RosBE/RosBE-Windows/Root/charch.cmd
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/charch.cmd?rev=37232&r1=37231&r2=37232&view=diff
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/charch.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/charch.cmd [iso-8859-1] Thu Nov  6 15:13:20 2008
@@ -44,26 +44,31 @@
     goto :EOC
 )
 
-:EOA
-
 ::
 :: Refresh all needed Params by recalling the main Path setting CMD File.
 ::
+
+:EOA
+
 call "%_ROSBE_BASEDIR%\rosbe-gcc-env.cmd"
 goto :EOC
+
 
 ::
 :: If Parameters were set, parse them, if not, ask the user to add them.
 ::
+
 :INTERACTIVE
-    set /p _1="Please enter a Architecture you want to build ReactOS for: "
-    if "%_1%" == "" (
-        echo ERROR: You must enter a Architecture.
-        goto :EOC
-    )
+
+set /p _1="Please enter a Architecture you want to build ReactOS for: "
+if "%_1%" == "" (
+    echo ERROR: You must enter a Architecture.
+    goto :EOC
+)
 goto :EOF
 
 :EOC
+
 if defined _ROSBE_VERSION (
     title ReactOS Build Environment %_ROSBE_VERSION%
 )

Modified: trunk/tools/RosBE/RosBE-Windows/Root/chdefdir.cmd
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/chdefdir.cmd?rev=37232&r1=37231&r2=37232&view=diff
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/chdefdir.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/chdefdir.cmd [iso-8859-1] Thu Nov  6 15:13:20 2008
@@ -39,15 +39,18 @@
 ::
 :: If Parameters were set, parse them, if not, ask the user to add them.
 ::
+
 :INTERACTIVE
-    set /p _1="Please enter a ReactOS source directory, or 'previous': "
-    if "%_1%" == "" (
-        echo ERROR: You must enter a ReactOS source directory, or 'previous'.
-        goto :EOC
-    )
+
+set /p _1="Please enter a ReactOS source directory, or 'previous': "
+if "%_1%" == "" (
+    echo ERROR: You must enter a ReactOS source directory, or 'previous'.
+    goto :EOC
+)
 goto :EOF
 
 :EOC
+
 if defined _ROSBE_VERSION (
     title ReactOS Build Environment %_ROSBE_VERSION%
 )

Modified: trunk/tools/RosBE/RosBE-Windows/Root/chdefgcc.cmd
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/chdefgcc.cmd?rev=37232&r1=37231&r2=37232&view=diff
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/chdefgcc.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/chdefgcc.cmd [iso-8859-1] Thu Nov  6 15:13:20 2008
@@ -55,23 +55,26 @@
 )
 
 :EOA
+
 call "%_ROSBE_BASEDIR%\rosbe-gcc-env.cmd" chdefgcc
 goto :EOC
 
 :INTERACTIVE
-    set /p _1="Please enter a MinGW/GCC directory (don't use quotes): "
-    if "%_1%" == "" (
-        echo ERROR: You must enter a MinGW/GCC directory.
-        goto :EOC
-    )
-    set /p _2="Please specify, if this will be the Target or Host GCC: "
-    if "%_2%" == "" (
-        echo ERROR: You must enter "target" or "host".
-        goto :EOC
-    )
+
+set /p _1="Please enter a MinGW/GCC directory (don't use quotes): "
+if "%_1%" == "" (
+    echo ERROR: You must enter a MinGW/GCC directory.
+    goto :EOC
+)
+set /p _2="Please specify, if this will be the Target or Host GCC: "
+if "%_2%" == "" (
+    echo ERROR: You must enter "target" or "host".
+    goto :EOC
+)
 goto :EOF
 
 :EOC
+
 if defined _ROSBE_VERSION (
     title ReactOS Build Environment %_ROSBE_VERSION%
 )

Modified: trunk/tools/RosBE/RosBE-Windows/Root/reladdr2line.cmd
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/reladdr2line.cmd?rev=37232&r1=37231&r2=37232&view=diff
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/reladdr2line.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/reladdr2line.cmd [iso-8859-1] Thu Nov  6 15:13:20 2008
@@ -38,37 +38,41 @@
 :: adress and can be given directly to raddr2line. If not, add it and
 :: give the result to raddr2line.
 ::
+
 :RADD2RLINE
-    if "%_1%" == "" (
-        echo ERROR: You must specify a path/file to examine.
-        goto :EOC
-    )
-    if "%_2%" == "" (
-        echo ERROR: You must specify a address to analyze.
-        goto :EOC
-    )
-    echo %_1%
-    for /f "tokens=2" %%i in ('"objdump -p %_1% 2>NUL | findstr ImageBase"') do set baseaddr=0x%%i
-    if %%i lss %_2% (
-        "%_ROSBE_BASEDIR%\Tools\raddr2line.exe" "%_1%" "%_2%"
-    ) else (
-        set /a baseaddr+=0x%_2%
-        for /f %%i in ('""%_ROSBE_BASEDIR%\Tools\echoh.exe" %baseaddr%"') do set relbase=%%i
-        "%_ROSBE_BASEDIR%\Tools\raddr2line.exe" "%_1%" "%relbase%"
-    )
+
+if "%_1%" == "" (
+    echo ERROR: You must specify a path/file to examine.
+    goto :EOC
+)
+if "%_2%" == "" (
+    echo ERROR: You must specify a address to analyze.
+    goto :EOC
+)
+echo %_1%
+for /f "tokens=2" %%i in ('"objdump -p %_1% 2>NUL | findstr ImageBase"') do set baseaddr=0x%%i
+if %%i lss %_2% (
+    "%_ROSBE_BASEDIR%\Tools\raddr2line.exe" "%_1%" "%_2%"
+) else (
+    set /a baseaddr+=0x%_2%
+    for /f %%i in ('""%_ROSBE_BASEDIR%\Tools\echoh.exe" %baseaddr%"') do set relbase=%%i
+    "%_ROSBE_BASEDIR%\Tools\raddr2line.exe" "%_1%" "%relbase%"
+)
 goto :EOC
 
 ::
 :: If Parameters were set, parse them, if not, ask the user to add them.
 ::
+
 :INTERACTIVE
-    if "%_1%" == "" (
-        set /p _1="Please enter the path/file to be examined: "
-        call :CHECKPATH
-    )
-    if "%_2%" == "" (
-        set /p _2="Please enter the address you would like to analyze: "
-    )
+
+if "%_1%" == "" (
+    set /p _1="Please enter the path/file to be examined: "
+    call :CHECKPATH
+)
+if "%_2%" == "" (
+    set /p _2="Please enter the address you would like to analyze: "
+)
 goto :EOF
 
 ::
@@ -76,14 +80,17 @@
 :: the specified file in the current directory and any
 :: sub-directories.
 ::
+
 :CHECKPATH
-    "%_ROSBE_BASEDIR%\Tools\chkslash.exe" %_1%
-    if errorlevel 2 (
-        for /f "usebackq" %%i in (`"dir /a:-d /s /b %_1% 2>NUL | findstr "%_1%""`) do set _1=%%i
-    )
+
+"%_ROSBE_BASEDIR%\Tools\chkslash.exe" %_1%
+if errorlevel 2 (
+    for /f "usebackq" %%i in (`"dir /a:-d /s /b %_1% 2>NUL | findstr "%_1%""`) do set _1=%%i
+)
 goto :EOF
 
 :EOC
+
 if defined _ROSBE_VERSION (
     title ReactOS Build Environment %_ROSBE_VERSION%
 )

Modified: trunk/tools/RosBE/RosBE-Windows/Root/rosbe-gcc-env.cmd
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/rosbe-gcc-env.cmd?rev=37232&r1=37231&r2=37232&view=diff
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/rosbe-gcc-env.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/rosbe-gcc-env.cmd [iso-8859-1] Thu Nov  6 15:13:20 2008
@@ -26,7 +26,6 @@
 ::
 :: Set the Arch Variables
 ::
-
 set ROS_ARCH=
 set ROS_PREFIX=
 
@@ -50,11 +49,12 @@
     set _ROSBE_TARGET_MINGWPATH=%_ROSBE_BASEDIR%\x86_64
 )
 
-:main
-
 ::
 :: Set up the GCC 4.x.x build environment.
 ::
+
+:main
+
 set PATH=%_ROSBE_HOST_MINGWPATH%\bin;%_ROSBE_TARGET_MINGWPATH%\bin;%_ROSBE_ORIGINALPATH%
 set _ROSBE_MINGWMAKE=%_ROSBE_HOST_MINGWPATH%\bin\mingw32-make.exe
 

Modified: trunk/tools/RosBE/RosBE-Windows/Root/sSVN.cmd
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/sSVN.cmd?rev=37232&r1=37231&r2=37232&view=diff
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/sSVN.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/sSVN.cmd [iso-8859-1] Thu Nov  6 15:13:20 2008
@@ -19,6 +19,7 @@
     echo No parameter specified. Try 'help [COMMAND]'.
     goto :EOC
 )
+
 ::
 :: These two are directly parsed to svn.
 ::
@@ -40,10 +41,10 @@
     "%_ROSBE_BASEDIR%\Tools\svn.exe" cleanup
     goto :EOC
 )
+
 ::
 :: Check if the folder is empty. If not, output an error.
 ::
-
 if /i "%1" == "create" (
     title SVN Creating...
     if exist ".svn\." (
@@ -58,6 +59,7 @@
     )
     goto :EOC
 )
+
 ::
 :: Output the revision of the local and online trees and tell the user if
 :: its up to date or not.
@@ -78,6 +80,7 @@
 )
 
 :UP
+
 echo Local Revision: %OFFSVN%
 echo Online HEAD Revision: %ONSVN%
 echo.
@@ -91,11 +94,13 @@
 )
 
 :UP2
+
 set /p UP="Please enter 'yes' or 'no': "
 if /i "%UP%"=="yes" "%_ROSBE_BASEDIR%\ssvn" update
 if /i "%UP%"=="no" goto :EOC
 
 :EOC
+
 if defined _ROSBE_VERSION (
     title ReactOS Build Environment %_ROSBE_VERSION%
 )

Modified: trunk/tools/RosBE/RosBE-Windows/Root/scut.cmd
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/scut.cmd?rev=37232&r1=37231&r2=37232&view=diff
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/scut.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/scut.cmd [iso-8859-1] Thu Nov  6 15:13:20 2008
@@ -35,9 +35,11 @@
 goto :EOC
 
 :paramcall
+
 call "%_ROSBE_BASEDIR%\Tools\scut.exe" "%1" %2 %3
 
 :EOC
+
 if defined _ROSBE_VERSION (
     title ReactOS Build Environment %_ROSBE_VERSION%
 )

Modified: trunk/tools/RosBE/RosBE-Windows/Root/update.cmd
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE/RosBE-Windows/Root/update.cmd?rev=37232&r1=37231&r2=37232&view=diff
==============================================================================
--- trunk/tools/RosBE/RosBE-Windows/Root/update.cmd [iso-8859-1] (original)
+++ trunk/tools/RosBE/RosBE-Windows/Root/update.cmd [iso-8859-1] Thu Nov  6 15:13:20 2008
@@ -16,6 +16,7 @@
 if %_ROSBE_DEBUG% == 1 (
     @echo on
 )
+
 ::
 :: Set Title
 ::
@@ -110,9 +111,9 @@
 cd /d "%_ROSBE_BASEDIR%"
 
 if %_ROSBE_CMDS% == yes (
-    ::
-    :: First check for a new Updater
-    ::
+
+    REM First check for a new Updater
+
     for %%F in (update.cmd) do set _ROSBE_UPDDATE=%%~tF
     "Tools\wget.exe" -N --ignore-length --no-verbose %_ROSBE_URL%/update.cmd
     for %%F in (update.cmd) do set _ROSBE_UPDDATE2=%%~tF
@@ -122,9 +123,9 @@
         echo Updater got updated and needs to be restarted.
         goto :EOU
     )
-    ::
-    :: PS1 Files.
-    ::
+
+    REM PS1 Files.
+
     if exist "Build.ps1" (
         "Tools\wget.exe" -N --ignore-length --no-verbose %_ROSBE_URL%/Build.ps1
     )
@@ -144,37 +145,32 @@
         "Tools\wget.exe" -N --ignore-length --no-verbose %_ROSBE_URL%/rosbe-gcc-env.ps1
     )
 
-    ::
-    :: Options Files.
-    ::
+    REM Options Files.
+
     if exist "options.cmd" (
         "Tools\wget.exe" -N --ignore-length --no-verbose %_ROSBE_URL%/options.cmd
     )
 
-    ::
-    :: SVN Files.
-    ::
+    REM SVN Files.
+
     if exist "sSVN.cmd" (
         "Tools\wget.exe" -N --ignore-length --no-verbose %_ROSBE_URL%/sSVN.cmd
     )
 
-    ::
-    :: SCut Files.
-    ::
+    REM SCut Files.
+
     if exist "scut.cmd" (
         "Tools\wget.exe" -N --ignore-length --no-verbose %_ROSBE_URL%/scut.cmd
     )
 
-    ::
-    :: RelAddr2Line Files.
-    ::
+    REM RelAddr2Line Files.
+
     if exist "reladdr2line.cmd" (
         "Tools\wget.exe" -N --ignore-length --no-verbose %_ROSBE_URL%/reladdr2line.cmd
     )
 
-    ::
-    :: Other Tools Files.
-    ::
+    REM Other Tools Files.
+
     if exist "Config.cmd" (
         "Tools\wget.exe" -N --ignore-length --no-verbose %_ROSBE_URL%/Config.cmd
     )
@@ -182,9 +178,8 @@
         "Tools\wget.exe" -N --ignore-length --no-verbose %_ROSBE_URL%/chdefdir.cmd
     )
 
-    ::
-    :: Default Files.
-    ::
+    REM Default Files.
+
     "Tools\wget.exe" -N --ignore-length --no-verbose %_ROSBE_URL%/Build.cmd
     "Tools\wget.exe" -N --ignore-length --no-verbose %_ROSBE_URL%/ChangeLog.txt
     "Tools\wget.exe" -N --ignore-length --no-verbose %_ROSBE_URL%/chdefgcc.cmd
@@ -203,47 +198,44 @@
 )
 
 if %_ROSBE_GCC% == yes (
-    ::
-    :: Add Dates into Vars and load GCC packages if needed.
-    ::
+
+    REM Add Dates into Vars and load GCC packages if needed.
+
     if exist GCC.7z (
         for %%F in (GCC.7z) do set _ROSBE_GCCDATE=%%~tF
     )
 
     "Tools\wget.exe" -N --ignore-length --no-verbose %_ROSBE_URL%/GCC.7z
 
-    ::
-    :: Add the maybe Updated Dates to another Var.
-    ::
+    REM Add the maybe Updated Dates to another Var.
+
     for %%F in (GCC.7z) do set _ROSBE_GCCDATE2=%%~tF
 
-    ::
-    :: Extract GCC.
-    ::
+    REM Extract GCC.
+
     if !_ROSBE_GCCDATE! NEQ !_ROSBE_GCCDATE2! (
         "Tools\7z.exe" x GCC.7z "%_ROSBE_BASEDIR%\i386"
     )
 )
 if %_ROSBE_TOOLS% == yes (
-    ::
-    :: Add Dates into Vars and load Tool SRC packages if needed.
-    ::
+
+    REM Add Dates into Vars and load Tool SRC packages if needed.
+
     if exist Tools.7z (
         for %%F in (Tools.7z) do set _ROSBE_TOOLSDATE=%%~tF
     )
 
     "Tools\wget.exe" -N --ignore-length --no-verbose %_ROSBE_URL%/Tools.7z
 
-    ::
-    :: Add the maybe Updated Dates to another Var.
-    ::
+    REM Add the maybe Updated Dates to another Var.
+
     for %%F in (Tools.7z) do set _ROSBE_TOOLSDATE2=%%~tF
 
     if !_ROSBE_TOOLSDATE! NEQ !_ROSBE_TOOLSDATE2! (
         "Tools\7z.exe" x Tools.7z "%TEMP%"
-        ::
-        :: Build the tools
-        ::
+
+        REM Build the tools
+
         make -f %TEMP%\makefile
         copy %TEMP%\*.exe "%_ROSBE_BASEDIR%\Tools"
     )
@@ -252,6 +244,10 @@
 :EOU
 
 cd /d "%_ROSBE_OPATH%"
+
+if defined _ROSBE_VERSION (
+    title ReactOS Build Environment %_ROSBE_VERSION%
+)
 
 ::
 :: Unload Vars.
@@ -267,8 +263,3 @@
 set _ROSBE_OPATH=
 set _ROSBE_UPDDATE=
 set _ROSBE_UPDDATE2=
-
-
-if defined _ROSBE_VERSION (
-    title ReactOS Build Environment %_ROSBE_VERSION%
-)



More information about the Ros-diffs mailing list