VirtualBox

source: vbox/trunk/src/VBox/VMM/VMMAll/IEMAllDbg.cpp@ 105724

Last change on this file since 105724 was 102869, checked in by vboxsync, 10 months ago

Fixing most probaly a typo in r161081. bugref:10371

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 75.9 KB
Line 
1/* $Id: IEMAllDbg.cpp 102869 2024-01-15 04:52:34Z vboxsync $ */
2/** @file
3 * IEM - Debug and Logging.
4 */
5
6/*
7 * Copyright (C) 2023 Oracle and/or its affiliates.
8 *
9 * This file is part of VirtualBox base platform packages, as
10 * available from https://www.virtualbox.org.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation, in version 3 of the
15 * License.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, see <https://www.gnu.org/licenses>.
24 *
25 * SPDX-License-Identifier: GPL-3.0-only
26 */
27
28
29/*********************************************************************************************************************************
30* Header Files *
31*********************************************************************************************************************************/
32#define LOG_GROUP LOG_GROUP_IEM
33#define VMCPU_INCL_CPUM_GST_CTX
34#include <VBox/vmm/iem.h>
35#include <VBox/vmm/cpum.h>
36#include <VBox/vmm/dbgf.h>
37#include <VBox/vmm/pgm.h>
38#include "IEMInternal.h"
39#include <VBox/vmm/vmcc.h>
40#include <VBox/log.h>
41#include <iprt/errcore.h>
42#include <iprt/ctype.h>
43#include <iprt/string.h>
44
45
46/*********************************************************************************************************************************
47* Syscalls *
48*********************************************************************************************************************************/
49
50#ifdef LOG_ENABLED
51
52# undef LOG_GROUP
53# define LOG_GROUP LOG_GROUP_IEM_SYSCALL
54
55DECLINLINE(char *) iemLogSyscallFormatChr(char pszBuf[4], char ch)
56{
57 if (RT_C_IS_PRINT(ch))
58 {
59 pszBuf[0] = '\'';
60 pszBuf[1] = ch;
61 pszBuf[2] = '\'';
62 }
63 else if (ch == '\n' || ch == '\r')
64 {
65 pszBuf[0] = '\'';
66 pszBuf[1] = ch == '\n' ? 'n' : 'r';
67 pszBuf[2] = ' ';
68 }
69 else
70 {
71 pszBuf[0] = ' ';
72 pszBuf[1] = '?';
73 pszBuf[2] = ' ';
74 }
75 pszBuf[3] = '\0';
76 return pszBuf;
77}
78
79
80/**
81 * The output buffer must be 4x + 8 the size of the input.
82 */
83static char *iemLogSyscallFormatStr(char *pszDst, const char *pszSrc, size_t cchSrc)
84{
85 char * const pszRet = pszDst;
86 *pszDst++ = '\"';
87 for (unsigned off = 0; off < cchSrc; off++)
88 {
89 char const ch = pszSrc[off];
90 if (RT_C_IS_PRINT(ch))
91 *pszDst++ = ch;
92 else
93 {
94 *pszDst++ = '\\';
95 if (ch == '\n')
96 *pszDst++ = 'n';
97 else if (ch == '\r')
98 *pszDst++ = 'r';
99 else if (ch == '\t')
100 *pszDst++ = 't';
101 else if (ch == '\0')
102 *pszDst++ = '0';
103 else
104 {
105 static char const s_szHexChars[17] = "0123456789abcdef";
106 *pszDst++ = 'x';
107 *pszDst++ = s_szHexChars[(uint8_t)ch >> 4];
108 *pszDst++ = s_szHexChars[(uint8_t)ch & 0xf];
109 }
110 }
111 }
112 *pszDst++ = '\"';
113 *pszDst++ = '\0';
114 return pszRet;
115}
116
117
118/**
119 * VIDEO.
120 */
121static void iemLogSyscallVgaBiosInt10h(PVMCPUCC pVCpu)
122{
123 const char *pszSimple;
124 switch (pVCpu->cpum.GstCtx.ah)
125 {
126 case 0x00:
127 Log(("VGABIOS INT 10h: AH=00h: set video mode: AL=%#x (BX=%#x)\n", pVCpu->cpum.GstCtx.al, pVCpu->cpum.GstCtx.bx));
128 return;
129 case 0x01: pszSimple = "set text-mode cursor shape"; break;
130 case 0x02: pszSimple = "set cursor position"; break;
131 case 0x03: pszSimple = "get cursor position"; break;
132 case 0x04: pszSimple = "get light pen position"; break;
133 case 0x05: pszSimple = "select active display page"; break;
134 case 0x06: pszSimple = "scroll up window"; break;
135 case 0x07: pszSimple = "scroll down window"; break;
136 case 0x08: pszSimple = "read char & attr at cursor"; break;
137 case 0x09: pszSimple = "write char & attr at cursor"; break;
138 case 0x0a: pszSimple = "write char only at cursor"; break;
139 case 0x0b:
140 switch (pVCpu->cpum.GstCtx.bh)
141 {
142 case 0: pszSimple = "set background/border color"; break;
143 case 1: pszSimple = "set palette"; break;
144 case 2: pszSimple = "set palette entry"; break;
145 default:
146 return;
147 }
148 break;
149 case 0x0c: pszSimple = "write graphics pixel"; break;
150 case 0x0d: pszSimple = "read graphics pixel"; break;
151 case 0x0e:
152 {
153 char szChar[4];
154 Log(("VGABIOS INT 10h: AH=0eh: teletype output: AL=%#04x %s BH=%#x (pg) BL=%#x\n",
155 pVCpu->cpum.GstCtx.al, iemLogSyscallFormatChr(szChar, pVCpu->cpum.GstCtx.al), pVCpu->cpum.GstCtx.bh,
156 pVCpu->cpum.GstCtx.bl));
157 return;
158 }
159 case 0x13:
160 {
161 char szRaw[256] = {0};
162 unsigned const cbToRead = RT_MIN(RT_ELEMENTS(szRaw), pVCpu->cpum.GstCtx.cx);
163 PGMPhysSimpleReadGCPtr(pVCpu, szRaw, pVCpu->cpum.GstCtx.es.u64Base + pVCpu->cpum.GstCtx.bp, cbToRead);
164 char szChars[256+1];
165 if (pVCpu->cpum.GstCtx.al & RT_BIT_32(1))
166 {
167 for (unsigned i = 0; i < cbToRead; i += 2)
168 szChars[i / 2] = RT_C_IS_PRINT(szRaw[i]) ? szRaw[i] : '.';
169 szChars[cbToRead / 2] = '\0';
170 }
171 else
172 {
173 for (unsigned i = 0; i < cbToRead; i += 2)
174 szChars[i] = RT_C_IS_PRINT(szRaw[i]) ? szRaw[i] : '.';
175 szChars[cbToRead] = '\0';
176 }
177 Log(("VGABIOS INT 10h: AH=13h: write string: AL=%#x BH=%#x (pg) BL=%#x DH=%#x (row) DL=%#x (col) CX=%#x (len) ES:BP=%04x:%04x: '%s' (%.*Rhxs)\n",
178 pVCpu->cpum.GstCtx.al, pVCpu->cpum.GstCtx.bh, pVCpu->cpum.GstCtx.bl, pVCpu->cpum.GstCtx.dh, pVCpu->cpum.GstCtx.dl,
179 pVCpu->cpum.GstCtx.cx, pVCpu->cpum.GstCtx.es.Sel, pVCpu->cpum.GstCtx.bp, szChars, cbToRead, szRaw));
180 return;
181 }
182 default:
183 return;
184 }
185 Log(("VGABIOS INT 10h: AH=%02xh: %s - AL=%#x BX=%#x CX=%#x DX=%#x\n",
186 pVCpu->cpum.GstCtx.ah, pszSimple, pVCpu->cpum.GstCtx.al,
187 pVCpu->cpum.GstCtx.bx, pVCpu->cpum.GstCtx.cx, pVCpu->cpum.GstCtx.dx));
188}
189
190
191/**
192 * BIOS INT 16h.
193 */
194static void iemLogSyscallBiosInt16h(PVMCPUCC pVCpu)
195{
196 const char *pszSimple;
197 switch (pVCpu->cpum.GstCtx.ah)
198 {
199 case 0x00: pszSimple = "get keystroke"; break;
200 case 0x01: pszSimple = "check for keystroke"; break;
201 case 0x02: pszSimple = "get shift flags"; break;
202 case 0x03: pszSimple = "set typematic rate and delay"; break;
203 case 0x09: pszSimple = "get keyboard functionality"; break;
204 case 0x0a: pszSimple = "get keyboard id"; break;
205 case 0x10: pszSimple = "get enhanced keystroke"; break;
206 case 0x11: pszSimple = "check for enhanced keystroke"; break;
207 case 0x12: pszSimple = "get enhanced shift flags"; break;
208 default:
209 return;
210 }
211 Log(("BIOS INT 16h: AH=%02xh: %s - AL=%#x BX=%#x CX=%#x DX=%#x\n",
212 pVCpu->cpum.GstCtx.ah, pszSimple, pVCpu->cpum.GstCtx.al,
213 pVCpu->cpum.GstCtx.bx, pVCpu->cpum.GstCtx.cx, pVCpu->cpum.GstCtx.dx));
214}
215
216
217/**
218 * DOS INT 21h.
219 */
220static void iemLogSyscallDosInt21h(PVMCPUCC pVCpu)
221{
222 const char *pszSimple;
223 switch (pVCpu->cpum.GstCtx.ah)
224 {
225 case 0x00: pszSimple = "terminate program"; break;
226 case 0x01: pszSimple = "read stdin char w/ echo"; break;
227 case 0x02:
228 {
229 char szChar[4];
230 Log(("DOS INT 21h: AH=02h: write char to stdout - DL=%#04x %s (AL=%#x BX=%#x CX=%#x DX=%#x BP=%#x SI=%#x DI=%#x)\n",
231 pVCpu->cpum.GstCtx.dl, iemLogSyscallFormatChr(szChar, pVCpu->cpum.GstCtx.dl), pVCpu->cpum.GstCtx.al,
232 pVCpu->cpum.GstCtx.bx, pVCpu->cpum.GstCtx.cx, pVCpu->cpum.GstCtx.dx, pVCpu->cpum.GstCtx.bp,
233 pVCpu->cpum.GstCtx.si, pVCpu->cpum.GstCtx.di));
234 return;
235 }
236 case 0x03: pszSimple = "read char from stdaux"; break;
237 case 0x04: pszSimple = "write char to stdaux"; break;
238 case 0x05: pszSimple = "write char to printer"; break;
239 case 0x06: pszSimple = pVCpu->cpum.GstCtx.dl == 0xff ? "direct console input" : "direct console output"; break;
240 case 0x07: pszSimple = "direct character input w/o echo"; break;
241 case 0x08: pszSimple = "character input w/o echo"; break;
242 case 0x09:
243 {
244 char achRaw[128] = {0};
245 unsigned const cbToRead = RT_MIN(RT_ELEMENTS(achRaw), 0x10000U - pVCpu->cpum.GstCtx.dx);
246 PGMPhysSimpleReadGCPtr(pVCpu, achRaw, pVCpu->cpum.GstCtx.ds.u64Base + pVCpu->cpum.GstCtx.dx, cbToRead);
247 unsigned cchRaw = 0;
248 while (cchRaw < cbToRead)
249 if (achRaw[cchRaw++] == '$')
250 break;
251
252 char szFmt[sizeof(achRaw) * 4 + 16];
253 Log(("DOS INT 21h: AH=09h: write string to stdout - DS:DX=%04x:%04x %s\n",
254 pVCpu->cpum.GstCtx.ds.Sel, pVCpu->cpum.GstCtx.dx, iemLogSyscallFormatStr(szFmt, achRaw, cchRaw)));
255 return;
256 }
257 case 0x0a: pszSimple = "buffered input"; break;
258 case 0x0b: pszSimple = "get stdin status"; break;
259 case 0x0c: pszSimple = "flush buf & read stdin"; break;
260 case 0x0d: pszSimple = "disk reset"; break;
261 case 0x0e: pszSimple = "select default drive"; break;
262 case 0x0f: pszSimple = "open file (fcb)"; break;
263 case 0x10: pszSimple = "close file (fcb)"; break;
264 case 0x11: pszSimple = "find first (fcb)"; break;
265 case 0x12: pszSimple = "find next (fcb)"; break;
266 case 0x13: pszSimple = "delete file (fcb)"; break;
267 case 0x14: pszSimple = "seq read (fcb)"; break;
268 case 0x15: pszSimple = "seq write (fcb)"; break;
269 case 0x16: pszSimple = "create/truncate file (fcb)"; break;
270 case 0x17: pszSimple = "rename (fcb)"; break;
271 default:
272 return;
273 }
274 Log(("DOS INT 21h: AH=%02xh: %s - AL=%#x BX=%#x CX=%#x DX=%#x BP=%#x SI=%#x DI=%#x\n",
275 pVCpu->cpum.GstCtx.ah, pszSimple, pVCpu->cpum.GstCtx.al, pVCpu->cpum.GstCtx.bx, pVCpu->cpum.GstCtx.cx,
276 pVCpu->cpum.GstCtx.dx, pVCpu->cpum.GstCtx.bp, pVCpu->cpum.GstCtx.si, pVCpu->cpum.GstCtx.di));
277}
278
279
280static void iemLogSyscallWinVxDCall(PVMCPUCC pVCpu, uint8_t cbInstr)
281{
282 /*
283 * Two double words follow the instruction:
284 * 1. Service number.
285 * 2. VxD identifier.
286 */
287 uint16_t auParams[2] = {0, 0};
288 RTGCPTR const GCPtrParams = pVCpu->cpum.GstCtx.cs.u64Base + pVCpu->cpum.GstCtx.rip + cbInstr;
289 int rc = PGMPhysSimpleReadGCPtr(pVCpu, auParams, GCPtrParams, sizeof(auParams));
290 if (RT_SUCCESS(rc))
291 {
292 const char *pszVxD = NULL;
293 const char *pszService = NULL;
294 uint16_t const idVxD = auParams[1];
295 uint16_t const idService = auParams[0];
296 switch (idVxD)
297 {
298 case 0x0001:
299 switch (idService)
300 {
301 case 0x0000: pszService = "get version"; break;
302 case 0x0001: pszService = "get current VM handle"; break;
303 case 0x0002: pszService = "test current VM handle"; break;
304 case 0x0003: pszService = "get system VM handle"; break;
305 case 0x0004: pszService = "test system VM handle"; break;
306 case 0x0005: pszService = "validate VM handle"; break;
307 case 0x0006: pszService = "get VMM reenter count"; break;
308 case 0x0007: pszService = "begin reentrant execution"; break;
309 case 0x0008: pszService = "end reentrant execution"; break;
310 case 0x0009: pszService = "install V86 breakpoint"; break;
311 case 0x000a: pszService = "remove V86 breakpoint"; break;
312 case 0x000b: pszService = "allocate V86 callback"; break;
313 case 0x000c: pszService = "allocation PM callback"; break;
314 case 0x000d: pszService = "call when VM returns"; break;
315 case 0x000e: pszService = "schedule global event"; break;
316 case 0x000f: pszService = "schedule VM event"; break;
317 case 0x0010: pszService = "call global event"; break;
318 case 0x0011: pszService = "call VM event"; break;
319 case 0x0012: pszService = "cancel global event"; break;
320 case 0x0013: pszService = "cancel VM event"; break;
321 case 0x0014: pszService = "call priority VM event"; break;
322 case 0x0015: pszService = "cancel priority VM event"; break;
323 case 0x0016: pszService = "get NMI handler address"; break;
324 case 0x0017: pszService = "set NMI handler address"; break;
325 case 0x0018: pszService = "hook NMI event"; break;
326 case 0x0019: pszService = "call when VM interrupts enabled"; break;
327 case 0x001a: pszService = "enable VM interrupts"; break;
328 case 0x001b: pszService = "disable VM interrupts"; break;
329 case 0x001c: pszService = "map flat"; break;
330 case 0x001d: pszService = "map linear to VM address"; break;
331 case 0x001e: pszService = "adjust execution priority"; break;
332 case 0x001f: pszService = "begin critical section"; break;
333 case 0x0020: pszService = "end critical section"; break;
334 case 0x0021: pszService = "end critical section and suspend"; break;
335 case 0x0022: pszService = "claim critical section"; break;
336 case 0x0023: pszService = "release critical section"; break;
337 case 0x0024: pszService = "call when not critical"; break;
338 case 0x0025: pszService = "create semaphore"; break;
339 case 0x0026: pszService = "destroy semaphore"; break;
340 case 0x0027: pszService = "wait on semaphore"; break;
341 case 0x0028: pszService = "signal semaphore"; break;
342 case 0x0029: pszService = "get critical section status"; break;
343 case 0x002a: pszService = "call when task switched"; break;
344 case 0x002b: pszService = "suspend VM"; break;
345 case 0x002c: pszService = "resume VM"; break;
346 case 0x002d: pszService = "no-fail resume VM"; break;
347 case 0x002e: pszService = "nuke VM"; break;
348 case 0x002f: pszService = "crash current VM"; break;
349 case 0x0030: pszService = "get execution focus"; break;
350 case 0x0031: pszService = "set execution focus"; break;
351 case 0x0032: pszService = "get time slice priority"; break;
352 case 0x0033: pszService = "set time slice priority"; break;
353 case 0x0034: pszService = "get time slice granularity"; break;
354 case 0x0035: pszService = "set time slice granularity"; break;
355 case 0x0036: pszService = "get time slice information"; break;
356 case 0x0037: pszService = "adjust execution time"; break;
357 case 0x0038: pszService = "release time slice"; break;
358 case 0x0039: pszService = "wake up VM"; break;
359 case 0x003a: pszService = "call when idle"; break;
360 case 0x003b: pszService = "get next VM handle"; break;
361 case 0x003c: pszService = "set global timeout"; break;
362 case 0x003d: pszService = "set VM timeout"; break;
363 case 0x003e: pszService = "cancel timeout"; break;
364 case 0x003f: pszService = "get system time"; break;
365 case 0x0040: pszService = "get VM execution time"; break;
366 case 0x0041: pszService = "hook V86 interrupt chain"; break;
367 case 0x0042: pszService = "get V86 interrupt vector"; break;
368 case 0x0043: pszService = "set V86 interrupt vector"; break;
369 case 0x0044: pszService = "get PM interrupt vector"; break;
370 case 0x0045: pszService = "set PM interrupt vector"; break;
371 case 0x0046: pszService = "simulate interrupt"; break;
372 case 0x0047: pszService = "simulate IRET"; break;
373 case 0x0048: pszService = "simulate far call"; break;
374 case 0x0049: pszService = "simulate far jump"; break;
375 case 0x004a: pszService = "simulate far RET"; break;
376 case 0x004b: pszService = "simulate far RET N"; break;
377 case 0x004c: pszService = "build interrupt stack frame"; break;
378 case 0x004d: pszService = "simulate push"; break;
379 case 0x004e: pszService = "simulate pop"; break;
380 case 0x004f: pszService = "HeapAllocate"; break;
381 case 0x0050: pszService = "HeapReAllocate"; break;
382 case 0x0051: pszService = "HeapFree"; break;
383 case 0x0052: pszService = "HeapGetSize"; break;
384 case 0x0053: pszService = "PageAllocate"; break;
385 case 0x0054: pszService = "PageReAllocate"; break;
386 case 0x0055: pszService = "PageFree"; break;
387 case 0x0056: pszService = "PageLock"; break;
388 case 0x0057: pszService = "PageUnLock"; break;
389 case 0x0058: pszService = "PageGetSizeAddr"; break;
390 case 0x0059: pszService = "PageGetAllocInfo"; break;
391 case 0x005a: pszService = "GetFreePageCount"; break;
392 case 0x005b: pszService = "GetSysPageCount"; break;
393 case 0x005c: pszService = "GetVMPgCount"; break;
394 case 0x005d: pszService = "MapIntoV86"; break;
395 case 0x005e: pszService = "PhysIntoV86"; break;
396 case 0x005f: pszService = "TestGlobalV86Mem"; break;
397 case 0x0060: pszService = "ModifyPageBits"; break;
398 case 0x0061: pszService = "copy page table"; break;
399 case 0x0062: pszService = "map linear into V86"; break;
400 case 0x0063: pszService = "linear page lock"; break;
401 case 0x0064: pszService = "linear page unlock"; break;
402 case 0x0065: pszService = "SetResetV86Pageabl"; break;
403 case 0x0066: pszService = "GetV86PageableArray"; break;
404 case 0x0067: pszService = "PageCheckLinRange"; break;
405 case 0x0068: pszService = "page out dirty pages"; break;
406 case 0x0069: pszService = "discard pages"; break;
407 case 0x006a: pszService = "GetNulPageHandle"; break;
408 case 0x006b: pszService = "get first V86 page"; break;
409 case 0x006c: pszService = "map physical address to linear address"; break;
410 case 0x006d: pszService = "GetAppFlatDSAlias"; break;
411 case 0x006e: pszService = "SelectorMapFlat"; break;
412 case 0x006f: pszService = "GetDemandPageInfo"; break;
413 case 0x0070: pszService = "GetSetPageOutCount"; break;
414 case 0x0071: pszService = "hook V86 page"; break;
415 case 0x0072: pszService = "assign device V86 pages"; break;
416 case 0x0073: pszService = "deassign device V86 pages"; break;
417 case 0x0074: pszService = "get array of V86 pages for device"; break;
418 case 0x0075: pszService = "SetNULPageAddr"; break;
419 case 0x0076: pszService = "allocate GDT selector"; break;
420 case 0x0077: pszService = "free GDT selector"; break;
421 case 0x0078: pszService = "allocate LDT selector"; break;
422 case 0x0079: pszService = "free LDT selector"; break;
423 case 0x007a: pszService = "BuildDescriptorDWORDs"; break;
424 case 0x007b: pszService = "get descriptor"; break;
425 case 0x007c: pszService = "set descriptor"; break;
426 case 0x007d: pszService = "toggle HMA"; break;
427 case 0x007e: pszService = "get fault hook addresses"; break;
428 case 0x007f: pszService = "hook V86 fault"; break;
429 case 0x0080: pszService = "hook PM fault"; break;
430 case 0x0081: pszService = "hook VMM fault"; break;
431 case 0x0082: pszService = "begin nested V86 execution"; break;
432 case 0x0083: pszService = "begin nested execution"; break;
433 case 0x0084: pszService = "execute V86-mode interrupt"; break;
434 case 0x0085: pszService = "resume execution"; break;
435 case 0x0086: pszService = "end nested execution"; break;
436 case 0x0087: pszService = "allocate PM application callback area"; break;
437 case 0x0088: pszService = "get current PM application callback area"; break;
438 case 0x0089: pszService = "set V86 execution mode"; break;
439 case 0x008a: pszService = "set PM execution mode"; break;
440 case 0x008b: pszService = "begin using locked PM stack"; break;
441 case 0x008c: pszService = "end using locked PM stack"; break;
442 case 0x008d: pszService = "save client state"; break;
443 case 0x008e: pszService = "restore client state"; break;
444 case 0x008f: pszService = "execute VxD interrupt"; break;
445 case 0x0090: pszService = "hook device service"; break;
446 case 0x0091: pszService = "hook device V86 API"; break;
447 case 0x0092: pszService = "hook device PM API"; break;
448 case 0x0093: pszService = "system control (see also #02657)"; break;
449 case 0x0094: pszService = "simulate I/O"; break;
450 case 0x0095: pszService = "install multiple I/O handlers"; break;
451 case 0x0096: pszService = "install I/O handler"; break;
452 case 0x0097: pszService = "enable global trapping"; break;
453 case 0x0098: pszService = "enable local trapping"; break;
454 case 0x0099: pszService = "disable global trapping"; break;
455 case 0x009a: pszService = "disable local trapping"; break;
456 case 0x009b: pszService = "create list"; break;
457 case 0x009c: pszService = "destroy list"; break;
458 case 0x009d: pszService = "allocate list"; break;
459 case 0x009e: pszService = "attach list"; break;
460 case 0x009f: pszService = "attach list tail"; break;
461 case 0x00a0: pszService = "insert into list"; break;
462 case 0x00a1: pszService = "remove from list"; break;
463 case 0x00a2: pszService = "deallocate list"; break;
464 case 0x00a3: pszService = "get first item in list"; break;
465 case 0x00a4: pszService = "get next item in list"; break;
466 case 0x00a5: pszService = "remove first item in list"; break;
467 case 0x00a6: pszService = "add instance item"; break;
468 case 0x00a7: pszService = "allocate device callback area"; break;
469 case 0x00a8: pszService = "allocate global V86 data area"; break;
470 case 0x00a9: pszService = "allocate temporary V86 data area"; break;
471 case 0x00aa: pszService = "free temporary V86 data area"; break;
472 case 0x00ab: pszService = "get decimal integer from profile"; break;
473 case 0x00ac: pszService = "convert decimal string to integer"; break;
474 case 0x00ad: pszService = "get fixed-point number from profile"; break;
475 case 0x00ae: pszService = "convert fixed-point string"; break;
476 case 0x00af: pszService = "get hex integer from profile"; break;
477 case 0x00b0: pszService = "convert hex string to integer"; break;
478 case 0x00b1: pszService = "get boolean value from profile"; break;
479 case 0x00b2: pszService = "convert boolean string"; break;
480 case 0x00b3: pszService = "get string from profile"; break;
481 case 0x00b4: pszService = "get next string from profile"; break;
482 case 0x00b5: pszService = "get environment string"; break;
483 case 0x00b6: pszService = "get exec path"; break;
484 case 0x00b7: pszService = "get configuration directory"; break;
485 case 0x00b8: pszService = "open file"; break;
486 case 0x00b9: pszService = "get PSP segment"; break;
487 case 0x00ba: pszService = "get DOS vectors"; break;
488 case 0x00bb: pszService = "get machine information"; break;
489 case 0x00bc: pszService = "get/set HMA information"; break;
490 case 0x00bd: pszService = "set system exit code"; break;
491 case 0x00be: pszService = "fatal error handler"; break;
492 case 0x00bf: pszService = "fatal memory error"; break;
493 case 0x00c0: pszService = "update system clock"; break;
494 case 0x00c1: pszService = "test if debugger installed"; break;
495 case 0x00c2: pszService = "output debugger string"; break;
496 case 0x00c3: pszService = "output debugger character"; break;
497 case 0x00c4: pszService = "input debugger character"; break;
498 case 0x00c5: pszService = "debugger convert hex to binary"; break;
499 case 0x00c6: pszService = "debugger convert hex to decimal"; break;
500 case 0x00c7: pszService = "debugger test if valid handle"; break;
501 case 0x00c8: pszService = "validate client pointer"; break;
502 case 0x00c9: pszService = "test reentry"; break;
503 case 0x00ca: pszService = "queue debugger string"; break;
504 case 0x00cb: pszService = "log procedure call"; break;
505 case 0x00cc: pszService = "debugger test current VM"; break;
506 case 0x00cd: pszService = "get PM interrupt type"; break;
507 case 0x00ce: pszService = "set PM interrupt type"; break;
508 case 0x00cf: pszService = "get last updated system time"; break;
509 case 0x00d0: pszService = "get last updated VM execution time"; break;
510 case 0x00d1: pszService = "test if double-byte character-set lead byte"; break;
511 case 0x00d2: pszService = "AddFreePhysPage"; break;
512 case 0x00d3: pszService = "PageResetHandlePAddr"; break;
513 case 0x00d4: pszService = "SetLastV86Page"; break;
514 case 0x00d5: pszService = "GetLastV86Page"; break;
515 case 0x00d6: pszService = "MapFreePhysReg"; break;
516 case 0x00d7: pszService = "UnmapFreePhysReg"; break;
517 case 0x00d8: pszService = "XchgFreePhysReg"; break;
518 case 0x00d9: pszService = "SetFreePhysRegCalBk"; break;
519 case 0x00da: pszService = "get next arena (MCB)"; break;
520 case 0x00db: pszService = "get name of ugly TSR"; break;
521 case 0x00dc: pszService = "get debug options"; break;
522 case 0x00dd: pszService = "set physical HMA alias"; break;
523 case 0x00de: pszService = "GetGlblRng0V86IntBase"; break;
524 case 0x00df: pszService = "add global V86 data area"; break;
525 case 0x00e0: pszService = "get/set detailed VM error"; break;
526 case 0x00e1: pszService = "Is_Debug_Chr"; break;
527 case 0x00e2: pszService = "clear monochrome screen"; break;
528 case 0x00e3: pszService = "output character to mono screen"; break;
529 case 0x00e4: pszService = "output string to mono screen"; break;
530 case 0x00e5: pszService = "set current position on mono screen"; break;
531 case 0x00e6: pszService = "get current position on mono screen"; break;
532 case 0x00e7: pszService = "get character from mono screen"; break;
533 case 0x00e8: pszService = "locate byte in ROM"; break;
534 case 0x00e9: pszService = "hook invalid page fault"; break;
535 case 0x00ea: pszService = "unhook invalid page fault"; break;
536 case 0x00eb: pszService = "set delete on exit file"; break;
537 case 0x00ec: pszService = "close VM"; break;
538 case 0x00ed: pszService = "Enable_Touch_1st_Meg"; break;
539 case 0x00ee: pszService = "Disable_Touch_1st_Meg"; break;
540 case 0x00ef: pszService = "install exception handler"; break;
541 case 0x00f0: pszService = "remove exception handler"; break;
542 case 0x00f1: pszService = "Get_Crit_Status_No_Block"; break;
543 case 0x00f2: pszService = "Schedule_VM_RTI_Event"; break;
544 case 0x00f3: pszService = "Trace_Out_Service"; break;
545 case 0x00f4: pszService = "Debug_Out_Service"; break;
546 case 0x00f5: pszService = "Debug_Flags_Service"; break;
547 case 0x00f6: pszService = "VMM add import module name"; break;
548 case 0x00f7: pszService = "VMM Add DDB"; break;
549 case 0x00f8: pszService = "VMM Remove DDB"; break;
550 case 0x00f9: pszService = "get thread time slice priority"; break;
551 case 0x00fa: pszService = "set thread time slice priority"; break;
552 case 0x00fb: pszService = "schedule thread event"; break;
553 case 0x00fc: pszService = "cancel thread event"; break;
554 case 0x00fd: pszService = "set thread timeout"; break;
555 case 0x00fe: pszService = "set asynchronous timeout"; break;
556 case 0x00ff: pszService = "AllocatreThreadDataSlot"; break;
557 case 0x0100: pszService = "FreeThreadDataSlot"; break;
558 case 0x0101: pszService = "create Mutex"; break;
559 case 0x0102: pszService = "destroy Mutex"; break;
560 case 0x0103: pszService = "get Mutex owner"; break;
561 case 0x0104: pszService = "call when thread switched"; break;
562 case 0x0105: pszService = "create thread"; break;
563 case 0x0106: pszService = "start thread"; break;
564 case 0x0107: pszService = "terminate thread"; break;
565 case 0x0108: pszService = "get current thread handle"; break;
566 case 0x0109: pszService = "test current thread handle"; break;
567 case 0x010a: pszService = "Get_Sys_Thread_Handle"; break;
568 case 0x010b: pszService = "Test_Sys_Thread_Handle"; break;
569 case 0x010c: pszService = "Validate_Thread_Handle"; break;
570 case 0x010d: pszService = "Get_Initial_Thread_Handle"; break;
571 case 0x010e: pszService = "Test_Initial_Thread_Handle"; break;
572 case 0x010f: pszService = "Debug_Test_Valid_Thread_Handle"; break;
573 case 0x0110: pszService = "Debug_Test_Cur_Thread"; break;
574 case 0x0111: pszService = "VMM_GetSystemInitState"; break;
575 case 0x0112: pszService = "Cancel_Call_When_Thread_Switched"; break;
576 case 0x0113: pszService = "Get_Next_Thread_Handle"; break;
577 case 0x0114: pszService = "Adjust_Thread_Exec_Priority"; break;
578 case 0x0115: pszService = "Deallocate_Device_CB_Area"; break;
579 case 0x0116: pszService = "Remove_IO_Handler"; break;
580 case 0x0117: pszService = "Remove_Mult_IO_Handlers"; break;
581 case 0x0118: pszService = "unhook V86 interrupt chain"; break;
582 case 0x0119: pszService = "unhook V86 fault handler"; break;
583 case 0x011a: pszService = "unhook PM fault handler"; break;
584 case 0x011b: pszService = "unhook VMM fault handler"; break;
585 case 0x011c: pszService = "unhook device service"; break;
586 case 0x011d: pszService = "PageReserve"; break;
587 case 0x011e: pszService = "PageCommit"; break;
588 case 0x011f: pszService = "PageDecommit"; break;
589 case 0x0120: pszService = "PagerRegister"; break;
590 case 0x0121: pszService = "PagerQuery"; break;
591 case 0x0122: pszService = "PagerDeregister"; break;
592 case 0x0123: pszService = "ContextCreate"; break;
593 case 0x0124: pszService = "ContextDestroy"; break;
594 case 0x0125: pszService = "PageAttach"; break;
595 case 0x0126: pszService = "PageFlush"; break;
596 case 0x0127: pszService = "SignalID"; break;
597 case 0x0128: pszService = "PageCommitPhys"; break;
598 case 0x0129: pszService = "Register_Win32_Services"; break;
599 case 0x012a: pszService = "Cancel_Call_When_Not_Critical"; break;
600 case 0x012b: pszService = "Cancel_Call_When_Idle"; break;
601 case 0x012c: pszService = "Cancel_Call_When_Task_Switched"; break;
602 case 0x012d: pszService = "Debug_Printf_Service"; break;
603 case 0x012e: pszService = "enter Mutex"; break;
604 case 0x012f: pszService = "leave Mutex"; break;
605 case 0x0130: pszService = "simulate VM I/O"; break;
606 case 0x0131: pszService = "Signal_Semaphore_No_Switch"; break;
607 case 0x0132: pszService = "MMSwitchContext"; break;
608 case 0x0133: pszService = "MMModifyPermissions"; break;
609 case 0x0134: pszService = "MMQuery"; break;
610 case 0x0135: pszService = "EnterMustComplete"; break;
611 case 0x0136: pszService = "LeaveMustComplete"; break;
612 case 0x0137: pszService = "ResumeExecMustComplete"; break;
613 case 0x0138: pszService = "get thread termination status"; break;
614 case 0x0139: pszService = "GetInstanceInfo"; break;
615 case 0x013a: pszService = "ExecIntMustComplete"; break;
616 case 0x013b: pszService = "ExecVxDIntMustComplete"; break;
617 case 0x013c: pszService = "begin V86 serialization"; break;
618 case 0x013d: pszService = "unhook V86 page"; break;
619 case 0x013e: pszService = "VMM_GetVxDLocationList"; break;
620 case 0x013f: pszService = "VMM_GetDDBList get start of VxD chain"; break;
621 case 0x0140: pszService = "unhook NMI event"; break;
622 case 0x0141: pszService = "Get_Instanced_V86_Int_Vector"; break;
623 case 0x0142: pszService = "get or set real DOS PSP"; break;
624 case 0x0143: pszService = "call priority thread event"; break;
625 case 0x0144: pszService = "Get_System_Time_Address"; break;
626 case 0x0145: pszService = "Get_Crit_Status_Thread"; break;
627 case 0x0146: pszService = "Get_DDB"; break;
628 case 0x0147: pszService = "Directed_Sys_Control"; break;
629 case 0x0148: pszService = "RegOpenKey"; break;
630 case 0x0149: pszService = "RegCloseKey"; break;
631 case 0x014a: pszService = "RegCreateKey"; break;
632 case 0x014b: pszService = "RegDeleteKey"; break;
633 case 0x014c: pszService = "RegEnumKey"; break;
634 case 0x014d: pszService = "RegQueryValue"; break;
635 case 0x014e: pszService = "RegSetValue"; break;
636 case 0x014f: pszService = "RegDeleteValue"; break;
637 case 0x0150: pszService = "RegEnumValue"; break;
638 case 0x0151: pszService = "RegQueryValueEx"; break;
639 case 0x0152: pszService = "RegSetValueEx"; break;
640 case 0x0153: pszService = "CallRing3"; break;
641 case 0x0154: pszService = "Exec_PM_Int"; break;
642 case 0x0155: pszService = "RegFlushKey"; break;
643 case 0x0156: pszService = "PageCommitContig"; break;
644 case 0x0157: pszService = "GetCurrentContext"; break;
645 case 0x0158: pszService = "LocalizeSprintf"; break;
646 case 0x0159: pszService = "LocalizeStackSprintf"; break;
647 case 0x015a: pszService = "Call_Restricted_Event"; break;
648 case 0x015b: pszService = "Cancel_Restricted_Event"; break;
649 case 0x015c: pszService = "Register_PEF_Provider"; break;
650 case 0x015d: pszService = "GetPhysPageInfo"; break;
651 case 0x015e: pszService = "RegQueryInfoKey"; break;
652 case 0x015f: pszService = "MemArb_Reserve_Pages"; break;
653 case 0x0160: pszService = "Time_Slice_Sys_VM_Idle"; break;
654 case 0x0161: pszService = "Time_Slice_Sleep"; break;
655 case 0x0162: pszService = "Boost_With_Decay"; break;
656 case 0x0163: pszService = "Set_Inversion_Pri"; break;
657 case 0x0164: pszService = "Reset_Inversion_Pri"; break;
658 case 0x0165: pszService = "Release_Inversion_Pri"; break;
659 case 0x0166: pszService = "Get_Thread_Win32_Pri"; break;
660 case 0x0167: pszService = "Set_Thread_Win32_Pri"; break;
661 case 0x0168: pszService = "Set_Thread_Static_Boost"; break;
662 case 0x0169: pszService = "Set_VM_Static_Boost"; break;
663 case 0x016a: pszService = "Release_Inversion_Pri_ID"; break;
664 case 0x016b: pszService = "Attach_Thread_To_Group"; break;
665 case 0x016c: pszService = "Detach_Thread_From_Group"; break;
666 case 0x016d: pszService = "Set_Group_Static_Boost"; break;
667 case 0x016e: pszService = "GetRegistryPath"; break;
668 case 0x016f: pszService = "GetRegistryKey"; break;
669 case 0x0170: pszService = "CleanupNestedExec"; break;
670 case 0x0171: pszService = "RegRemapPreDefKey"; break;
671 case 0x0172: pszService = "End_V86_Serialization"; break;
672 case 0x0173: pszService = "Assert_Range"; break;
673 case 0x0174: pszService = "Sprintf"; break;
674 case 0x0175: pszService = "PageChangePager"; break;
675 case 0x0176: pszService = "RegCreateDynKey"; break;
676 case 0x0177: pszService = "RegQMulti"; break;
677 case 0x0178: pszService = "Boost_Thread_With_VM"; break;
678 case 0x0179: pszService = "Get_Boot_Flags"; break;
679 case 0x017a: pszService = "Set_Boot_Flags"; break;
680 case 0x017b: pszService = "lstrcpyn"; break;
681 case 0x017c: pszService = "lstrlen"; break;
682 case 0x017d: pszService = "lmemcpy"; break;
683 case 0x017e: pszService = "GetVxDName"; break;
684 case 0x017f: pszService = "Force_Mutexes_Free"; break;
685 case 0x0180: pszService = "Restore_Forced_Mutexes"; break;
686 case 0x0181: pszService = "AddReclaimableItem"; break;
687 case 0x0182: pszService = "SetReclaimableItem"; break;
688 case 0x0183: pszService = "EnumReclaimableItem"; break;
689 case 0x0184: pszService = "Time_Slice_Wake_Sys_VM"; break;
690 case 0x0185: pszService = "VMM_Replace_Global_Environment"; break;
691 case 0x0186: pszService = "Begin_Non_Serial_Nest_V86_Exec"; break;
692 case 0x0187: pszService = "Get_Nest_Exec_Status"; break;
693 case 0x0188: pszService = "Open_Boot_Log"; break;
694 case 0x0189: pszService = "Write_Boot_Log"; break;
695 case 0x018a: pszService = "Close_Boot_Log"; break;
696 case 0x018b: pszService = "EnableDisable_Boot_Log"; break;
697 case 0x018c: pszService = "Call_On_My_Stack"; break;
698 case 0x018d: pszService = "Get_Inst_V86_Int_Vec_Base"; break;
699 case 0x018e: pszService = "lstrcmpi"; break;
700 case 0x018f: pszService = "strupr"; break;
701 case 0x0190: pszService = "Log_Fault_Call_Out"; break;
702 case 0x0191: pszService = "AtEventTime"; break;
703 }
704 pszVxD = "VMM";
705 break;
706 case 0x0002: pszVxD = "DEBUG"; break;
707 case 0x0003: pszVxD = "VPICD"; break;
708 case 0x0004: pszVxD = "VDMAD"; break;
709 case 0x0005: pszVxD = "VTD"; break;
710 case 0x0006: pszVxD = "V86MMGR"; break;
711 case 0x0007: pszVxD = "PageSwap"; break;
712 case 0x0009: pszVxD = "REBOOT"; break;
713 case 0x000A: pszVxD = "VDD"; break;
714 case 0x000B: pszVxD = "VSD"; break;
715 case 0x000C: pszVxD = "VMD / VMOUSE"; break;
716 case 0x000D: pszVxD = "VKD"; break;
717 case 0x000E: pszVxD = "VCD"; break;
718 case 0x0010: pszVxD = "BlockDev / IOS"; break;
719 case 0x0011: pszVxD = "VMCPD"; break;
720 case 0x0012: pszVxD = "EBIOS"; break;
721 case 0x0014: pszVxD = "VNETBIOS"; break;
722 case 0x0015: pszVxD = "DOSMGR"; break;
723 case 0x0017: pszVxD = "SHELL"; break;
724 case 0x0018: pszVxD = "VMPoll"; break;
725 case 0x001A: pszVxD = "DOSNET"; break;
726 case 0x001B: pszVxD = "VFD"; break;
727 case 0x001C: pszVxD = "LoadHi"; break;
728 case 0x0020: pszVxD = "Int13"; break;
729 case 0x0021: pszVxD = "PAGEFILE"; break;
730 case 0x0026: pszVxD = "VPOWERD"; break;
731 case 0x0027: pszVxD = "VXDLDR"; break;
732 case 0x0028: pszVxD = "NDIS"; break;
733 case 0x002A: pszVxD = "VWIN32"; break;
734 case 0x002B: pszVxD = "VCOMM"; break;
735 case 0x002C: pszVxD = "SPOOLER"; break;
736 case 0x0032: pszVxD = "VSERVER"; break;
737 case 0x0033: pszVxD = "CONFIGMG"; break;
738 case 0x0034: pszVxD = "DWCFGMG.SYS"; break;
739 case 0x0036: pszVxD = "VFBACKUP"; break;
740 case 0x0037: pszVxD = "VMINI / ENABLE"; break;
741 case 0x0038: pszVxD = "VCOND"; break;
742 case 0x003D: pszVxD = "BIOS"; break;
743 case 0x003E: pszVxD = "WSOCK"; break;
744 case 0x0040: pszVxD = "IFSMgr"; break;
745 case 0x0041: pszVxD = "VCDFSD"; break;
746 case 0x0048: pszVxD = "PERF"; break;
747 case 0x004A: pszVxD = "MTRR"; break;
748 case 0x004B: pszVxD = "NTKERN"; break;
749 case 0x011F: pszVxD = "VFLATD"; break;
750 case 0x0449: pszVxD = "vjoyd"; break;
751 case 0x044A: pszVxD = "mmdevldr"; break;
752 case 0x0480: pszVxD = "VNetSup"; break;
753 case 0x0481: pszVxD = "VREDIR"; break;
754 case 0x0483: pszVxD = "VSHARE"; break;
755 case 0x0487: pszVxD = "NWLINK"; break;
756 case 0x0488: pszVxD = "VTDI"; break;
757 case 0x0489: pszVxD = "VIP"; break;
758 case 0x048A: pszVxD = "MSTCP"; break;
759 case 0x048B: pszVxD = "VCACHE"; break;
760 case 0x048E: pszVxD = "NWREDIR"; break;
761 case 0x0491: pszVxD = "FILESEC"; break;
762 case 0x0492: pszVxD = "NWSERVER"; break;
763 case 0x0493: pszVxD = "MSSP / NWSP"; break;
764 case 0x0494: pszVxD = "NSCL"; break;
765 case 0x0495: pszVxD = "AFVXD"; break;
766 case 0x0496: pszVxD = "NDIS2SUP"; break;
767 case 0x0498: pszVxD = "Splitter"; break;
768 case 0x0499: pszVxD = "PPPMAC"; break;
769 case 0x049A: pszVxD = "VDHCP"; break;
770 case 0x049B: pszVxD = "VNBT"; break;
771 case 0x049D: pszVxD = "LOGGER"; break;
772 case 0x097C: pszVxD = "PCCARD"; break;
773 case 0x3098: pszVxD = "VstlthD"; break; /* QEMM */
774 case 0x30F6: pszVxD = "WSVV"; break;
775 case 0x33FC: pszVxD = "ASPIENUM"; break;
776 case 0x357E: pszVxD = "DSOUND"; break;
777 case 0x39E6: pszVxD = "A3D"; break;
778 case 0x3BFD: pszVxD = "CWCPROXY"; break;
779 case 0x3C78: pszVxD = "VGARTD"; break;
780
781 default:
782 {
783 uint8_t abOpcodes[16] = {0};
784 cbInstr = RT_MIN(cbInstr, 16);
785 rc = PGMPhysSimpleReadGCPtr(pVCpu, abOpcodes, GCPtrParams - cbInstr, cbInstr);
786 Log2(("VxD syscall: VxD=%#x Service=%#x - Unknown at %04x:%08RX64: %.*Rhxs - %.*Rhxs (%Rrc)\n",
787 idVxD, idService, pVCpu->cpum.GstCtx.cs.Sel, pVCpu->cpum.GstCtx.rip,
788 cbInstr, abOpcodes, sizeof(auParams), auParams, rc));
789 return;
790 }
791 }
792 if (pszService)
793 Log2(("VxD syscall: VxD=%#04x Service=%#04x - %s: %s\n", idVxD, idService, pszVxD, pszService));
794 else
795 Log2(("VxD syscall: VxD=%#04x Service=%#04x - %s\n", idVxD, idService, pszVxD));
796 }
797 else
798 Log2(("VxD syscall: unable to read parameters at %RGv: %Rrc\n", GCPtrParams, rc));
799}
800
801
802static void iemLogSyscallLinuxX86Int80(PVMCPUCC pVCpu)
803{
804 uint32_t fStrArgs = 0;
805 const char *pszName;
806 int cArgs;
807 uint32_t const uSysCall = pVCpu->cpum.GstCtx.eax;
808 switch (uSysCall)
809 {
810 case 0: cArgs = -1; pszName = "restart_syscall"; break;
811 case 1: cArgs = 1; pszName = "exit"; break;
812 case 2: cArgs = -1; pszName = "fork"; break;
813 case 3: cArgs = 3; pszName = "read"; break;
814 case 4: cArgs = 3; pszName = "write"; break;
815 case 5: cArgs = 3; pszName = "open"; fStrArgs = 1; break;
816 case 6: cArgs = 1; pszName = "close"; break;
817 case 7: cArgs = 3; pszName = "waitpid"; break;
818 case 8: cArgs = 2; pszName = "creat"; break;
819 case 9: cArgs = 2; pszName = "link"; fStrArgs = 1|2; break;
820 case 10: cArgs = 1; pszName = "unlink"; fStrArgs = 1; break;
821 case 11: cArgs = 3; pszName = "execve"; fStrArgs = 1; break;
822 case 12: cArgs = 1; pszName = "chdir"; fStrArgs = 1; break;
823 case 13: cArgs = 1; pszName = "time"; break;
824 case 14: cArgs = 3; pszName = "mknod"; fStrArgs = 1; break;
825 case 15: cArgs = 2; pszName = "chmod"; fStrArgs = 1; break;
826 case 16: cArgs = 3; pszName = "lchown"; fStrArgs = 1; break;
827 case 17: cArgs = -1; pszName = "break;"; break;
828 case 18: cArgs = 2; pszName = "oldstat"; fStrArgs = 1; break;
829 case 19: cArgs = 3; pszName = "lseek"; break;
830 case 20: cArgs = -1; pszName = "getpid"; break;
831 case 21: cArgs = 5; pszName = "mount"; fStrArgs = 1|2|4; break;
832 case 22: cArgs = 1; pszName = "umount"; fStrArgs = 1; break;
833 case 23: cArgs = 1; pszName = "setuid"; break;
834 case 24: cArgs = -1; pszName = "getuid"; break;
835 case 25: cArgs = 1; pszName = "stime"; break;
836 case 26: cArgs = 4; pszName = "ptrace"; break;
837 case 27: cArgs = 1; pszName = "alarm"; break;
838 case 28: cArgs = 2; pszName = "oldfstat"; break;
839 case 29: cArgs = -1; pszName = "pause"; break;
840 case 30: cArgs = 2; pszName = "utime"; fStrArgs = 1; break;
841 case 31: cArgs = -1; pszName = "stty"; break;
842 case 32: cArgs = -1; pszName = "gtty"; break;
843 case 33: cArgs = 2; pszName = "access"; fStrArgs = 1; break;
844 case 34: cArgs = 1; pszName = "nice"; break;
845 case 35: cArgs = -1; pszName = "ftime"; break;
846 case 36: cArgs = -1; pszName = "sync"; break;
847 case 37: cArgs = 2; pszName = "kill"; break;
848 case 38: cArgs = 2; pszName = "rename"; fStrArgs = 1|2; break;
849 case 39: cArgs = 2; pszName = "mkdir"; fStrArgs = 1; break;
850 case 40: cArgs = 1; pszName = "rmdir"; fStrArgs = 1; break;
851 case 41: cArgs = 1; pszName = "dup"; break;
852 case 42: cArgs = 1; pszName = "pipe"; break;
853 case 43: cArgs = 1; pszName = "times"; fStrArgs = 1; break;
854 case 44: cArgs = -1; pszName = "prof"; break;
855 case 45: cArgs = 1; pszName = "brk"; break;
856 case 46: cArgs = 1; pszName = "setgid"; break;
857 case 47: cArgs = -1; pszName = "getgid"; break;
858 case 48: cArgs = 2; pszName = "signal"; break;
859 case 49: cArgs = -1; pszName = "geteuid"; break;
860 case 50: cArgs = -1; pszName = "getegid"; break;
861 case 51: cArgs = 1; pszName = "acct"; break;
862 case 52: cArgs = 2; pszName = "umount2"; fStrArgs = 1; break;
863 case 53: cArgs = -1; pszName = "lock"; break;
864 case 54: cArgs = 3; pszName = "ioctl"; break;
865 case 55: cArgs = 3; pszName = "fcntl"; break;
866 case 56: cArgs = -1; pszName = "mpx"; break;
867 case 57: cArgs = 2; pszName = "setpgid"; break;
868 case 58: cArgs = -1; pszName = "ulimit"; break;
869 case 59: cArgs = 1; pszName = "oldolduname"; break;
870 case 60: cArgs = 1; pszName = "umask"; break;
871 case 61: cArgs = 1; pszName = "chroot"; fStrArgs = 1; break;
872 case 62: cArgs = 2; pszName = "ustat"; break;
873 case 63: cArgs = 2; pszName = "dup2"; break;
874 case 64: cArgs = -1; pszName = "getppid"; break;
875 case 65: cArgs = -1; pszName = "getpgrp"; break;
876 case 66: cArgs = -1; pszName = "setsid"; break;
877 case 67: cArgs = 3; pszName = "sigaction"; break;
878 case 68: cArgs = -1; pszName = "sgetmask"; break;
879 case 69: cArgs = 1; pszName = "ssetmask"; break;
880 case 70: cArgs = 2; pszName = "setreuid"; break;
881 case 71: cArgs = 2; pszName = "setregid"; break;
882 case 72: cArgs = 1; pszName = "sigsuspend"; break;
883 case 73: cArgs = 1; pszName = "sigpending"; break;
884 case 74: cArgs = 2; pszName = "sethostname"; fStrArgs = 1; break;
885 case 75: cArgs = 2; pszName = "setrlimit"; break;
886 case 76: cArgs = 2; pszName = "getrlimit"; break;
887 case 77: cArgs = 2; pszName = "getrusage"; break;
888 case 78: cArgs = 2; pszName = "gettimeofday"; break;
889 case 79: cArgs = 2; pszName = "settimeofday"; break;
890 case 80: cArgs = 2; pszName = "getgroups"; break;
891 case 81: cArgs = 2; pszName = "setgroups"; break;
892 case 82: cArgs = 1; pszName = "select"; break;
893 case 83: cArgs = 2; pszName = "symlink"; fStrArgs = 1|2; break;
894 case 84: cArgs = 2; pszName = "oldlstat"; fStrArgs = 1; break;
895 case 85: cArgs = 3; pszName = "readlink"; fStrArgs = 1; break;
896 case 86: cArgs = 1; pszName = "uselib"; break;
897 case 87: cArgs = 2; pszName = "swapon"; fStrArgs = 1; break;
898 case 88: cArgs = 4; pszName = "reboot"; break;
899 case 89: cArgs = 3; pszName = "readdir"; break;
900 case 90: cArgs = 1; pszName = "mmap"; break;
901 case 91: cArgs = 2; pszName = "munmap"; break;
902 case 92: cArgs = 2; pszName = "truncate"; fStrArgs = 1; break;
903 case 93: cArgs = 2; pszName = "ftruncate"; break;
904 case 94: cArgs = 2; pszName = "fchmod"; break;
905 case 95: cArgs = 3; pszName = "fchown"; break;
906 case 96: cArgs = 2; pszName = "getpriority"; break;
907 case 97: cArgs = 3; pszName = "setpriority"; break;
908 case 98: cArgs = -1; pszName = "profil"; break;
909 case 99: cArgs = 2; pszName = "statfs"; fStrArgs = 1; break;
910 case 100: cArgs = 2; pszName = "fstatfs"; break;
911 case 101: cArgs = 3; pszName = "ioperm"; break;
912 case 102: cArgs = 2; pszName = "socketcall"; break;
913 case 103: cArgs = 3; pszName = "syslog"; break;
914 case 104: cArgs = 3; pszName = "setitimer"; break;
915 case 105: cArgs = 2; pszName = "getitimer"; break;
916 case 106: cArgs = 2; pszName = "stat"; fStrArgs = 1; break;
917 case 107: cArgs = 2; pszName = "lstat"; fStrArgs = 1; break;
918 case 108: cArgs = 2; pszName = "fstat"; break;
919 case 109: cArgs = 1; pszName = "olduname"; break;
920 case 110: cArgs = 1; pszName = "iopl"; break;
921 case 111: cArgs = -1; pszName = "vhangup"; break;
922 case 112: cArgs = -1; pszName = "idle"; break;
923 case 113: cArgs = 1; pszName = "vm86old"; break;
924 case 114: cArgs = 4; pszName = "wait4"; break;
925 case 115: cArgs = 1; pszName = "swapoff"; fStrArgs = 1; break;
926 case 116: cArgs = 1; pszName = "sysinfo"; break;
927 case 117: cArgs = 6; pszName = "ipc"; break;
928 case 118: cArgs = 1; pszName = "fsync"; break;
929 case 119: cArgs = -1; pszName = "sigreturn"; break;
930 case 120: cArgs = 5; pszName = "clone"; break;
931 case 121: cArgs = 2; pszName = "setdomainname"; fStrArgs = 1; break;
932 case 122: cArgs = 1; pszName = "uname"; break;
933 case 123: cArgs = 3; pszName = "modify_ldt"; break;
934 case 124: cArgs = 1; pszName = "adjtimex"; break;
935 case 125: cArgs = 3; pszName = "mprotect"; break;
936 case 126: cArgs = 3; pszName = "sigprocmask"; break;
937 case 127: cArgs = -1; pszName = "create_module"; fStrArgs = 1; break;
938 case 128: cArgs = 3; pszName = "init_module"; break;
939 case 129: cArgs = 2; pszName = "delete_module"; fStrArgs = 1; break;
940 case 130: cArgs = -1; pszName = "get_kernel_syms"; break;
941 case 131: cArgs = 4; pszName = "quotactl"; break;
942 case 132: cArgs = 1; pszName = "getpgid"; break;
943 case 133: cArgs = 1; pszName = "fchdir"; break;
944 case 134: cArgs = -1; pszName = "bdflush"; break;
945 case 135: cArgs = 3; pszName = "sysfs"; break;
946 case 136: cArgs = 1; pszName = "personality"; break;
947 case 137: cArgs = -1; pszName = "afs_syscall"; break;
948 case 138: cArgs = 1; pszName = "setfsuid"; break;
949 case 139: cArgs = 1; pszName = "setfsgid"; break;
950 case 140: cArgs = 5; pszName = "_llseek"; break;
951 case 141: cArgs = 3; pszName = "getdents"; break;
952 case 142: cArgs = 5; pszName = "_newselect"; break;
953 case 143: cArgs = 2; pszName = "flock"; break;
954 case 144: cArgs = 3; pszName = "msync"; break;
955 case 145: cArgs = 3; pszName = "readv"; break;
956 case 146: cArgs = 3; pszName = "writev"; break;
957 case 147: cArgs = 1; pszName = "getsid"; break;
958 case 148: cArgs = 1; pszName = "fdatasync"; break;
959 case 149: cArgs = -1; pszName = "_sysctl"; break;
960 case 150: cArgs = 2; pszName = "mlock"; break;
961 case 151: cArgs = 2; pszName = "munlock"; break;
962 case 152: cArgs = 1; pszName = "mlockall"; break;
963 case 153: cArgs = -1; pszName = "munlockall"; break;
964 case 154: cArgs = 2; pszName = "sched_setparam"; break;
965 case 155: cArgs = 2; pszName = "sched_getparam"; break;
966 case 156: cArgs = 3; pszName = "sched_setscheduler"; break;
967 case 157: cArgs = 1; pszName = "sched_getscheduler"; break;
968 case 158: cArgs = -1; pszName = "sched_yield"; break;
969 case 159: cArgs = 1; pszName = "sched_get_priority_max"; break;
970 case 160: cArgs = 1; pszName = "sched_get_priority_min"; break;
971 case 161: cArgs = 2; pszName = "sched_rr_get_interval"; break;
972 case 162: cArgs = 2; pszName = "nanosleep"; break;
973 case 163: cArgs = 5; pszName = "mremap"; break;
974 case 164: cArgs = 3; pszName = "setresuid"; break;
975 case 165: cArgs = 3; pszName = "getresuid"; break;
976 case 166: cArgs = 2; pszName = "vm86"; break;
977 case 167: cArgs = -1; pszName = "query_module"; break;
978 case 168: cArgs = 3; pszName = "poll"; break;
979 case 169: cArgs = -1; pszName = "nfsservctl"; break;
980 case 170: cArgs = 3; pszName = "setresgid"; break;
981 case 171: cArgs = 3; pszName = "getresgid"; break;
982 case 172: cArgs = 5; pszName = "prctl"; break;
983 case 173: cArgs = -1; pszName = "rt_sigreturn"; break;
984 case 174: cArgs = 4; pszName = "rt_sigaction"; break;
985 case 175: cArgs = 4; pszName = "rt_sigprocmask"; break;
986 case 176: cArgs = 2; pszName = "rt_sigpending"; break;
987 case 177: cArgs = 4; pszName = "rt_sigtimedwait"; break;
988 case 178: cArgs = 3; pszName = "rt_sigqueueinfo"; break;
989 case 179: cArgs = 2; pszName = "rt_sigsuspend"; break;
990 case 180: cArgs = 5; pszName = "pread64"; break;
991 case 181: cArgs = 5; pszName = "pwrite64"; break;
992 case 182: cArgs = 3; pszName = "chown"; break;
993 case 183: cArgs = 2; pszName = "getcwd"; break;
994 case 184: cArgs = 2; pszName = "capget"; break;
995 case 185: cArgs = 2; pszName = "capset"; break;
996 case 186: cArgs = 2; pszName = "sigaltstack"; break;
997 case 187: cArgs = 4; pszName = "sendfile"; break;
998 case 188: cArgs = -1; pszName = "getpmsg"; break;
999 case 189: cArgs = -1; pszName = "putpmsg"; break;
1000 case 190: cArgs = -1; pszName = "vfork"; break;
1001 case 191: cArgs = 2; pszName = "ugetrlimit"; break;
1002 case 192: cArgs = 6; pszName = "mmap2"; break;
1003 case 193: cArgs = 3; pszName = "truncate64"; break;
1004 case 194: cArgs = 3; pszName = "ftruncate64"; break;
1005 case 195: cArgs = 2; pszName = "stat64"; break;
1006 case 196: cArgs = 2; pszName = "lstat64"; break;
1007 case 197: cArgs = 2; pszName = "fstat64"; break;
1008 case 198: cArgs = 3; pszName = "lchown32"; break;
1009 case 199: cArgs = -1; pszName = "getuid32"; break;
1010 case 200: cArgs = -1; pszName = "getgid32"; break;
1011 case 201: cArgs = -1; pszName = "geteuid32"; break;
1012 case 202: cArgs = -1; pszName = "getegid32"; break;
1013 case 203: cArgs = 2; pszName = "setreuid32"; break;
1014 case 204: cArgs = 2; pszName = "setregid32"; break;
1015 case 205: cArgs = 2; pszName = "getgroups32"; break;
1016 case 206: cArgs = 2; pszName = "setgroups32"; break;
1017 case 207: cArgs = 3; pszName = "fchown32"; break;
1018 case 208: cArgs = 3; pszName = "setresuid32"; break;
1019 case 209: cArgs = 3; pszName = "getresuid32"; break;
1020 case 210: cArgs = 3; pszName = "setresgid32"; break;
1021 case 211: cArgs = 3; pszName = "getresgid32"; break;
1022 case 212: cArgs = 3; pszName = "chown32"; break;
1023 case 213: cArgs = 1; pszName = "setuid32"; break;
1024 case 214: cArgs = 1; pszName = "setgid32"; break;
1025 case 215: cArgs = 1; pszName = "setfsuid32"; break;
1026 case 216: cArgs = 1; pszName = "setfsgid32"; break;
1027 case 217: cArgs = 2; pszName = "pivot_root"; break;
1028 case 218: cArgs = 3; pszName = "mincore"; break;
1029 case 219: cArgs = 3; pszName = "madvise"; break;
1030 case 220: cArgs = 3; pszName = "getdents64"; break;
1031 case 221: cArgs = 3; pszName = "fcntl64"; break;
1032 case 224: cArgs = -1; pszName = "gettid"; break;
1033 case 225: cArgs = 4; pszName = "readahead"; break;
1034 case 226: cArgs = 5; pszName = "setxattr"; break;
1035 case 227: cArgs = 5; pszName = "lsetxattr"; break;
1036 case 228: cArgs = 5; pszName = "fsetxattr"; break;
1037 case 229: cArgs = 4; pszName = "getxattr"; break;
1038 case 230: cArgs = 4; pszName = "lgetxattr"; break;
1039 case 231: cArgs = 4; pszName = "fgetxattr"; break;
1040 case 232: cArgs = 3; pszName = "listxattr"; break;
1041 case 233: cArgs = 3; pszName = "llistxattr"; break;
1042 case 234: cArgs = 3; pszName = "flistxattr"; break;
1043 case 235: cArgs = 2; pszName = "removexattr"; break;
1044 case 236: cArgs = 2; pszName = "lremovexattr"; break;
1045 case 237: cArgs = 2; pszName = "fremovexattr"; break;
1046 case 238: cArgs = 2; pszName = "tkill"; break;
1047 case 239: cArgs = 4; pszName = "sendfile64"; break;
1048 case 240: cArgs = 6; pszName = "futex"; break;
1049 case 241: cArgs = 3; pszName = "sched_setaffinity"; break;
1050 case 242: cArgs = 3; pszName = "sched_getaffinity"; break;
1051 case 243: cArgs = 1; pszName = "set_thread_area"; break;
1052 case 244: cArgs = 1; pszName = "get_thread_area"; break;
1053 case 245: cArgs = 2; pszName = "io_setup"; break;
1054 case 246: cArgs = 1; pszName = "io_destroy"; break;
1055 case 247: cArgs = 5; pszName = "io_getevents"; break;
1056 case 248: cArgs = 3; pszName = "io_submit"; break;
1057 case 249: cArgs = 3; pszName = "io_cancel"; break;
1058 case 250: cArgs = 5; pszName = "fadvise64"; break;
1059 case 252: cArgs = 1; pszName = "exit_group"; break;
1060 case 253: cArgs = -1; pszName = "lookup_dcookie"; break;
1061 case 254: cArgs = 1; pszName = "epoll_create"; break;
1062 case 255: cArgs = 4; pszName = "epoll_ctl"; break;
1063 case 256: cArgs = 4; pszName = "epoll_wait"; break;
1064 case 257: cArgs = 5; pszName = "remap_file_pages"; break;
1065 case 258: cArgs = 1; pszName = "set_tid_address"; break;
1066 case 259: cArgs = 3; pszName = "timer_create"; break;
1067 case 260: cArgs = 4; pszName = "timer_settime"; break;
1068 case 261: cArgs = 2; pszName = "timer_gettime"; break;
1069 case 262: cArgs = 1; pszName = "timer_getoverrun"; break;
1070 case 263: cArgs = 1; pszName = "timer_delete"; break;
1071 case 264: cArgs = 2; pszName = "clock_settime"; break;
1072 case 265: cArgs = 2; pszName = "clock_gettime"; break;
1073 case 266: cArgs = 2; pszName = "clock_getres"; break;
1074 case 267: cArgs = 4; pszName = "clock_nanosleep"; break;
1075 case 268: cArgs = 3; pszName = "statfs64"; break;
1076 case 269: cArgs = 3; pszName = "fstatfs64"; break;
1077 case 270: cArgs = 3; pszName = "tgkill"; break;
1078 case 271: cArgs = 2; pszName = "utimes"; break;
1079 case 272: cArgs = 6; pszName = "fadvise64_64"; break;
1080 case 273: cArgs = -1; pszName = "vserver"; break;
1081 case 274: cArgs = 6; pszName = "mbind"; break;
1082 case 275: cArgs = 5; pszName = "get_mempolicy"; break;
1083 case 276: cArgs = 3; pszName = "set_mempolicy"; break;
1084 case 277: cArgs = 4; pszName = "mq_open"; break;
1085 case 278: cArgs = 1; pszName = "mq_unlink"; break;
1086 case 279: cArgs = 5; pszName = "mq_timedsend"; break;
1087 case 280: cArgs = 5; pszName = "mq_timedreceive"; break;
1088 case 281: cArgs = 2; pszName = "mq_notify"; break;
1089 case 282: cArgs = 3; pszName = "mq_getsetattr"; break;
1090 case 283: cArgs = 4; pszName = "kexec_load"; break;
1091 case 284: cArgs = 5; pszName = "waitid"; break;
1092 case 286: cArgs = 5; pszName = "add_key"; break;
1093 case 287: cArgs = 4; pszName = "request_key"; break;
1094 case 288: cArgs = 5; pszName = "keyctl"; break;
1095 case 289: cArgs = 3; pszName = "ioprio_set"; break;
1096 case 290: cArgs = 2; pszName = "ioprio_get"; break;
1097 case 291: cArgs = -1; pszName = "inotify_init"; break;
1098 case 292: cArgs = 3; pszName = "inotify_add_watch"; break;
1099 case 293: cArgs = 2; pszName = "inotify_rm_watch"; break;
1100 case 294: cArgs = 4; pszName = "migrate_pages"; break;
1101 case 295: cArgs = 4; pszName = "openat"; break;
1102 case 296: cArgs = 3; pszName = "mkdirat"; break;
1103 case 297: cArgs = 4; pszName = "mknodat"; break;
1104 case 298: cArgs = 5; pszName = "fchownat"; break;
1105 case 299: cArgs = 3; pszName = "futimesat"; break;
1106 case 300: cArgs = 4; pszName = "fstatat64"; break;
1107 case 301: cArgs = 3; pszName = "unlinkat"; break;
1108 case 302: cArgs = 4; pszName = "renameat"; break;
1109 case 303: cArgs = 5; pszName = "linkat"; break;
1110 case 304: cArgs = 3; pszName = "symlinkat"; break;
1111 case 305: cArgs = 4; pszName = "readlinkat"; break;
1112 case 306: cArgs = 3; pszName = "fchmodat"; break;
1113 case 307: cArgs = 3; pszName = "faccessat"; break;
1114 case 308: cArgs = 6; pszName = "pselect6"; break;
1115 case 309: cArgs = 5; pszName = "ppoll"; break;
1116 case 310: cArgs = 1; pszName = "unshare"; break;
1117 case 311: cArgs = 2; pszName = "set_robust_list"; break;
1118 case 312: cArgs = 3; pszName = "get_robust_list"; break;
1119 case 313: cArgs = 6; pszName = "splice"; break;
1120 case 314: cArgs = 6; pszName = "sync_file_range"; break;
1121 case 315: cArgs = 4; pszName = "tee"; break;
1122 case 316: cArgs = 4; pszName = "vmsplice"; break;
1123 case 317: cArgs = 6; pszName = "move_pages"; break;
1124 case 318: cArgs = 3; pszName = "getcpu"; break;
1125 case 319: cArgs = 6; pszName = "epoll_pwait"; break;
1126 case 320: cArgs = 4; pszName = "utimensat"; break;
1127 case 321: cArgs = 3; pszName = "signalfd"; break;
1128 case 322: cArgs = 2; pszName = "timerfd_create"; break;
1129 case 323: cArgs = 1; pszName = "eventfd"; break;
1130 case 324: cArgs = 6; pszName = "fallocate"; break;
1131 case 325: cArgs = 4; pszName = "timerfd_settime"; break;
1132 case 326: cArgs = 2; pszName = "timerfd_gettime"; break;
1133 case 327: cArgs = 4; pszName = "signalfd4"; break;
1134 case 328: cArgs = 2; pszName = "eventfd2"; break;
1135 case 329: cArgs = 1; pszName = "epoll_create1"; break;
1136 case 330: cArgs = 3; pszName = "dup3"; break;
1137 case 331: cArgs = 2; pszName = "pipe2"; break;
1138 case 332: cArgs = 1; pszName = "inotify_init1"; break;
1139 case 333: cArgs = 5; pszName = "preadv"; break;
1140 case 334: cArgs = 5; pszName = "pwritev"; break;
1141 case 335: cArgs = 4; pszName = "rt_tgsigqueueinfo"; break;
1142 case 336: cArgs = 5; pszName = "perf_event_open"; break;
1143 case 337: cArgs = 5; pszName = "recvmmsg"; break;
1144 case 338: cArgs = 2; pszName = "fanotify_init"; break;
1145 case 339: cArgs = 5; pszName = "fanotify_mark"; break;
1146 case 340: cArgs = 4; pszName = "prlimit64"; break;
1147 case 341: cArgs = 5; pszName = "name_to_handle_at"; break;
1148 case 342: cArgs = 3; pszName = "open_by_handle_at"; break;
1149 case 343: cArgs = 2; pszName = "clock_adjtime"; break;
1150 case 344: cArgs = 1; pszName = "syncfs"; break;
1151 case 345: cArgs = 4; pszName = "sendmmsg"; break;
1152 case 346: cArgs = 2; pszName = "setns"; break;
1153 case 347: cArgs = 6; pszName = "process_vm_readv"; break;
1154 case 348: cArgs = 6; pszName = "process_vm_writev"; break;
1155 case 349: cArgs = 5; pszName = "kcmp"; break;
1156 case 350: cArgs = 3; pszName = "finit_module"; break;
1157 case 351: cArgs = 3; pszName = "sched_setattr"; break;
1158 case 352: cArgs = 4; pszName = "sched_getattr"; break;
1159 case 353: cArgs = 5; pszName = "renameat2"; break;
1160 case 354: cArgs = 3; pszName = "seccomp"; break;
1161 case 355: cArgs = 3; pszName = "getrandom"; break;
1162 case 356: cArgs = 2; pszName = "memfd_create"; break;
1163 case 357: cArgs = 3; pszName = "bpf"; break;
1164 case 358: cArgs = 5; pszName = "execveat"; break;
1165 case 359: cArgs = 3; pszName = "socket"; break;
1166 case 360: cArgs = 4; pszName = "socketpair"; break;
1167 case 361: cArgs = 3; pszName = "bind"; break;
1168 case 362: cArgs = 3; pszName = "connect"; break;
1169 case 363: cArgs = 2; pszName = "listen"; break;
1170 case 364: cArgs = 4; pszName = "accept4"; break;
1171 case 365: cArgs = 5; pszName = "getsockopt"; break;
1172 case 366: cArgs = 5; pszName = "setsockopt"; break;
1173 case 367: cArgs = 3; pszName = "getsockname"; break;
1174 case 368: cArgs = 3; pszName = "getpeername"; break;
1175 case 369: cArgs = 6; pszName = "sendto"; break;
1176 case 370: cArgs = 3; pszName = "sendmsg"; break;
1177 case 371: cArgs = 6; pszName = "recvfrom"; break;
1178 case 372: cArgs = 3; pszName = "recvmsg"; break;
1179 case 373: cArgs = 2; pszName = "shutdown"; break;
1180 case 374: cArgs = 1; pszName = "userfaultfd"; break;
1181 case 375: cArgs = 3; pszName = "membarrier"; break;
1182 case 376: cArgs = 3; pszName = "mlock2"; break;
1183 case 377: cArgs = 6; pszName = "copy_file_range"; break;
1184 case 378: cArgs = 6; pszName = "preadv2"; break;
1185 case 379: cArgs = 6; pszName = "pwritev2"; break;
1186 case 380: cArgs = 4; pszName = "pkey_mprotect"; break;
1187 case 381: cArgs = 2; pszName = "pkey_alloc"; break;
1188 case 382: cArgs = 1; pszName = "pkey_free"; break;
1189 case 383: cArgs = 5; pszName = "statx"; break;
1190 case 384: cArgs = 2; pszName = "arch_prctl"; break;
1191 case 385: cArgs = 6; pszName = "io_pgetevents"; break;
1192 case 386: cArgs = 4; pszName = "rseq"; break;
1193 case 393: cArgs = 3; pszName = "semget"; break;
1194 case 394: cArgs = 4; pszName = "semctl"; break;
1195 case 395: cArgs = 3; pszName = "shmget"; break;
1196 case 396: cArgs = 3; pszName = "shmctl"; break;
1197 case 397: cArgs = 3; pszName = "shmat"; break;
1198 case 398: cArgs = 1; pszName = "shmdt"; break;
1199 case 399: cArgs = 2; pszName = "msgget"; break;
1200 case 400: cArgs = 4; pszName = "msgsnd"; break;
1201 case 401: cArgs = 5; pszName = "msgrcv"; break;
1202 case 402: cArgs = 3; pszName = "msgctl"; break;
1203 case 403: cArgs = 2; pszName = "clock_gettime64"; break;
1204 case 404: cArgs = 2; pszName = "clock_settime64"; break;
1205 case 405: cArgs = 2; pszName = "clock_adjtime64"; break;
1206 case 406: cArgs = 2; pszName = "clock_getres_time64"; break;
1207 case 407: cArgs = 4; pszName = "clock_nanosleep_time64"; break;
1208 case 408: cArgs = 2; pszName = "timer_gettime64"; break;
1209 case 409: cArgs = 4; pszName = "timer_settime64"; break;
1210 case 410: cArgs = 2; pszName = "timerfd_gettime64"; break;
1211 case 411: cArgs = 4; pszName = "timerfd_settime64"; break;
1212 case 412: cArgs = 4; pszName = "utimensat_time64"; break;
1213 case 413: cArgs = 6; pszName = "pselect6_time64"; break;
1214 case 414: cArgs = 5; pszName = "ppoll_time64"; break;
1215 case 416: cArgs = 6; pszName = "io_pgetevents_time64"; break;
1216 case 417: cArgs = 5; pszName = "recvmmsg_time64"; break;
1217 case 418: cArgs = 5; pszName = "mq_timedsend_time64"; break;
1218 case 419: cArgs = 5; pszName = "mq_timedreceive_time64"; break;
1219 case 420: cArgs = 4; pszName = "semtimedop_time64"; break;
1220 case 421: cArgs = 4; pszName = "rt_sigtimedwait_time64"; break;
1221 case 422: cArgs = 6; pszName = "futex_time64"; break;
1222 case 423: cArgs = 2; pszName = "sched_rr_get_interval_time64"; break;
1223 case 424: cArgs = 4; pszName = "pidfd_send_signal"; break;
1224 case 425: cArgs = 2; pszName = "io_uring_setup"; break;
1225 case 426: cArgs = 6; pszName = "io_uring_enter"; break;
1226 case 427: cArgs = 4; pszName = "io_uring_register"; break;
1227 case 428: cArgs = 3; pszName = "open_tree"; break;
1228 case 429: cArgs = 5; pszName = "move_mount"; break;
1229 case 430: cArgs = 2; pszName = "fsopen"; break;
1230 case 431: cArgs = 5; pszName = "fsconfig"; break;
1231 case 432: cArgs = 3; pszName = "fsmount"; break;
1232 case 433: cArgs = 3; pszName = "fspick"; break;
1233 case 434: cArgs = 2; pszName = "pidfd_open"; break;
1234 case 435: cArgs = 2; pszName = "clone3"; break;
1235 case 436: cArgs = 3; pszName = "close_range"; break;
1236 case 437: cArgs = 4; pszName = "openat2"; break;
1237 case 438: cArgs = 3; pszName = "pidfd_getfd"; break;
1238 case 439: cArgs = 4; pszName = "faccessat2"; break;
1239 case 440: cArgs = 5; pszName = "process_madvise"; break;
1240 case 441: cArgs = 6; pszName = "epoll_pwait2"; break;
1241 case 442: cArgs = 5; pszName = "mount_setattr"; break;
1242 case 443: cArgs = 4; pszName = "quotactl_fd"; break;
1243 case 444: cArgs = 3; pszName = "landlock_create_ruleset"; break;
1244 case 445: cArgs = 4; pszName = "landlock_add_rule"; break;
1245 case 446: cArgs = 2; pszName = "landlock_restrict_self"; break;
1246 case 447: cArgs = 1; pszName = "memfd_secret"; break;
1247 case 448: cArgs = 2; pszName = "process_mrelease"; break;
1248 case 449: cArgs = 5; pszName = "futex_waitv"; break;
1249 case 450: cArgs = 4; pszName = "set_mempolicy_home_node"; break;
1250 case 451: cArgs = 4; pszName = "cachestat"; break;
1251 case 452: cArgs = 4; pszName = "fchmodat2"; break;
1252
1253 default:
1254 pszName = "unknown!";
1255 cArgs = -1;
1256 break;;
1257 }
1258 Log3(("Linux syscall: %s (%#x) at %04x:%08x - cArgs=%d: ebx=%#x ecx=%#x edx=%#x esi=%#x edi=%#x ebp=%#x (esp=%#x eax=%#x efl=%#x)\n",
1259 pszName, uSysCall, pVCpu->cpum.GstCtx.cs.Sel, pVCpu->cpum.GstCtx.eip, cArgs, pVCpu->cpum.GstCtx.ebx,
1260 pVCpu->cpum.GstCtx.ecx, pVCpu->cpum.GstCtx.edx, pVCpu->cpum.GstCtx.esi, pVCpu->cpum.GstCtx.edi, pVCpu->cpum.GstCtx.ebp,
1261 pVCpu->cpum.GstCtx.esp, pVCpu->cpum.GstCtx.eax, pVCpu->cpum.GstCtx.eflags.uBoth));
1262
1263#ifdef IN_RING3
1264 /*
1265 * Log string arguments.
1266 */
1267 static const uint8_t s_aidxArgToGReg[] =
1268 { X86_GREG_xBX, X86_GREG_xCX, X86_GREG_xDX, X86_GREG_xSI, X86_GREG_xDI, X86_GREG_xBP };
1269 if (fStrArgs)
1270 {
1271 PUVM pUVM = pVCpu->pVMR3->pUVM;
1272 do
1273 {
1274 unsigned const iStrArg = ASMBitFirstSetU32(fStrArgs) - 1;
1275 fStrArgs &= ~RT_BIT_32(iStrArg);
1276 if (iStrArg < RT_ELEMENTS(s_aidxArgToGReg))
1277 {
1278 char szStr[1024];
1279 uint32_t const uAddr = pVCpu->cpum.GstCtx.aGRegs[s_aidxArgToGReg[iStrArg]].u32;
1280 DBGFADDRESS DbgAddr;
1281 int rc = DBGFR3MemReadString(pUVM, pVCpu->idCpu, DBGFR3AddrFromFlat(pUVM, &DbgAddr, uAddr), szStr, sizeof(szStr));
1282 if (RT_SUCCESS(rc))
1283 {
1284 rc = RTStrValidateEncoding(szStr);
1285 if (RT_SUCCESS(rc))
1286 Log3(("Linux syscall %x/arg #%u: %#x '%s'\n", uSysCall, iStrArg, uAddr, szStr));
1287 else
1288 Log3(("Linux syscall %x/arg #%u: %#x %.*Rhxs\n", uSysCall, iStrArg, uAddr, strlen(szStr), szStr));
1289 }
1290 }
1291
1292
1293 } while (fStrArgs);
1294 }
1295#else
1296 RT_NOREF(fStrArgs);
1297#endif
1298}
1299
1300
1301void iemLogSyscallRealModeInt(PVMCPUCC pVCpu, uint8_t u8Vector, uint8_t cbInstr)
1302{
1303 /* DOS & BIOS (V86 mode) */
1304 if (LogIsEnabled())
1305 {
1306 switch (u8Vector)
1307 {
1308 case 0x10:
1309 iemLogSyscallVgaBiosInt10h(pVCpu);
1310 break;
1311 case 0x16:
1312 iemLogSyscallBiosInt16h(pVCpu);
1313 break;
1314 case 0x21:
1315 iemLogSyscallDosInt21h(pVCpu);
1316 break;
1317 }
1318 }
1319 RT_NOREF(cbInstr);
1320}
1321
1322
1323void iemLogSyscallProtModeInt(PVMCPUCC pVCpu, uint8_t u8Vector, uint8_t cbInstr)
1324{
1325 /* DOS & BIOS (V86 mode) */
1326 if ( LogIsEnabled()
1327 && pVCpu->cpum.GstCtx.eflags.Bits.u1VM /* v8086 mode */)
1328 {
1329 switch (u8Vector)
1330 {
1331 case 0x10:
1332 iemLogSyscallVgaBiosInt10h(pVCpu);
1333 break;
1334 case 0x16:
1335 iemLogSyscallBiosInt16h(pVCpu);
1336 break;
1337 case 0x21:
1338 iemLogSyscallDosInt21h(pVCpu);
1339 break;
1340 }
1341 }
1342
1343 /* Windows 3.x */
1344 if (LogIs2Enabled())
1345 switch (u8Vector)
1346 {
1347 case 0x20: /* VxD call. */
1348 iemLogSyscallWinVxDCall(pVCpu, cbInstr);
1349 break;
1350 }
1351
1352 /* Linux */
1353 if (LogIs3Enabled() && u8Vector == 0x80)
1354 iemLogSyscallLinuxX86Int80(pVCpu);
1355}
1356
1357#endif /* LOG_ENABLED */
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette