- sysreg is now able to start the emulator but it cannot get any debug data yet. But this might be due that i tested sysreg in linux under vmware which then ran qemu....
svn path=/trunk/; revision=25437
free(command);
return pid;
}
-#elif defined (__LINUX__)
+#else
/********************************************************************************************************************/
OsSupport::ProcessID OsSupport::createProcess(TCHAR *procname, int procargsnum, TCHAR **procargs)
{
if ((pid = fork()) < 0)
{
cerr << "OsSupport::createProcess> fork failed" << endl;
- return pid;
+ return 0;
}
+ if (pid == 0)
+ {
+ execv(procname, procargs);
+ return 0;
+ }
+
+ return pid;
+ }
+ bool OsSupport::terminateProcess(OsSupport::ProcessID pid)
+ {
+ kill(pid, SIGKILL);
+ return true;
}
+
#endif
} // end of namespace System_
* PROGRAMMERS: Johannes Anderwald (johannes.anderwald at sbox tugraz at)
*/
-#ifdef WIN32
+#if 0
#include <windows.h>
-#elif defined(__LINUX__)
+#else
#include <unistd.h>
+#include <sys/types.h>
+#include <signal.h>
#endif
#include "user_types.h"
#ifdef WIN32
typedef DWORD ProcessID;
-
-#elif defined(__LINUX__)
+#else
typedef pid_t ProcessID;
-
-#else
-#error you need to define pid handle type for your platform
-#endif
+ #endif
//---------------------------------------------------------------------------------------
///
return false;
}
//
- m_File = _tpopen(PipeCmd.c_str(), AccessMode.c_str());
+ m_File = popen(PipeCmd.c_str(), "r"); //AccessMode.c_str());
if (m_File)
{
cerr << "PipeReader::openPipe> successfully opened pipe" << endl;
return false;
}
- int res = _pclose(m_File);
+ int res = pclose(m_File);
if (res == INT_MAX)
{
#include "rosboot_test.h"
#include "pipe_reader.h"
-#include "namedpipe_reader.h"
-#include "sym_file.h"
+//#include "namedpipe_reader.h"
+//#include "sym_file.h"
#include "file_reader.h"
#include "os_support.h"
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
+#include <math.h>
-
+
namespace Sysreg_
{
using std::vector;
using System_::PipeReader;
+#if 0
using System_::NamedPipeReader;
using System_::SymbolFile;
+#endif
using System_::FileReader;
using System_::OsSupport;
{
TCHAR * stop;
m_Timeout = _tcstod(timeout.c_str (), &stop);
- if (_isnan(m_Timeout) || m_Timeout == 0.0)
+
+ if (isnan(m_Timeout) || m_Timeout == 0.0)
{
cerr << "Warning: overriding timeout with default of 60 sec" << endl;
m_Timeout = 60.0;
///
string result;
result.reserve (200);
-
+#if 0
SymbolFile::resolveAddress (modulename, address, result);
cerr << result << endl;
-
+#endif
///
/// TODO
///
//---------------------------------------------------------------------------------------
bool RosBootTest::fetchDebugByPipe(string boot_cmd)
{
- NamedPipeReader namedpipe_reader;
string pipecmd = _T("");
+ bool ret = true;
///
/// FIXME
/// split up arguments
OsSupport::ProcessID pid = OsSupport::createProcess ((TCHAR*)boot_cmd.c_str (), 0, NULL);
-
+#if 0
string::size_type pipe_pos = boot_cmd.find (_T("serial pipe:"));
+ NamedPipeReader namedpipe_reader;
if (pipe_pos != string::npos)
{
pipe_pos += 12;
/// delay reading until emulator is ready
///
- _sleep( (clock_t)m_Delayread * CLOCKS_PER_SEC );
+ sleep( (clock_t)m_Delayread * CLOCKS_PER_SEC );
}
if (!namedpipe_reader.openPipe(pipecmd))
string Buffer;
Buffer.reserve (500);
- bool ret = true;
vector<string> vect;
size_t lines = 0;
bool write_log;
}
_sleep(3* CLOCKS_PER_SEC);
OsSupport::terminateProcess (pid);
-
+#endif
return ret;
}
//---------------------------------------------------------------------------------------
/// delay reading until emulator is ready
///
- _sleep( (clock_t)m_Delayread * CLOCKS_PER_SEC );
+ sleep( (clock_t)m_Delayread * CLOCKS_PER_SEC );
}
OsSupport::ProcessID pid = 0;
using Sysreg_::RegressionTest;
using Sysreg_::RosBootTest;
+#if 0
using System_::SymbolFile;
+#endif
typedef ComponentFactoryTemplate<RegressionTest, string> ComponentFactory;
string envvar;
string ros = _T("ROS_OUTPUT");
config.getStringValue (ros, envvar);
-
+#if 0
SymbolFile::initialize (config, envvar);
-
+#endif
if (regtest->execute (config))
{
cout << "The regression test " << regtest->getName () << " completed successfully" << endl;
conf_parser.cpp \
env_var.cpp \
pipe_reader.cpp \
- namedpipe_reader.cpp \
rosboot_test.cpp \
- sym_file.cpp \
sysreg.cpp \
file_reader.cpp \
os_support.cpp \
; This value is the command which is executed to gain debugging data
; this value is mandatory
-ROSBOOT_CMD=D:\reactos\qemu\qemu.exe -serial pipe:qemu -boot d -m 128 -L D:\reactos\qemu\ D:\reactos\RosVM.vmdk -cdrom D:\Reactos\ReactOS-RegTest.iso -pidfile pid.txt
+;ROSBOOT_CMD=D:\reactos\qemu\qemu.exe -serial pipe:qemu -boot d -m 128 -L D:\reactos\qemu\ D:\reactos\RosVM.vmdk -cdrom ; D:\Reactos\ReactOS-RegTest.iso -pidfile pid.txt
+
+ROSBOOT_CMD=/usr/bin/qemu -serial file:/home/freenet/reactos/tools/sysreg/txtmode.log -boot d -m 64 -L /home/freenet/reactos/qemu /home/freenet/reactos/qemu/c.img -cdrom /home/freenet/reactos/ReactOS.iso
;
; ROSBOOT_PIDFILE
; If the value is set to pipe, then sysreg will read from pipe created by the
; ROSBOOT_CMD
;
-;ROSBOOT_DEBUG_PORT=file
-ROSBOOT_DEBUG_PORT=pipe
+ROSBOOT_DEBUG_PORT=file
+;ROSBOOT_DEBUG_PORT=pipe
;
; ROSBOOT_DEBUG_FILE
; debug data to the specified debug file
;
-ROSBOOT_DEBUG_FILE=D:\ReactOS\tools\sysreg\txtmode.log
+;ROSBOOT_DEBUG_FILE=D:\ReactOS\tools\sysreg\txtmode.log
+ROSBOOT_DEBUG_FILE=/home/freenet/reactos/tools/sysreg/txtmode.log
; ROSBOOT_DELAY_READ;
;
;
; CP_NAME is the value of the ROSBOOT_CHECK_POINT variable
-ROSBOOT_CHECK_POINT=USETUP_COMPLETE
-;ROSBOOT_CHECK_POINT=SYSSETUP_COMPLETE
-;ROSBOOT_CHECK_POINT=THIRDBOOT_COMPLETE
+;ROSBOOT_CHECK_POINT=USETUP_COMPLETE
+ROSBOOT_CHECK_POINT=SYSSETUP_COMPLETE
+ROSBOOT_CHECK_POINT=THIRDBOOT_COMPLETE
; ROSBOOT_CRITICAL_APP
;
ROSBOOT_CRITICAL_APP=setup.exe userinit.exe smss.exe winlogon.exe csrss.exe explorer.exe
-;ROSBOOT_CRITICAL_APP=setup.exe userinit.exe smss.exe winlogon.exe csrss.exe explorer.exe lsass.exe
-
+;ROSBOOT_CRITICAL_APP=setup.exe userinit.exe smss.exe winlogon.exe csrss.exe explorer.exe lsass.exe
\ No newline at end of file