可以在Gem5系统调用仿真模式下运行Python代码吗?

可以在Gem5系统调用仿真模式下运行Python代码吗?,python,linux,x86,gem5,Python,Linux,X86,Gem5,我需要在里面运行一些Python代码。作为测试,我创建了一个名为hello.py的Python程序,它打印“hello World from Python”。我使用创建了hello.py文件的二进制文件。二进制文件名是hello。接下来,我尝试使用以下命令运行Gem5/build/X86/Gem5.opt--debug flags=DRAM--debug file=Gem5-helloworld.out./configs/example/se.py-c./tests/test progs/myF

我需要在里面运行一些Python代码。作为测试,我创建了一个名为
hello.py
的Python程序,它打印“hello World from Python”。我使用创建了
hello.py
文件的二进制文件。二进制文件名是
hello
。接下来,我尝试使用以下命令运行Gem5
/build/X86/Gem5.opt--debug flags=DRAM--debug file=Gem5-helloworld.out./configs/example/se.py-c./tests/test progs/myFile/hello
。但是,我收到以下消息
致命:syscall fchmod(#91)未实现。
并且Gem5没有打印“来自Python的Hello World”消息。如何解决上述问题?可以在Gem5中运行Python代码吗?Gem5正在终端中打印以下内容

./build/X86/gem5.opt --debug-flags=DRAM --debug-file=gem5-helloworld.out ./configs/example/se.py -c ./tests/test-progs/myFile/hello

warn: CheckedInt already exists in allParams. This may be caused by the Python 2.7 compatibility layer.
warn: Enum already exists in allParams. This may be caused by the Python 2.7 compatibility layer.
warn: ScopedEnum already exists in allParams. This may be caused by the Python 2.7 compatibility layer.
gem5 Simulator System.  http://gem5.org
gem5 is copyrighted software; use the --copyright option for details.

gem5 version 20.0.0.3
gem5 compiled Aug  5 2020 12:06:57
gem5 started Sep 21 2020 16:31:18
gem5 executing on LAPWF05588, pid 248502
command line: ./build/X86/gem5.opt --debug-flags=DRAM --debug-file=gem5-helloworld.out ./configs/example/se.py -c ./tests/test-progs/myFile/hello

Global frequency set at 1000000000000 ticks per second
warn: No dot file generated. Please install pydot to generate the dot file and pdf.
warn: DRAM device capacity (8192 Mbytes) does not match the address range assigned (512 Mbytes)
0: system.remote_gdb: listening for remote gdb on port 7000
**** REAL SIMULATION ****
info: Entering event queue @ 0.  Starting simulation...
warn: ignoring syscall access(...)
info: Increasing stack size by one page.
warn: ignoring syscall mprotect(...)
warn: ignoring syscall mprotect(...)
warn: ignoring syscall mprotect(...)
warn: ignoring syscall mprotect(...)
warn: ignoring syscall mprotect(...)
warn: ignoring syscall mprotect(...)
info: Increasing stack size by one page.
info: Increasing stack size by one page.
info: Increasing stack size by one page.
info: Increasing stack size by one page.
info: Increasing stack size by one page.
info: Increasing stack size by one page.
info: Increasing stack size by one page.
warn: MOVNTDQ: Ignoring non-temporal hint, modeling as cacheable!
fatal: syscall fchmod (#91) unimplemented.
Memory Usage: 688628 KBytes

您必须在命中所有缺失的必需系统调用时逐个实现它们

但是,其中一些不是基本的,并且将使用未实现的存根
ignoreFunc
,只需快速查看系统调用描述并尝试猜测它是否是基本的,例如

我想这不会很难。不尝试就无法确定,这完全取决于缺少多少不可忽略的系统调用以及它们的实现有多复杂

Java的情况与此类似:

相关的:


您必须在命中所有缺失的必需系统调用时逐个实现它们

但是,其中一些不是基本的,并且将使用未实现的存根
ignoreFunc
,只需快速查看系统调用描述并尝试猜测它是否是基本的,例如

我想这不会很难。不尝试就无法确定,这完全取决于缺少多少不可忽略的系统调用以及它们的实现有多复杂

Java的情况与此类似:

相关的:


谢谢您的回复。如何实现丢失的系统调用?你能给我举个例子吗?@BeautifulMind看看我链接的源代码行代码,它包含所有现有系统调用的定义。只要模仿别人在做什么,应该很容易理解。还要安装Eclipse:谢谢您的回复。如何实现丢失的系统调用?你能给我举个例子吗?@BeautifulMind看看我链接的源代码行代码,它包含所有现有系统调用的定义。只要模仿别人在做什么,应该很容易理解。还要安装Eclipse: