Author: cfinck
Date: Tue Jun 19 00:54:50 2007
New Revision: 27228
URL:
http://svn.reactos.org/svn/reactos?rev=27228&view=rev
Log:
Add a "reladdr2line" tool coded by Christoph
I slightly modified his batch file, so it integrates into RosBE
Added:
trunk/tools/RosBE-Windows/Root/reladdr2line.cmd
trunk/tools/RosBE-Windows/Tools/echoh.c
Modified:
trunk/tools/RosBE-Windows/Root/RosBE.mac
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 Tue Jun 19 00:54:50 2007
@@ -5,3 +5,4 @@
HELP = "%ROSBEBASEDIR%\Help.cmd" $*
MAKE = "%ROSBEBASEDIR%\Build.cmd" $*
MAKEX = "%ROSBEBASEDIR%\Build-Multi.cmd" $*
+RELADDR2LINE = "%ROSBEBASEDIR%\reladdr2line.cmd" $*
Added: 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 (added)
+++ trunk/tools/RosBE-Windows/Root/reladdr2line.cmd Tue Jun 19 00:54:50 2007
@@ -1,0 +1,5 @@
+@echo off
+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 ('"%ROSBEBASEDIR%\Tools\echoh %baseaddr%"') do set
relbase=%%i
+addr2line --exe=%1 %relbase% 2>NUL
Added: trunk/tools/RosBE-Windows/Tools/echoh.c
URL:
http://svn.reactos.org/svn/reactos/trunk/tools/RosBE-Windows/Tools/echoh.c?…
==============================================================================
--- trunk/tools/RosBE-Windows/Tools/echoh.c (added)
+++ trunk/tools/RosBE-Windows/Tools/echoh.c Tue Jun 19 00:54:50 2007
@@ -1,0 +1,17 @@
+/*
+ * PROJECT: RosBE - ReactOS Build Environment for Windows
+ * LICENSE: GPL - See COPYING in the top level directory
+ * FILE: Tools/echoh.c
+ * PURPOSE: Converts a value to hex and displays it
+ * COPYRIGHT: Copyright 2007 Christoph von Wittich <Christoph_vW(a)reactos.org>
+ *
+ */
+
+
+#include <stdio.h>
+
+int main(int argc, char** argv) {
+ if (argc == 2)
+ printf("%x", atoi(argv[1]));
+ return 0;
+}