about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorTheofilos Augoustis <theofilos.augoustis@gmail.com>2025-11-25 16:36:52 +0000
committerTheofilos Augoustis <theofilos.augoustis@gmail.com>2025-11-25 16:36:52 +0000
commitede3d0c1b980f8527a45ae5b513bbcc3099818e2 (patch)
tree0003cfdb7a79488528b3dabe81dca32a509c1b22
parent17b76c5545b56cebb050ce05681d50265a68e155 (diff)
downloadfocaccia-ede3d0c1b980f8527a45ae5b513bbcc3099818e2.tar.gz
focaccia-ede3d0c1b980f8527a45ae5b513bbcc3099818e2.zip
Add support for emulating read()/write() and vector variants
-rw-r--r--src/focaccia/qemu/x86.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/focaccia/qemu/x86.py b/src/focaccia/qemu/x86.py
index 8bbbf56..bed347c 100644
--- a/src/focaccia/qemu/x86.py
+++ b/src/focaccia/qemu/x86.py
@@ -2,6 +2,10 @@ from focaccia.qemu.syscall import SyscallInfo
 
 # Incomplete, only the most common ones
 emulated_system_calls = {
+    0: SyscallInfo('read', patchup_address_registers=['rsi']),
+    1: SyscallInfo('write'),
+    19: SyscallInfo('readv', patchup_address_registers=['rsi']),
+    20: SyscallInfo('writev'),
     34:  SyscallInfo('pause', []),
     39:  SyscallInfo('getpid', []),
     102: SyscallInfo('getuid', []),