#include <VirtualSystem.h>
Onikiri::EmulatorUtility::VirtualSystemに対する継承グラフ
Public メソッド | |
int | Access (const char *path, int mode) |
bool | AddFDMap (int targetFD, int hostFD, bool autoclose=false) |
void | AddInsnTick () |
int | ChDir (const char *path) |
int | Close (int targetFD) |
int | Dup (int fd) |
int | FDHostToTarget (int hostFD) const |
int | FDTargetToHost (int targetFD) const |
int | FStat (int fd, HostStat *s) |
int | FTruncate (int fd, s64 length) |
s64 | GetClock () |
char * | GetCWD (char *buf, int maxlen) |
DelayUnlinker * | GetDelayUnlinker () |
int | GetEGID () |
int | GetErrno () |
int | GetEUID () |
int | GetGID () |
s64 | GetInsnTick () |
int | GetPID () |
s64 | GetTime () |
int | GetUID () |
s64 | LSeek (int fd, s64 offset, int whence) |
int | LStat (const char *path, HostStat *s) |
int | MkDir (const char *path, int mode) |
int | Open (const char *filename, int oflag) |
int | Read (int targetFD, void *buffer, unsigned int count) |
int | Rename (const char *oldpath, const char *newpath) |
void | SetInitialWorkingDir (const boost::filesystem::path &dir) |
int | Stat (const char *path, HostStat *s) |
int | Truncate (const char *path, s64 length) |
int | Unlink (const char *path) |
VirtualSystem () | |
int | Write (int targetFD, void *buffer, unsigned int count) |
~VirtualSystem () |
VirtualSystem.h の 100 行で定義されています。
VirtualSystem::VirtualSystem | ( | ) |
VirtualSystem.cpp の 228 行で定義されています。
参照先 Onikiri::ParamExchange::LoadParam().
00229 { 00230 LoadParam(); 00231 m_executedInsnTick = 0; 00232 m_timeEmulationMode = EmulationModeStrToInt( m_timeEmulationModeStr ); 00233 }
関数の呼び出しグラフ:
VirtualSystem::~VirtualSystem | ( | ) |
VirtualSystem.cpp の 235 行で定義されています。
参照先 Onikiri::ParamExchange::ReleaseParam().
00236 { 00237 ReleaseParam(); 00238 for_each(m_autoCloseFD.begin(), m_autoCloseFD.end(), posix_close); 00239 }
関数の呼び出しグラフ:
int VirtualSystem::Access | ( | const char * | path, | |
int | mode | |||
) |
VirtualSystem.cpp の 399 行で定義されています。
参照元 Onikiri::EmulatorUtility::Linux64SyscallConv::syscall_access().
Here is the caller graph for this function:
bool VirtualSystem::AddFDMap | ( | int | targetFD, | |
int | hostFD, | |||
bool | autoclose = false | |||
) |
VirtualSystem.cpp の 246 行で定義されています。
参照先 Onikiri::EmulatorUtility::FDConv::AddMap().
00247 { 00248 if (!m_fdConv.AddMap(targetFD, hostFD)) 00249 return false; 00250 00251 if (autoclose) 00252 AddAutoCloseFD(hostFD); 00253 00254 return true; 00255 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
void Onikiri::EmulatorUtility::VirtualSystem::AddInsnTick | ( | ) | [inline] |
VirtualSystem.h の 160 行で定義されています。
参照元 Onikiri::EmulatorUtility::CommonEmulator< Traits >::Execute()・Onikiri::EmulatorUtility::CommonEmulator< Traits >::Skip().
Here is the caller graph for this function:
int VirtualSystem::ChDir | ( | const char * | path | ) |
int VirtualSystem::Close | ( | int | targetFD | ) |
VirtualSystem.cpp の 357 行で定義されています。
参照先 Onikiri::EmulatorUtility::DelayUnlinker::GetMapPath()・Onikiri::EmulatorUtility::DelayUnlinker::IfUnlinkable()・Onikiri::EmulatorUtility::DelayUnlinker::RemoveMap()・Onikiri::EmulatorUtility::FDConv::RemoveMap()・Onikiri::EmulatorUtility::DelayUnlinker::RemoveUnlinkPath()・Onikiri::EmulatorUtility::FDConv::TargetToHost().
参照元 Onikiri::EmulatorUtility::Linux64SyscallConv::syscall_close().
00358 { 00359 int hostFD = m_fdConv.TargetToHost(fd); 00360 int result = posix_close(hostFD); 00361 if (result != -1) { 00362 // closeゥN[YXgO 00363 RemoveAutoCloseFD(hostFD); 00364 00365 m_fdConv.RemoveMap(fd); 00366 #ifdef HOST_IS_WINDOWS 00367 if( m_delayUnlinker.IfUnlinkable(fd) ){ 00368 m_delayUnlinker.RemoveUnlinkPath(m_delayUnlinker.GetMapPath(fd)); 00369 posix_unlink(m_delayUnlinker.GetMapPath(fd).c_str()); 00370 } 00371 #endif 00372 m_delayUnlinker.RemoveMap(fd); 00373 } 00374 00375 return result; 00376 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
int VirtualSystem::Dup | ( | int | fd | ) |
VirtualSystem.cpp の 328 行で定義されています。
参照先 AddFDMap()・Onikiri::EmulatorUtility::DelayUnlinker::AddMap()・FDTargetToHost()・Onikiri::EmulatorUtility::FDConv::GetFirstFreeFD()・Onikiri::EmulatorUtility::DelayUnlinker::GetMapPath().
参照元 Onikiri::EmulatorUtility::Linux64SyscallConv::syscall_dup().
00329 { 00330 int hostFD = FDTargetToHost(fd); 00331 int dupHostFD = posix_dup(hostFD); 00332 // FD\ 00333 if (dupHostFD != -1) { 00334 int targetFD = m_fdConv.GetFirstFreeFD(); 00335 AddFDMap(targetFD, dupHostFD, true); 00336 m_delayUnlinker.AddMap(targetFD, m_delayUnlinker.GetMapPath(fd)); 00337 return targetFD; 00338 } 00339 else { 00340 return -1; 00341 } 00342 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
int Onikiri::EmulatorUtility::VirtualSystem::FDHostToTarget | ( | int | hostFD | ) | const [inline] |
int Onikiri::EmulatorUtility::VirtualSystem::FDTargetToHost | ( | int | targetFD | ) | const [inline] |
VirtualSystem.h の 148 行で定義されています。
参照先 Onikiri::EmulatorUtility::FDConv::TargetToHost().
参照元 Dup()・FStat()・FTruncate()・LSeek().
関数の呼び出しグラフ:
Here is the caller graph for this function:
int VirtualSystem::FStat | ( | int | fd, | |
HostStat * | s | |||
) |
VirtualSystem.cpp の 378 行で定義されています。
参照先 FDTargetToHost().
参照元 Onikiri::EmulatorUtility::Linux64SyscallConv::syscall_fstat64().
00379 { 00380 int hostFD = FDTargetToHost(fd); 00381 return posix_fstat(hostFD, buffer); 00382 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
int VirtualSystem::FTruncate | ( | int | fd, | |
s64 | length | |||
) |
VirtualSystem.cpp の 434 行で定義されています。
参照先 FDTargetToHost().
参照元 Onikiri::EmulatorUtility::Linux64SyscallConv::syscall_ftruncate().
00435 { 00436 int hostFD = FDTargetToHost(fd); 00437 return posix_ftruncate(hostFD, length); 00438 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
s64 VirtualSystem::GetClock | ( | ) |
VirtualSystem.cpp の 494 行で定義されています。
参照元 Onikiri::EmulatorUtility::Linux64SyscallConv::syscall_times().
00495 { 00496 switch(m_timeEmulationMode){ 00497 default: 00498 case TIME_HOST: 00499 return clock(); 00500 case TIME_FIXED: 00501 return 0; 00502 case TIME_INSTRUCTION: 00503 return m_executedInsnTick/(INSN_PER_SEC/1000); 00504 } 00505 }
Here is the caller graph for this function:
char * VirtualSystem::GetCWD | ( | char * | buf, | |
int | maxlen | |||
) |
VirtualSystem.cpp の 275 行で定義されています。
参照元 Onikiri::EmulatorUtility::Linux64SyscallConv::syscall_getcwd().
Here is the caller graph for this function:
DelayUnlinker* Onikiri::EmulatorUtility::VirtualSystem::GetDelayUnlinker | ( | ) | [inline] |
int VirtualSystem::GetEGID | ( | ) |
int VirtualSystem::GetErrno | ( | ) |
int VirtualSystem::GetEUID | ( | ) |
int VirtualSystem::GetGID | ( | ) |
s64 Onikiri::EmulatorUtility::VirtualSystem::GetInsnTick | ( | ) | [inline] |
VirtualSystem.h の 164 行で定義されています。
参照元 Onikiri::AlphaLinux::AlphaLinuxSyscallConv::Execute().
Here is the caller graph for this function:
int VirtualSystem::GetPID | ( | ) |
s64 VirtualSystem::GetTime | ( | ) |
VirtualSystem.cpp の 481 行で定義されています。
参照元 Onikiri::EmulatorUtility::Linux64SyscallConv::syscall_gettimeofday()・Onikiri::EmulatorUtility::Linux64SyscallConv::syscall_time().
00482 { 00483 switch(m_timeEmulationMode){ 00484 default: 00485 case TIME_HOST: 00486 return time(NULL); 00487 case TIME_FIXED: 00488 return m_unixTime; 00489 case TIME_INSTRUCTION: 00490 return m_unixTime + m_executedInsnTick/INSN_PER_SEC; 00491 } 00492 }
Here is the caller graph for this function:
int VirtualSystem::GetUID | ( | ) |
VirtualSystem.cpp の 393 行で定義されています。
参照先 FDTargetToHost().
参照元 Onikiri::EmulatorUtility::Linux64SyscallConv::syscall_lseek().
00394 { 00395 int hostFD = FDTargetToHost(fd); 00396 return posix_lseek(hostFD, offset, whence); 00397 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
int Onikiri::EmulatorUtility::VirtualSystem::LStat | ( | const char * | path, | |
HostStat * | s | |||
) |
参照元 Onikiri::EmulatorUtility::Linux64SyscallConv::syscall_lstat64().
Here is the caller graph for this function:
int VirtualSystem::MkDir | ( | const char * | path, | |
int | mode | |||
) |
VirtualSystem.cpp の 440 行で定義されています。
参照元 Onikiri::EmulatorUtility::Linux64SyscallConv::syscall_mkdir().
00441 { 00442 namespace fs = filesystem; 00443 if (fs::create_directory( GetHostPath(path) )) 00444 return 0; 00445 else 00446 return -1; 00447 }
Here is the caller graph for this function:
int VirtualSystem::Open | ( | const char * | filename, | |
int | oflag | |||
) |
VirtualSystem.cpp の 312 行で定義されています。
参照先 AddFDMap()・Onikiri::EmulatorUtility::DelayUnlinker::AddMap()・Onikiri::EmulatorUtility::FDConv::GetFirstFreeFD().
参照元 Onikiri::EmulatorUtility::Linux64SyscallConv::syscall_open().
00313 { 00314 int hostFD = posix_open(GetHostPath(filename).string().c_str(), oflag, POSIX_S_IWRITE | POSIX_S_IREAD); 00315 00316 // FD\ 00317 if (hostFD != -1) { 00318 int targetFD = m_fdConv.GetFirstFreeFD(); 00319 AddFDMap(targetFD, hostFD, true); 00320 m_delayUnlinker.AddMap(targetFD, GetHostPath(filename).string()); 00321 return targetFD; 00322 } 00323 else { 00324 return -1; 00325 } 00326 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
int VirtualSystem::Read | ( | int | targetFD, | |
void * | buffer, | |||
unsigned int | count | |||
) |
VirtualSystem.cpp の 345 行で定義されています。
参照先 Onikiri::EmulatorUtility::FDConv::TargetToHost().
参照元 Onikiri::EmulatorUtility::Linux64SyscallConv::syscall_read()・Onikiri::EmulatorUtility::Linux64SyscallConv::syscall_readv().
00346 { 00347 int hostFD = m_fdConv.TargetToHost(fd); 00348 return posix_read(hostFD, buffer, count); 00349 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
int VirtualSystem::Rename | ( | const char * | oldpath, | |
const char * | newpath | |||
) |
VirtualSystem.cpp の 424 行で定義されています。
参照元 Onikiri::EmulatorUtility::Linux64SyscallConv::syscall_rename().
00425 { 00426 return posix_rename((m_cwd/oldpath).string().c_str(), (m_cwd/newpath).string().c_str()); 00427 }
Here is the caller graph for this function:
void VirtualSystem::SetInitialWorkingDir | ( | const boost::filesystem::path & | dir | ) |
int Onikiri::EmulatorUtility::VirtualSystem::Stat | ( | const char * | path, | |
HostStat * | s | |||
) |
参照元 Onikiri::EmulatorUtility::Linux64SyscallConv::syscall_stat64().
Here is the caller graph for this function:
int VirtualSystem::Truncate | ( | const char * | path, | |
s64 | length | |||
) |
VirtualSystem.cpp の 429 行で定義されています。
参照元 Onikiri::EmulatorUtility::Linux64SyscallConv::syscall_truncate().
Here is the caller graph for this function:
int VirtualSystem::Unlink | ( | const char * | path | ) |
VirtualSystem.cpp の 404 行で定義されています。
参照先 Onikiri::EmulatorUtility::DelayUnlinker::AddUnlinkPath().
参照元 Onikiri::EmulatorUtility::Linux64SyscallConv::syscall_unlink().
00405 { 00406 /* unlink 00407 Unix AvZX open 00408 t@C unlink AvZX 00409 close _t@CB 00410 AWindows open t@C unlink 00411 G[B 00412 Windows Unix DelayUnlinker NXp 00413 */ 00414 int unlinkerr = posix_unlink(GetHostPath(path).string().c_str()); 00415 #ifdef HOST_IS_WINDOWS 00416 if( posix_geterrno() == 0xd ){ 00417 m_delayUnlinker.AddUnlinkPath(GetHostPath(path).string()); 00418 return 0; 00419 } 00420 #endif 00421 return unlinkerr; 00422 }
関数の呼び出しグラフ:
Here is the caller graph for this function:
int VirtualSystem::Write | ( | int | targetFD, | |
void * | buffer, | |||
unsigned int | count | |||
) |
VirtualSystem.cpp の 351 行で定義されています。
参照先 Onikiri::EmulatorUtility::FDConv::TargetToHost().
参照元 Onikiri::EmulatorUtility::Linux64SyscallConv::syscall_write()・Onikiri::EmulatorUtility::Linux64SyscallConv::syscall_writev().
00352 { 00353 int hostFD = m_fdConv.TargetToHost(fd); 00354 return posix_write(hostFD, buffer, count); 00355 }
関数の呼び出しグラフ:
Here is the caller graph for this function: