[ros-diffs] [dreimer] 27678: A try to fix reladdr2line

dreimer at svn.reactos.org dreimer at svn.reactos.org
Sun Jul 15 14:38:16 CEST 2007


Author: dreimer
Date: Sun Jul 15 16:38:16 2007
New Revision: 27678

URL: http://svn.reactos.org/svn/reactos?rev=27678&view=rev
Log:
A try to fix reladdr2line

Modified:
    trunk/tools/RosBE-Windows/Root/reladdr2line.cmd

Modified: trunk/tools/RosBE-Windows/Root/reladdr2line.cmd
URL: http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/Root/reladdr2line.cmd?rev=27678&r1=27677&r2=27678&view=diff
==============================================================================
--- trunk/tools/RosBE-Windows/Root/reladdr2line.cmd (original)
+++ trunk/tools/RosBE-Windows/Root/reladdr2line.cmd Sun Jul 15 16:38:16 2007
@@ -11,17 +11,17 @@
 
 title relAddr2Line...
 
-set 1 = %1
-set 2 = %2
+set _1=%1
+set _2=%2
 
 ::
 :: Receive the Parameters and decide what to do.
 ::
-if "%1%" == "" (
+if "%_1%" == "" (
     goto :MAN
 )
-if not "%1%" == "" (
-    if "%2%" == "" (
+if not "%_1%" == "" (
+    if "%_2%" == "" (
         goto :AUTO1
     ) else (
         goto :EOC
@@ -33,25 +33,25 @@
 ::
 :MAN
 echo Set the Path to the Executable to be examined.
-SET /P 1 =
+SET /P _1=
 echo Set the Address you wanna analyze inside the Executable.
-SET /P 2 =
+SET /P _2=
 echo.
 goto :EOC
 
 :AUTO1
 echo Set the Address you wanna analyze inside the Executable.
 echo.
-SET /P 2 =
+SET /P _2=
 goto :EOC
 
 :EOC
-for /f "tokens=2" %%i in ('"objdump -p %1% 2>NUL | findstr ImageBase"') do SET baseaddr=0x%%i
-if %%i < %2% (
-    raddr2line "%1%" "%2%" 2>NUL
-)else(
-    set /a baseaddr += 0x%2%
+for /f "tokens=2" %%i in ('"objdump -p %_1% 2>NUL | findstr ImageBase"') do SET baseaddr=0x%%i
+if %%i LSS %_2% (
+    raddr2line "%_1%" "%_2%" 2>NUL
+) else (
+    set /a baseaddr += 0x%_2%
     for /f %%i in ('"echoh %baseaddr%"') do set relbase=%%i
-    raddr2line "%1%" "%relbase%" 2>NUL
+    raddr2line "%_1%" "%relbase%" 2>NUL
 )
 title ReactOS Build Environment %_VER%




More information about the Ros-diffs mailing list