Author: dreimer
Date: Sat Jul 14 18:50:26 2007
New Revision: 27659
URL:
http://svn.reactos.org/svn/reactos?rev=27659&view=rev
Log:
Merge RAddr.cmd and reladdr2line.cmd
Remove my RAddr.cmd
Add reladdr2line.cmd instead
Removed:
trunk/tools/RosBE-Windows/Root/RAddr.cmd
Modified:
trunk/tools/RosBE-Windows/Root/RosBE.mac
trunk/tools/RosBE-Windows/Root/reladdr2line.cmd
Removed: trunk/tools/RosBE-Windows/Root/RAddr.cmd
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/Root/RAddr.cmd…
==============================================================================
--- trunk/tools/RosBE-Windows/Root/RAddr.cmd (original)
+++ trunk/tools/RosBE-Windows/Root/RAddr.cmd (removed)
@@ -1,50 +1,0 @@
-::
-:: PROJECT: RosBE - ReactOS Build Environment for Windows
-:: LICENSE: GPL - See COPYING in the top level directory
-:: FILE: Root/RAddr.cmd
-:: PURPOSE: Translates program addresses into file names and
-:: line numbers.
-:: COPYRIGHT: Copyright 2007 Daniel Reimer <reimer.daniel(a)freenet.de>
-::
-::
-@echo off
-
-title RAddr2Line...
-
-set 1 = %1
-set 2 = %2
-
-::
-:: Receive the Parameters and decide what to do.
-::
-if "%1%" == "" (
- goto :MAN
-)
-if not "%1%" == "" (
- if "%2%" == "" (
- goto :AUTO1
- ) else (
- goto :EOC
- )
-)
-
-::
-:: If Parameters were set, parse them, if not, ask the user to add them.
-::
-:MAN
-echo Set the Path to the Executable to be examined.
-SET /P 1 =
-echo Set the Address you wanna analyze inside the Executable.
-SET /P 2 =
-echo.
-goto :EOC
-
-:AUTO1
-echo Set the Address you wanna analyze inside the Executable.
-echo.
-SET /P 2 =
-goto :EOC
-
-:EOC
-raddr2line "%1%" "%2%"
-title ReactOS Build Environment %_VER%
Modified: trunk/tools/RosBE-Windows/Root/RosBE.mac
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/Root/RosBE.mac…
==============================================================================
--- trunk/tools/RosBE-Windows/Root/RosBE.mac (original)
+++ trunk/tools/RosBE-Windows/Root/RosBE.mac Sat Jul 14 18:50:26 2007
@@ -6,4 +6,4 @@
MAKE = "%ROSBEBASEDIR%\Build.cmd" $*
MAKEX = "%ROSBEBASEDIR%\Build-Multi.cmd" $*
CHDEFDIR = "%ROSBEBASEDIR%\chdefdir.cmd" $*
-RADDR2LINE = "%ROSBEBASEDIR%\RAddr.cmd" $*
+RADDR2LINE = "%ROSBEBASEDIR%\reladdr2line.cmd" $*
Modified: trunk/tools/RosBE-Windows/Root/reladdr2line.cmd
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/Root/reladdr2l…
==============================================================================
--- trunk/tools/RosBE-Windows/Root/reladdr2line.cmd (original)
+++ trunk/tools/RosBE-Windows/Root/reladdr2line.cmd Sat Jul 14 18:50:26 2007
@@ -4,6 +4,7 @@
:: FILE: Root/reladdr2line.cmd
:: PURPOSE: Converts a value to hex and displays it.
:: COPYRIGHT: Copyright 2007 Christoph von Wittich <Christoph_vW(a)reactos.org>
+:: Daniel Reimer <reimer.daniel(a)freenet.de>
::
::
@echo off
@@ -46,13 +47,11 @@
:EOC
for /f "tokens=2" %%i in ('"objdump -p %1% 2>NUL | findstr
ImageBase"') do SET baseaddr=0x%%i
-set /a baseaddr += 0x%2%
-for /f %%i in ('"echoh %baseaddr%"') do set relbase=%%i
-raddr2line "%1%" "%relbase%" 2>NUL
-
+if %%i < %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
+)
title ReactOS Build Environment %_VER%
-
-::%1 Dateiname
-::%2 Adresse
-::%%i das was objdump rausfindet
-::baseaddr = %%i + Adresse