From: <cap...@us...> - 2007-04-18 22:26:28
|
Revision: 71 http://svn.sourceforge.net/pearcolator/?rev=71&view=rev Author: captain5050 Date: 2007-04-18 15:26:30 -0700 (Wed, 18 Apr 2007) Log Message: ----------- Fix at least one silly mistake in Linux stack initialization and enable stack debug. argv[0] is always the executable file name. Modified Paths: -------------- src/org/binarytranslator/generic/os/abi/linux/LinuxStackInitializer.java src/org/binarytranslator/vmInterface/DynamicCodeRunner.java Modified: src/org/binarytranslator/generic/os/abi/linux/LinuxStackInitializer.java =================================================================== --- src/org/binarytranslator/generic/os/abi/linux/LinuxStackInitializer.java 2007-04-18 18:44:18 UTC (rev 70) +++ src/org/binarytranslator/generic/os/abi/linux/LinuxStackInitializer.java 2007-04-18 22:26:30 UTC (rev 71) @@ -299,8 +299,12 @@ // grab the vector of command line options that are to be delivered to the // linux program - String[] argv = DBT_Options.executableArguments; - + String[] argv = new String[DBT_Options.executableArguments.length+1]; + argv[0] = DBT_Options.executableFile; + for (int i=0; i < DBT_Options.executableArguments.length; i++) { + argv[i+1] = DBT_Options.executableArguments[i]; + } + // --- // First create the information block by concatenating all strings // together, then compute pointers to values in the information Modified: src/org/binarytranslator/vmInterface/DynamicCodeRunner.java =================================================================== --- src/org/binarytranslator/vmInterface/DynamicCodeRunner.java 2007-04-18 18:44:18 UTC (rev 70) +++ src/org/binarytranslator/vmInterface/DynamicCodeRunner.java 2007-04-18 22:26:30 UTC (rev 71) @@ -44,7 +44,7 @@ VM.sysWriteHex(ps.getCurrentInstructionAddress()); VM.sysWriteln(); VM.sysWriteln(ps.toString()); - // ps.dumpStack(20); + ps.dumpStack(20); VM.sysWrite("About to bridge to "); VM.sysWriteHex(VM_Magic.objectAsAddress(code).toInt()); VM.sysWriteln(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |