Also add the syscall number into the SyscallDesc class.
The common table structure is basically just a map that extracts its
key value from the SyscallDesc class using a new num() accessor. By
using a map instead of an array (like RISCV was already doing), it's
easy to support gaps of arbitrary size and non-zero offsets of groups
of system calls without lots of filler or additional logic. This
simplified the ARM system call tables in particular which had a lot
of filler entries.
Also, both the 32 and 64 bit ARM syscall tables had entries for a
syscall at 123456 which was the "Angel SWI system call". This value
is actually the immediate constant passed to the SWI system call
instruction and is not interpreted as the system call number in linux.
This constant can be intercepted by hardware or a simulator to, for
instance, implement ARM semihosting.
Also, that constant in combination with the SWI instruction is only
used for semihosting in 32 bit ARM mode, not in 64 bit mode or in
thumb.
Since checking for that system call number was very likely a mistake
from misinterpreting how the semihosting calls work, this change
drops those checks.
Change-Id: I9b2a902d7326791449cf0e1b98e932dcadba54f7
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/24117
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Gabe Black <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
}
#endif
-static SyscallDescABI<ArmFreebsdProcess32::SyscallABI> syscallDescs32[] = {
- /* 0 */ { "unused#000" },
- /* 1 */ { "unused#001" },
- /* 2 */ { "unused#002" },
- /* 3 */ { "unused#003" },
- /* 4 */ { "unused#004" },
- /* 5 */ { "unused#005" },
- /* 6 */ { "unused#006" },
- /* 7 */ { "unused#007" },
- /* 8 */ { "unused#008" },
- /* 9 */ { "unused#009" },
- /* 10 */ { "unused#010" },
- /* 11 */ { "unused#011" },
- /* 12 */ { "unused#012" },
- /* 13 */ { "unused#013" },
- /* 14 */ { "unused#014" },
- /* 15 */ { "unused#015" },
- /* 16 */ { "unused#016" },
- /* 17 */ { "unused#017" },
- /* 18 */ { "unused#018" },
- /* 19 */ { "unused#019" },
- /* 20 */ { "unused#020" },
- /* 21 */ { "unused#021" },
- /* 22 */ { "unused#022" },
- /* 23 */ { "unused#023" },
- /* 24 */ { "unused#024" },
- /* 25 */ { "unused#025" },
- /* 26 */ { "unused#026" },
- /* 27 */ { "unused#027" },
- /* 28 */ { "unused#028" },
- /* 29 */ { "unused#029" },
- /* 30 */ { "unused#030" },
- /* 31 */ { "unused#031" },
- /* 32 */ { "unused#032" },
- /* 33 */ { "unused#033" },
- /* 34 */ { "unused#034" },
- /* 35 */ { "unused#035" },
- /* 36 */ { "unused#036" },
- /* 37 */ { "unused#037" },
- /* 38 */ { "unused#038" },
- /* 39 */ { "unused#039" },
- /* 40 */ { "unused#040" },
- /* 41 */ { "unused#041" },
- /* 42 */ { "unused#042" },
- /* 43 */ { "unused#043" },
- /* 44 */ { "unused#044" },
- /* 45 */ { "unused#045" },
- /* 46 */ { "unused#046" },
- /* 47 */ { "unused#047" },
- /* 48 */ { "unused#048" },
- /* 49 */ { "unused#049" },
- /* 50 */ { "unused#050" },
- /* 51 */ { "unused#051" },
- /* 52 */ { "unused#052" },
- /* 53 */ { "unused#053" },
- /* 54 */ { "unused#054" },
- /* 55 */ { "unused#055" },
- /* 56 */ { "unused#056" },
- /* 57 */ { "unused#057" },
- /* 58 */ { "unused#058" },
- /* 59 */ { "unused#059" },
- /* 60 */ { "unused#060" },
- /* 61 */ { "unused#061" },
- /* 62 */ { "unused#062" },
- /* 63 */ { "unused#063" },
- /* 64 */ { "unused#064" },
- /* 65 */ { "unused#065" },
- /* 66 */ { "unused#066" },
- /* 67 */ { "unused#067" },
- /* 68 */ { "unused#068" },
- /* 69 */ { "unused#069" },
- /* 70 */ { "unused#070" },
- /* 71 */ { "unused#071" },
- /* 72 */ { "unused#072" },
- /* 73 */ { "unused#073" },
- /* 74 */ { "unused#074" },
- /* 75 */ { "unused#075" },
- /* 76 */ { "unused#076" },
- /* 77 */ { "unused#077" },
- /* 78 */ { "unused#078" },
- /* 79 */ { "unused#079" },
- /* 80 */ { "unused#080" },
- /* 81 */ { "unused#081" },
- /* 82 */ { "unused#082" },
- /* 83 */ { "unused#083" },
- /* 84 */ { "unused#084" },
- /* 85 */ { "unused#085" },
- /* 86 */ { "unused#086" },
- /* 87 */ { "unused#087" },
- /* 88 */ { "unused#088" },
- /* 89 */ { "unused#089" },
- /* 90 */ { "unused#090" },
- /* 91 */ { "unused#091" },
- /* 92 */ { "unused#092" },
- /* 93 */ { "unused#093" },
- /* 94 */ { "unused#094" },
- /* 95 */ { "unused#095" },
- /* 96 */ { "unused#096" },
- /* 97 */ { "unused#097" },
- /* 98 */ { "unused#098" },
- /* 99 */ { "unused#099" },
- /* 100 */ { "unused#100" },
- /* 101 */ { "unused#101" },
- /* 102 */ { "unused#102" },
- /* 103 */ { "unused#103" },
- /* 104 */ { "unused#104" },
- /* 105 */ { "unused#105" },
- /* 106 */ { "unused#106" },
- /* 107 */ { "unused#107" },
- /* 108 */ { "unused#108" },
- /* 109 */ { "unused#109" },
- /* 110 */ { "unused#110" },
- /* 111 */ { "unused#111" },
- /* 112 */ { "unused#112" },
- /* 113 */ { "unused#113" },
- /* 114 */ { "unused#114" },
- /* 115 */ { "unused#115" },
- /* 116 */ { "unused#116" },
- /* 117 */ { "unused#117" },
- /* 118 */ { "unused#118" },
- /* 119 */ { "unused#119" },
- /* 120 */ { "unused#120" },
- /* 121 */ { "unused#121" },
- /* 122 */ { "unused#122" },
- /* 123 */ { "unused#123" },
- /* 124 */ { "unused#124" },
- /* 125 */ { "unused#125" },
- /* 126 */ { "unused#126" },
- /* 127 */ { "unused#127" },
- /* 128 */ { "unused#128" },
- /* 129 */ { "unused#129" },
- /* 130 */ { "unused#130" },
- /* 131 */ { "unused#131" },
- /* 132 */ { "unused#132" },
- /* 133 */ { "unused#133" },
- /* 134 */ { "unused#134" },
- /* 135 */ { "unused#135" },
- /* 136 */ { "unused#136" },
- /* 137 */ { "unused#137" },
- /* 138 */ { "unused#138" },
- /* 139 */ { "unused#139" },
- /* 140 */ { "unused#140" },
- /* 141 */ { "unused#141" },
- /* 142 */ { "unused#142" },
- /* 143 */ { "unused#143" },
- /* 144 */ { "unused#144" },
- /* 145 */ { "unused#145" },
- /* 146 */ { "unused#146" },
- /* 147 */ { "unused#147" },
- /* 148 */ { "unused#148" },
- /* 149 */ { "unused#149" },
- /* 150 */ { "unused#150" },
- /* 151 */ { "unused#151" },
- /* 152 */ { "unused#152" },
- /* 153 */ { "unused#153" },
- /* 154 */ { "unused#154" },
- /* 155 */ { "unused#155" },
- /* 156 */ { "unused#156" },
- /* 157 */ { "unused#157" },
- /* 158 */ { "unused#158" },
- /* 159 */ { "unused#159" },
- /* 160 */ { "unused#160" },
- /* 161 */ { "unused#161" },
- /* 162 */ { "unused#162" },
- /* 163 */ { "unused#163" },
- /* 164 */ { "unused#164" },
- /* 165 */ { "unused#165" },
- /* 166 */ { "unused#166" },
- /* 167 */ { "unused#167" },
- /* 168 */ { "unused#168" },
- /* 169 */ { "unused#169" },
- /* 170 */ { "unused#170" },
- /* 171 */ { "unused#171" },
- /* 172 */ { "unused#172" },
- /* 173 */ { "unused#173" },
- /* 174 */ { "unused#174" },
- /* 175 */ { "unused#175" },
- /* 176 */ { "unused#176" },
- /* 177 */ { "unused#177" },
- /* 178 */ { "unused#178" },
- /* 179 */ { "unused#179" },
- /* 180 */ { "unused#180" },
- /* 181 */ { "unused#181" },
- /* 182 */ { "unused#182" },
- /* 183 */ { "unused#183" },
- /* 184 */ { "unused#184" },
- /* 185 */ { "unused#185" },
- /* 186 */ { "unused#186" },
- /* 187 */ { "unused#187" },
- /* 188 */ { "unused#188" },
- /* 189 */ { "unused#189" },
- /* 190 */ { "unused#190" },
- /* 191 */ { "unused#191" },
- /* 192 */ { "unused#192" },
- /* 193 */ { "unused#193" },
- /* 194 */ { "unused#194" },
- /* 195 */ { "unused#195" },
- /* 196 */ { "unused#196" },
- /* 197 */ { "unused#197" },
- /* 198 */ { "unused#198" },
- /* 199 */ { "unused#199" },
- /* 200 */ { "unused#200" },
- /* 201 */ { "unused#201" },
- /* 202 */ { "unused#202" },
- /* 203 */ { "unused#203" },
- /* 204 */ { "unused#204" },
- /* 205 */ { "unused#205" },
- /* 206 */ { "unused#206" },
- /* 207 */ { "unused#207" },
- /* 208 */ { "unused#208" },
- /* 209 */ { "unused#209" },
- /* 210 */ { "unused#210" },
- /* 211 */ { "unused#211" },
- /* 212 */ { "unused#212" },
- /* 213 */ { "unused#213" },
- /* 214 */ { "unused#214" },
- /* 215 */ { "unused#215" },
- /* 216 */ { "unused#216" },
- /* 217 */ { "unused#217" },
- /* 218 */ { "unused#218" },
- /* 219 */ { "unused#219" },
- /* 220 */ { "unused#220" },
- /* 221 */ { "unused#221" },
- /* 222 */ { "unused#222" },
- /* 223 */ { "unused#223" },
- /* 224 */ { "unused#224" },
- /* 225 */ { "unused#225" },
- /* 226 */ { "unused#226" },
- /* 227 */ { "unused#227" },
- /* 228 */ { "unused#228" },
- /* 229 */ { "unused#229" },
- /* 230 */ { "unused#230" },
- /* 231 */ { "unused#231" },
- /* 232 */ { "unused#232" },
- /* 233 */ { "unused#233" },
- /* 234 */ { "unused#234" },
- /* 235 */ { "unused#235" },
- /* 236 */ { "unused#236" },
- /* 237 */ { "unused#237" },
- /* 238 */ { "unused#238" },
- /* 239 */ { "unused#239" },
- /* 240 */ { "unused#240" },
- /* 241 */ { "unused#241" },
- /* 242 */ { "unused#242" },
- /* 243 */ { "unused#243" },
- /* 244 */ { "unused#244" },
- /* 245 */ { "unused#245" },
- /* 246 */ { "unused#246" },
- /* 247 */ { "unused#247" },
- /* 248 */ { "unused#248" },
- /* 249 */ { "unused#249" },
- /* 250 */ { "unused#250" },
- /* 251 */ { "unused#251" },
- /* 252 */ { "unused#252" },
- /* 253 */ { "unused#253" },
- /* 254 */ { "unused#254" },
- /* 255 */ { "unused#255" },
- /* 256 */ { "unused#256" },
- /* 257 */ { "unused#257" },
- /* 258 */ { "unused#258" },
- /* 259 */ { "unused#259" },
- /* 260 */ { "unused#260" },
- /* 261 */ { "unused#261" },
- /* 262 */ { "unused#262" },
- /* 263 */ { "unused#263" },
- /* 264 */ { "unused#264" },
- /* 265 */ { "unused#265" },
- /* 266 */ { "unused#266" },
- /* 267 */ { "unused#267" },
- /* 268 */ { "unused#268" },
- /* 269 */ { "unused#269" },
- /* 270 */ { "unused#270" },
- /* 271 */ { "unused#271" },
- /* 272 */ { "unused#272" },
- /* 273 */ { "unused#273" },
- /* 274 */ { "unused#274" },
- /* 275 */ { "unused#275" },
- /* 276 */ { "unused#276" },
- /* 277 */ { "unused#277" },
- /* 278 */ { "unused#278" },
- /* 279 */ { "unused#279" },
- /* 280 */ { "unused#280" },
- /* 281 */ { "unused#281" },
- /* 282 */ { "unused#282" },
- /* 283 */ { "unused#283" },
- /* 284 */ { "unused#284" },
- /* 285 */ { "unused#285" },
- /* 286 */ { "unused#286" },
- /* 287 */ { "unused#287" },
- /* 288 */ { "unused#288" },
- /* 289 */ { "unused#289" },
- /* 290 */ { "unused#290" },
- /* 291 */ { "unused#291" },
- /* 292 */ { "unused#292" },
- /* 293 */ { "unused#293" },
- /* 294 */ { "unused#294" },
- /* 295 */ { "unused#295" },
- /* 296 */ { "unused#296" },
- /* 297 */ { "unused#297" },
- /* 298 */ { "unused#298" },
- /* 299 */ { "unused#299" },
- /* 300 */ { "unused#300" },
- /* 301 */ { "unused#301" },
- /* 302 */ { "unused#302" },
- /* 303 */ { "unused#303" },
- /* 304 */ { "unused#304" },
- /* 305 */ { "unused#305" },
- /* 306 */ { "unused#306" },
- /* 307 */ { "unused#307" },
- /* 308 */ { "unused#308" },
- /* 309 */ { "unused#309" },
- /* 310 */ { "unused#310" },
- /* 311 */ { "unused#311" },
- /* 312 */ { "unused#312" },
- /* 313 */ { "unused#313" },
- /* 314 */ { "unused#314" },
- /* 315 */ { "unused#315" },
- /* 316 */ { "unused#316" },
- /* 317 */ { "unused#317" },
- /* 318 */ { "unused#318" },
- /* 319 */ { "unused#319" },
- /* 320 */ { "unused#320" },
- /* 321 */ { "unused#321" },
- /* 322 */ { "unused#322" },
- /* 323 */ { "unused#323" },
- /* 324 */ { "unused#324" },
- /* 325 */ { "unused#325" },
- /* 326 */ { "unused#326" },
- /* 327 */ { "unused#327" },
- /* 328 */ { "unused#328" },
- /* 329 */ { "unused#329" },
- /* 330 */ { "unused#330" },
- /* 331 */ { "unused#331" },
- /* 332 */ { "unused#332" },
- /* 333 */ { "unused#333" },
- /* 334 */ { "unused#334" },
- /* 335 */ { "unused#335" },
- /* 336 */ { "unused#336" },
- /* 337 */ { "unused#337" },
- /* 338 */ { "unused#338" },
- /* 339 */ { "unused#339" },
- /* 340 */ { "unused#340" },
- /* 341 */ { "unused#341" },
- /* 342 */ { "unused#342" },
- /* 343 */ { "unused#343" },
- /* 344 */ { "unused#344" },
- /* 345 */ { "unused#345" },
- /* 346 */ { "unused#346" },
- /* 347 */ { "unused#347" },
- /* 348 */ { "unused#348" },
- /* 349 */ { "unused#349" },
- /* 350 */ { "unused#350" },
- /* 351 */ { "unused#351" },
- /* 352 */ { "unused#352" },
- /* 353 */ { "unused#353" },
- /* 354 */ { "unused#354" },
- /* 355 */ { "unused#355" },
- /* 356 */ { "unused#356" },
- /* 357 */ { "unused#357" },
- /* 358 */ { "unused#358" },
- /* 359 */ { "unused#359" },
- /* 360 */ { "unused#360" },
- /* 361 */ { "unused#361" },
- /* 362 */ { "unused#362" },
- /* 363 */ { "unused#363" },
- /* 364 */ { "unused#364" },
- /* 365 */ { "unused#365" },
- /* 366 */ { "unused#366" },
- /* 367 */ { "unused#367" },
- /* 368 */ { "unused#368" },
- /* 369 */ { "unused#369" },
- /* 370 */ { "unused#370" },
- /* 371 */ { "unused#371" },
- /* 372 */ { "unused#372" },
- /* 373 */ { "unused#373" },
- /* 374 */ { "unused#374" },
- /* 375 */ { "unused#375" },
- /* 376 */ { "unused#376" },
- /* 377 */ { "unused#377" },
- /* 378 */ { "unused#378" },
- /* 379 */ { "unused#379" },
- /* 380 */ { "unused#380" },
- /* 381 */ { "unused#381" },
- /* 382 */ { "unused#382" },
- /* 383 */ { "unused#383" },
- /* 384 */ { "unused#384" },
- /* 385 */ { "unused#385" },
- /* 386 */ { "unused#386" },
- /* 387 */ { "unused#387" },
- /* 388 */ { "unused#388" },
- /* 389 */ { "unused#389" },
- /* 390 */ { "unused#390" },
- /* 391 */ { "unused#391" },
- /* 392 */ { "unused#392" },
- /* 393 */ { "unused#393" },
- /* 394 */ { "unused#394" },
- /* 395 */ { "unused#395" },
- /* 396 */ { "unused#396" },
- /* 397 */ { "unused#397" },
- /* 398 */ { "unused#398" },
- /* 399 */ { "unused#399" },
- /* 400 */ { "unused#400" },
- /* 401 */ { "unused#401" },
- /* 402 */ { "unused#402" },
- /* 403 */ { "unused#403" },
- /* 404 */ { "unused#404" },
- /* 405 */ { "unused#405" },
- /* 406 */ { "unused#406" },
- /* 407 */ { "unused#407" },
- /* 408 */ { "unused#408" },
- /* 409 */ { "unused#409" },
- /* 410 */ { "unused#410" },
- /* 411 */ { "unused#411" },
- /* 412 */ { "unused#412" },
- /* 413 */ { "unused#413" },
- /* 414 */ { "unused#414" },
- /* 415 */ { "unused#415" },
- /* 416 */ { "unused#416" },
- /* 417 */ { "unused#417" },
- /* 418 */ { "unused#418" },
- /* 419 */ { "unused#419" },
- /* 420 */ { "unused#420" },
- /* 421 */ { "unused#421" },
- /* 422 */ { "unused#422" },
- /* 423 */ { "unused#423" },
- /* 424 */ { "unused#424" },
- /* 425 */ { "unused#425" },
- /* 426 */ { "unused#426" },
- /* 427 */ { "unused#427" },
- /* 428 */ { "unused#428" },
- /* 429 */ { "unused#429" },
- /* 430 */ { "unused#430" },
- /* 431 */ { "unused#431" },
- /* 432 */ { "unused#432" },
- /* 433 */ { "unused#433" },
- /* 434 */ { "unused#434" },
- /* 435 */ { "unused#435" },
- /* 436 */ { "unused#436" },
- /* 437 */ { "unused#437" },
- /* 438 */ { "unused#438" },
- /* 439 */ { "unused#439" },
- /* 440 */ { "unused#440" },
- /* 441 */ { "unused#441" },
- /* 442 */ { "unused#442" },
- /* 443 */ { "unused#443" },
- /* 444 */ { "unused#444" },
- /* 445 */ { "unused#445" },
- /* 446 */ { "unused#446" },
- /* 447 */ { "unused#447" },
- /* 448 */ { "unused#448" },
- /* 449 */ { "unused#449" },
- /* 450 */ { "unused#450" },
- /* 451 */ { "unused#451" },
- /* 452 */ { "unused#452" },
- /* 453 */ { "unused#453" },
- /* 454 */ { "unused#454" },
- /* 455 */ { "unused#455" },
- /* 456 */ { "unused#456" },
- /* 457 */ { "unused#457" },
- /* 458 */ { "unused#458" },
- /* 459 */ { "unused#459" },
- /* 460 */ { "unused#460" },
- /* 461 */ { "unused#461" },
- /* 462 */ { "unused#462" },
- /* 463 */ { "unused#463" },
- /* 464 */ { "unused#464" },
- /* 465 */ { "unused#465" },
- /* 466 */ { "unused#466" },
- /* 467 */ { "unused#467" },
- /* 468 */ { "unused#468" },
- /* 469 */ { "unused#469" },
- /* 470 */ { "unused#470" },
- /* 471 */ { "unused#471" },
- /* 472 */ { "unused#472" },
- /* 473 */ { "unused#473" },
- /* 474 */ { "unused#474" },
- /* 475 */ { "unused#475" },
- /* 476 */ { "unused#476" },
- /* 477 */ { "unused#477" },
- /* 478 */ { "unused#478" },
- /* 479 */ { "unused#479" },
- /* 480 */ { "unused#480" },
- /* 481 */ { "unused#481" },
- /* 482 */ { "unused#482" },
- /* 483 */ { "unused#483" },
- /* 484 */ { "unused#484" },
- /* 485 */ { "unused#485" },
- /* 486 */ { "unused#486" },
- /* 487 */ { "unused#487" },
- /* 488 */ { "unused#488" },
- /* 489 */ { "unused#489" },
- /* 490 */ { "unused#490" },
- /* 491 */ { "unused#491" },
- /* 492 */ { "unused#492" },
- /* 493 */ { "unused#493" },
- /* 494 */ { "unused#494" },
- /* 495 */ { "unused#495" },
- /* 496 */ { "unused#496" },
- /* 497 */ { "unused#497" },
- /* 498 */ { "unused#498" },
- /* 499 */ { "unused#499" },
- /* 500 */ { "unused#500" },
- /* 501 */ { "unused#501" },
- /* 502 */ { "unused#502" },
- /* 503 */ { "unused#503" },
- /* 504 */ { "unused#504" },
- /* 505 */ { "unused#505" },
- /* 506 */ { "unused#506" },
- /* 507 */ { "unused#507" },
- /* 508 */ { "unused#508" },
- /* 509 */ { "unused#509" },
- /* 510 */ { "unused#510" },
- /* 511 */ { "unused#511" },
- /* 512 */ { "unused#512" },
- /* 513 */ { "unused#513" },
- /* 514 */ { "unused#514" },
- /* 515 */ { "unused#515" },
- /* 516 */ { "unused#516" },
- /* 517 */ { "unused#517" },
- /* 518 */ { "unused#518" },
- /* 519 */ { "unused#519" },
- /* 520 */ { "unused#520" },
- /* 521 */ { "unused#521" },
- /* 522 */ { "unused#522" },
- /* 523 */ { "unused#523" },
- /* 524 */ { "unused#524" },
- /* 525 */ { "unused#525" },
- /* 526 */ { "unused#526" },
- /* 527 */ { "unused#527" },
- /* 528 */ { "unused#528" },
- /* 529 */ { "unused#529" },
- /* 530 */ { "unused#530" },
- /* 531 */ { "unused#531" },
- /* 532 */ { "unused#532" },
- /* 533 */ { "unused#533" },
- /* 534 */ { "unused#534" },
- /* 535 */ { "unused#535" },
- /* 536 */ { "unused#536" },
- /* 537 */ { "unused#537" },
- /* 538 */ { "unused#538" },
- /* 539 */ { "unused#539" },
- /* 540 */ { "unused#540" },
- /* 541 */ { "unused#541" },
- /* 542 */ { "unused#542" },
- /* 543 */ { "unused#543" },
- /* 544 */ { "unused#544" },
- /* 545 */ { "unused#545" },
- /* 546 */ { "unused#546" },
- /* 547 */ { "unused#547" },
-};
-
-static SyscallDescABI<ArmFreebsdProcess64::SyscallABI> syscallDescs64[] = {
- /* 0 */ { "unused#000" },
- /* 1 */ { "exit", exitFunc },
- /* 2 */ { "unused#002" },
- /* 3 */ { "read", readFunc<ArmFreebsd64> },
- /* 4 */ { "write", writeFunc<ArmFreebsd64> },
- /* 5 */ { "unused#005" },
- /* 6 */ { "unused#006" },
- /* 7 */ { "unused#007" },
- /* 8 */ { "unused#008" },
- /* 9 */ { "unused#009" },
- /* 10 */ { "unused#010" },
- /* 11 */ { "unused#011" },
- /* 12 */ { "unused#012" },
- /* 13 */ { "unused#013" },
- /* 14 */ { "unused#014" },
- /* 15 */ { "unused#015" },
- /* 16 */ { "unused#016" },
- /* 17 */ { "obreak", brkFunc },
- /* 18 */ { "unused#018" },
- /* 19 */ { "unused#019" },
- /* 20 */ { "unused#020" },
- /* 21 */ { "unused#021" },
- /* 22 */ { "unused#022" },
- /* 23 */ { "unused#023" },
- /* 24 */ { "unused#024" },
- /* 25 */ { "unused#025" },
- /* 26 */ { "unused#026" },
- /* 27 */ { "unused#027" },
- /* 28 */ { "unused#028" },
- /* 29 */ { "unused#029" },
- /* 30 */ { "unused#030" },
- /* 31 */ { "unused#031" },
- /* 32 */ { "unused#032" },
- /* 33 */ { "unused#033" },
- /* 34 */ { "unused#034" },
- /* 35 */ { "unused#035" },
- /* 36 */ { "unused#036" },
- /* 37 */ { "unused#037" },
- /* 38 */ { "unused#038" },
- /* 39 */ { "unused#039" },
- /* 40 */ { "unused#040" },
- /* 41 */ { "unused#041" },
- /* 42 */ { "unused#042" },
- /* 43 */ { "unused#043" },
- /* 44 */ { "unused#044" },
- /* 45 */ { "unused#045" },
- /* 46 */ { "unused#046" },
- /* 47 */ { "unused#047" },
- /* 48 */ { "unused#048" },
- /* 49 */ { "unused#049" },
- /* 50 */ { "unused#050" },
- /* 51 */ { "unused#051" },
- /* 52 */ { "unused#052" },
- /* 53 */ { "unused#053" },
- /* 54 */ { "ioctl", ioctlFunc<ArmFreebsd64> },
- /* 55 */ { "unused#055" },
- /* 56 */ { "unused#056" },
- /* 57 */ { "unused#057" },
- /* 58 */ { "readlink", readlinkFunc },
- /* 59 */ { "unused#059" },
- /* 60 */ { "unused#060" },
- /* 61 */ { "unused#061" },
- /* 62 */ { "unused#062" },
- /* 63 */ { "unused#063" },
- /* 64 */ { "unused#064" },
- /* 65 */ { "unused#065" },
- /* 66 */ { "unused#066" },
- /* 67 */ { "unused#067" },
- /* 68 */ { "unused#068" },
- /* 69 */ { "unused#069" },
- /* 70 */ { "unused#070" },
- /* 71 */ { "unused#071" },
- /* 72 */ { "unused#072" },
- /* 73 */ { "unused#073" },
- /* 74 */ { "unused#074" },
- /* 75 */ { "unused#075" },
- /* 76 */ { "unused#076" },
- /* 77 */ { "unused#077" },
- /* 78 */ { "unused#078" },
- /* 79 */ { "unused#079" },
- /* 80 */ { "unused#080" },
- /* 81 */ { "unused#081" },
- /* 82 */ { "unused#082" },
- /* 83 */ { "unused#083" },
- /* 84 */ { "unused#084" },
- /* 85 */ { "unused#085" },
- /* 86 */ { "unused#086" },
- /* 87 */ { "unused#087" },
- /* 88 */ { "unused#088" },
- /* 89 */ { "unused#089" },
- /* 90 */ { "unused#090" },
- /* 91 */ { "unused#091" },
- /* 92 */ { "unused#092" },
- /* 93 */ { "unused#093" },
- /* 94 */ { "unused#094" },
- /* 95 */ { "unused#095" },
- /* 96 */ { "unused#096" },
- /* 97 */ { "unused#097" },
- /* 98 */ { "unused#098" },
- /* 99 */ { "unused#099" },
- /* 100 */ { "unused#100" },
- /* 101 */ { "unused#101" },
- /* 102 */ { "unused#102" },
- /* 103 */ { "unused#103" },
- /* 104 */ { "unused#104" },
- /* 105 */ { "unused#105" },
- /* 106 */ { "unused#106" },
- /* 107 */ { "unused#107" },
- /* 108 */ { "unused#108" },
- /* 109 */ { "unused#109" },
- /* 110 */ { "unused#110" },
- /* 111 */ { "unused#111" },
- /* 112 */ { "unused#112" },
- /* 113 */ { "unused#113" },
- /* 114 */ { "unused#114" },
- /* 115 */ { "unused#115" },
- /* 116 */ { "unused#116" },
- /* 117 */ { "getrusage", getrusageFunc<ArmFreebsd64> },
- /* 118 */ { "unused#118" },
- /* 119 */ { "unused#119" },
- /* 120 */ { "unused#120" },
- /* 121 */ { "unused#121" },
- /* 122 */ { "unused#122" },
- /* 123 */ { "unused#123" },
- /* 124 */ { "unused#124" },
- /* 125 */ { "unused#125" },
- /* 126 */ { "unused#126" },
- /* 127 */ { "unused#127" },
- /* 128 */ { "unused#128" },
- /* 129 */ { "unused#129" },
- /* 130 */ { "unused#130" },
- /* 131 */ { "unused#131" },
- /* 132 */ { "unused#132" },
- /* 133 */ { "unused#133" },
- /* 134 */ { "unused#134" },
- /* 135 */ { "unused#135" },
- /* 136 */ { "unused#136" },
- /* 137 */ { "unused#137" },
- /* 138 */ { "unused#138" },
- /* 139 */ { "unused#139" },
- /* 140 */ { "unused#140" },
- /* 141 */ { "unused#141" },
- /* 142 */ { "unused#142" },
- /* 143 */ { "unused#143" },
- /* 144 */ { "unused#144" },
- /* 145 */ { "unused#145" },
- /* 146 */ { "unused#146" },
- /* 147 */ { "unused#147" },
- /* 148 */ { "unused#148" },
- /* 149 */ { "unused#149" },
- /* 150 */ { "unused#150" },
- /* 151 */ { "unused#151" },
- /* 152 */ { "unused#152" },
- /* 153 */ { "unused#153" },
- /* 154 */ { "unused#154" },
- /* 155 */ { "unused#155" },
- /* 156 */ { "unused#156" },
- /* 157 */ { "unused#157" },
- /* 158 */ { "unused#158" },
- /* 159 */ { "unused#159" },
- /* 160 */ { "unused#160" },
- /* 161 */ { "unused#161" },
- /* 162 */ { "unused#162" },
- /* 163 */ { "unused#163" },
- /* 164 */ { "unused#164" },
- /* 165 */ { "unused#165" },
- /* 166 */ { "unused#166" },
- /* 167 */ { "unused#167" },
- /* 168 */ { "unused#168" },
- /* 169 */ { "unused#169" },
- /* 170 */ { "unused#170" },
- /* 171 */ { "unused#171" },
- /* 172 */ { "unused#172" },
- /* 173 */ { "unused#173" },
- /* 174 */ { "unused#174" },
- /* 175 */ { "unused#175" },
- /* 176 */ { "unused#176" },
- /* 177 */ { "unused#177" },
- /* 178 */ { "unused#178" },
- /* 179 */ { "unused#179" },
- /* 180 */ { "unused#180" },
- /* 181 */ { "unused#181" },
- /* 182 */ { "unused#182" },
- /* 183 */ { "unused#183" },
- /* 184 */ { "unused#184" },
- /* 185 */ { "unused#185" },
- /* 186 */ { "unused#186" },
- /* 187 */ { "unused#187" },
- /* 188 */ { "unused#188" },
- /* 189 */ { "fstat", fstatFunc<ArmFreebsd64> },
- /* 190 */ { "unused#190" },
- /* 191 */ { "unused#191" },
- /* 192 */ { "unused#192" },
- /* 193 */ { "unused#193" },
- /* 194 */ { "unused#194" },
- /* 195 */ { "unused#195" },
- /* 196 */ { "unused#196" },
- /* 197 */ { "unused#197" },
- /* 198 */ { "unused#198" },
- /* 199 */ { "unused#199" },
- /* 200 */ { "unused#200" },
- /* 201 */ { "unused#201" },
+static SyscallDescTable<ArmFreebsdProcess32::SyscallABI> syscallDescs32({});
+
+static SyscallDescTable<ArmFreebsdProcess64::SyscallABI> syscallDescs64 = {
+ { 1, "exit", exitFunc },
+ { 3, "read", readFunc<ArmFreebsd64> },
+ { 4, "write", writeFunc<ArmFreebsd64> },
+ { 17, "obreak", brkFunc },
+ { 54, "ioctl", ioctlFunc<ArmFreebsd64> },
+ { 58, "readlink", readlinkFunc },
+ { 117, "getrusage", getrusageFunc<ArmFreebsd64> },
+ { 189, "fstat", fstatFunc<ArmFreebsd64> },
#if !defined ( __GNU_LIBRARY__ )
- /* 202 */ { "sysctl", sysctlFunc },
+ { 202, "sysctl", sysctlFunc },
#else
- /* 202 */ { "sysctl" },
+ { 202, "sysctl" },
#endif
- /* 203 */ { "unused#203" },
- /* 204 */ { "unused#204" },
- /* 205 */ { "unused#205" },
- /* 206 */ { "unused#206" },
- /* 207 */ { "unused#207" },
- /* 208 */ { "unused#208" },
- /* 209 */ { "unused#209" },
- /* 210 */ { "unused#210" },
- /* 211 */ { "unused#211" },
- /* 212 */ { "unused#212" },
- /* 213 */ { "unused#213" },
- /* 214 */ { "unused#214" },
- /* 215 */ { "unused#215" },
- /* 216 */ { "unused#216" },
- /* 217 */ { "unused#217" },
- /* 218 */ { "unused#218" },
- /* 219 */ { "unused#219" },
- /* 220 */ { "unused#220" },
- /* 221 */ { "unused#221" },
- /* 222 */ { "unused#222" },
- /* 223 */ { "unused#223" },
- /* 224 */ { "unused#224" },
- /* 225 */ { "unused#225" },
- /* 226 */ { "unused#226" },
- /* 227 */ { "unused#227" },
- /* 228 */ { "unused#228" },
- /* 229 */ { "unused#229" },
- /* 230 */ { "unused#230" },
- /* 231 */ { "unused#231" },
- /* 232 */ { "unused#232" },
- /* 233 */ { "unused#233" },
- /* 234 */ { "unused#234" },
- /* 235 */ { "unused#235" },
- /* 236 */ { "unused#236" },
- /* 237 */ { "unused#237" },
- /* 238 */ { "unused#238" },
- /* 239 */ { "unused#239" },
- /* 240 */ { "unused#240" },
- /* 241 */ { "unused#241" },
- /* 242 */ { "unused#242" },
- /* 243 */ { "unused#243" },
- /* 244 */ { "unused#244" },
- /* 245 */ { "unused#245" },
- /* 246 */ { "unused#246" },
- /* 247 */ { "unused#247" },
- /* 248 */ { "unused#248" },
- /* 249 */ { "unused#249" },
- /* 250 */ { "unused#250" },
- /* 251 */ { "unused#251" },
- /* 252 */ { "unused#252" },
- /* 253 */ { "issetugid", issetugidFunc },
- /* 254 */ { "unused#254" },
- /* 255 */ { "unused#255" },
- /* 256 */ { "unused#256" },
- /* 257 */ { "unused#257" },
- /* 258 */ { "unused#258" },
- /* 259 */ { "unused#259" },
- /* 260 */ { "unused#260" },
- /* 261 */ { "unused#261" },
- /* 262 */ { "unused#262" },
- /* 263 */ { "unused#263" },
- /* 264 */ { "unused#264" },
- /* 265 */ { "unused#265" },
- /* 266 */ { "unused#266" },
- /* 267 */ { "unused#267" },
- /* 268 */ { "unused#268" },
- /* 269 */ { "unused#269" },
- /* 270 */ { "unused#270" },
- /* 271 */ { "unused#271" },
- /* 272 */ { "unused#272" },
- /* 273 */ { "unused#273" },
- /* 274 */ { "unused#274" },
- /* 275 */ { "unused#275" },
- /* 276 */ { "unused#276" },
- /* 277 */ { "unused#277" },
- /* 278 */ { "unused#278" },
- /* 279 */ { "unused#279" },
- /* 280 */ { "unused#280" },
- /* 281 */ { "unused#281" },
- /* 282 */ { "unused#282" },
- /* 283 */ { "unused#283" },
- /* 284 */ { "unused#284" },
- /* 285 */ { "unused#285" },
- /* 286 */ { "unused#286" },
- /* 287 */ { "unused#287" },
- /* 288 */ { "unused#288" },
- /* 289 */ { "unused#289" },
- /* 290 */ { "unused#290" },
- /* 291 */ { "unused#291" },
- /* 292 */ { "unused#292" },
- /* 293 */ { "unused#293" },
- /* 294 */ { "unused#294" },
- /* 295 */ { "unused#295" },
- /* 296 */ { "unused#296" },
- /* 297 */ { "unused#297" },
- /* 298 */ { "unused#298" },
- /* 299 */ { "unused#299" },
- /* 300 */ { "unused#300" },
- /* 301 */ { "unused#301" },
- /* 302 */ { "unused#302" },
- /* 303 */ { "unused#303" },
- /* 304 */ { "unused#304" },
- /* 305 */ { "unused#305" },
- /* 306 */ { "unused#306" },
- /* 307 */ { "unused#307" },
- /* 308 */ { "unused#308" },
- /* 309 */ { "unused#309" },
- /* 310 */ { "unused#310" },
- /* 311 */ { "unused#311" },
- /* 312 */ { "unused#312" },
- /* 313 */ { "unused#313" },
- /* 314 */ { "unused#314" },
- /* 315 */ { "unused#315" },
- /* 316 */ { "unused#316" },
- /* 317 */ { "unused#317" },
- /* 318 */ { "unused#318" },
- /* 319 */ { "unused#319" },
- /* 320 */ { "unused#320" },
- /* 321 */ { "unused#321" },
- /* 322 */ { "unused#322" },
- /* 323 */ { "unused#323" },
- /* 324 */ { "unused#324" },
- /* 325 */ { "unused#325" },
- /* 326 */ { "unused#326" },
- /* 327 */ { "unused#327" },
- /* 328 */ { "unused#328" },
- /* 329 */ { "unused#329" },
- /* 330 */ { "unused#330" },
- /* 331 */ { "unused#331" },
- /* 332 */ { "unused#332" },
- /* 333 */ { "unused#333" },
- /* 334 */ { "unused#334" },
- /* 335 */ { "unused#335" },
- /* 336 */ { "unused#336" },
- /* 337 */ { "unused#337" },
- /* 338 */ { "unused#338" },
- /* 339 */ { "unused#339" },
- /* 340 */ { "unused#340" },
- /* 341 */ { "unused#341" },
- /* 342 */ { "unused#342" },
- /* 343 */ { "unused#343" },
- /* 344 */ { "unused#344" },
- /* 345 */ { "unused#345" },
- /* 346 */ { "unused#346" },
- /* 347 */ { "unused#347" },
- /* 348 */ { "unused#348" },
- /* 349 */ { "unused#349" },
- /* 350 */ { "unused#350" },
- /* 351 */ { "unused#351" },
- /* 352 */ { "unused#352" },
- /* 353 */ { "unused#353" },
- /* 354 */ { "unused#354" },
- /* 355 */ { "unused#355" },
- /* 356 */ { "unused#356" },
- /* 357 */ { "unused#357" },
- /* 358 */ { "unused#358" },
- /* 359 */ { "unused#359" },
- /* 360 */ { "unused#360" },
- /* 361 */ { "unused#361" },
- /* 362 */ { "unused#362" },
- /* 363 */ { "unused#363" },
- /* 364 */ { "unused#364" },
- /* 365 */ { "unused#365" },
- /* 366 */ { "unused#366" },
- /* 367 */ { "unused#367" },
- /* 368 */ { "unused#368" },
- /* 369 */ { "unused#369" },
- /* 370 */ { "unused#370" },
- /* 371 */ { "unused#371" },
- /* 372 */ { "unused#372" },
- /* 373 */ { "unused#373" },
- /* 374 */ { "unused#374" },
- /* 375 */ { "unused#375" },
- /* 376 */ { "unused#376" },
- /* 377 */ { "unused#377" },
- /* 378 */ { "unused#378" },
- /* 379 */ { "unused#379" },
- /* 380 */ { "unused#380" },
- /* 381 */ { "unused#381" },
- /* 382 */ { "unused#382" },
- /* 383 */ { "unused#383" },
- /* 384 */ { "unused#384" },
- /* 385 */ { "unused#385" },
- /* 386 */ { "unused#386" },
- /* 387 */ { "unused#387" },
- /* 388 */ { "unused#388" },
- /* 389 */ { "unused#389" },
- /* 390 */ { "unused#390" },
- /* 391 */ { "unused#391" },
- /* 392 */ { "unused#392" },
- /* 393 */ { "unused#393" },
- /* 394 */ { "unused#394" },
- /* 395 */ { "unused#395" },
- /* 396 */ { "unused#396" },
- /* 397 */ { "unused#397" },
- /* 398 */ { "unused#398" },
- /* 399 */ { "unused#399" },
- /* 400 */ { "unused#400" },
- /* 401 */ { "unused#401" },
- /* 402 */ { "unused#402" },
- /* 403 */ { "unused#403" },
- /* 404 */ { "unused#404" },
- /* 405 */ { "unused#405" },
- /* 406 */ { "unused#406" },
- /* 407 */ { "unused#407" },
- /* 408 */ { "unused#408" },
- /* 409 */ { "unused#409" },
- /* 410 */ { "unused#410" },
- /* 411 */ { "unused#411" },
- /* 412 */ { "unused#412" },
- /* 413 */ { "unused#413" },
- /* 414 */ { "unused#414" },
- /* 415 */ { "unused#415" },
- /* 416 */ { "unused#416" },
- /* 417 */ { "unused#417" },
- /* 418 */ { "unused#418" },
- /* 419 */ { "unused#419" },
- /* 420 */ { "unused#420" },
- /* 421 */ { "unused#421" },
- /* 422 */ { "unused#422" },
- /* 423 */ { "unused#423" },
- /* 424 */ { "unused#424" },
- /* 425 */ { "unused#425" },
- /* 426 */ { "unused#426" },
- /* 427 */ { "unused#427" },
- /* 428 */ { "unused#428" },
- /* 429 */ { "unused#429" },
- /* 430 */ { "unused#430" },
- /* 431 */ { "unused#431" },
- /* 432 */ { "unused#432" },
- /* 433 */ { "unused#433" },
- /* 434 */ { "unused#434" },
- /* 435 */ { "unused#435" },
- /* 436 */ { "unused#436" },
- /* 437 */ { "unused#437" },
- /* 438 */ { "unused#438" },
- /* 439 */ { "unused#439" },
- /* 440 */ { "unused#440" },
- /* 441 */ { "unused#441" },
- /* 442 */ { "unused#442" },
- /* 443 */ { "unused#443" },
- /* 444 */ { "unused#444" },
- /* 445 */ { "unused#445" },
- /* 446 */ { "unused#446" },
- /* 447 */ { "unused#447" },
- /* 448 */ { "unused#448" },
- /* 449 */ { "unused#449" },
- /* 450 */ { "unused#450" },
- /* 451 */ { "unused#451" },
- /* 452 */ { "unused#452" },
- /* 453 */ { "unused#453" },
- /* 454 */ { "unused#454" },
- /* 455 */ { "unused#455" },
- /* 456 */ { "unused#456" },
- /* 457 */ { "unused#457" },
- /* 458 */ { "unused#458" },
- /* 459 */ { "unused#459" },
- /* 460 */ { "unused#460" },
- /* 461 */ { "unused#461" },
- /* 462 */ { "unused#462" },
- /* 463 */ { "unused#463" },
- /* 464 */ { "unused#464" },
- /* 465 */ { "unused#465" },
- /* 466 */ { "unused#466" },
- /* 467 */ { "unused#467" },
- /* 468 */ { "unused#468" },
- /* 469 */ { "unused#469" },
- /* 470 */ { "unused#470" },
- /* 471 */ { "unused#471" },
- /* 472 */ { "unused#472" },
- /* 473 */ { "unused#473" },
- /* 474 */ { "unused#474" },
- /* 475 */ { "unused#475" },
- /* 476 */ { "unused#476" },
- /* 477 */ { "mmap", mmapFunc<ArmFreebsd64> },
- /* 478 */ { "unused#478" },
- /* 479 */ { "unused#479" },
- /* 480 */ { "unused#480" },
- /* 481 */ { "unused#481" },
- /* 482 */ { "unused#482" },
- /* 483 */ { "unused#483" },
- /* 484 */ { "unused#484" },
- /* 485 */ { "unused#485" },
- /* 486 */ { "unused#486" },
- /* 487 */ { "unused#487" },
- /* 488 */ { "unused#488" },
- /* 489 */ { "unused#489" },
- /* 490 */ { "unused#490" },
- /* 491 */ { "unused#491" },
- /* 492 */ { "unused#492" },
- /* 493 */ { "unused#493" },
- /* 494 */ { "unused#494" },
- /* 495 */ { "unused#495" },
- /* 496 */ { "unused#496" },
- /* 497 */ { "unused#497" },
- /* 498 */ { "unused#498" },
- /* 499 */ { "unused#499" },
- /* 500 */ { "unused#500" },
- /* 501 */ { "unused#501" },
- /* 502 */ { "unused#502" },
- /* 503 */ { "unused#503" },
- /* 504 */ { "unused#504" },
- /* 505 */ { "unused#505" },
- /* 506 */ { "unused#506" },
- /* 507 */ { "unused#507" },
- /* 508 */ { "unused#508" },
- /* 509 */ { "unused#509" },
- /* 510 */ { "unused#510" },
- /* 511 */ { "unused#511" },
- /* 512 */ { "unused#512" },
- /* 513 */ { "unused#513" },
- /* 514 */ { "unused#514" },
- /* 515 */ { "unused#515" },
- /* 516 */ { "unused#516" },
- /* 517 */ { "unused#517" },
- /* 518 */ { "unused#518" },
- /* 519 */ { "unused#519" },
- /* 520 */ { "unused#520" },
- /* 521 */ { "unused#521" },
- /* 522 */ { "unused#522" },
- /* 523 */ { "unused#523" },
- /* 524 */ { "unused#524" },
- /* 525 */ { "unused#525" },
- /* 526 */ { "unused#526" },
- /* 527 */ { "unused#527" },
- /* 528 */ { "unused#528" },
- /* 529 */ { "unused#529" },
- /* 530 */ { "unused#530" },
- /* 531 */ { "unused#531" },
- /* 532 */ { "unused#532" },
- /* 533 */ { "unused#533" },
- /* 534 */ { "unused#534" },
- /* 535 */ { "unused#535" },
- /* 536 */ { "unused#536" },
- /* 537 */ { "unused#537" },
- /* 538 */ { "unused#538" },
- /* 539 */ { "unused#539" },
- /* 540 */ { "unused#540" },
- /* 541 */ { "unused#541" },
- /* 542 */ { "unused#542" },
- /* 543 */ { "unused#543" },
- /* 544 */ { "unused#544" },
- /* 545 */ { "unused#545" },
- /* 546 */ { "unused#546" },
- /* 547 */ { "unused#547" },
+ { 253, "issetugid", issetugidFunc },
+ { 477, "mmap", mmapFunc<ArmFreebsd64> }
};
ArmFreebsdProcess32::ArmFreebsdProcess32(ProcessParams * params,
- ObjectFile *objFile, ObjectFile::Arch _arch)
- : ArmProcess32(params, objFile, _arch)
-{
- SyscallTable table;
-
- table.descs = syscallDescs32;
- table.size = sizeof(syscallDescs32) / sizeof(SyscallDesc);
- table.base = 0;
- syscallTables.push_back(table);
-}
+ ObjectFile *objFile, ObjectFile::Arch _arch) :
+ ArmProcess32(params, objFile, _arch)
+{}
ArmFreebsdProcess64::ArmFreebsdProcess64(ProcessParams * params,
- ObjectFile *objFile, ObjectFile::Arch _arch)
- : ArmProcess64(params, objFile, _arch)
-{
- SyscallTable table;
-
- table.descs = syscallDescs64;
- table.size = sizeof(syscallDescs64) / sizeof(SyscallDesc);
- table.base = 0;
- syscallTables.push_back(table);
-}
-
-SyscallDesc*
-ArmFreebsdProcessBits::getFreebsdDesc(int callnum)
-{
-
- for (unsigned i = 0; i < syscallTables.size(); i++) {
- SyscallDesc *desc = syscallTables[i].getDesc(callnum);
- if (desc)
- return desc;
- }
- return NULL;
-}
-
-SyscallDesc *
-ArmFreebsdProcessBits::SyscallTable::getDesc(int callnum) const
-{
-
- int offset = callnum - base;
- if (offset < 0 || offset >= size)
- return NULL;
- return &descs[offset];
-}
+ ObjectFile *objFile, ObjectFile::Arch _arch) :
+ ArmProcess64(params, objFile, _arch)
+{}
SyscallDesc*
ArmFreebsdProcess32::getDesc(int callnum)
{
-
- return getFreebsdDesc(callnum);
+ return syscallDescs32.get(callnum);
}
SyscallDesc*
ArmFreebsdProcess64::getDesc(int callnum)
{
-
- return getFreebsdDesc(callnum);
+ return syscallDescs64.get(callnum);
}
void
class ArmFreebsdProcessBits
{
protected:
- SyscallDesc* getFreebsdDesc(int callnum);
-
- struct SyscallTable
- {
- int base;
- SyscallDesc *descs;
- int size;
-
- SyscallDesc *getDesc(int offset) const;
- };
-
- std::vector<SyscallTable> syscallTables;
-
struct SyscallABI {};
};
return 0;
}
-static SyscallDescABI<ArmLinuxProcess32::SyscallABI> syscallDescs32[] = {
- /* 0 */ { "syscall" },
- /* 1 */ { "exit", exitFunc },
- /* 2 */ { "fork" },
- /* 3 */ { "read", readFunc<ArmLinux32> },
- /* 4 */ { "write", writeFunc<ArmLinux32> },
- /* 5 */ { "open", openFunc<ArmLinux32> },
- /* 6 */ { "close", closeFunc },
- /* 7 */ { "unused#7" },
- /* 8 */ { "creat" },
- /* 9 */ { "link" },
- /* 10 */ { "unlink", unlinkFunc },
- /* 11 */ { "execve", execveFunc<ArmLinux32> },
- /* 12 */ { "chdir" },
- /* 13 */ { "time", timeFunc<ArmLinux32> },
- /* 14 */ { "mknod" },
- /* 15 */ { "chmod", chmodFunc<ArmLinux32> },
- /* 16 */ { "lchown", chownFunc },
- /* 17 */ { "unused#17" },
- /* 18 */ { "unused#18" },
- /* 19 */ { "lseek", lseekFunc },
- /* 20 */ { "getpid", getpidFunc },
- /* 21 */ { "mount" },
- /* 22 */ { "umount" },
- /* 23 */ { "setuid", ignoreFunc },
- /* 24 */ { "getuid", getuidFunc },
- /* 25 */ { "stime" },
- /* 26 */ { "ptrace" },
- /* 27 */ { "alarm" },
- /* 28 */ { "unused#28" },
- /* 29 */ { "pause" },
- /* 30 */ { "utime" },
- /* 31 */ { "unused#31" },
- /* 32 */ { "unused#32" },
- /* 33 */ { "access", accessFunc },
- /* 34 */ { "nice" },
- /* 35 */ { "unused#35" },
- /* 36 */ { "sync" },
- /* 37 */ { "kill", ignoreFunc },
- /* 38 */ { "rename", renameFunc },
- /* 39 */ { "mkdir", mkdirFunc },
- /* 40 */ { "rmdir" },
- /* 41 */ { "dup", dupFunc },
- /* 42 */ { "pipe", pipePseudoFunc },
- /* 43 */ { "times", timesFunc<ArmLinux32> },
- /* 44 */ { "unused#44" },
- /* 45 */ { "brk", brkFunc },
- /* 46 */ { "setgid" },
- /* 47 */ { "getgid", getgidFunc },
- /* 48 */ { "unused#48" },
- /* 49 */ { "geteuid", geteuidFunc },
- /* 50 */ { "getegid", getegidFunc },
- /* 51 */ { "acct" },
- /* 52 */ { "umount2" },
- /* 53 */ { "unused#53" },
- /* 54 */ { "ioctl", ioctlFunc<ArmLinux32> },
- /* 55 */ { "fcntl", fcntlFunc },
- /* 56 */ { "unused#56" },
- /* 57 */ { "setpgid" },
- /* 58 */ { "unused#58" },
- /* 59 */ { "unused#59" },
- /* 60 */ { "umask", umaskFunc },
- /* 61 */ { "chroot" },
- /* 62 */ { "ustat" },
- /* 63 */ { "dup2" },
- /* 64 */ { "getppid", getppidFunc },
- /* 65 */ { "getpgrp" },
- /* 66 */ { "setsid" },
- /* 67 */ { "sigaction" },
- /* 68 */ { "unused#68" },
- /* 69 */ { "unused#69" },
- /* 70 */ { "setreuid" },
- /* 71 */ { "setregid" },
- /* 72 */ { "sigsuspend" },
- /* 73 */ { "sigpending" },
- /* 74 */ { "sethostname", ignoreFunc },
- /* 75 */ { "setrlimit", ignoreFunc },
- /* 76 */ { "getrlimit", getrlimitFunc<ArmLinux32> },
- /* 77 */ { "getrusage", getrusageFunc<ArmLinux32> },
- /* 78 */ { "gettimeofday", gettimeofdayFunc<ArmLinux32> },
- /* 79 */ { "settimeofday" },
- /* 80 */ { "getgroups" },
- /* 81 */ { "setgroups" },
- /* 82 */ { "reserved#82" },
- /* 83 */ { "symlink" },
- /* 84 */ { "unused#84" },
- /* 85 */ { "readlink", readlinkFunc },
- /* 86 */ { "uselib" },
- /* 87 */ { "swapon" },
- /* 88 */ { "reboot" },
- /* 89 */ { "readdir" },
- /* 90 */ { "mmap", mmapFunc<ArmLinux32> },
- /* 91 */ { "munmap", munmapFunc },
- /* 92 */ { "truncate", truncateFunc },
- /* 93 */ { "ftruncate", ftruncateFunc },
- /* 94 */ { "fchmod" },
- /* 95 */ { "fchown" },
- /* 96 */ { "getpriority" },
- /* 97 */ { "setpriority" },
- /* 98 */ { "unused#98" },
- /* 99 */ { "statfs" },
- /* 100 */ { "fstatfs" },
- /* 101 */ { "unused#101" },
- /* 102 */ { "socketcall" },
- /* 103 */ { "syslog" },
- /* 104 */ { "setitimer" },
- /* 105 */ { "getitimer" },
- /* 106 */ { "stat", statFunc<ArmLinux32> },
- /* 107 */ { "lstat" },
- /* 108 */ { "fstat", fstatFunc<ArmLinux32> },
- /* 109 */ { "unused#109" },
- /* 110 */ { "unused#101" },
- /* 111 */ { "vhangup" },
- /* 112 */ { "unused#112" },
- /* 113 */ { "syscall" },
- /* 114 */ { "wait4" },
- /* 115 */ { "swapoff" },
- /* 116 */ { "sysinfo", sysinfoFunc<ArmLinux32> },
- /* 117 */ { "ipc" },
- /* 118 */ { "fsync" },
- /* 119 */ { "sigreturn" },
- /* 120 */ { "clone", cloneBackwardsFunc<ArmLinux32> },
- /* 121 */ { "setdomainname" },
- /* 122 */ { "uname", unameFunc32 },
- /* 123 */ { "unused#123" },
- /* 124 */ { "adjtimex" },
- /* 125 */ { "mprotect", ignoreFunc },
- /* 126 */ { "sigprocmask", ignoreWarnOnceFunc },
- /* 127 */ { "unused#127" },
- /* 128 */ { "init_module" },
- /* 129 */ { "delete_module" },
- /* 130 */ { "unused#130" },
- /* 131 */ { "quotactl" },
- /* 132 */ { "getpgid" },
- /* 133 */ { "fchdir" },
- /* 134 */ { "bdflush" },
- /* 135 */ { "sysfs" },
- /* 136 */ { "personality" },
- /* 137 */ { "reserved#138" },
- /* 138 */ { "setfsuid" },
- /* 139 */ { "setfsgid" },
- /* 140 */ { "llseek", _llseekFunc },
+
+class SyscallTable32 :
+ public SyscallDescTable<ArmLinuxProcess32::SyscallABI>
+{
+ public:
+ SyscallTable32(int base) :
+ SyscallDescTable<ArmLinuxProcess32::SyscallABI>({
+ { base + 0, "syscall" },
+ { base + 1, "exit", exitFunc },
+ { base + 2, "fork" },
+ { base + 3, "read", readFunc<ArmLinux32> },
+ { base + 4, "write", writeFunc<ArmLinux32> },
+ { base + 5, "open", openFunc<ArmLinux32> },
+ { base + 6, "close", closeFunc },
+ { base + 8, "creat" },
+ { base + 9, "link" },
+ { base + 10, "unlink", unlinkFunc },
+ { base + 11, "execve", execveFunc<ArmLinux32> },
+ { base + 12, "chdir" },
+ { base + 13, "time", timeFunc<ArmLinux32> },
+ { base + 14, "mknod" },
+ { base + 15, "chmod", chmodFunc<ArmLinux32> },
+ { base + 16, "lchown", chownFunc },
+ { base + 19, "lseek", lseekFunc },
+ { base + 20, "getpid", getpidFunc },
+ { base + 21, "mount" },
+ { base + 22, "umount" },
+ { base + 23, "setuid", ignoreFunc },
+ { base + 24, "getuid", getuidFunc },
+ { base + 25, "stime" },
+ { base + 26, "ptrace" },
+ { base + 27, "alarm" },
+ { base + 29, "pause" },
+ { base + 30, "utime" },
+ { base + 33, "access", accessFunc },
+ { base + 34, "nice" },
+ { base + 36, "sync" },
+ { base + 37, "kill", ignoreFunc },
+ { base + 38, "rename", renameFunc },
+ { base + 39, "mkdir", mkdirFunc },
+ { base + 40, "rmdir" },
+ { base + 41, "dup", dupFunc },
+ { base + 42, "pipe", pipePseudoFunc },
+ { base + 43, "times", timesFunc<ArmLinux32> },
+ { base + 45, "brk", brkFunc },
+ { base + 46, "setgid" },
+ { base + 47, "getgid", getgidFunc },
+ { base + 49, "geteuid", geteuidFunc },
+ { base + 50, "getegid", getegidFunc },
+ { base + 51, "acct" },
+ { base + 52, "umount2" },
+ { base + 54, "ioctl", ioctlFunc<ArmLinux32> },
+ { base + 55, "fcntl", fcntlFunc },
+ { base + 57, "setpgid" },
+ { base + 60, "umask", umaskFunc },
+ { base + 61, "chroot" },
+ { base + 62, "ustat" },
+ { base + 63, "dup2" },
+ { base + 64, "getppid", getppidFunc },
+ { base + 65, "getpgrp" },
+ { base + 66, "setsid" },
+ { base + 67, "sigaction" },
+ { base + 70, "setreuid" },
+ { base + 71, "setregid" },
+ { base + 72, "sigsuspend" },
+ { base + 73, "sigpending" },
+ { base + 74, "sethostname", ignoreFunc },
+ { base + 75, "setrlimit", ignoreFunc },
+ { base + 76, "getrlimit", getrlimitFunc<ArmLinux32> },
+ { base + 77, "getrusage", getrusageFunc<ArmLinux32> },
+ { base + 78, "gettimeofday", gettimeofdayFunc<ArmLinux32> },
+ { base + 79, "settimeofday" },
+ { base + 80, "getgroups" },
+ { base + 81, "setgroups" },
+ { base + 82, "reserved#82" },
+ { base + 83, "symlink" },
+ { base + 85, "readlink", readlinkFunc },
+ { base + 86, "uselib" },
+ { base + 87, "swapon" },
+ { base + 88, "reboot" },
+ { base + 89, "readdir" },
+ { base + 90, "mmap", mmapFunc<ArmLinux32> },
+ { base + 91, "munmap", munmapFunc },
+ { base + 92, "truncate", truncateFunc },
+ { base + 93, "ftruncate", ftruncateFunc },
+ { base + 94, "fchmod" },
+ { base + 95, "fchown" },
+ { base + 96, "getpriority" },
+ { base + 97, "setpriority" },
+ { base + 99, "statfs" },
+ { base + 100, "fstatfs" },
+ { base + 102, "socketcall" },
+ { base + 103, "syslog" },
+ { base + 104, "setitimer" },
+ { base + 105, "getitimer" },
+ { base + 106, "stat", statFunc<ArmLinux32> },
+ { base + 107, "lstat" },
+ { base + 108, "fstat", fstatFunc<ArmLinux32> },
+ { base + 111, "vhangup" },
+ { base + 113, "syscall" },
+ { base + 114, "wait4" },
+ { base + 115, "swapoff" },
+ { base + 116, "sysinfo", sysinfoFunc<ArmLinux32> },
+ { base + 117, "ipc" },
+ { base + 118, "fsync" },
+ { base + 119, "sigreturn" },
+ { base + 120, "clone", cloneBackwardsFunc<ArmLinux32> },
+ { base + 121, "setdomainname" },
+ { base + 122, "uname", unameFunc32 },
+ { base + 124, "adjtimex" },
+ { base + 125, "mprotect", ignoreFunc },
+ { base + 126, "sigprocmask", ignoreWarnOnceFunc },
+ { base + 128, "init_module" },
+ { base + 129, "delete_module" },
+ { base + 131, "quotactl" },
+ { base + 132, "getpgid" },
+ { base + 133, "fchdir" },
+ { base + 134, "bdflush" },
+ { base + 135, "sysfs" },
+ { base + 136, "personality" },
+ { base + 137, "reserved#138" },
+ { base + 138, "setfsuid" },
+ { base + 139, "setfsgid" },
+ { base + 140, "llseek", _llseekFunc },
#if defined(SYS_getdents)
- /* 141 */ { "getdents", getdentsFunc },
+ { base + 141, "getdents", getdentsFunc },
#else
- /* 141 */ { "getdents" },
+ { base + 141, "getdents" },
#endif
- /* 142 */ { "newselect" },
- /* 143 */ { "flock" },
- /* 144 */ { "msync" },
- /* 145 */ { "readv" },
- /* 146 */ { "writev", writevFunc<ArmLinux32> },
- /* 147 */ { "getsid" },
- /* 148 */ { "fdatasync" },
- /* 149 */ { "sysctl" },
- /* 150 */ { "mlock" },
- /* 151 */ { "munlock" },
- /* 152 */ { "mlockall" },
- /* 153 */ { "munlockall" },
- /* 154 */ { "sched_setparam" },
- /* 155 */ { "sched_getparam" },
- /* 156 */ { "sched_setscheduler" },
- /* 157 */ { "sched_getscheduler" },
- /* 158 */ { "sched_yield" },
- /* 159 */ { "sched_get_priority_max" },
- /* 160 */ { "sched_get_priority_min" },
- /* 161 */ { "sched_rr_get_interval" },
- /* 162 */ { "nanosleep", ignoreWarnOnceFunc },
- /* 163 */ { "mremap", mremapFunc<ArmLinux32> }, // ARM-specific
- /* 164 */ { "setresuid" },
- /* 165 */ { "getresuid" },
- /* 166 */ { "unused#166" },
- /* 167 */ { "unused#167" },
- /* 168 */ { "poll" },
- /* 169 */ { "nfsservctl" },
- /* 170 */ { "setresgid" },
- /* 171 */ { "getresgid" },
- /* 172 */ { "prctl" },
- /* 173 */ { "rt_sigreturn" },
- /* 174 */ { "rt_sigaction", ignoreWarnOnceFunc },
- /* 175 */ { "rt_sigprocmask", ignoreWarnOnceFunc },
- /* 176 */ { "rt_sigpending" },
- /* 177 */ { "rt_sigtimedwait" },
- /* 178 */ { "rt_sigqueueinfo", ignoreFunc },
- /* 179 */ { "rt_sigsuspend" },
- /* 180 */ { "pread64" },
- /* 181 */ { "pwrite64" },
- /* 182 */ { "chown" },
- /* 183 */ { "getcwd", getcwdFunc },
- /* 184 */ { "capget" },
- /* 185 */ { "capset" },
- /* 186 */ { "sigaltstack" },
- /* 187 */ { "sendfile" },
- /* 188 */ { "unused#188" },
- /* 189 */ { "unused#189" },
- /* 190 */ { "vfork" },
- /* 191 */ { "getrlimit", getrlimitFunc<ArmLinux32> },
- /* 192 */ { "mmap2", mmapFunc<ArmLinux32> },
- /* 193 */ { "truncate64" },
- /* 194 */ { "ftruncate64", ftruncate64Func },
- /* 195 */ { "stat64", stat64Func<ArmLinux32> },
- /* 196 */ { "lstat64", lstat64Func<ArmLinux32> },
- /* 197 */ { "fstat64", fstat64Func<ArmLinux32> },
- /* 198 */ { "lchown" },
- /* 199 */ { "getuid", getuidFunc },
- /* 200 */ { "getgid", getgidFunc },
- /* 201 */ { "geteuid", geteuidFunc },
- /* 202 */ { "getegid", getegidFunc },
- /* 203 */ { "setreuid" },
- /* 204 */ { "setregid" },
- /* 205 */ { "getgroups" },
- /* 206 */ { "setgroups" },
- /* 207 */ { "fchown" },
- /* 208 */ { "setresuid" },
- /* 209 */ { "getresuid" },
- /* 210 */ { "setresgid" },
- /* 211 */ { "getresgid" },
- /* 212 */ { "chown" },
- /* 213 */ { "setuid" },
- /* 214 */ { "setgid" },
- /* 215 */ { "setfsuid" },
- /* 216 */ { "setfsgid" },
+ { base + 142, "newselect" },
+ { base + 143, "flock" },
+ { base + 144, "msync" },
+ { base + 145, "readv" },
+ { base + 146, "writev", writevFunc<ArmLinux32> },
+ { base + 147, "getsid" },
+ { base + 148, "fdatasync" },
+ { base + 149, "sysctl" },
+ { base + 150, "mlock" },
+ { base + 151, "munlock" },
+ { base + 152, "mlockall" },
+ { base + 153, "munlockall" },
+ { base + 154, "sched_setparam" },
+ { base + 155, "sched_getparam" },
+ { base + 156, "sched_setscheduler" },
+ { base + 157, "sched_getscheduler" },
+ { base + 158, "sched_yield" },
+ { base + 159, "sched_get_priority_max" },
+ { base + 160, "sched_get_priority_min" },
+ { base + 161, "sched_rr_get_interval" },
+ { base + 162, "nanosleep", ignoreWarnOnceFunc },
+ { base + 163, "mremap", mremapFunc<ArmLinux32> }, // ARM-specific
+ { base + 164, "setresuid" },
+ { base + 165, "getresuid" },
+ { base + 168, "poll" },
+ { base + 169, "nfsservctl" },
+ { base + 170, "setresgid" },
+ { base + 171, "getresgid" },
+ { base + 172, "prctl" },
+ { base + 173, "rt_sigreturn" },
+ { base + 174, "rt_sigaction", ignoreWarnOnceFunc },
+ { base + 175, "rt_sigprocmask", ignoreWarnOnceFunc },
+ { base + 176, "rt_sigpending" },
+ { base + 177, "rt_sigtimedwait" },
+ { base + 178, "rt_sigqueueinfo", ignoreFunc },
+ { base + 179, "rt_sigsuspend" },
+ { base + 180, "pread64" },
+ { base + 181, "pwrite64" },
+ { base + 182, "chown" },
+ { base + 183, "getcwd", getcwdFunc },
+ { base + 184, "capget" },
+ { base + 185, "capset" },
+ { base + 186, "sigaltstack" },
+ { base + 187, "sendfile" },
+ { base + 190, "vfork" },
+ { base + 191, "getrlimit", getrlimitFunc<ArmLinux32> },
+ { base + 192, "mmap2", mmapFunc<ArmLinux32> },
+ { base + 193, "truncate64" },
+ { base + 194, "ftruncate64", ftruncate64Func },
+ { base + 195, "stat64", stat64Func<ArmLinux32> },
+ { base + 196, "lstat64", lstat64Func<ArmLinux32> },
+ { base + 197, "fstat64", fstat64Func<ArmLinux32> },
+ { base + 198, "lchown" },
+ { base + 199, "getuid", getuidFunc },
+ { base + 200, "getgid", getgidFunc },
+ { base + 201, "geteuid", geteuidFunc },
+ { base + 202, "getegid", getegidFunc },
+ { base + 203, "setreuid" },
+ { base + 204, "setregid" },
+ { base + 205, "getgroups" },
+ { base + 206, "setgroups" },
+ { base + 207, "fchown" },
+ { base + 208, "setresuid" },
+ { base + 209, "getresuid" },
+ { base + 210, "setresgid" },
+ { base + 211, "getresgid" },
+ { base + 212, "chown" },
+ { base + 213, "setuid" },
+ { base + 214, "setgid" },
+ { base + 215, "setfsuid" },
+ { base + 216, "setfsgid" },
#if defined(SYS_getdents64)
- /* 217 */ { "getdents64", getdents64Func },
+ { base + 217, "getdents64", getdents64Func },
#else
- /* 217 */ { "getdents64" },
+ { base + 217, "getdents64" },
#endif
- /* 218 */ { "pivot_root" },
- /* 219 */ { "mincore" },
- /* 220 */ { "madvise", ignoreFunc },
- /* 221 */ { "fcntl64", fcntl64Func },
- /* 222 */ { "unused#222" },
- /* 223 */ { "unknown#223" },
- /* 224 */ { "gettid", gettidFunc },
- /* 225 */ { "readahead" },
- /* 226 */ { "setxattr" },
- /* 227 */ { "lsetxattr" },
- /* 228 */ { "fsetxattr" },
- /* 229 */ { "getxattr" },
- /* 230 */ { "lgetxattr" },
- /* 231 */ { "fgetxattr" },
- /* 232 */ { "listxattr" },
- /* 233 */ { "llistxattr" },
- /* 234 */ { "flistxattr" },
- /* 235 */ { "removexattr" },
- /* 236 */ { "lremovexattr" },
- /* 237 */ { "fremovexattr" },
- /* 238 */ { "tkill" },
- /* 239 */ { "sendfile64" },
- /* 240 */ { "futex", futexFunc<ArmLinux32> },
- /* 241 */ { "sched_setaffinity" },
- /* 242 */ { "sched_getaffinity", ignoreFunc },
- /* 243 */ { "io_setup" },
- /* 244 */ { "io_destroy" },
- /* 245 */ { "io_getevents" },
- /* 246 */ { "io_submit" },
- /* 247 */ { "io_cancel" },
- /* 248 */ { "exit_group", exitGroupFunc },
- /* 249 */ { "lookup_dcookie" },
- /* 250 */ { "epoll_create" },
- /* 251 */ { "epoll_ctl" },
- /* 252 */ { "epoll_wait" },
- /* 253 */ { "remap_file_pages" },
- /* 254 */ { "unused#254" },
- /* 255 */ { "unused#255" },
- /* 256 */ { "set_tid_address", setTidAddressFunc },
- /* 257 */ { "timer_create" },
- /* 258 */ { "timer_settime" },
- /* 259 */ { "timer_gettime" },
- /* 260 */ { "timer_getoverrun" },
- /* 261 */ { "timer_delete" },
- /* 262 */ { "clock_settime" },
- /* 263 */ { "clock_gettime", clock_gettimeFunc<ArmLinux32> },
- /* 264 */ { "clock_getres", clock_getresFunc<ArmLinux32> },
- /* 265 */ { "clock_nanosleep" },
- /* 266 */ { "statfs64" },
- /* 267 */ { "fstatfs64" },
- /* 268 */ { "tgkill", tgkillFunc<ArmLinux32> },
- /* 269 */ { "utimes" },
- /* 270 */ { "arm_fadvise64_64" },
- /* 271 */ { "pciconfig_iobase" },
- /* 272 */ { "pciconfig_read" },
- /* 273 */ { "pciconfig_write" },
- /* 274 */ { "mq_open" },
- /* 275 */ { "mq_unlink" },
- /* 276 */ { "mq_timedsend" },
- /* 277 */ { "mq_timedreceive" },
- /* 278 */ { "mq_notify" },
- /* 279 */ { "mq_getsetattr" },
- /* 280 */ { "waitid" },
- /* 281 */ { "socket" },
- /* 282 */ { "bind" },
- /* 283 */ { "connect" },
- /* 284 */ { "listen" },
- /* 285 */ { "accept" },
- /* 286 */ { "getsockname" },
- /* 287 */ { "getpeername" },
- /* 288 */ { "socketpair" },
- /* 289 */ { "send" },
- /* 290 */ { "sendto" },
- /* 291 */ { "recv" },
- /* 292 */ { "recvfrom" },
- /* 293 */ { "shutdown" },
- /* 294 */ { "setsockopt" },
- /* 295 */ { "getsockopt" },
- /* 296 */ { "sendmsg" },
- /* 297 */ { "rcvmsg" },
- /* 298 */ { "semop" },
- /* 299 */ { "semget" },
- /* 300 */ { "semctl" },
- /* 301 */ { "msgsend" },
- /* 302 */ { "msgrcv" },
- /* 303 */ { "msgget" },
- /* 304 */ { "msgctl" },
- /* 305 */ { "shmat" },
- /* 306 */ { "shmdt" },
- /* 307 */ { "shmget" },
- /* 308 */ { "shmctl" },
- /* 309 */ { "add_key" },
- /* 310 */ { "request_key" },
- /* 311 */ { "keyctl" },
- /* 312 */ { "semtimedop" },
- /* 313 */ { "unused#313" },
- /* 314 */ { "ioprio_set" },
- /* 315 */ { "ioprio_get" },
- /* 316 */ { "inotify_init" },
- /* 317 */ { "inotify_add_watch" },
- /* 318 */ { "inotify_rm_watch" },
- /* 319 */ { "mbind" },
- /* 320 */ { "get_mempolicy" },
- /* 321 */ { "set_mempolicy" },
- /* 322 */ { "openat", openatFunc<ArmLinux32> },
- /* 323 */ { "mkdirat" },
- /* 324 */ { "mknodat" },
- /* 325 */ { "fchownat" },
- /* 326 */ { "futimesat" },
- /* 327 */ { "fstatat64" },
- /* 328 */ { "unlinkat" },
- /* 329 */ { "renameat" },
- /* 330 */ { "linkat" },
- /* 331 */ { "symlinkat" },
- /* 332 */ { "readlinkat" },
- /* 333 */ { "fchmodat" },
- /* 334 */ { "faccessat" },
- /* 335 */ { "pselect6" },
- /* 336 */ { "ppoll" },
- /* 337 */ { "unshare" },
- /* 338 */ { "set_robust_list", ignoreFunc },
- /* 339 */ { "get_robust_list" },
- /* 340 */ { "splice" },
- /* 341 */ { "arm_sync_file_range" },
- /* 342 */ { "tee" },
- /* 343 */ { "vmsplice" },
- /* 344 */ { "move_pages" },
- /* 345 */ { "getcpu" },
- /* 346 */ { "epoll_pwait" },
- /* 347 */ { "sys_kexec_load" },
- /* 348 */ { "sys_utimensat" },
- /* 349 */ { "sys_signalfd" },
- /* 350 */ { "sys_timerfd_create" },
- /* 351 */ { "sys_eventfd" },
- /* 352 */ { "sys_fallocate" },
- /* 353 */ { "sys_timerfd_settime" },
- /* 354 */ { "sys_timerfd_gettime" },
- /* 355 */ { "sys_signalfd4" },
- /* 356 */ { "sys_eventfd2" },
- /* 357 */ { "sys_epoll_create1" },
- /* 358 */ { "sys_dup3" },
- /* 359 */ { "sys_pipe2" },
- /* 360 */ { "sys_inotify_init1" },
- /* 361 */ { "sys_preadv" },
- /* 362 */ { "sys_pwritev" },
- /* 363 */ { "sys_rt_tgsigqueueinfo" },
- /* 364 */ { "sys_perf_event_open" },
- /* 365 */ { "sys_recvmmsg" },
+ { base + 218, "pivot_root" },
+ { base + 219, "mincore" },
+ { base + 220, "madvise", ignoreFunc },
+ { base + 221, "fcntl64", fcntl64Func },
+ { base + 224, "gettid", gettidFunc },
+ { base + 225, "readahead" },
+ { base + 226, "setxattr" },
+ { base + 227, "lsetxattr" },
+ { base + 228, "fsetxattr" },
+ { base + 229, "getxattr" },
+ { base + 230, "lgetxattr" },
+ { base + 231, "fgetxattr" },
+ { base + 232, "listxattr" },
+ { base + 233, "llistxattr" },
+ { base + 234, "flistxattr" },
+ { base + 235, "removexattr" },
+ { base + 236, "lremovexattr" },
+ { base + 237, "fremovexattr" },
+ { base + 238, "tkill" },
+ { base + 239, "sendfile64" },
+ { base + 240, "futex", futexFunc<ArmLinux32> },
+ { base + 241, "sched_setaffinity" },
+ { base + 242, "sched_getaffinity", ignoreFunc },
+ { base + 243, "io_setup" },
+ { base + 244, "io_destroy" },
+ { base + 245, "io_getevents" },
+ { base + 246, "io_submit" },
+ { base + 247, "io_cancel" },
+ { base + 248, "exit_group", exitGroupFunc },
+ { base + 249, "lookup_dcookie" },
+ { base + 250, "epoll_create" },
+ { base + 251, "epoll_ctl" },
+ { base + 252, "epoll_wait" },
+ { base + 253, "remap_file_pages" },
+ { base + 256, "set_tid_address", setTidAddressFunc },
+ { base + 257, "timer_create" },
+ { base + 258, "timer_settime" },
+ { base + 259, "timer_gettime" },
+ { base + 260, "timer_getoverrun" },
+ { base + 261, "timer_delete" },
+ { base + 262, "clock_settime" },
+ { base + 263, "clock_gettime", clock_gettimeFunc<ArmLinux32> },
+ { base + 264, "clock_getres", clock_getresFunc<ArmLinux32> },
+ { base + 265, "clock_nanosleep" },
+ { base + 266, "statfs64" },
+ { base + 267, "fstatfs64" },
+ { base + 268, "tgkill", tgkillFunc<ArmLinux32> },
+ { base + 269, "utimes" },
+ { base + 270, "arm_fadvise64_64" },
+ { base + 271, "pciconfig_iobase" },
+ { base + 272, "pciconfig_read" },
+ { base + 273, "pciconfig_write" },
+ { base + 274, "mq_open" },
+ { base + 275, "mq_unlink" },
+ { base + 276, "mq_timedsend" },
+ { base + 277, "mq_timedreceive" },
+ { base + 278, "mq_notify" },
+ { base + 279, "mq_getsetattr" },
+ { base + 280, "waitid" },
+ { base + 281, "socket" },
+ { base + 282, "bind" },
+ { base + 283, "connect" },
+ { base + 284, "listen" },
+ { base + 285, "accept" },
+ { base + 286, "getsockname" },
+ { base + 287, "getpeername" },
+ { base + 288, "socketpair" },
+ { base + 289, "send" },
+ { base + 290, "sendto" },
+ { base + 291, "recv" },
+ { base + 292, "recvfrom" },
+ { base + 293, "shutdown" },
+ { base + 294, "setsockopt" },
+ { base + 295, "getsockopt" },
+ { base + 296, "sendmsg" },
+ { base + 297, "rcvmsg" },
+ { base + 298, "semop" },
+ { base + 299, "semget" },
+ { base + 300, "semctl" },
+ { base + 301, "msgsend" },
+ { base + 302, "msgrcv" },
+ { base + 303, "msgget" },
+ { base + 304, "msgctl" },
+ { base + 305, "shmat" },
+ { base + 306, "shmdt" },
+ { base + 307, "shmget" },
+ { base + 308, "shmctl" },
+ { base + 309, "add_key" },
+ { base + 310, "request_key" },
+ { base + 311, "keyctl" },
+ { base + 312, "semtimedop" },
+ { base + 314, "ioprio_set" },
+ { base + 315, "ioprio_get" },
+ { base + 316, "inotify_init" },
+ { base + 317, "inotify_add_watch" },
+ { base + 318, "inotify_rm_watch" },
+ { base + 319, "mbind" },
+ { base + 320, "get_mempolicy" },
+ { base + 321, "set_mempolicy" },
+ { base + 322, "openat", openatFunc<ArmLinux32> },
+ { base + 323, "mkdirat" },
+ { base + 324, "mknodat" },
+ { base + 325, "fchownat" },
+ { base + 326, "futimesat" },
+ { base + 327, "fstatat64" },
+ { base + 328, "unlinkat" },
+ { base + 329, "renameat" },
+ { base + 330, "linkat" },
+ { base + 331, "symlinkat" },
+ { base + 332, "readlinkat" },
+ { base + 333, "fchmodat" },
+ { base + 334, "faccessat" },
+ { base + 335, "pselect6" },
+ { base + 336, "ppoll" },
+ { base + 337, "unshare" },
+ { base + 338, "set_robust_list", ignoreFunc },
+ { base + 339, "get_robust_list" },
+ { base + 340, "splice" },
+ { base + 341, "arm_sync_file_range" },
+ { base + 342, "tee" },
+ { base + 343, "vmsplice" },
+ { base + 344, "move_pages" },
+ { base + 345, "getcpu" },
+ { base + 346, "epoll_pwait" },
+ { base + 347, "sys_kexec_load" },
+ { base + 348, "sys_utimensat" },
+ { base + 349, "sys_signalfd" },
+ { base + 350, "sys_timerfd_create" },
+ { base + 351, "sys_eventfd" },
+ { base + 352, "sys_fallocate" },
+ { base + 353, "sys_timerfd_settime" },
+ { base + 354, "sys_timerfd_gettime" },
+ { base + 355, "sys_signalfd4" },
+ { base + 356, "sys_eventfd2" },
+ { base + 357, "sys_epoll_create1" },
+ { base + 358, "sys_dup3" },
+ { base + 359, "sys_pipe2" },
+ { base + 360, "sys_inotify_init1" },
+ { base + 361, "sys_preadv" },
+ { base + 362, "sys_pwritev" },
+ { base + 363, "sys_rt_tgsigqueueinfo" },
+ { base + 364, "sys_perf_event_open" },
+ { base + 365, "sys_recvmmsg" },
+ })
+ {}
};
-static SyscallDescABI<ArmLinuxProcess64::SyscallABI> syscallDescs64[] = {
- /* 0 */ { "io_setup" },
- /* 1 */ { "io_destroy" },
- /* 2 */ { "io_submit" },
- /* 3 */ { "io_cancel" },
- /* 4 */ { "io_getevents" },
- /* 5 */ { "setxattr" },
- /* 6 */ { "lsetxattr" },
- /* 7 */ { "fsetxattr" },
- /* 8 */ { "getxattr" },
- /* 9 */ { "lgetxattr" },
- /* 10 */ { "fgetxattr" },
- /* 11 */ { "listxattr" },
- /* 12 */ { "llistxattr" },
- /* 13 */ { "flistxattr" },
- /* 14 */ { "removexattr" },
- /* 15 */ { "lremovexattr" },
- /* 16 */ { "fremovexattr" },
- /* 17 */ { "getcwd", getcwdFunc },
- /* 18 */ { "lookup_dcookie" },
- /* 19 */ { "eventfd2" },
- /* 20 */ { "epoll_create1" },
- /* 21 */ { "epoll_ctl" },
- /* 22 */ { "epoll_pwait" },
- /* 23 */ { "dup", dupFunc },
- /* 24 */ { "dup3" },
- /* 25 */ { "fcntl64", fcntl64Func },
- /* 26 */ { "inotify_init1" },
- /* 27 */ { "inotify_add_watch" },
- /* 28 */ { "inotify_rm_watch" },
- /* 29 */ { "ioctl", ioctlFunc<ArmLinux64> },
- /* 30 */ { "ioprio_set" },
- /* 31 */ { "ioprio_get" },
- /* 32 */ { "flock" },
- /* 33 */ { "mknodat" },
- /* 34 */ { "mkdirat" },
- /* 35 */ { "unlinkat", unlinkatFunc<ArmLinux64> },
- /* 36 */ { "symlinkat" },
- /* 37 */ { "linkat" },
- /* 38 */ { "renameat", renameatFunc<ArmLinux64> },
- /* 39 */ { "umount2" },
- /* 40 */ { "mount" },
- /* 41 */ { "pivot_root" },
- /* 42 */ { "nfsservctl" },
- /* 43 */ { "statfs64" },
- /* 44 */ { "fstatfs64" },
- /* 45 */ { "truncate64" },
- /* 46 */ { "ftruncate64", ftruncate64Func },
- /* 47 */ { "fallocate" },
- /* 48 */ { "faccessat", faccessatFunc<ArmLinux64> },
- /* 49 */ { "chdir" },
- /* 50 */ { "fchdir" },
- /* 51 */ { "chroot" },
- /* 52 */ { "fchmod" },
- /* 53 */ { "fchmodat" },
- /* 54 */ { "fchownat" },
- /* 55 */ { "fchown" },
- /* 56 */ { "openat", openatFunc<ArmLinux64> },
- /* 57 */ { "close", closeFunc },
- /* 58 */ { "vhangup" },
- /* 59 */ { "pipe2" },
- /* 60 */ { "quotactl" },
+static SyscallTable32 syscallDescs32Low(0), syscallDescs32High(0x900000);
+
+class SyscallTable64 :
+ public SyscallDescTable<ArmLinuxProcess64::SyscallABI>
+{
+ public:
+ SyscallTable64(int base) :
+ SyscallDescTable<ArmLinuxProcess64::SyscallABI>({
+ { base + 0, "io_setup" },
+ { base + 1, "io_destroy" },
+ { base + 2, "io_submit" },
+ { base + 3, "io_cancel" },
+ { base + 4, "io_getevents" },
+ { base + 5, "setxattr" },
+ { base + 6, "lsetxattr" },
+ { base + 7, "fsetxattr" },
+ { base + 8, "getxattr" },
+ { base + 9, "lgetxattr" },
+ { base + 10, "fgetxattr" },
+ { base + 11, "listxattr" },
+ { base + 12, "llistxattr" },
+ { base + 13, "flistxattr" },
+ { base + 14, "removexattr" },
+ { base + 15, "lremovexattr" },
+ { base + 16, "fremovexattr" },
+ { base + 17, "getcwd", getcwdFunc },
+ { base + 18, "lookup_dcookie" },
+ { base + 19, "eventfd2" },
+ { base + 20, "epoll_create1" },
+ { base + 21, "epoll_ctl" },
+ { base + 22, "epoll_pwait" },
+ { base + 23, "dup", dupFunc },
+ { base + 24, "dup3" },
+ { base + 25, "fcntl64", fcntl64Func },
+ { base + 26, "inotify_init1" },
+ { base + 27, "inotify_add_watch" },
+ { base + 28, "inotify_rm_watch" },
+ { base + 29, "ioctl", ioctlFunc<ArmLinux64> },
+ { base + 30, "ioprio_set" },
+ { base + 31, "ioprio_get" },
+ { base + 32, "flock" },
+ { base + 33, "mknodat" },
+ { base + 34, "mkdirat" },
+ { base + 35, "unlinkat", unlinkatFunc<ArmLinux64> },
+ { base + 36, "symlinkat" },
+ { base + 37, "linkat" },
+ { base + 38, "renameat", renameatFunc<ArmLinux64> },
+ { base + 39, "umount2" },
+ { base + 40, "mount" },
+ { base + 41, "pivot_root" },
+ { base + 42, "nfsservctl" },
+ { base + 43, "statfs64" },
+ { base + 44, "fstatfs64" },
+ { base + 45, "truncate64" },
+ { base + 46, "ftruncate64", ftruncate64Func },
+ { base + 47, "fallocate" },
+ { base + 48, "faccessat", faccessatFunc<ArmLinux64> },
+ { base + 49, "chdir" },
+ { base + 50, "fchdir" },
+ { base + 51, "chroot" },
+ { base + 52, "fchmod" },
+ { base + 53, "fchmodat" },
+ { base + 54, "fchownat" },
+ { base + 55, "fchown" },
+ { base + 56, "openat", openatFunc<ArmLinux64> },
+ { base + 57, "close", closeFunc },
+ { base + 58, "vhangup" },
+ { base + 59, "pipe2" },
+ { base + 60, "quotactl" },
#if defined(SYS_getdents64)
- /* 61 */ { "getdents64", getdents64Func },
+ { base + 61, "getdents64", getdents64Func },
#else
- /* 61 */ { "getdents64" },
+ { base + 61, "getdents64" },
#endif
- /* 62 */ { "llseek", lseekFunc },
- /* 63 */ { "read", readFunc<ArmLinux64> },
- /* 64 */ { "write", writeFunc<ArmLinux64> },
- /* 65 */ { "readv" },
- /* 66 */ { "writev", writevFunc<ArmLinux64> },
- /* 67 */ { "pread64" },
- /* 68 */ { "pwrite64" },
- /* 69 */ { "preadv" },
- /* 70 */ { "pwritev" },
- /* 71 */ { "sendfile64" },
- /* 72 */ { "pselect6" },
- /* 73 */ { "ppoll" },
- /* 74 */ { "signalfd4" },
- /* 75 */ { "vmsplice" },
- /* 76 */ { "splice" },
- /* 77 */ { "tee" },
- /* 78 */ { "readlinkat", readlinkatFunc<ArmLinux64> },
- /* 79 */ { "fstatat64", fstatat64Func<ArmLinux64> },
- /* 80 */ { "fstat64", fstat64Func<ArmLinux64> },
- /* 81 */ { "sync" },
- /* 82 */ { "fsync" },
- /* 83 */ { "fdatasync" },
- /* 84 */ { "sync_file_range" },
- /* 85 */ { "timerfd_create" },
- /* 86 */ { "timerfd_settime" },
- /* 87 */ { "timerfd_gettime" },
- /* 88 */ { "utimensat" },
- /* 89 */ { "acct" },
- /* 90 */ { "capget" },
- /* 91 */ { "capset" },
- /* 92 */ { "personality" },
- /* 93 */ { "exit", exitFunc },
- /* 94 */ { "exit_group", exitGroupFunc },
- /* 95 */ { "waitid" },
- /* 96 */ { "set_tid_address", setTidAddressFunc },
- /* 97 */ { "unshare" },
- /* 98 */ { "futex", futexFunc<ArmLinux64> },
- /* 99 */ { "set_robust_list", ignoreFunc },
- /* 100 */ { "get_robust_list" },
- /* 101 */ { "nanosleep", ignoreWarnOnceFunc },
- /* 102 */ { "getitimer" },
- /* 103 */ { "setitimer" },
- /* 104 */ { "kexec_load" },
- /* 105 */ { "init_module" },
- /* 106 */ { "delete_module" },
- /* 107 */ { "timer_create" },
- /* 108 */ { "timer_gettime" },
- /* 109 */ { "timer_getoverrun" },
- /* 110 */ { "timer_settime" },
- /* 111 */ { "timer_delete" },
- /* 112 */ { "clock_settime" },
- /* 113 */ { "clock_gettime", clock_gettimeFunc<ArmLinux64> },
- /* 114 */ { "clock_getres" },
- /* 115 */ { "clock_nanosleep" },
- /* 116 */ { "syslog" },
- /* 117 */ { "ptrace" },
- /* 118 */ { "sched_setparam" },
- /* 119 */ { "sched_setscheduler" },
- /* 120 */ { "sched_getscheduler" },
- /* 121 */ { "sched_getparam" },
- /* 122 */ { "sched_setaffinity" },
- /* 123 */ { "sched_getaffinity", ignoreFunc },
- /* 124 */ { "sched_yield" },
- /* 125 */ { "sched_get_priority_max" },
- /* 126 */ { "sched_get_priority_min" },
- /* 127 */ { "sched_rr_get_interval" },
- /* 128 */ { "restart_syscall" },
- /* 129 */ { "kill", ignoreFunc },
- /* 130 */ { "tkill" },
- /* 131 */ { "tgkill", tgkillFunc<ArmLinux64> },
- /* 132 */ { "sigaltstack" },
- /* 133 */ { "rt_sigsuspend" },
- /* 134 */ { "rt_sigaction", ignoreFunc },
- /* 135 */ { "rt_sigprocmask", ignoreWarnOnceFunc },
- /* 136 */ { "rt_sigpending" },
- /* 137 */ { "rt_sigtimedwait" },
- /* 138 */ { "rt_sigqueueinfo", ignoreFunc },
- /* 139 */ { "rt_sigreturn" },
- /* 140 */ { "setpriority" },
- /* 141 */ { "getpriority" },
- /* 142 */ { "reboot" },
- /* 143 */ { "setregid" },
- /* 144 */ { "setgid" },
- /* 145 */ { "setreuid" },
- /* 146 */ { "setuid" },
- /* 147 */ { "setresuid" },
- /* 148 */ { "getresuid" },
- /* 149 */ { "setresgid" },
- /* 150 */ { "getresgid" },
- /* 151 */ { "setfsuid" },
- /* 152 */ { "setfsgid" },
- /* 153 */ { "times", timesFunc<ArmLinux64> },
- /* 154 */ { "setpgid" },
- /* 155 */ { "getpgid" },
- /* 156 */ { "getsid" },
- /* 157 */ { "setsid" },
- /* 158 */ { "getgroups" },
- /* 159 */ { "setgroups" },
- /* 160 */ { "uname", unameFunc64 },
- /* 161 */ { "sethostname", ignoreFunc },
- /* 162 */ { "setdomainname" },
- /* 163 */ { "getrlimit", getrlimitFunc<ArmLinux64> },
- /* 164 */ { "setrlimit", ignoreFunc },
- /* 165 */ { "getrusage", getrusageFunc<ArmLinux64> },
- /* 166 */ { "umask" },
- /* 167 */ { "prctl" },
- /* 168 */ { "getcpu" },
- /* 169 */ { "gettimeofday", gettimeofdayFunc<ArmLinux64> },
- /* 170 */ { "settimeofday" },
- /* 171 */ { "adjtimex" },
- /* 172 */ { "getpid", getpidFunc },
- /* 173 */ { "getppid", getppidFunc },
- /* 174 */ { "getuid", getuidFunc },
- /* 175 */ { "geteuid", geteuidFunc },
- /* 176 */ { "getgid", getgidFunc },
- /* 177 */ { "getegid", getegidFunc },
- /* 178 */ { "gettid", gettidFunc },
- /* 179 */ { "sysinfo", sysinfoFunc<ArmLinux64> },
- /* 180 */ { "mq_open" },
- /* 181 */ { "mq_unlink" },
- /* 182 */ { "mq_timedsend" },
- /* 183 */ { "mq_timedreceive" },
- /* 184 */ { "mq_notify" },
- /* 185 */ { "mq_getsetattr" },
- /* 186 */ { "msgget" },
- /* 187 */ { "msgctl" },
- /* 188 */ { "msgrcv" },
- /* 189 */ { "msgsnd" },
- /* 190 */ { "semget" },
- /* 191 */ { "semctl" },
- /* 192 */ { "semtimedop" },
- /* 193 */ { "semop" },
- /* 194 */ { "shmget" },
- /* 195 */ { "shmctl" },
- /* 196 */ { "shmat" },
- /* 197 */ { "shmdt" },
- /* 198 */ { "socket" },
- /* 199 */ { "socketpair" },
- /* 200 */ { "bind" },
- /* 201 */ { "listen" },
- /* 202 */ { "accept" },
- /* 203 */ { "connect" },
- /* 204 */ { "getsockname" },
- /* 205 */ { "getpeername" },
- /* 206 */ { "sendto" },
- /* 207 */ { "recvfrom" },
- /* 208 */ { "setsockopt" },
- /* 209 */ { "getsockopt" },
- /* 210 */ { "shutdown" },
- /* 211 */ { "sendmsg" },
- /* 212 */ { "recvmsg" },
- /* 213 */ { "readahead" },
- /* 214 */ { "brk", brkFunc },
- /* 215 */ { "munmap", munmapFunc },
- /* 216 */ { "mremap", mremapFunc<ArmLinux64> },
- /* 217 */ { "add_key" },
- /* 218 */ { "request_key" },
- /* 219 */ { "keyctl" },
- /* 220 */ { "clone", cloneBackwardsFunc<ArmLinux64> },
- /* 221 */ { "execve", execveFunc<ArmLinux64> },
- /* 222 */ { "mmap2", mmapFunc<ArmLinux64> },
- /* 223 */ { "fadvise64_64" },
- /* 224 */ { "swapon" },
- /* 225 */ { "swapoff" },
- /* 226 */ { "mprotect", ignoreFunc },
- /* 227 */ { "msync" },
- /* 228 */ { "mlock" },
- /* 229 */ { "munlock" },
- /* 230 */ { "mlockall" },
- /* 231 */ { "munlockall" },
- /* 232 */ { "mincore" },
- /* 233 */ { "madvise", ignoreFunc },
- /* 234 */ { "remap_file_pages" },
- /* 235 */ { "mbind" },
- /* 236 */ { "get_mempolicy" },
- /* 237 */ { "set_mempolicy" },
- /* 238 */ { "migrate_pages" },
- /* 239 */ { "move_pages" },
- /* 240 */ { "rt_tgsigqueueinfo" },
- /* 241 */ { "perf_event_open" },
- /* 242 */ { "accept4" },
- /* 243 */ { "recvmmsg" },
- /* 244 */ { "unused#244" },
- /* 245 */ { "unused#245" },
- /* 246 */ { "unused#246" },
- /* 247 */ { "unused#247" },
- /* 248 */ { "unused#248" },
- /* 249 */ { "unused#249" },
- /* 250 */ { "unused#250" },
- /* 251 */ { "unused#251" },
- /* 252 */ { "unused#252" },
- /* 253 */ { "unused#253" },
- /* 254 */ { "unused#254" },
- /* 255 */ { "unused#255" },
- /* 256 */ { "unused#256" },
- /* 257 */ { "unused#257" },
- /* 258 */ { "unused#258" },
- /* 259 */ { "unused#259" },
- /* 260 */ { "wait4" },
- /* 261 */ { "prlimit64", prlimitFunc<ArmLinux64> },
- /* 262 */ { "fanotify_init" },
- /* 263 */ { "fanotify_mark" },
- /* 264 */ { "name_to_handle_at" },
- /* 265 */ { "open_by_handle_at" },
- /* 266 */ { "clock_adjtime" },
- /* 267 */ { "syncfs" },
- /* 268 */ { "setns" },
- /* 269 */ { "sendmmsg" },
- /* 270 */ { "process_vm_readv" },
- /* 271 */ { "process_vm_writev" },
- /* 272 */ { "unused#272" },
- /* 273 */ { "unused#273" },
- /* 274 */ { "unused#274" },
- /* 275 */ { "unused#275" },
- /* 276 */ { "unused#276" },
- /* 277 */ { "unused#277" },
- /* 278 */ { "unused#278" },
- /* 279 */ { "unused#279" },
- /* 280 */ { "unused#280" },
- /* 281 */ { "unused#281" },
- /* 282 */ { "unused#282" },
- /* 283 */ { "unused#283" },
- /* 284 */ { "unused#284" },
- /* 285 */ { "unused#285" },
- /* 286 */ { "unused#286" },
- /* 287 */ { "unused#287" },
- /* 288 */ { "unused#288" },
- /* 289 */ { "unused#289" },
- /* 290 */ { "unused#290" },
- /* 291 */ { "unused#291" },
- /* 292 */ { "unused#292" },
- /* 293 */ { "unused#293" },
- /* 294 */ { "unused#294" },
- /* 295 */ { "unused#295" },
- /* 296 */ { "unused#296" },
- /* 297 */ { "unused#297" },
- /* 298 */ { "unused#298" },
- /* 299 */ { "unused#299" },
- /* 300 */ { "unused#300" },
- /* 301 */ { "unused#301" },
- /* 302 */ { "unused#302" },
- /* 303 */ { "unused#303" },
- /* 304 */ { "unused#304" },
- /* 305 */ { "unused#305" },
- /* 306 */ { "unused#306" },
- /* 307 */ { "unused#307" },
- /* 308 */ { "unused#308" },
- /* 309 */ { "unused#309" },
- /* 310 */ { "unused#310" },
- /* 311 */ { "unused#311" },
- /* 312 */ { "unused#312" },
- /* 313 */ { "unused#313" },
- /* 314 */ { "unused#314" },
- /* 315 */ { "unused#315" },
- /* 316 */ { "unused#316" },
- /* 317 */ { "unused#317" },
- /* 318 */ { "unused#318" },
- /* 319 */ { "unused#319" },
- /* 320 */ { "unused#320" },
- /* 321 */ { "unused#321" },
- /* 322 */ { "unused#322" },
- /* 323 */ { "unused#323" },
- /* 324 */ { "unused#324" },
- /* 325 */ { "unused#325" },
- /* 326 */ { "unused#326" },
- /* 327 */ { "unused#327" },
- /* 328 */ { "unused#328" },
- /* 329 */ { "unused#329" },
- /* 330 */ { "unused#330" },
- /* 331 */ { "unused#331" },
- /* 332 */ { "unused#332" },
- /* 333 */ { "unused#333" },
- /* 334 */ { "unused#334" },
- /* 335 */ { "unused#335" },
- /* 336 */ { "unused#336" },
- /* 337 */ { "unused#337" },
- /* 338 */ { "unused#338" },
- /* 339 */ { "unused#339" },
- /* 340 */ { "unused#340" },
- /* 341 */ { "unused#341" },
- /* 342 */ { "unused#342" },
- /* 343 */ { "unused#343" },
- /* 344 */ { "unused#344" },
- /* 345 */ { "unused#345" },
- /* 346 */ { "unused#346" },
- /* 347 */ { "unused#347" },
- /* 348 */ { "unused#348" },
- /* 349 */ { "unused#349" },
- /* 350 */ { "unused#350" },
- /* 351 */ { "unused#351" },
- /* 352 */ { "unused#352" },
- /* 353 */ { "unused#353" },
- /* 354 */ { "unused#354" },
- /* 355 */ { "unused#355" },
- /* 356 */ { "unused#356" },
- /* 357 */ { "unused#357" },
- /* 358 */ { "unused#358" },
- /* 359 */ { "unused#359" },
- /* 360 */ { "unused#360" },
- /* 361 */ { "unused#361" },
- /* 362 */ { "unused#362" },
- /* 363 */ { "unused#363" },
- /* 364 */ { "unused#364" },
- /* 365 */ { "unused#365" },
- /* 366 */ { "unused#366" },
- /* 367 */ { "unused#367" },
- /* 368 */ { "unused#368" },
- /* 369 */ { "unused#369" },
- /* 370 */ { "unused#370" },
- /* 371 */ { "unused#371" },
- /* 372 */ { "unused#372" },
- /* 373 */ { "unused#373" },
- /* 374 */ { "unused#374" },
- /* 375 */ { "unused#375" },
- /* 376 */ { "unused#376" },
- /* 377 */ { "unused#377" },
- /* 378 */ { "unused#378" },
- /* 379 */ { "unused#379" },
- /* 380 */ { "unused#380" },
- /* 381 */ { "unused#381" },
- /* 382 */ { "unused#382" },
- /* 383 */ { "unused#383" },
- /* 384 */ { "unused#384" },
- /* 385 */ { "unused#385" },
- /* 386 */ { "unused#386" },
- /* 387 */ { "unused#387" },
- /* 388 */ { "unused#388" },
- /* 389 */ { "unused#389" },
- /* 390 */ { "unused#390" },
- /* 391 */ { "unused#391" },
- /* 392 */ { "unused#392" },
- /* 393 */ { "unused#393" },
- /* 394 */ { "unused#394" },
- /* 395 */ { "unused#395" },
- /* 396 */ { "unused#396" },
- /* 397 */ { "unused#397" },
- /* 398 */ { "unused#398" },
- /* 399 */ { "unused#399" },
- /* 400 */ { "unused#400" },
- /* 401 */ { "unused#401" },
- /* 402 */ { "unused#402" },
- /* 403 */ { "unused#403" },
- /* 404 */ { "unused#404" },
- /* 405 */ { "unused#405" },
- /* 406 */ { "unused#406" },
- /* 407 */ { "unused#407" },
- /* 408 */ { "unused#408" },
- /* 409 */ { "unused#409" },
- /* 410 */ { "unused#410" },
- /* 411 */ { "unused#411" },
- /* 412 */ { "unused#412" },
- /* 413 */ { "unused#413" },
- /* 414 */ { "unused#414" },
- /* 415 */ { "unused#415" },
- /* 416 */ { "unused#416" },
- /* 417 */ { "unused#417" },
- /* 418 */ { "unused#418" },
- /* 419 */ { "unused#419" },
- /* 420 */ { "unused#420" },
- /* 421 */ { "unused#421" },
- /* 422 */ { "unused#422" },
- /* 423 */ { "unused#423" },
- /* 424 */ { "unused#424" },
- /* 425 */ { "unused#425" },
- /* 426 */ { "unused#426" },
- /* 427 */ { "unused#427" },
- /* 428 */ { "unused#428" },
- /* 429 */ { "unused#429" },
- /* 430 */ { "unused#430" },
- /* 431 */ { "unused#431" },
- /* 432 */ { "unused#432" },
- /* 433 */ { "unused#433" },
- /* 434 */ { "unused#434" },
- /* 435 */ { "unused#435" },
- /* 436 */ { "unused#436" },
- /* 437 */ { "unused#437" },
- /* 438 */ { "unused#438" },
- /* 439 */ { "unused#439" },
- /* 440 */ { "unused#440" },
- /* 441 */ { "unused#441" },
- /* 442 */ { "unused#442" },
- /* 443 */ { "unused#443" },
- /* 444 */ { "unused#444" },
- /* 445 */ { "unused#445" },
- /* 446 */ { "unused#446" },
- /* 447 */ { "unused#447" },
- /* 448 */ { "unused#448" },
- /* 449 */ { "unused#449" },
- /* 450 */ { "unused#450" },
- /* 451 */ { "unused#451" },
- /* 452 */ { "unused#452" },
- /* 453 */ { "unused#453" },
- /* 454 */ { "unused#454" },
- /* 455 */ { "unused#455" },
- /* 456 */ { "unused#456" },
- /* 457 */ { "unused#457" },
- /* 458 */ { "unused#458" },
- /* 459 */ { "unused#459" },
- /* 460 */ { "unused#460" },
- /* 461 */ { "unused#461" },
- /* 462 */ { "unused#462" },
- /* 463 */ { "unused#463" },
- /* 464 */ { "unused#464" },
- /* 465 */ { "unused#465" },
- /* 466 */ { "unused#466" },
- /* 467 */ { "unused#467" },
- /* 468 */ { "unused#468" },
- /* 469 */ { "unused#469" },
- /* 470 */ { "unused#470" },
- /* 471 */ { "unused#471" },
- /* 472 */ { "unused#472" },
- /* 473 */ { "unused#473" },
- /* 474 */ { "unused#474" },
- /* 475 */ { "unused#475" },
- /* 476 */ { "unused#476" },
- /* 477 */ { "unused#477" },
- /* 478 */ { "unused#478" },
- /* 479 */ { "unused#479" },
- /* 480 */ { "unused#480" },
- /* 481 */ { "unused#481" },
- /* 482 */ { "unused#482" },
- /* 483 */ { "unused#483" },
- /* 484 */ { "unused#484" },
- /* 485 */ { "unused#485" },
- /* 486 */ { "unused#486" },
- /* 487 */ { "unused#487" },
- /* 488 */ { "unused#488" },
- /* 489 */ { "unused#489" },
- /* 490 */ { "unused#490" },
- /* 491 */ { "unused#491" },
- /* 492 */ { "unused#492" },
- /* 493 */ { "unused#493" },
- /* 494 */ { "unused#494" },
- /* 495 */ { "unused#495" },
- /* 496 */ { "unused#496" },
- /* 497 */ { "unused#497" },
- /* 498 */ { "unused#498" },
- /* 499 */ { "unused#499" },
- /* 500 */ { "unused#500" },
- /* 501 */ { "unused#501" },
- /* 502 */ { "unused#502" },
- /* 503 */ { "unused#503" },
- /* 504 */ { "unused#504" },
- /* 505 */ { "unused#505" },
- /* 506 */ { "unused#506" },
- /* 507 */ { "unused#507" },
- /* 508 */ { "unused#508" },
- /* 509 */ { "unused#509" },
- /* 510 */ { "unused#510" },
- /* 511 */ { "unused#511" },
- /* 512 */ { "unused#512" },
- /* 513 */ { "unused#513" },
- /* 514 */ { "unused#514" },
- /* 515 */ { "unused#515" },
- /* 516 */ { "unused#516" },
- /* 517 */ { "unused#517" },
- /* 518 */ { "unused#518" },
- /* 519 */ { "unused#519" },
- /* 520 */ { "unused#520" },
- /* 521 */ { "unused#521" },
- /* 522 */ { "unused#522" },
- /* 523 */ { "unused#523" },
- /* 524 */ { "unused#524" },
- /* 525 */ { "unused#525" },
- /* 526 */ { "unused#526" },
- /* 527 */ { "unused#527" },
- /* 528 */ { "unused#528" },
- /* 529 */ { "unused#529" },
- /* 530 */ { "unused#530" },
- /* 531 */ { "unused#531" },
- /* 532 */ { "unused#532" },
- /* 533 */ { "unused#533" },
- /* 534 */ { "unused#534" },
- /* 535 */ { "unused#535" },
- /* 536 */ { "unused#536" },
- /* 537 */ { "unused#537" },
- /* 538 */ { "unused#538" },
- /* 539 */ { "unused#539" },
- /* 540 */ { "unused#540" },
- /* 541 */ { "unused#541" },
- /* 542 */ { "unused#542" },
- /* 543 */ { "unused#543" },
- /* 544 */ { "unused#544" },
- /* 545 */ { "unused#545" },
- /* 546 */ { "unused#546" },
- /* 547 */ { "unused#547" },
- /* 548 */ { "unused#548" },
- /* 549 */ { "unused#549" },
- /* 550 */ { "unused#550" },
- /* 551 */ { "unused#551" },
- /* 552 */ { "unused#552" },
- /* 553 */ { "unused#553" },
- /* 554 */ { "unused#554" },
- /* 555 */ { "unused#555" },
- /* 556 */ { "unused#556" },
- /* 557 */ { "unused#557" },
- /* 558 */ { "unused#558" },
- /* 559 */ { "unused#559" },
- /* 560 */ { "unused#560" },
- /* 561 */ { "unused#561" },
- /* 562 */ { "unused#562" },
- /* 563 */ { "unused#563" },
- /* 564 */ { "unused#564" },
- /* 565 */ { "unused#565" },
- /* 566 */ { "unused#566" },
- /* 567 */ { "unused#567" },
- /* 568 */ { "unused#568" },
- /* 569 */ { "unused#569" },
- /* 570 */ { "unused#570" },
- /* 571 */ { "unused#571" },
- /* 572 */ { "unused#572" },
- /* 573 */ { "unused#573" },
- /* 574 */ { "unused#574" },
- /* 575 */ { "unused#575" },
- /* 576 */ { "unused#576" },
- /* 577 */ { "unused#577" },
- /* 578 */ { "unused#578" },
- /* 579 */ { "unused#579" },
- /* 580 */ { "unused#580" },
- /* 581 */ { "unused#581" },
- /* 582 */ { "unused#582" },
- /* 583 */ { "unused#583" },
- /* 584 */ { "unused#584" },
- /* 585 */ { "unused#585" },
- /* 586 */ { "unused#586" },
- /* 587 */ { "unused#587" },
- /* 588 */ { "unused#588" },
- /* 589 */ { "unused#589" },
- /* 590 */ { "unused#590" },
- /* 591 */ { "unused#591" },
- /* 592 */ { "unused#592" },
- /* 593 */ { "unused#593" },
- /* 594 */ { "unused#594" },
- /* 595 */ { "unused#595" },
- /* 596 */ { "unused#596" },
- /* 597 */ { "unused#597" },
- /* 598 */ { "unused#598" },
- /* 599 */ { "unused#599" },
- /* 600 */ { "unused#600" },
- /* 601 */ { "unused#601" },
- /* 602 */ { "unused#602" },
- /* 603 */ { "unused#603" },
- /* 604 */ { "unused#604" },
- /* 605 */ { "unused#605" },
- /* 606 */ { "unused#606" },
- /* 607 */ { "unused#607" },
- /* 608 */ { "unused#608" },
- /* 609 */ { "unused#609" },
- /* 610 */ { "unused#610" },
- /* 611 */ { "unused#611" },
- /* 612 */ { "unused#612" },
- /* 613 */ { "unused#613" },
- /* 614 */ { "unused#614" },
- /* 615 */ { "unused#615" },
- /* 616 */ { "unused#616" },
- /* 617 */ { "unused#617" },
- /* 618 */ { "unused#618" },
- /* 619 */ { "unused#619" },
- /* 620 */ { "unused#620" },
- /* 621 */ { "unused#621" },
- /* 622 */ { "unused#622" },
- /* 623 */ { "unused#623" },
- /* 624 */ { "unused#624" },
- /* 625 */ { "unused#625" },
- /* 626 */ { "unused#626" },
- /* 627 */ { "unused#627" },
- /* 628 */ { "unused#628" },
- /* 629 */ { "unused#629" },
- /* 630 */ { "unused#630" },
- /* 631 */ { "unused#631" },
- /* 632 */ { "unused#632" },
- /* 633 */ { "unused#633" },
- /* 634 */ { "unused#634" },
- /* 635 */ { "unused#635" },
- /* 636 */ { "unused#636" },
- /* 637 */ { "unused#637" },
- /* 638 */ { "unused#638" },
- /* 639 */ { "unused#639" },
- /* 640 */ { "unused#640" },
- /* 641 */ { "unused#641" },
- /* 642 */ { "unused#642" },
- /* 643 */ { "unused#643" },
- /* 644 */ { "unused#644" },
- /* 645 */ { "unused#645" },
- /* 646 */ { "unused#646" },
- /* 647 */ { "unused#647" },
- /* 648 */ { "unused#648" },
- /* 649 */ { "unused#649" },
- /* 650 */ { "unused#650" },
- /* 651 */ { "unused#651" },
- /* 652 */ { "unused#652" },
- /* 653 */ { "unused#653" },
- /* 654 */ { "unused#654" },
- /* 655 */ { "unused#655" },
- /* 656 */ { "unused#656" },
- /* 657 */ { "unused#657" },
- /* 658 */ { "unused#658" },
- /* 659 */ { "unused#659" },
- /* 660 */ { "unused#660" },
- /* 661 */ { "unused#661" },
- /* 662 */ { "unused#662" },
- /* 663 */ { "unused#663" },
- /* 664 */ { "unused#664" },
- /* 665 */ { "unused#665" },
- /* 666 */ { "unused#666" },
- /* 667 */ { "unused#667" },
- /* 668 */ { "unused#668" },
- /* 669 */ { "unused#669" },
- /* 670 */ { "unused#670" },
- /* 671 */ { "unused#671" },
- /* 672 */ { "unused#672" },
- /* 673 */ { "unused#673" },
- /* 674 */ { "unused#674" },
- /* 675 */ { "unused#675" },
- /* 676 */ { "unused#676" },
- /* 677 */ { "unused#677" },
- /* 678 */ { "unused#678" },
- /* 679 */ { "unused#679" },
- /* 680 */ { "unused#680" },
- /* 681 */ { "unused#681" },
- /* 682 */ { "unused#682" },
- /* 683 */ { "unused#683" },
- /* 684 */ { "unused#684" },
- /* 685 */ { "unused#685" },
- /* 686 */ { "unused#686" },
- /* 687 */ { "unused#687" },
- /* 688 */ { "unused#688" },
- /* 689 */ { "unused#689" },
- /* 690 */ { "unused#690" },
- /* 691 */ { "unused#691" },
- /* 692 */ { "unused#692" },
- /* 693 */ { "unused#693" },
- /* 694 */ { "unused#694" },
- /* 695 */ { "unused#695" },
- /* 696 */ { "unused#696" },
- /* 697 */ { "unused#697" },
- /* 698 */ { "unused#698" },
- /* 699 */ { "unused#699" },
- /* 700 */ { "unused#700" },
- /* 701 */ { "unused#701" },
- /* 702 */ { "unused#702" },
- /* 703 */ { "unused#703" },
- /* 704 */ { "unused#704" },
- /* 705 */ { "unused#705" },
- /* 706 */ { "unused#706" },
- /* 707 */ { "unused#707" },
- /* 708 */ { "unused#708" },
- /* 709 */ { "unused#709" },
- /* 710 */ { "unused#710" },
- /* 711 */ { "unused#711" },
- /* 712 */ { "unused#712" },
- /* 713 */ { "unused#713" },
- /* 714 */ { "unused#714" },
- /* 715 */ { "unused#715" },
- /* 716 */ { "unused#716" },
- /* 717 */ { "unused#717" },
- /* 718 */ { "unused#718" },
- /* 719 */ { "unused#719" },
- /* 720 */ { "unused#720" },
- /* 721 */ { "unused#721" },
- /* 722 */ { "unused#722" },
- /* 723 */ { "unused#723" },
- /* 724 */ { "unused#724" },
- /* 725 */ { "unused#725" },
- /* 726 */ { "unused#726" },
- /* 727 */ { "unused#727" },
- /* 728 */ { "unused#728" },
- /* 729 */ { "unused#729" },
- /* 730 */ { "unused#730" },
- /* 731 */ { "unused#731" },
- /* 732 */ { "unused#732" },
- /* 733 */ { "unused#733" },
- /* 734 */ { "unused#734" },
- /* 735 */ { "unused#735" },
- /* 736 */ { "unused#736" },
- /* 737 */ { "unused#737" },
- /* 738 */ { "unused#738" },
- /* 739 */ { "unused#739" },
- /* 740 */ { "unused#740" },
- /* 741 */ { "unused#741" },
- /* 742 */ { "unused#742" },
- /* 743 */ { "unused#743" },
- /* 744 */ { "unused#744" },
- /* 745 */ { "unused#745" },
- /* 746 */ { "unused#746" },
- /* 747 */ { "unused#747" },
- /* 748 */ { "unused#748" },
- /* 749 */ { "unused#749" },
- /* 750 */ { "unused#750" },
- /* 751 */ { "unused#751" },
- /* 752 */ { "unused#752" },
- /* 753 */ { "unused#753" },
- /* 754 */ { "unused#754" },
- /* 755 */ { "unused#755" },
- /* 756 */ { "unused#756" },
- /* 757 */ { "unused#757" },
- /* 758 */ { "unused#758" },
- /* 759 */ { "unused#759" },
- /* 760 */ { "unused#760" },
- /* 761 */ { "unused#761" },
- /* 762 */ { "unused#762" },
- /* 763 */ { "unused#763" },
- /* 764 */ { "unused#764" },
- /* 765 */ { "unused#765" },
- /* 766 */ { "unused#766" },
- /* 767 */ { "unused#767" },
- /* 768 */ { "unused#768" },
- /* 769 */ { "unused#769" },
- /* 770 */ { "unused#770" },
- /* 771 */ { "unused#771" },
- /* 772 */ { "unused#772" },
- /* 773 */ { "unused#773" },
- /* 774 */ { "unused#774" },
- /* 775 */ { "unused#775" },
- /* 776 */ { "unused#776" },
- /* 777 */ { "unused#777" },
- /* 778 */ { "unused#778" },
- /* 779 */ { "unused#779" },
- /* 780 */ { "unused#780" },
- /* 781 */ { "unused#781" },
- /* 782 */ { "unused#782" },
- /* 783 */ { "unused#783" },
- /* 784 */ { "unused#784" },
- /* 785 */ { "unused#785" },
- /* 786 */ { "unused#786" },
- /* 787 */ { "unused#787" },
- /* 788 */ { "unused#788" },
- /* 789 */ { "unused#789" },
- /* 790 */ { "unused#790" },
- /* 791 */ { "unused#791" },
- /* 792 */ { "unused#792" },
- /* 793 */ { "unused#793" },
- /* 794 */ { "unused#794" },
- /* 795 */ { "unused#795" },
- /* 796 */ { "unused#796" },
- /* 797 */ { "unused#797" },
- /* 798 */ { "unused#798" },
- /* 799 */ { "unused#799" },
- /* 800 */ { "unused#800" },
- /* 801 */ { "unused#801" },
- /* 802 */ { "unused#802" },
- /* 803 */ { "unused#803" },
- /* 804 */ { "unused#804" },
- /* 805 */ { "unused#805" },
- /* 806 */ { "unused#806" },
- /* 807 */ { "unused#807" },
- /* 808 */ { "unused#808" },
- /* 809 */ { "unused#809" },
- /* 810 */ { "unused#810" },
- /* 811 */ { "unused#811" },
- /* 812 */ { "unused#812" },
- /* 813 */ { "unused#813" },
- /* 814 */ { "unused#814" },
- /* 815 */ { "unused#815" },
- /* 816 */ { "unused#816" },
- /* 817 */ { "unused#817" },
- /* 818 */ { "unused#818" },
- /* 819 */ { "unused#819" },
- /* 820 */ { "unused#820" },
- /* 821 */ { "unused#821" },
- /* 822 */ { "unused#822" },
- /* 823 */ { "unused#823" },
- /* 824 */ { "unused#824" },
- /* 825 */ { "unused#825" },
- /* 826 */ { "unused#826" },
- /* 827 */ { "unused#827" },
- /* 828 */ { "unused#828" },
- /* 829 */ { "unused#829" },
- /* 830 */ { "unused#830" },
- /* 831 */ { "unused#831" },
- /* 832 */ { "unused#832" },
- /* 833 */ { "unused#833" },
- /* 834 */ { "unused#834" },
- /* 835 */ { "unused#835" },
- /* 836 */ { "unused#836" },
- /* 837 */ { "unused#837" },
- /* 838 */ { "unused#838" },
- /* 839 */ { "unused#839" },
- /* 840 */ { "unused#840" },
- /* 841 */ { "unused#841" },
- /* 842 */ { "unused#842" },
- /* 843 */ { "unused#843" },
- /* 844 */ { "unused#844" },
- /* 845 */ { "unused#845" },
- /* 846 */ { "unused#846" },
- /* 847 */ { "unused#847" },
- /* 848 */ { "unused#848" },
- /* 849 */ { "unused#849" },
- /* 850 */ { "unused#850" },
- /* 851 */ { "unused#851" },
- /* 852 */ { "unused#852" },
- /* 853 */ { "unused#853" },
- /* 854 */ { "unused#854" },
- /* 855 */ { "unused#855" },
- /* 856 */ { "unused#856" },
- /* 857 */ { "unused#857" },
- /* 858 */ { "unused#858" },
- /* 859 */ { "unused#859" },
- /* 860 */ { "unused#860" },
- /* 861 */ { "unused#861" },
- /* 862 */ { "unused#862" },
- /* 863 */ { "unused#863" },
- /* 864 */ { "unused#864" },
- /* 865 */ { "unused#865" },
- /* 866 */ { "unused#866" },
- /* 867 */ { "unused#867" },
- /* 868 */ { "unused#868" },
- /* 869 */ { "unused#869" },
- /* 870 */ { "unused#870" },
- /* 871 */ { "unused#871" },
- /* 872 */ { "unused#872" },
- /* 873 */ { "unused#873" },
- /* 874 */ { "unused#874" },
- /* 875 */ { "unused#875" },
- /* 876 */ { "unused#876" },
- /* 877 */ { "unused#877" },
- /* 878 */ { "unused#878" },
- /* 879 */ { "unused#879" },
- /* 880 */ { "unused#880" },
- /* 881 */ { "unused#881" },
- /* 882 */ { "unused#882" },
- /* 883 */ { "unused#883" },
- /* 884 */ { "unused#884" },
- /* 885 */ { "unused#885" },
- /* 886 */ { "unused#886" },
- /* 887 */ { "unused#887" },
- /* 888 */ { "unused#888" },
- /* 889 */ { "unused#889" },
- /* 890 */ { "unused#890" },
- /* 891 */ { "unused#891" },
- /* 892 */ { "unused#892" },
- /* 893 */ { "unused#893" },
- /* 894 */ { "unused#894" },
- /* 895 */ { "unused#895" },
- /* 896 */ { "unused#896" },
- /* 897 */ { "unused#897" },
- /* 898 */ { "unused#898" },
- /* 899 */ { "unused#899" },
- /* 900 */ { "unused#900" },
- /* 901 */ { "unused#901" },
- /* 902 */ { "unused#902" },
- /* 903 */ { "unused#903" },
- /* 904 */ { "unused#904" },
- /* 905 */ { "unused#905" },
- /* 906 */ { "unused#906" },
- /* 907 */ { "unused#907" },
- /* 908 */ { "unused#908" },
- /* 909 */ { "unused#909" },
- /* 910 */ { "unused#910" },
- /* 911 */ { "unused#911" },
- /* 912 */ { "unused#912" },
- /* 913 */ { "unused#913" },
- /* 914 */ { "unused#914" },
- /* 915 */ { "unused#915" },
- /* 916 */ { "unused#916" },
- /* 917 */ { "unused#917" },
- /* 918 */ { "unused#918" },
- /* 919 */ { "unused#919" },
- /* 920 */ { "unused#920" },
- /* 921 */ { "unused#921" },
- /* 922 */ { "unused#922" },
- /* 923 */ { "unused#923" },
- /* 924 */ { "unused#924" },
- /* 925 */ { "unused#925" },
- /* 926 */ { "unused#926" },
- /* 927 */ { "unused#927" },
- /* 928 */ { "unused#928" },
- /* 929 */ { "unused#929" },
- /* 930 */ { "unused#930" },
- /* 931 */ { "unused#931" },
- /* 932 */ { "unused#932" },
- /* 933 */ { "unused#933" },
- /* 934 */ { "unused#934" },
- /* 935 */ { "unused#935" },
- /* 936 */ { "unused#936" },
- /* 937 */ { "unused#937" },
- /* 938 */ { "unused#938" },
- /* 939 */ { "unused#939" },
- /* 940 */ { "unused#940" },
- /* 941 */ { "unused#941" },
- /* 942 */ { "unused#942" },
- /* 943 */ { "unused#943" },
- /* 944 */ { "unused#944" },
- /* 945 */ { "unused#945" },
- /* 946 */ { "unused#946" },
- /* 947 */ { "unused#947" },
- /* 948 */ { "unused#948" },
- /* 949 */ { "unused#949" },
- /* 950 */ { "unused#950" },
- /* 951 */ { "unused#951" },
- /* 952 */ { "unused#952" },
- /* 953 */ { "unused#953" },
- /* 954 */ { "unused#954" },
- /* 955 */ { "unused#955" },
- /* 956 */ { "unused#956" },
- /* 957 */ { "unused#957" },
- /* 958 */ { "unused#958" },
- /* 959 */ { "unused#959" },
- /* 960 */ { "unused#960" },
- /* 961 */ { "unused#961" },
- /* 962 */ { "unused#962" },
- /* 963 */ { "unused#963" },
- /* 964 */ { "unused#964" },
- /* 965 */ { "unused#965" },
- /* 966 */ { "unused#966" },
- /* 967 */ { "unused#967" },
- /* 968 */ { "unused#968" },
- /* 969 */ { "unused#969" },
- /* 970 */ { "unused#970" },
- /* 971 */ { "unused#971" },
- /* 972 */ { "unused#972" },
- /* 973 */ { "unused#973" },
- /* 974 */ { "unused#974" },
- /* 975 */ { "unused#975" },
- /* 976 */ { "unused#976" },
- /* 977 */ { "unused#977" },
- /* 978 */ { "unused#978" },
- /* 979 */ { "unused#979" },
- /* 980 */ { "unused#980" },
- /* 981 */ { "unused#981" },
- /* 982 */ { "unused#982" },
- /* 983 */ { "unused#983" },
- /* 984 */ { "unused#984" },
- /* 985 */ { "unused#985" },
- /* 986 */ { "unused#986" },
- /* 987 */ { "unused#987" },
- /* 988 */ { "unused#988" },
- /* 989 */ { "unused#989" },
- /* 990 */ { "unused#990" },
- /* 991 */ { "unused#991" },
- /* 992 */ { "unused#992" },
- /* 993 */ { "unused#993" },
- /* 994 */ { "unused#994" },
- /* 995 */ { "unused#995" },
- /* 996 */ { "unused#996" },
- /* 997 */ { "unused#997" },
- /* 998 */ { "unused#998" },
- /* 999 */ { "unused#999" },
- /* 1000 */ { "unused#1000" },
- /* 1001 */ { "unused#1001" },
- /* 1002 */ { "unused#1002" },
- /* 1003 */ { "unused#1003" },
- /* 1004 */ { "unused#1004" },
- /* 1005 */ { "unused#1005" },
- /* 1006 */ { "unused#1006" },
- /* 1007 */ { "unused#1007" },
- /* 1008 */ { "unused#1008" },
- /* 1009 */ { "unused#1009" },
- /* 1010 */ { "unused#1010" },
- /* 1011 */ { "unused#1011" },
- /* 1012 */ { "unused#1012" },
- /* 1013 */ { "unused#1013" },
- /* 1014 */ { "unused#1014" },
- /* 1015 */ { "unused#1015" },
- /* 1016 */ { "unused#1016" },
- /* 1017 */ { "unused#1017" },
- /* 1018 */ { "unused#1018" },
- /* 1019 */ { "unused#1019" },
- /* 1020 */ { "unused#1020" },
- /* 1021 */ { "unused#1021" },
- /* 1022 */ { "unused#1022" },
- /* 1023 */ { "unused#1023" },
- /* 1024 */ { "open", openFunc<ArmLinux64> },
- /* 1025 */ { "link" },
- /* 1026 */ { "unlink", unlinkFunc },
- /* 1027 */ { "mknod" },
- /* 1028 */ { "chmod", chmodFunc<ArmLinux64> },
- /* 1029 */ { "chown" },
- /* 1030 */ { "mkdir", mkdirFunc },
- /* 1031 */ { "rmdir" },
- /* 1032 */ { "lchown" },
- /* 1033 */ { "access", accessFunc },
- /* 1034 */ { "rename", renameFunc },
- /* 1035 */ { "readlink", readlinkFunc },
- /* 1036 */ { "symlink" },
- /* 1037 */ { "utimes" },
- /* 1038 */ { "stat64", stat64Func<ArmLinux64> },
- /* 1039 */ { "lstat64", lstat64Func<ArmLinux64> },
- /* 1040 */ { "pipe", pipePseudoFunc },
- /* 1041 */ { "dup2" },
- /* 1042 */ { "epoll_create" },
- /* 1043 */ { "inotify_init" },
- /* 1044 */ { "eventfd" },
- /* 1045 */ { "signalfd" },
- /* 1046 */ { "sendfile" },
- /* 1047 */ { "ftruncate", ftruncateFunc },
- /* 1048 */ { "truncate", truncateFunc },
- /* 1049 */ { "stat", statFunc<ArmLinux64> },
- /* 1050 */ { "lstat" },
- /* 1051 */ { "fstat", fstatFunc<ArmLinux64> },
- /* 1052 */ { "fcntl", fcntlFunc },
- /* 1053 */ { "fadvise64" },
- /* 1054 */ { "newfstatat" },
- /* 1055 */ { "fstatfs" },
- /* 1056 */ { "statfs" },
- /* 1057 */ { "lseek", lseekFunc },
- /* 1058 */ { "mmap", mmapFunc<ArmLinux64> },
- /* 1059 */ { "alarm" },
- /* 1060 */ { "getpgrp" },
- /* 1061 */ { "pause" },
- /* 1062 */ { "time", timeFunc<ArmLinux64> },
- /* 1063 */ { "utime" },
- /* 1064 */ { "creat" },
+ { base + 62, "llseek", lseekFunc },
+ { base + 63, "read", readFunc<ArmLinux64> },
+ { base + 64, "write", writeFunc<ArmLinux64> },
+ { base + 65, "readv" },
+ { base + 66, "writev", writevFunc<ArmLinux64> },
+ { base + 67, "pread64" },
+ { base + 68, "pwrite64" },
+ { base + 69, "preadv" },
+ { base + 70, "pwritev" },
+ { base + 71, "sendfile64" },
+ { base + 72, "pselect6" },
+ { base + 73, "ppoll" },
+ { base + 74, "signalfd4" },
+ { base + 75, "vmsplice" },
+ { base + 76, "splice" },
+ { base + 77, "tee" },
+ { base + 78, "readlinkat", readlinkatFunc<ArmLinux64> },
+ { base + 79, "fstatat64", fstatat64Func<ArmLinux64> },
+ { base + 80, "fstat64", fstat64Func<ArmLinux64> },
+ { base + 81, "sync" },
+ { base + 82, "fsync" },
+ { base + 83, "fdatasync" },
+ { base + 84, "sync_file_range" },
+ { base + 85, "timerfd_create" },
+ { base + 86, "timerfd_settime" },
+ { base + 87, "timerfd_gettime" },
+ { base + 88, "utimensat" },
+ { base + 89, "acct" },
+ { base + 90, "capget" },
+ { base + 91, "capset" },
+ { base + 92, "personality" },
+ { base + 93, "exit", exitFunc },
+ { base + 94, "exit_group", exitGroupFunc },
+ { base + 95, "waitid" },
+ { base + 96, "set_tid_address", setTidAddressFunc },
+ { base + 97, "unshare" },
+ { base + 98, "futex", futexFunc<ArmLinux64> },
+ { base + 99, "set_robust_list", ignoreFunc },
+ { base + 100, "get_robust_list" },
+ { base + 101, "nanosleep", ignoreWarnOnceFunc },
+ { base + 102, "getitimer" },
+ { base + 103, "setitimer" },
+ { base + 104, "kexec_load" },
+ { base + 105, "init_module" },
+ { base + 106, "delete_module" },
+ { base + 107, "timer_create" },
+ { base + 108, "timer_gettime" },
+ { base + 109, "timer_getoverrun" },
+ { base + 110, "timer_settime" },
+ { base + 111, "timer_delete" },
+ { base + 112, "clock_settime" },
+ { base + 113, "clock_gettime", clock_gettimeFunc<ArmLinux64> },
+ { base + 114, "clock_getres" },
+ { base + 115, "clock_nanosleep" },
+ { base + 116, "syslog" },
+ { base + 117, "ptrace" },
+ { base + 118, "sched_setparam" },
+ { base + 119, "sched_setscheduler" },
+ { base + 120, "sched_getscheduler" },
+ { base + 121, "sched_getparam" },
+ { base + 122, "sched_setaffinity" },
+ { base + 123, "sched_getaffinity", ignoreFunc },
+ { base + 124, "sched_yield" },
+ { base + 125, "sched_get_priority_max" },
+ { base + 126, "sched_get_priority_min" },
+ { base + 127, "sched_rr_get_interval" },
+ { base + 128, "restart_syscall" },
+ { base + 129, "kill", ignoreFunc },
+ { base + 130, "tkill" },
+ { base + 131, "tgkill", tgkillFunc<ArmLinux64> },
+ { base + 132, "sigaltstack" },
+ { base + 133, "rt_sigsuspend" },
+ { base + 134, "rt_sigaction", ignoreFunc },
+ { base + 135, "rt_sigprocmask", ignoreWarnOnceFunc },
+ { base + 136, "rt_sigpending" },
+ { base + 137, "rt_sigtimedwait" },
+ { base + 138, "rt_sigqueueinfo", ignoreFunc },
+ { base + 139, "rt_sigreturn" },
+ { base + 140, "setpriority" },
+ { base + 141, "getpriority" },
+ { base + 142, "reboot" },
+ { base + 143, "setregid" },
+ { base + 144, "setgid" },
+ { base + 145, "setreuid" },
+ { base + 146, "setuid" },
+ { base + 147, "setresuid" },
+ { base + 148, "getresuid" },
+ { base + 149, "setresgid" },
+ { base + 150, "getresgid" },
+ { base + 151, "setfsuid" },
+ { base + 152, "setfsgid" },
+ { base + 153, "times", timesFunc<ArmLinux64> },
+ { base + 154, "setpgid" },
+ { base + 155, "getpgid" },
+ { base + 156, "getsid" },
+ { base + 157, "setsid" },
+ { base + 158, "getgroups" },
+ { base + 159, "setgroups" },
+ { base + 160, "uname", unameFunc64 },
+ { base + 161, "sethostname", ignoreFunc },
+ { base + 162, "setdomainname" },
+ { base + 163, "getrlimit", getrlimitFunc<ArmLinux64> },
+ { base + 164, "setrlimit", ignoreFunc },
+ { base + 165, "getrusage", getrusageFunc<ArmLinux64> },
+ { base + 166, "umask" },
+ { base + 167, "prctl" },
+ { base + 168, "getcpu" },
+ { base + 169, "gettimeofday", gettimeofdayFunc<ArmLinux64> },
+ { base + 170, "settimeofday" },
+ { base + 171, "adjtimex" },
+ { base + 172, "getpid", getpidFunc },
+ { base + 173, "getppid", getppidFunc },
+ { base + 174, "getuid", getuidFunc },
+ { base + 175, "geteuid", geteuidFunc },
+ { base + 176, "getgid", getgidFunc },
+ { base + 177, "getegid", getegidFunc },
+ { base + 178, "gettid", gettidFunc },
+ { base + 179, "sysinfo", sysinfoFunc<ArmLinux64> },
+ { base + 180, "mq_open" },
+ { base + 181, "mq_unlink" },
+ { base + 182, "mq_timedsend" },
+ { base + 183, "mq_timedreceive" },
+ { base + 184, "mq_notify" },
+ { base + 185, "mq_getsetattr" },
+ { base + 186, "msgget" },
+ { base + 187, "msgctl" },
+ { base + 188, "msgrcv" },
+ { base + 189, "msgsnd" },
+ { base + 190, "semget" },
+ { base + 191, "semctl" },
+ { base + 192, "semtimedop" },
+ { base + 193, "semop" },
+ { base + 194, "shmget" },
+ { base + 195, "shmctl" },
+ { base + 196, "shmat" },
+ { base + 197, "shmdt" },
+ { base + 198, "socket" },
+ { base + 199, "socketpair" },
+ { base + 200, "bind" },
+ { base + 201, "listen" },
+ { base + 202, "accept" },
+ { base + 203, "connect" },
+ { base + 204, "getsockname" },
+ { base + 205, "getpeername" },
+ { base + 206, "sendto" },
+ { base + 207, "recvfrom" },
+ { base + 208, "setsockopt" },
+ { base + 209, "getsockopt" },
+ { base + 210, "shutdown" },
+ { base + 211, "sendmsg" },
+ { base + 212, "recvmsg" },
+ { base + 213, "readahead" },
+ { base + 214, "brk", brkFunc },
+ { base + 215, "munmap", munmapFunc },
+ { base + 216, "mremap", mremapFunc<ArmLinux64> },
+ { base + 217, "add_key" },
+ { base + 218, "request_key" },
+ { base + 219, "keyctl" },
+ { base + 220, "clone", cloneBackwardsFunc<ArmLinux64> },
+ { base + 221, "execve", execveFunc<ArmLinux64> },
+ { base + 222, "mmap2", mmapFunc<ArmLinux64> },
+ { base + 223, "fadvise64_64" },
+ { base + 224, "swapon" },
+ { base + 225, "swapoff" },
+ { base + 226, "mprotect", ignoreFunc },
+ { base + 227, "msync" },
+ { base + 228, "mlock" },
+ { base + 229, "munlock" },
+ { base + 230, "mlockall" },
+ { base + 231, "munlockall" },
+ { base + 232, "mincore" },
+ { base + 233, "madvise", ignoreFunc },
+ { base + 234, "remap_file_pages" },
+ { base + 235, "mbind" },
+ { base + 236, "get_mempolicy" },
+ { base + 237, "set_mempolicy" },
+ { base + 238, "migrate_pages" },
+ { base + 239, "move_pages" },
+ { base + 240, "rt_tgsigqueueinfo" },
+ { base + 241, "perf_event_open" },
+ { base + 242, "accept4" },
+ { base + 243, "recvmmsg" },
+ { base + 260, "wait4" },
+ { base + 261, "prlimit64", prlimitFunc<ArmLinux64> },
+ { base + 262, "fanotify_init" },
+ { base + 263, "fanotify_mark" },
+ { base + 264, "name_to_handle_at" },
+ { base + 265, "open_by_handle_at" },
+ { base + 266, "clock_adjtime" },
+ { base + 267, "syncfs" },
+ { base + 268, "setns" },
+ { base + 269, "sendmmsg" },
+ { base + 270, "process_vm_readv" },
+ { base + 271, "process_vm_writev" },
+ { base + 1024, "open", openFunc<ArmLinux64> },
+ { base + 1025, "link" },
+ { base + 1026, "unlink", unlinkFunc },
+ { base + 1027, "mknod" },
+ { base + 1028, "chmod", chmodFunc<ArmLinux64> },
+ { base + 1029, "chown" },
+ { base + 1030, "mkdir", mkdirFunc },
+ { base + 1031, "rmdir" },
+ { base + 1032, "lchown" },
+ { base + 1033, "access", accessFunc },
+ { base + 1034, "rename", renameFunc },
+ { base + 1035, "readlink", readlinkFunc },
+ { base + 1036, "symlink" },
+ { base + 1037, "utimes" },
+ { base + 1038, "stat64", stat64Func<ArmLinux64> },
+ { base + 1039, "lstat64", lstat64Func<ArmLinux64> },
+ { base + 1040, "pipe", pipePseudoFunc },
+ { base + 1041, "dup2" },
+ { base + 1042, "epoll_create" },
+ { base + 1043, "inotify_init" },
+ { base + 1044, "eventfd" },
+ { base + 1045, "signalfd" },
+ { base + 1046, "sendfile" },
+ { base + 1047, "ftruncate", ftruncateFunc },
+ { base + 1048, "truncate", truncateFunc },
+ { base + 1049, "stat", statFunc<ArmLinux64> },
+ { base + 1050, "lstat" },
+ { base + 1051, "fstat", fstatFunc<ArmLinux64> },
+ { base + 1052, "fcntl", fcntlFunc },
+ { base + 1053, "fadvise64" },
+ { base + 1054, "newfstatat" },
+ { base + 1055, "fstatfs" },
+ { base + 1056, "statfs" },
+ { base + 1057, "lseek", lseekFunc },
+ { base + 1058, "mmap", mmapFunc<ArmLinux64> },
+ { base + 1059, "alarm" },
+ { base + 1060, "getpgrp" },
+ { base + 1061, "pause" },
+ { base + 1062, "time", timeFunc<ArmLinux64> },
+ { base + 1063, "utime" },
+ { base + 1064, "creat" },
#if defined(SYS_getdents)
- /* 1065 */ { "getdents", getdentsFunc },
+ { base + 1065, "getdents", getdentsFunc },
#else
- /* 1065 */ { "getdents" },
+ { base + 1065, "getdents" },
#endif
- /* 1066 */ { "futimesat" },
- /* 1067 */ { "select" },
- /* 1068 */ { "poll" },
- /* 1069 */ { "epoll_wait" },
- /* 1070 */ { "ustat" },
- /* 1071 */ { "vfork" },
- /* 1072 */ { "oldwait4" },
- /* 1073 */ { "recv" },
- /* 1074 */ { "send" },
- /* 1075 */ { "bdflush" },
- /* 1076 */ { "umount" },
- /* 1077 */ { "uselib" },
- /* 1078 */ { "_sysctl" },
- /* 1079 */ { "fork" }
+ { base + 1066, "futimesat" },
+ { base + 1067, "select" },
+ { base + 1068, "poll" },
+ { base + 1069, "epoll_wait" },
+ { base + 1070, "ustat" },
+ { base + 1071, "vfork" },
+ { base + 1072, "oldwait4" },
+ { base + 1073, "recv" },
+ { base + 1074, "send" },
+ { base + 1075, "bdflush" },
+ { base + 1076, "umount" },
+ { base + 1077, "uselib" },
+ { base + 1078, "_sysctl" },
+ { base + 1079, "fork" }
+ })
+ {}
};
-static SyscallDescABI<ArmLinuxProcess32::SyscallABI> privSyscallDescs32[] = {
- /* 1 */ { "breakpoint" },
- /* 2 */ { "cacheflush" },
- /* 3 */ { "usr26" },
- /* 4 */ { "usr32" },
- /* 5 */ { "set_tls", setTLSFunc32 }
+static SyscallTable64 syscallDescs64Low(0), syscallDescs64High(0x900000);
+
+static SyscallDescTable<ArmLinuxProcess32::SyscallABI> privSyscallDescs32 = {
+ { 0xf0001, "breakpoint" },
+ { 0xf0002, "cacheflush" },
+ { 0xf0003, "usr26" },
+ { 0xf0004, "usr32" },
+ { 0xf0005, "set_tls", setTLSFunc32 },
};
// Indices 1, 3 and 4 are unallocated.
-static SyscallDescABI<ArmLinuxProcess64::SyscallABI> privSyscallDescs64[] = {
- /* 1 */ { "unallocated" },
- /* 2 */ { "cacheflush" },
- /* 3 */ { "unallocated" },
- /* 4 */ { "unallocated" },
- /* 5 */ { "set_tls", setTLSFunc64 }
+static SyscallDescTable<ArmLinuxProcess64::SyscallABI> privSyscallDescs64 = {
+ { 0x1002, "cacheflush" },
+ { 0x1005, "set_tls", setTLSFunc64 }
};
ArmLinuxProcess32::ArmLinuxProcess32(ProcessParams * params,
- ObjectFile *objFile, ObjectFile::Arch _arch)
- : ArmProcess32(params, objFile, _arch)
-{
- SyscallTable table;
-
- table.descs = syscallDescs32;
- table.size = sizeof(syscallDescs32) / sizeof(SyscallDesc);
- table.base = 0;
- syscallTables.push_back(table);
- table.base = 0x900000;
- syscallTables.push_back(table);
-
- table.descs = privSyscallDescs32;
- table.size = sizeof(privSyscallDescs32) / sizeof(SyscallDesc);
- table.base = 0xf0001;
- syscallTables.push_back(table);
-}
+ ObjectFile *objFile, ObjectFile::Arch _arch) :
+ ArmProcess32(params, objFile, _arch)
+{}
ArmLinuxProcess64::ArmLinuxProcess64(ProcessParams * params,
- ObjectFile *objFile, ObjectFile::Arch _arch)
- : ArmProcess64(params, objFile, _arch)
-{
- SyscallTable table;
-
- table.descs = syscallDescs64;
- table.size = sizeof(syscallDescs64) / sizeof(SyscallDesc);
- table.base = 0;
- syscallTables.push_back(table);
- table.base = 0x900000;
- syscallTables.push_back(table);
-
- table.descs = privSyscallDescs64;
- table.size = sizeof(privSyscallDescs64) / sizeof(SyscallDesc);
- table.base = 0x1001;
- syscallTables.push_back(table);
-}
+ ObjectFile *objFile, ObjectFile::Arch _arch) :
+ ArmProcess64(params, objFile, _arch)
+{}
const Addr ArmLinuxProcess32::commPage = 0xffff0000;
-SyscallDesc*
-ArmLinuxProcessBits::getLinuxDesc(int callnum)
-{
- // Angel SWI syscalls are unsupported in this release
- if (callnum == 0x123456)
- panic("Attempt to execute an ANGEL_SWI system call (newlib-related)");
- for (unsigned i = 0; i < syscallTables.size(); i++) {
- SyscallDesc *desc = syscallTables[i].getDesc(callnum);
- if (desc)
- return desc;
- }
- return NULL;
-}
-
-SyscallDesc *
-ArmLinuxProcessBits::SyscallTable::getDesc(int callnum) const
-{
- int offset = callnum - base;
- if (offset < 0 || offset >= size)
- return NULL;
- return &descs[offset];
-}
-
SyscallDesc*
ArmLinuxProcess32::getDesc(int callnum)
{
- return getLinuxDesc(callnum);
+ SyscallDesc *desc = syscallDescs32Low.get(callnum);
+ if (desc)
+ return desc;
+ desc = syscallDescs32Low.get(callnum);
+ if (desc)
+ return desc;
+ return privSyscallDescs32.get(callnum);
}
SyscallDesc*
ArmLinuxProcess64::getDesc(int callnum)
{
- return getLinuxDesc(callnum);
+ SyscallDesc *desc = syscallDescs64Low.get(callnum);
+ if (desc)
+ return desc;
+ desc = syscallDescs64Low.get(callnum);
+ if (desc)
+ return desc;
+ return privSyscallDescs64.get(callnum);
}
void
class ArmLinuxProcessBits
{
protected:
- SyscallDesc* getLinuxDesc(int callnum);
-
- struct SyscallTable
- {
- int base;
- SyscallDesc *descs;
- int size;
-
- SyscallDesc *getDesc(int offset) const;
- };
-
- std::vector<SyscallTable> syscallTables;
-
struct SyscallABI {};
};
return 0;
}
-SyscallDescABI<MipsProcess::SyscallABI> MipsLinuxProcess::syscallDescs[] = {
- /* 0 */ { "syscall" },
- /* 1 */ { "exit", exitFunc },
- /* 2 */ { "fork" },
- /* 3 */ { "read", readFunc<MipsLinux> },
- /* 4 */ { "write", writeFunc<MipsLinux> },
- /* 5 */ { "open", openFunc<MipsLinux> },
- /* 6 */ { "close", closeFunc },
- /* 7 */ { "waitpid" },
- /* 8 */ { "creat" },
- /* 9 */ { "link" },
- /* 10 */ { "unlink", unlinkFunc },
- /* 11 */ { "execve" },
- /* 12 */ { "chdir" },
- /* 13 */ { "time" },
- /* 14 */ { "mknod" },
- /* 15 */ { "chmod", chmodFunc<MipsLinux> },
- /* 16 */ { "lchown", chownFunc },
- /* 17 */ { "break", brkFunc },
- /* 18 */ { "unused#18" },
- /* 19 */ { "lseek", lseekFunc },
- /* 20 */ { "getpid", getpidFunc },
- /* 21 */ { "mount" },
- /* 22 */ { "umount" },
- /* 23 */ { "setuid", ignoreFunc },
- /* 24 */ { "getuid", getuidFunc },
- /* 25 */ { "stime" },
- /* 26 */ { "ptrace" },
- /* 27 */ { "alarm" },
- /* 28 */ { "unused#28" },
- /* 29 */ { "pause" },
- /* 30 */ { "utime" },
- /* 31 */ { "stty" },
- /* 32 */ { "gtty" },
- /* 33 */ { "access" },
- /* 34 */ { "nice" },
- /* 35 */ { "ftime" },
- /* 36 */ { "sync" },
- /* 37 */ { "kill" },
- /* 38 */ { "rename" },
- /* 39 */ { "mkdir", mkdirFunc },
- /* 40 */ { "rmdir" },
- /* 41 */ { "dup" },
- /* 42 */ { "pipe", pipePseudoFunc },
- /* 43 */ { "times" },
- /* 44 */ { "prof" },
- /* 45 */ { "brk", brkFunc },
- /* 46 */ { "setgid" },
- /* 47 */ { "getgid", getgidFunc },
- /* 48 */ { "signal", ignoreFunc },
- /* 49 */ { "geteuid", geteuidFunc },
- /* 50 */ { "getegid", getegidFunc },
- /* 51 */ { "acct" },
- /* 52 */ { "umount2" },
- /* 53 */ { "lock" },
- /* 54 */ { "ioctl", ioctlFunc<MipsLinux> },
- /* 55 */ { "fcntl", fcntlFunc },
- /* 56 */ { "mpx" },
- /* 57 */ { "setpgid" },
- /* 58 */ { "ulimit" },
- /* 59 */ { "unused#59" },
- /* 60 */ { "umask", umaskFunc },
- /* 61 */ { "chroot" },
- /* 62 */ { "ustat" },
- /* 63 */ { "dup2" },
- /* 64 */ { "getppid", getpagesizeFunc },
- /* 65 */ { "getpgrp" },
- /* 66 */ { "setsid" },
- /* 67 */ { "sigaction" },
- /* 68 */ { "sgetmask" },
- /* 69 */ { "ssetmask" },
- /* 70 */ { "setreuid" },
- /* 71 */ { "setregid" },
- /* 72 */ { "sigsuspend" },
- /* 73 */ { "sigpending" },
- /* 74 */ { "sethostname", ignoreFunc },
- /* 75 */ { "setrlimit" },
- /* 76 */ { "getrlimit" },
- /* 77 */ { "getrusage", getrusageFunc<MipsLinux> },
- /* 78 */ { "gettimeofday" },
- /* 79 */ { "settimeofday" },
- /* 80 */ { "getgroups" },
- /* 81 */ { "setgroups" },
- /* 82 */ { "reserved#82" },
- /* 83 */ { "symlink" },
- /* 84 */ { "unused#84" },
- /* 85 */ { "readlink", readlinkFunc },
- /* 86 */ { "uselib" },
- /* 87 */ { "swapon", gethostnameFunc },
- /* 88 */ { "reboot" },
- /* 89 */ { "readdir" },
- /* 90 */ { "mmap", mmapFunc<MipsLinux> },
- /* 91 */ { "munmap",munmapFunc },
- /* 92 */ { "truncate", truncateFunc },
- /* 93 */ { "ftruncate", ftruncateFunc },
- /* 94 */ { "fchmod", fchmodFunc<MipsLinux> },
- /* 95 */ { "fchown", fchownFunc },
- /* 96 */ { "getpriority" },
- /* 97 */ { "setpriority" },
- /* 98 */ { "profil" },
- /* 99 */ { "statfs" },
- /* 100 */ { "fstatfs" },
- /* 101 */ { "ioperm" },
- /* 102 */ { "socketcall" },
- /* 103 */ { "syslog" },
- /* 104 */ { "setitimer" },
- /* 105 */ { "getitimer" },
- /* 106 */ { "stat", statFunc<MipsLinux> },
- /* 107 */ { "lstat" },
- /* 108 */ { "fstat", fstatFunc<MipsLinux> },
- /* 109 */ { "unused#109" },
- /* 110 */ { "iopl" },
- /* 111 */ { "vhangup" },
- /* 112 */ { "idle", ignoreFunc },
- /* 113 */ { "vm86" },
- /* 114 */ { "wait4" },
- /* 115 */ { "swapoff" },
- /* 116 */ { "sysinfo", sysinfoFunc<MipsLinux> },
- /* 117 */ { "ipc" },
- /* 118 */ { "fsync" },
- /* 119 */ { "sigreturn" },
- /* 120 */ { "clone" },
- /* 121 */ { "setdomainname" },
- /* 122 */ { "uname", unameFunc },
- /* 123 */ { "modify_ldt" },
- /* 124 */ { "adjtimex" },
- /* 125 */ { "mprotect", ignoreFunc },
- /* 126 */ { "sigprocmask" },
- /* 127 */ { "create_module" },
- /* 128 */ { "init_module" },
- /* 129 */ { "delete_module" },
- /* 130 */ { "get_kernel_syms" },
- /* 131 */ { "quotactl" },
- /* 132 */ { "getpgid" },
- /* 133 */ { "fchdir" },
- /* 134 */ { "bdflush" },
- /* 135 */ { "sysfs" },
- /* 136 */ { "personality" },
- /* 137 */ { "afs_syscall" },
- /* 138 */ { "setfsuid" },
- /* 139 */ { "setfsgid" },
- /* 140 */ { "llseek" },
- /* 141 */ { "getdents" },
- /* 142 */ { "newselect" },
- /* 143 */ { "flock" },
- /* 144 */ { "msync" },
- /* 145 */ { "readv" },
- /* 146 */ { "writev", writevFunc<MipsLinux> },
- /* 147 */ { "cacheflush" },
- /* 148 */ { "cachectl" },
- /* 149 */ { "sysmips" },
- /* 150 */ { "unused#150" },
- /* 151 */ { "getsid" },
- /* 152 */ { "fdatasync" },
- /* 153 */ { "sysctl", ignoreFunc },
- /* 154 */ { "mlock" },
- /* 155 */ { "munlock" },
- /* 156 */ { "mlockall" },
- /* 157 */ { "munlockall" },
- /* 158 */ { "sched_setparam" },
- /* 159 */ { "sched_getparam" },
- /* 160 */ { "sched_setscheduler" },
- /* 161 */ { "sched_getscheduler" },
- /* 162 */ { "sched_yield" },
- /* 163 */ { "sched_get_prioritymax" },
- /* 164 */ { "sched_get_priority_min" },
- /* 165 */ { "sched_rr_get_interval" },
- /* 166 */ { "nanosleep" },
- /* 167 */ { "mremap", mremapFunc<MipsLinux> },
- /* 168 */ { "accept" },
- /* 169 */ { "bind" },
- /* 170 */ { "connect" },
- /* 171 */ { "getpeername" },
- /* 172 */ { "getsockname" },
- /* 173 */ { "getsockopt" },
- /* 174 */ { "listen" },
- /* 175 */ { "recv" },
- /* 176 */ { "recvmsg" },
- /* 177 */ { "send" },
- /* 178 */ { "sendmsg", ignoreFunc },
- /* 179 */ { "sendto" },
- /* 180 */ { "setsockopt" },
- /* 181 */ { "shutdown" },
- /* 182 */ { "unknown #182" },
- /* 183 */ { "socket", ignoreFunc },
- /* 184 */ { "socketpair" },
- /* 185 */ { "setresuid" },
- /* 186 */ { "getresuid" },
- /* 187 */ { "query_module" },
- /* 188 */ { "poll" },
- /* 189 */ { "nfsservctl" },
- /* 190 */ { "setresgid" },
- /* 191 */ { "getresgid" },
- /* 192 */ { "prctl" },
- /* 193 */ { "rt_sigreturn" },
- /* 194 */ { "rt_sigaction" },
- /* 195 */ { "rt_sigprocmask" },
- /* 196 */ { "rt_sigpending" },
- /* 197 */ { "rt_sigtimedwait" },
- /* 198 */ { "rt_sigqueueinfo", ignoreFunc },
- /* 199 */ { "rt_sigsuspend" },
- /* 200 */ { "pread64" },
- /* 201 */ { "pwrite64" },
- /* 202 */ { "chown" },
- /* 203 */ { "getcwd", getcwdFunc },
- /* 204 */ { "capget" },
- /* 205 */ { "capset" },
- /* 206 */ { "sigalstack" },
- /* 207 */ { "sendfile" },
- /* 208 */ { "getpmsg" },
- /* 209 */ { "putpmsg" },
- /* 210 */ { "mmap2" },
- /* 211 */ { "truncate64" },
- /* 212 */ { "ftruncate64" },
- /* 213 */ { "stat64" },
- /* 214 */ { "lstat64", lstat64Func<MipsLinux> },
- /* 215 */ { "fstat64", fstat64Func<MipsLinux> },
- /* 216 */ { "pivot_root" },
- /* 217 */ { "mincore" },
- /* 218 */ { "madvise" },
- /* 219 */ { "getdents64" },
- /* 220 */ { "fcntl64", fcntl64Func },
- /* 221 */ { "reserved#221" },
- /* 222 */ { "gettid" },
- /* 223 */ { "readahead" },
- /* 224 */ { "setxattr" },
- /* 225 */ { "lsetxattr" },
- /* 226 */ { "fsetxattr" },
- /* 227 */ { "getxattr" },
- /* 228 */ { "lgetxattr" },
- /* 229 */ { "fgetxattr" },
- /* 230 */ { "listxattr" },
- /* 231 */ { "llistxattr" },
- /* 232 */ { "flistxattr" },
- /* 233 */ { "removexattr" },
- /* 234 */ { "lremovexattr" },
- /* 235 */ { "fremovexattr", ignoreFunc },
- /* 236 */ { "tkill" },
- /* 237 */ { "sendfile64" },
- /* 238 */ { "futex" },
- /* 239 */ { "sched_setaffinity" },
- /* 240 */ { "sched_getaffinity" },
- /* 241 */ { "io_setup" },
- /* 242 */ { "io_destroy" },
- /* 243 */ { "io_getevents" },
- /* 244 */ { "io_submit" },
- /* 245 */ { "io_cancel" },
- /* 246 */ { "exit_group", exitFunc },
- /* 247 */ { "lookup_dcookie" },
- /* 248 */ { "epoll_create" },
- /* 249 */ { "epoll_ctl" },
- /* 250 */ { "epoll_wait" },
- /* 251 */ { "remap_file_pages" },
- /* 252 */ { "set_tid_address" },
- /* 253 */ { "restart_syscall" },
- /* 254 */ { "fadvise64" },
- /* 255 */ { "statfs64" },
- /* 256 */ { "fstafs64" },
- /* 257 */ { "timer_create", sys_getsysinfoFunc },
- /* 258 */ { "timer_settime", sys_setsysinfoFunc },
- /* 259 */ { "timer_gettime" },
- /* 260 */ { "timer_getoverrun" },
- /* 261 */ { "timer_delete" },
- /* 262 */ { "clock_settime" },
- /* 263 */ { "clock_gettime" },
- /* 264 */ { "clock_getres" },
- /* 265 */ { "clock_nanosleep" },
- /* 266 */ { "tgkill" },
- /* 267 */ { "utimes" },
- /* 268 */ { "mbind" },
- /* 269 */ { "get_mempolicy" },
- /* 270 */ { "set_mempolicy" },
- /* 271 */ { "mq_open" },
- /* 272 */ { "mq_unlink" },
- /* 273 */ { "mq_timedsend" },
- /* 274 */ { "mq_timedreceive" },
- /* 275 */ { "mq_notify" },
- /* 276 */ { "mq_getsetattr" },
- /* 277 */ { "vserver" },
- /* 278 */ { "waitid" },
- /* 279 */ { "unknown #279" },
- /* 280 */ { "add_key" },
- /* 281 */ { "request_key" },
- /* 282 */ { "keyctl" },
- /* 283 */ { "set_thread_area", setThreadAreaFunc },
- /* 284 */ { "inotify_init" },
- /* 285 */ { "inotify_add_watch" },
- /* 286 */ { "inotify_rm_watch" },
- /* 287 */ { "migrate_pages" },
- /* 288 */ { "openat" },
- /* 289 */ { "mkdirat" },
- /* 290 */ { "mknodat" },
- /* 291 */ { "fchownat" },
- /* 292 */ { "futimesat" },
- /* 293 */ { "fstatat64" },
- /* 294 */ { "unlinkat" },
- /* 295 */ { "renameat" },
- /* 296 */ { "linkat" },
- /* 297 */ { "symlinkat" },
- /* 298 */ { "readlinkat" },
- /* 299 */ { "fchmodat" },
- /* 300 */ { "faccessat" },
- /* 301 */ { "pselect6" },
- /* 302 */ { "ppoll" },
- /* 303 */ { "unshare" },
- /* 304 */ { "splice" },
- /* 305 */ { "sync_file_range" },
- /* 306 */ { "tee" },
- /* 307 */ { "vmsplice" },
- /* 308 */ { "move_pages" },
- /* 309 */ { "set_robust_list" },
- /* 310 */ { "get_robust_list" },
- /* 311 */ { "kexec_load" },
- /* 312 */ { "getcpu" },
- /* 313 */ { "epoll_pwait" },
- /* 314 */ { "ioprio_set" },
- /* 315 */ { "ioprio_get" },
- /* 316 */ { "utimensat" },
- /* 317 */ { "signalfd" },
- /* 318 */ { "timerfd" },
- /* 319 */ { "eventfd" }
+SyscallDescTable<MipsProcess::SyscallABI> MipsLinuxProcess::syscallDescs = {
+ { 4000, "syscall" },
+ { 4001, "exit", exitFunc },
+ { 4002, "fork" },
+ { 4003, "read", readFunc<MipsLinux> },
+ { 4004, "write", writeFunc<MipsLinux> },
+ { 4005, "open", openFunc<MipsLinux> },
+ { 4006, "close", closeFunc },
+ { 4007, "waitpid" },
+ { 4008, "creat" },
+ { 4009, "link" },
+ { 4010, "unlink", unlinkFunc },
+ { 4011, "execve" },
+ { 4012, "chdir" },
+ { 4013, "time" },
+ { 4014, "mknod" },
+ { 4015, "chmod", chmodFunc<MipsLinux> },
+ { 4016, "lchown", chownFunc },
+ { 4017, "break", brkFunc },
+ { 4018, "unused#18" },
+ { 4019, "lseek", lseekFunc },
+ { 4020, "getpid", getpidFunc },
+ { 4021, "mount" },
+ { 4022, "umount" },
+ { 4023, "setuid", ignoreFunc },
+ { 4024, "getuid", getuidFunc },
+ { 4025, "stime" },
+ { 4026, "ptrace" },
+ { 4027, "alarm" },
+ { 4028, "unused#28" },
+ { 4029, "pause" },
+ { 4030, "utime" },
+ { 4031, "stty" },
+ { 4032, "gtty" },
+ { 4033, "access" },
+ { 4034, "nice" },
+ { 4035, "ftime" },
+ { 4036, "sync" },
+ { 4037, "kill" },
+ { 4038, "rename" },
+ { 4039, "mkdir", mkdirFunc },
+ { 4040, "rmdir" },
+ { 4041, "dup" },
+ { 4042, "pipe", pipePseudoFunc },
+ { 4043, "times" },
+ { 4044, "prof" },
+ { 4045, "brk", brkFunc },
+ { 4046, "setgid" },
+ { 4047, "getgid", getgidFunc },
+ { 4048, "signal", ignoreFunc },
+ { 4049, "geteuid", geteuidFunc },
+ { 4050, "getegid", getegidFunc },
+ { 4051, "acct" },
+ { 4052, "umount2" },
+ { 4053, "lock" },
+ { 4054, "ioctl", ioctlFunc<MipsLinux> },
+ { 4055, "fcntl", fcntlFunc },
+ { 4056, "mpx" },
+ { 4057, "setpgid" },
+ { 4058, "ulimit" },
+ { 4059, "unused#59" },
+ { 4060, "umask", umaskFunc },
+ { 4061, "chroot" },
+ { 4062, "ustat" },
+ { 4063, "dup2" },
+ { 4064, "getppid", getpagesizeFunc },
+ { 4065, "getpgrp" },
+ { 4066, "setsid" },
+ { 4067, "sigaction" },
+ { 4068, "sgetmask" },
+ { 4069, "ssetmask" },
+ { 4070, "setreuid" },
+ { 4071, "setregid" },
+ { 4072, "sigsuspend" },
+ { 4073, "sigpending" },
+ { 4074, "sethostname", ignoreFunc },
+ { 4075, "setrlimit" },
+ { 4076, "getrlimit" },
+ { 4077, "getrusage", getrusageFunc<MipsLinux> },
+ { 4078, "gettimeofday" },
+ { 4079, "settimeofday" },
+ { 4080, "getgroups" },
+ { 4081, "setgroups" },
+ { 4082, "reserved#82" },
+ { 4083, "symlink" },
+ { 4084, "unused#84" },
+ { 4085, "readlink", readlinkFunc },
+ { 4086, "uselib" },
+ { 4087, "swapon", gethostnameFunc },
+ { 4088, "reboot" },
+ { 4089, "readdir" },
+ { 4090, "mmap", mmapFunc<MipsLinux> },
+ { 4091, "munmap",munmapFunc },
+ { 4092, "truncate", truncateFunc },
+ { 4093, "ftruncate", ftruncateFunc },
+ { 4094, "fchmod", fchmodFunc<MipsLinux> },
+ { 4095, "fchown", fchownFunc },
+ { 4096, "getpriority" },
+ { 4097, "setpriority" },
+ { 4098, "profil" },
+ { 4099, "statfs" },
+ { 4100, "fstatfs" },
+ { 4101, "ioperm" },
+ { 4102, "socketcall" },
+ { 4103, "syslog" },
+ { 4104, "setitimer" },
+ { 4105, "getitimer" },
+ { 4106, "stat", statFunc<MipsLinux> },
+ { 4107, "lstat" },
+ { 4108, "fstat", fstatFunc<MipsLinux> },
+ { 4109, "unused#109" },
+ { 4110, "iopl" },
+ { 4111, "vhangup" },
+ { 4112, "idle", ignoreFunc },
+ { 4113, "vm86" },
+ { 4114, "wait4" },
+ { 4115, "swapoff" },
+ { 4116, "sysinfo", sysinfoFunc<MipsLinux> },
+ { 4117, "ipc" },
+ { 4118, "fsync" },
+ { 4119, "sigreturn" },
+ { 4120, "clone" },
+ { 4121, "setdomainname" },
+ { 4122, "uname", unameFunc },
+ { 4123, "modify_ldt" },
+ { 4124, "adjtimex" },
+ { 4125, "mprotect", ignoreFunc },
+ { 4126, "sigprocmask" },
+ { 4127, "create_module" },
+ { 4128, "init_module" },
+ { 4129, "delete_module" },
+ { 4130, "get_kernel_syms" },
+ { 4131, "quotactl" },
+ { 4132, "getpgid" },
+ { 4133, "fchdir" },
+ { 4134, "bdflush" },
+ { 4135, "sysfs" },
+ { 4136, "personality" },
+ { 4137, "afs_syscall" },
+ { 4138, "setfsuid" },
+ { 4139, "setfsgid" },
+ { 4140, "llseek" },
+ { 4141, "getdents" },
+ { 4142, "newselect" },
+ { 4143, "flock" },
+ { 4144, "msync" },
+ { 4145, "readv" },
+ { 4146, "writev", writevFunc<MipsLinux> },
+ { 4147, "cacheflush" },
+ { 4148, "cachectl" },
+ { 4149, "sysmips" },
+ { 4150, "unused#150" },
+ { 4151, "getsid" },
+ { 4152, "fdatasync" },
+ { 4153, "sysctl", ignoreFunc },
+ { 4154, "mlock" },
+ { 4155, "munlock" },
+ { 4156, "mlockall" },
+ { 4157, "munlockall" },
+ { 4158, "sched_setparam" },
+ { 4159, "sched_getparam" },
+ { 4160, "sched_setscheduler" },
+ { 4161, "sched_getscheduler" },
+ { 4162, "sched_yield" },
+ { 4163, "sched_get_prioritymax" },
+ { 4164, "sched_get_priority_min" },
+ { 4165, "sched_rr_get_interval" },
+ { 4166, "nanosleep" },
+ { 4167, "mremap", mremapFunc<MipsLinux> },
+ { 4168, "accept" },
+ { 4169, "bind" },
+ { 4170, "connect" },
+ { 4171, "getpeername" },
+ { 4172, "getsockname" },
+ { 4173, "getsockopt" },
+ { 4174, "listen" },
+ { 4175, "recv" },
+ { 4176, "recvmsg" },
+ { 4177, "send" },
+ { 4178, "sendmsg", ignoreFunc },
+ { 4179, "sendto" },
+ { 4180, "setsockopt" },
+ { 4181, "shutdown" },
+ { 4182, "unknown #182" },
+ { 4183, "socket", ignoreFunc },
+ { 4184, "socketpair" },
+ { 4185, "setresuid" },
+ { 4186, "getresuid" },
+ { 4187, "query_module" },
+ { 4188, "poll" },
+ { 4189, "nfsservctl" },
+ { 4190, "setresgid" },
+ { 4191, "getresgid" },
+ { 4192, "prctl" },
+ { 4193, "rt_sigreturn" },
+ { 4194, "rt_sigaction" },
+ { 4195, "rt_sigprocmask" },
+ { 4196, "rt_sigpending" },
+ { 4197, "rt_sigtimedwait" },
+ { 4198, "rt_sigqueueinfo", ignoreFunc },
+ { 4199, "rt_sigsuspend" },
+ { 4200, "pread64" },
+ { 4201, "pwrite64" },
+ { 4202, "chown" },
+ { 4203, "getcwd", getcwdFunc },
+ { 4204, "capget" },
+ { 4205, "capset" },
+ { 4206, "sigalstack" },
+ { 4207, "sendfile" },
+ { 4208, "getpmsg" },
+ { 4209, "putpmsg" },
+ { 4210, "mmap2" },
+ { 4211, "truncate64" },
+ { 4212, "ftruncate64" },
+ { 4213, "stat64" },
+ { 4214, "lstat64", lstat64Func<MipsLinux> },
+ { 4215, "fstat64", fstat64Func<MipsLinux> },
+ { 4216, "pivot_root" },
+ { 4217, "mincore" },
+ { 4218, "madvise" },
+ { 4219, "getdents64" },
+ { 4220, "fcntl64", fcntl64Func },
+ { 4221, "reserved#221" },
+ { 4222, "gettid" },
+ { 4223, "readahead" },
+ { 4224, "setxattr" },
+ { 4225, "lsetxattr" },
+ { 4226, "fsetxattr" },
+ { 4227, "getxattr" },
+ { 4228, "lgetxattr" },
+ { 4229, "fgetxattr" },
+ { 4230, "listxattr" },
+ { 4231, "llistxattr" },
+ { 4232, "flistxattr" },
+ { 4233, "removexattr" },
+ { 4234, "lremovexattr" },
+ { 4235, "fremovexattr", ignoreFunc },
+ { 4236, "tkill" },
+ { 4237, "sendfile64" },
+ { 4238, "futex" },
+ { 4239, "sched_setaffinity" },
+ { 4240, "sched_getaffinity" },
+ { 4241, "io_setup" },
+ { 4242, "io_destroy" },
+ { 4243, "io_getevents" },
+ { 4244, "io_submit" },
+ { 4245, "io_cancel" },
+ { 4246, "exit_group", exitFunc },
+ { 4247, "lookup_dcookie" },
+ { 4248, "epoll_create" },
+ { 4249, "epoll_ctl" },
+ { 4250, "epoll_wait" },
+ { 4251, "remap_file_pages" },
+ { 4252, "set_tid_address" },
+ { 4253, "restart_syscall" },
+ { 4254, "fadvise64" },
+ { 4255, "statfs64" },
+ { 4256, "fstafs64" },
+ { 4257, "timer_create", sys_getsysinfoFunc },
+ { 4258, "timer_settime", sys_setsysinfoFunc },
+ { 4259, "timer_gettime" },
+ { 4260, "timer_getoverrun" },
+ { 4261, "timer_delete" },
+ { 4262, "clock_settime" },
+ { 4263, "clock_gettime" },
+ { 4264, "clock_getres" },
+ { 4265, "clock_nanosleep" },
+ { 4266, "tgkill" },
+ { 4267, "utimes" },
+ { 4268, "mbind" },
+ { 4269, "get_mempolicy" },
+ { 4270, "set_mempolicy" },
+ { 4271, "mq_open" },
+ { 4272, "mq_unlink" },
+ { 4273, "mq_timedsend" },
+ { 4274, "mq_timedreceive" },
+ { 4275, "mq_notify" },
+ { 4276, "mq_getsetattr" },
+ { 4277, "vserver" },
+ { 4278, "waitid" },
+ { 4279, "unknown #279" },
+ { 4280, "add_key" },
+ { 4281, "request_key" },
+ { 4282, "keyctl" },
+ { 4283, "set_thread_area", setThreadAreaFunc },
+ { 4284, "inotify_init" },
+ { 4285, "inotify_add_watch" },
+ { 4286, "inotify_rm_watch" },
+ { 4287, "migrate_pages" },
+ { 4288, "openat" },
+ { 4289, "mkdirat" },
+ { 4290, "mknodat" },
+ { 4291, "fchownat" },
+ { 4292, "futimesat" },
+ { 4293, "fstatat64" },
+ { 4294, "unlinkat" },
+ { 4295, "renameat" },
+ { 4296, "linkat" },
+ { 4297, "symlinkat" },
+ { 4298, "readlinkat" },
+ { 4299, "fchmodat" },
+ { 4300, "faccessat" },
+ { 4301, "pselect6" },
+ { 4302, "ppoll" },
+ { 4303, "unshare" },
+ { 4304, "splice" },
+ { 4305, "sync_file_range" },
+ { 4306, "tee" },
+ { 4307, "vmsplice" },
+ { 4308, "move_pages" },
+ { 4309, "set_robust_list" },
+ { 4310, "get_robust_list" },
+ { 4311, "kexec_load" },
+ { 4312, "getcpu" },
+ { 4313, "epoll_pwait" },
+ { 4314, "ioprio_set" },
+ { 4315, "ioprio_get" },
+ { 4316, "utimensat" },
+ { 4317, "signalfd" },
+ { 4318, "timerfd" },
+ { 4319, "eventfd" }
};
MipsLinuxProcess::MipsLinuxProcess(ProcessParams * params,
- ObjectFile *objFile)
- : MipsProcess(params, objFile),
- Num_Syscall_Descs(sizeof(syscallDescs) / sizeof(SyscallDesc))
-{ }
+ ObjectFile *objFile) :
+ MipsProcess(params, objFile)
+{}
SyscallDesc*
MipsLinuxProcess::getDesc(int callnum)
{
- //MIPS32 syscalls are in the range of 4000 - 4999
- int m5_sys_idx = callnum - 4000;
-
- if (m5_sys_idx < 0 || m5_sys_idx >= Num_Syscall_Descs)
- return NULL;
-
- return &syscallDescs[m5_sys_idx];
+ return syscallDescs.get(callnum);
}
void
void syscall(ThreadContext *tc, Fault *fault) override;
- /// Array of syscall descriptors, indexed by call number.
- static SyscallDescABI<SyscallABI> syscallDescs[];
- const int Num_Syscall_Descs;
+ /// Syscall descriptors, indexed by call number.
+ static SyscallDescTable<SyscallABI> syscallDescs;
};
#endif // __MIPS_LINUX_PROCESS_HH__
return 0;
}
-SyscallDescABI<PowerProcess::SyscallABI> PowerLinuxProcess::syscallDescs[] = {
- /* 0 */ { "syscall" },
- /* 1 */ { "exit", exitFunc },
- /* 2 */ { "fork" },
- /* 3 */ { "read", readFunc<PowerLinux> },
- /* 4 */ { "write", writeFunc<PowerLinux> },
- /* 5 */ { "open", openFunc<PowerLinux> },
- /* 6 */ { "close", closeFunc },
- /* 7 */ { "waitpid" }, //???
- /* 8 */ { "creat" },
- /* 9 */ { "link" },
- /* 10 */ { "unlink", unlinkFunc },
- /* 11 */ { "execve" },
- /* 12 */ { "chdir" },
- /* 13 */ { "time", timeFunc<PowerLinux> },
- /* 14 */ { "mknod" },
- /* 15 */ { "chmod", chmodFunc<PowerLinux> },
- /* 16 */ { "lchown", chownFunc },
- /* 17 */ { "break", brkFunc }, //???
- /* 18 */ { "unused#18" }, //???
- /* 19 */ { "lseek", lseekFunc },
- /* 20 */ { "getpid", getpidFunc },
- /* 21 */ { "mount" },
- /* 22 */ { "umount" },
- /* 23 */ { "setuid", ignoreFunc },
- /* 24 */ { "getuid", getuidFunc },
- /* 25 */ { "stime" },
- /* 26 */ { "ptrace" },
- /* 27 */ { "alarm" },
- /* 28 */ { "unused#28" },
- /* 29 */ { "pause" },
- /* 30 */ { "utime" },
- /* 31 */ { "stty" },
- /* 32 */ { "gtty" },
- /* 33 */ { "access" },
- /* 34 */ { "nice" },
- /* 35 */ { "ftime" },
- /* 36 */ { "sync" },
- /* 37 */ { "kill", ignoreFunc },
- /* 38 */ { "rename", renameFunc },
- /* 39 */ { "mkdir" },
- /* 40 */ { "rmdir" },
- /* 41 */ { "dup", dupFunc },
- /* 42 */ { "pipe" },
- /* 43 */ { "times", timesFunc<PowerLinux> },
- /* 44 */ { "prof" },
- /* 45 */ { "brk", brkFunc },
- /* 46 */ { "setgid" },
- /* 47 */ { "getgid", getgidFunc },
- /* 48 */ { "signal", ignoreFunc },
- /* 49 */ { "geteuid", geteuidFunc },
- /* 50 */ { "getegid", getegidFunc },
- /* 51 */ { "acct" },
- /* 52 */ { "umount2" },
- /* 53 */ { "lock" },
- /* 54 */ { "ioctl", ioctlFunc<PowerLinux> },
- /* 55 */ { "fcntl", fcntlFunc },
- /* 56 */ { "mpx" },
- /* 57 */ { "setpgid" },
- /* 58 */ { "ulimit" },
- /* 59 */ { "unused#59" },
- /* 60 */ { "umask", umaskFunc },
- /* 61 */ { "chroot" },
- /* 62 */ { "ustat" },
- /* 63 */ { "dup2" },
- /* 64 */ { "getppid", getpagesizeFunc },
- /* 65 */ { "getpgrp" },
- /* 66 */ { "setsid" },
- /* 67 */ { "sigaction" },
- /* 68 */ { "sgetmask" },
- /* 69 */ { "ssetmask" },
- /* 70 */ { "setreuid" },
- /* 71 */ { "setregid" },
- /* 72 */ { "sigsuspend" },
- /* 73 */ { "sigpending" },
- /* 74 */ { "sethostname", ignoreFunc },
- /* 75 */ { "setrlimit", ignoreFunc },
- /* 76 */ { "getrlimit" },
- /* 77 */ { "getrusage", ignoreFunc },
- /* 78 */ { "gettimeofday" },
- /* 79 */ { "settimeofday" },
- /* 80 */ { "getgroups" },
- /* 81 */ { "setgroups" },
- /* 82 */ { "reserved#82" },
- /* 83 */ { "symlink" },
- /* 84 */ { "unused#84" },
- /* 85 */ { "readlink" },
- /* 86 */ { "uselib" },
- /* 87 */ { "swapon", gethostnameFunc },
- /* 88 */ { "reboot" },
- /* 89 */ { "readdir" },
- /* 90 */ { "mmap", mmapFunc<PowerLinux> },
- /* 91 */ { "munmap",munmapFunc },
- /* 92 */ { "truncate", truncateFunc },
- /* 93 */ { "ftruncate", ftruncateFunc },
- /* 94 */ { "fchmod" },
- /* 95 */ { "fchown" },
- /* 96 */ { "getpriority" },
- /* 97 */ { "setpriority" },
- /* 98 */ { "profil" },
- /* 99 */ { "statfs" },
- /* 100 */ { "fstatfs" },
- /* 101 */ { "ioperm" },
- /* 102 */ { "socketcall" },
- /* 103 */ { "syslog" },
- /* 104 */ { "setitimer" },
- /* 105 */ { "getitimer" },
- /* 106 */ { "stat", statFunc<PowerLinux> },
- /* 107 */ { "lstat" },
- /* 108 */ { "fstat", fstatFunc<PowerLinux> },
- /* 109 */ { "unused#109" },
- /* 110 */ { "iopl" },
- /* 111 */ { "vhangup" },
- /* 112 */ { "idle", ignoreFunc },
- /* 113 */ { "vm86" },
- /* 114 */ { "wait4" },
- /* 115 */ { "swapoff" },
- /* 116 */ { "sysinfo" },
- /* 117 */ { "ipc" },
- /* 118 */ { "fsync" },
- /* 119 */ { "sigreturn" },
- /* 120 */ { "clone" },
- /* 121 */ { "setdomainname" },
- /* 122 */ { "uname", unameFunc },
- /* 123 */ { "modify_ldt" },
- /* 124 */ { "adjtimex" },
- /* 125 */ { "mprotect", ignoreFunc },
- /* 126 */ { "sigprocmask" },
- /* 127 */ { "create_module" },
- /* 128 */ { "init_module" },
- /* 129 */ { "delete_module" },
- /* 130 */ { "get_kernel_syms" },
- /* 131 */ { "quotactl" },
- /* 132 */ { "getpgid" },
- /* 133 */ { "fchdir" },
- /* 134 */ { "bdflush" },
- /* 135 */ { "sysfs" },
- /* 136 */ { "personality" },
- /* 137 */ { "afs_syscall" },
- /* 138 */ { "setfsuid" },
- /* 139 */ { "setfsgid" },
- /* 140 */ { "llseek", _llseekFunc },
- /* 141 */ { "getdents" },
- /* 142 */ { "newselect" },
- /* 143 */ { "flock" },
- /* 144 */ { "msync" },
- /* 145 */ { "readv" },
- /* 146 */ { "writev", writevFunc<PowerLinux> },
- /* 147 */ { "getsid" },
- /* 148 */ { "fdatasync" },
- /* 149 */ { "sysctl" },
- /* 150 */ { "mlock" },
- /* 151 */ { "munlock" },
- /* 152 */ { "mlockall" },
- /* 153 */ { "munlockall" },
- /* 154 */ { "sched_setparam" },
- /* 155 */ { "sched_getparam" },
- /* 156 */ { "sched_setscheduler" },
- /* 157 */ { "sched_getscheduler" },
- /* 158 */ { "sched_yield" },
- /* 159 */ { "sched_get_priority_max" },
- /* 160 */ { "sched_get_priority_min" },
- /* 161 */ { "sched_rr_get_interval" },
- /* 162 */ { "nanosleep" },
- /* 163 */ { "mremap" },
- /* 164 */ { "setresuid" },
- /* 165 */ { "getresuid" },
- /* 166 */ { "vm862" },
- /* 167 */ { "query_module" },
- /* 168 */ { "poll" },
- /* 169 */ { "nfsservctl" },
- /* 170 */ { "setresgid" },
- /* 171 */ { "getresgid" },
- /* 172 */ { "prctl" },
- /* 173 */ { "rt_sigaction", ignoreFunc },
- /* 174 */ { "rt_sigprocmask" },
- /* 175 */ { "unknown#175" },
- /* 176 */ { "rt_sigpending" },
- /* 177 */ { "rt_sigtimedwait" },
- /* 178 */ { "rt_sigqueueinfo", ignoreFunc },
- /* 179 */ { "rt_sigsuspend" },
- /* 180 */ { "pread64" },
- /* 181 */ { "pwrite64" },
- /* 182 */ { "chown" },
- /* 183 */ { "getcwd" },
- /* 184 */ { "capget" },
- /* 185 */ { "capset" },
- /* 186 */ { "sigaltstack" },
- /* 187 */ { "sendfile" },
- /* 188 */ { "getpmsg" },
- /* 189 */ { "putpmsg" },
- /* 190 */ { "ugetrlimit", ignoreFunc },
- /* 191 */ { "getrlimit" },
- /* 192 */ { "mmap2", mmapFunc<PowerLinux> },
- /* 193 */ { "truncate64" },
- /* 194 */ { "ftruncate64", ftruncate64Func },
- /* 195 */ { "stat64", stat64Func<PowerLinux> },
- /* 196 */ { "lstat64", lstat64Func<PowerLinux> },
- /* 197 */ { "fstat64", fstat64Func<PowerLinux> },
- /* 198 */ { "lchown" },
- /* 199 */ { "getuid", getuidFunc },
- /* 200 */ { "getgid", getgidFunc },
- /* 201 */ { "geteuid", geteuidFunc },
- /* 202 */ { "getegid", getegidFunc },
- /* 203 */ { "setreuid" },
- /* 204 */ { "fcntl64", fcntl64Func },
- /* 205 */ { "getgroups" },
- /* 206 */ { "setgroups" },
- /* 207 */ { "fchown" },
- /* 208 */ { "setresuid" },
- /* 209 */ { "getresuid" },
- /* 210 */ { "setresgid" },
- /* 211 */ { "getresgid" },
- /* 212 */ { "chown" },
- /* 213 */ { "setuid" },
- /* 214 */ { "setgid" },
- /* 215 */ { "setfsuid" },
- /* 216 */ { "setfsgid" },
- /* 217 */ { "getdents64" },
- /* 218 */ { "pivot_root" },
- /* 219 */ { "mincore" },
- /* 220 */ { "madvise" },
- /* 221 */ { "unknown#221" },
- /* 222 */ { "tux" },
- /* 223 */ { "unknown#223" },
- /* 224 */ { "gettid" },
- /* 225 */ { "readahead" },
- /* 226 */ { "setxattr" },
- /* 227 */ { "lsetxattr" },
- /* 228 */ { "fsetxattr" },
- /* 229 */ { "getxattr" },
- /* 230 */ { "lgetxattr" },
- /* 231 */ { "fgetxattr" },
- /* 232 */ { "listxattr" },
- /* 233 */ { "llistxattr" },
- /* 234 */ { "exit_group", exitGroupFunc },
- /* 235 */ { "removexattr" },
- /* 236 */ { "lremovexattr" },
- /* 237 */ { "fremovexattr" },
- /* 238 */ { "tkill" },
- /* 239 */ { "sendfile64" },
- /* 240 */ { "futex" },
- /* 241 */ { "sched_setaffinity" },
- /* 242 */ { "sched_getaffinity" },
- /* 243 */ { "io_setup" },
- /* 244 */ { "io_destory" },
- /* 245 */ { "io_getevents" },
- /* 246 */ { "io_submit" },
- /* 247 */ { "io_cancel" },
- /* 248 */ { "unknown#248" },
- /* 249 */ { "lookup_dcookie" },
- /* 250 */ { "epoll_create" },
- /* 251 */ { "epoll_ctl" },
- /* 252 */ { "epoll_wait" },
- /* 253 */ { "remap_file_pages" },
- /* 254 */ { "set_thread_area" },
- /* 255 */ { "get_thread_area" },
- /* 256 */ { "set_tid_address" },
- /* 257 */ { "timer_create" },
- /* 258 */ { "timer_settime" },
- /* 259 */ { "timer_gettime" },
- /* 260 */ { "timer_getoverrun" },
- /* 261 */ { "timer_delete" },
- /* 262 */ { "clock_settime" },
- /* 263 */ { "clock_gettime" },
- /* 264 */ { "clock_getres" },
- /* 265 */ { "clock_nanosleep" },
- /* 266 */ { "statfs64" },
- /* 267 */ { "fstatfs64" },
- /* 268 */ { "tgkill" },
- /* 269 */ { "utimes" },
- /* 270 */ { "arm_fadvise64_64" },
- /* 271 */ { "pciconfig_iobase" },
- /* 272 */ { "pciconfig_read" },
- /* 273 */ { "pciconfig_write" },
- /* 274 */ { "mq_open" },
- /* 275 */ { "mq_unlink" },
- /* 276 */ { "mq_timedsend" },
- /* 277 */ { "mq_timedreceive" },
- /* 278 */ { "mq_notify" },
- /* 279 */ { "mq_getsetattr" },
- /* 280 */ { "waitid" },
- /* 281 */ { "socket" },
- /* 282 */ { "bind" },
- /* 283 */ { "connect" },
- /* 284 */ { "listen" },
- /* 285 */ { "accept" },
- /* 286 */ { "getsockname" },
- /* 287 */ { "getpeername" },
- /* 288 */ { "socketpair" },
- /* 289 */ { "send" },
- /* 290 */ { "sendto" },
- /* 291 */ { "recv" },
- /* 292 */ { "recvfrom" },
- /* 293 */ { "shutdown" },
- /* 294 */ { "setsockopt" },
- /* 295 */ { "getsockopt" },
- /* 296 */ { "sendmsg" },
- /* 297 */ { "rcvmsg" },
- /* 298 */ { "semop" },
- /* 299 */ { "semget" },
- /* 300 */ { "semctl" },
- /* 301 */ { "msgsend" },
- /* 302 */ { "msgrcv" },
- /* 303 */ { "msgget" },
- /* 304 */ { "msgctl" },
- /* 305 */ { "shmat" },
- /* 306 */ { "shmdt" },
- /* 307 */ { "shmget" },
- /* 308 */ { "shmctl" },
- /* 309 */ { "add_key" },
- /* 310 */ { "request_key" },
- /* 311 */ { "keyctl" },
- /* 312 */ { "semtimedop" },
- /* 313 */ { "vserver" },
- /* 314 */ { "ioprio_set" },
- /* 315 */ { "ioprio_get" },
- /* 316 */ { "inotify_init" },
- /* 317 */ { "inotify_add_watch" },
- /* 318 */ { "inotify_rm_watch" },
- /* 319 */ { "mbind" },
- /* 320 */ { "get_mempolicy" },
- /* 321 */ { "set_mempolicy" },
- /* 322 */ { "openat" },
- /* 323 */ { "mkdirat" },
- /* 324 */ { "mknodat" },
- /* 325 */ { "fchownat" },
- /* 326 */ { "futimesat" },
- /* 327 */ { "fstatat64" },
- /* 328 */ { "unlinkat" },
- /* 329 */ { "renameat" },
- /* 330 */ { "linkat" },
- /* 331 */ { "symlinkat" },
- /* 332 */ { "readlinkat" },
- /* 333 */ { "fchmodat" },
- /* 334 */ { "faccessat" },
- /* 335 */ { "pselect6" },
- /* 336 */ { "ppoll" },
- /* 337 */ { "unshare" },
- /* 338 */ { "set_robust_list" },
- /* 339 */ { "get_robust_list" },
- /* 340 */ { "splice" },
- /* 341 */ { "arm_sync_file_range" },
- /* 342 */ { "tee" },
- /* 343 */ { "vmsplice" },
- /* 344 */ { "move_pages" },
- /* 345 */ { "getcpu" },
- /* 346 */ { "epoll_pwait" },
+SyscallDescTable<PowerProcess::SyscallABI> PowerLinuxProcess::syscallDescs = {
+ { 0, "syscall" },
+ { 1, "exit", exitFunc },
+ { 2, "fork" },
+ { 3, "read", readFunc<PowerLinux> },
+ { 4, "write", writeFunc<PowerLinux> },
+ { 5, "open", openFunc<PowerLinux> },
+ { 6, "close", closeFunc },
+ { 7, "waitpid" }, //???
+ { 8, "creat" },
+ { 9, "link" },
+ { 10, "unlink", unlinkFunc },
+ { 11, "execve" },
+ { 12, "chdir" },
+ { 13, "time", timeFunc<PowerLinux> },
+ { 14, "mknod" },
+ { 15, "chmod", chmodFunc<PowerLinux> },
+ { 16, "lchown", chownFunc },
+ { 17, "break", brkFunc }, //???
+ { 18, "unused#18" }, //???
+ { 19, "lseek", lseekFunc },
+ { 20, "getpid", getpidFunc },
+ { 21, "mount" },
+ { 22, "umount" },
+ { 23, "setuid", ignoreFunc },
+ { 24, "getuid", getuidFunc },
+ { 25, "stime" },
+ { 26, "ptrace" },
+ { 27, "alarm" },
+ { 28, "unused#28" },
+ { 29, "pause" },
+ { 30, "utime" },
+ { 31, "stty" },
+ { 32, "gtty" },
+ { 33, "access" },
+ { 34, "nice" },
+ { 35, "ftime" },
+ { 36, "sync" },
+ { 37, "kill", ignoreFunc },
+ { 38, "rename", renameFunc },
+ { 39, "mkdir" },
+ { 40, "rmdir" },
+ { 41, "dup", dupFunc },
+ { 42, "pipe" },
+ { 43, "times", timesFunc<PowerLinux> },
+ { 44, "prof" },
+ { 45, "brk", brkFunc },
+ { 46, "setgid" },
+ { 47, "getgid", getgidFunc },
+ { 48, "signal", ignoreFunc },
+ { 49, "geteuid", geteuidFunc },
+ { 50, "getegid", getegidFunc },
+ { 51, "acct" },
+ { 52, "umount2" },
+ { 53, "lock" },
+ { 54, "ioctl", ioctlFunc<PowerLinux> },
+ { 55, "fcntl", fcntlFunc },
+ { 56, "mpx" },
+ { 57, "setpgid" },
+ { 58, "ulimit" },
+ { 59, "unused#59" },
+ { 60, "umask", umaskFunc },
+ { 61, "chroot" },
+ { 62, "ustat" },
+ { 63, "dup2" },
+ { 64, "getppid", getpagesizeFunc },
+ { 65, "getpgrp" },
+ { 66, "setsid" },
+ { 67, "sigaction" },
+ { 68, "sgetmask" },
+ { 69, "ssetmask" },
+ { 70, "setreuid" },
+ { 71, "setregid" },
+ { 72, "sigsuspend" },
+ { 73, "sigpending" },
+ { 74, "sethostname", ignoreFunc },
+ { 75, "setrlimit", ignoreFunc },
+ { 76, "getrlimit" },
+ { 77, "getrusage", ignoreFunc },
+ { 78, "gettimeofday" },
+ { 79, "settimeofday" },
+ { 80, "getgroups" },
+ { 81, "setgroups" },
+ { 82, "reserved#82" },
+ { 83, "symlink" },
+ { 84, "unused#84" },
+ { 85, "readlink" },
+ { 86, "uselib" },
+ { 87, "swapon", gethostnameFunc },
+ { 88, "reboot" },
+ { 89, "readdir" },
+ { 90, "mmap", mmapFunc<PowerLinux> },
+ { 91, "munmap",munmapFunc },
+ { 92, "truncate", truncateFunc },
+ { 93, "ftruncate", ftruncateFunc },
+ { 94, "fchmod" },
+ { 95, "fchown" },
+ { 96, "getpriority" },
+ { 97, "setpriority" },
+ { 98, "profil" },
+ { 99, "statfs" },
+ { 100, "fstatfs" },
+ { 101, "ioperm" },
+ { 102, "socketcall" },
+ { 103, "syslog" },
+ { 104, "setitimer" },
+ { 105, "getitimer" },
+ { 106, "stat", statFunc<PowerLinux> },
+ { 107, "lstat" },
+ { 108, "fstat", fstatFunc<PowerLinux> },
+ { 109, "unused#109" },
+ { 110, "iopl" },
+ { 111, "vhangup" },
+ { 112, "idle", ignoreFunc },
+ { 113, "vm86" },
+ { 114, "wait4" },
+ { 115, "swapoff" },
+ { 116, "sysinfo" },
+ { 117, "ipc" },
+ { 118, "fsync" },
+ { 119, "sigreturn" },
+ { 120, "clone" },
+ { 121, "setdomainname" },
+ { 122, "uname", unameFunc },
+ { 123, "modify_ldt" },
+ { 124, "adjtimex" },
+ { 125, "mprotect", ignoreFunc },
+ { 126, "sigprocmask" },
+ { 127, "create_module" },
+ { 128, "init_module" },
+ { 129, "delete_module" },
+ { 130, "get_kernel_syms" },
+ { 131, "quotactl" },
+ { 132, "getpgid" },
+ { 133, "fchdir" },
+ { 134, "bdflush" },
+ { 135, "sysfs" },
+ { 136, "personality" },
+ { 137, "afs_syscall" },
+ { 138, "setfsuid" },
+ { 139, "setfsgid" },
+ { 140, "llseek", _llseekFunc },
+ { 141, "getdents" },
+ { 142, "newselect" },
+ { 143, "flock" },
+ { 144, "msync" },
+ { 145, "readv" },
+ { 146, "writev", writevFunc<PowerLinux> },
+ { 147, "getsid" },
+ { 148, "fdatasync" },
+ { 149, "sysctl" },
+ { 150, "mlock" },
+ { 151, "munlock" },
+ { 152, "mlockall" },
+ { 153, "munlockall" },
+ { 154, "sched_setparam" },
+ { 155, "sched_getparam" },
+ { 156, "sched_setscheduler" },
+ { 157, "sched_getscheduler" },
+ { 158, "sched_yield" },
+ { 159, "sched_get_priority_max" },
+ { 160, "sched_get_priority_min" },
+ { 161, "sched_rr_get_interval" },
+ { 162, "nanosleep" },
+ { 163, "mremap" },
+ { 164, "setresuid" },
+ { 165, "getresuid" },
+ { 166, "vm862" },
+ { 167, "query_module" },
+ { 168, "poll" },
+ { 169, "nfsservctl" },
+ { 170, "setresgid" },
+ { 171, "getresgid" },
+ { 172, "prctl" },
+ { 173, "rt_sigaction", ignoreFunc },
+ { 174, "rt_sigprocmask" },
+ { 175, "unknown#175" },
+ { 176, "rt_sigpending" },
+ { 177, "rt_sigtimedwait" },
+ { 178, "rt_sigqueueinfo", ignoreFunc },
+ { 179, "rt_sigsuspend" },
+ { 180, "pread64" },
+ { 181, "pwrite64" },
+ { 182, "chown" },
+ { 183, "getcwd" },
+ { 184, "capget" },
+ { 185, "capset" },
+ { 186, "sigaltstack" },
+ { 187, "sendfile" },
+ { 188, "getpmsg" },
+ { 189, "putpmsg" },
+ { 190, "ugetrlimit", ignoreFunc },
+ { 191, "getrlimit" },
+ { 192, "mmap2", mmapFunc<PowerLinux> },
+ { 193, "truncate64" },
+ { 194, "ftruncate64", ftruncate64Func },
+ { 195, "stat64", stat64Func<PowerLinux> },
+ { 196, "lstat64", lstat64Func<PowerLinux> },
+ { 197, "fstat64", fstat64Func<PowerLinux> },
+ { 198, "lchown" },
+ { 199, "getuid", getuidFunc },
+ { 200, "getgid", getgidFunc },
+ { 201, "geteuid", geteuidFunc },
+ { 202, "getegid", getegidFunc },
+ { 203, "setreuid" },
+ { 204, "fcntl64", fcntl64Func },
+ { 205, "getgroups" },
+ { 206, "setgroups" },
+ { 207, "fchown" },
+ { 208, "setresuid" },
+ { 209, "getresuid" },
+ { 210, "setresgid" },
+ { 211, "getresgid" },
+ { 212, "chown" },
+ { 213, "setuid" },
+ { 214, "setgid" },
+ { 215, "setfsuid" },
+ { 216, "setfsgid" },
+ { 217, "getdents64" },
+ { 218, "pivot_root" },
+ { 219, "mincore" },
+ { 220, "madvise" },
+ { 221, "unknown#221" },
+ { 222, "tux" },
+ { 223, "unknown#223" },
+ { 224, "gettid" },
+ { 225, "readahead" },
+ { 226, "setxattr" },
+ { 227, "lsetxattr" },
+ { 228, "fsetxattr" },
+ { 229, "getxattr" },
+ { 230, "lgetxattr" },
+ { 231, "fgetxattr" },
+ { 232, "listxattr" },
+ { 233, "llistxattr" },
+ { 234, "exit_group", exitGroupFunc },
+ { 235, "removexattr" },
+ { 236, "lremovexattr" },
+ { 237, "fremovexattr" },
+ { 238, "tkill" },
+ { 239, "sendfile64" },
+ { 240, "futex" },
+ { 241, "sched_setaffinity" },
+ { 242, "sched_getaffinity" },
+ { 243, "io_setup" },
+ { 244, "io_destory" },
+ { 245, "io_getevents" },
+ { 246, "io_submit" },
+ { 247, "io_cancel" },
+ { 248, "unknown#248" },
+ { 249, "lookup_dcookie" },
+ { 250, "epoll_create" },
+ { 251, "epoll_ctl" },
+ { 252, "epoll_wait" },
+ { 253, "remap_file_pages" },
+ { 254, "set_thread_area" },
+ { 255, "get_thread_area" },
+ { 256, "set_tid_address" },
+ { 257, "timer_create" },
+ { 258, "timer_settime" },
+ { 259, "timer_gettime" },
+ { 260, "timer_getoverrun" },
+ { 261, "timer_delete" },
+ { 262, "clock_settime" },
+ { 263, "clock_gettime" },
+ { 264, "clock_getres" },
+ { 265, "clock_nanosleep" },
+ { 266, "statfs64" },
+ { 267, "fstatfs64" },
+ { 268, "tgkill" },
+ { 269, "utimes" },
+ { 270, "arm_fadvise64_64" },
+ { 271, "pciconfig_iobase" },
+ { 272, "pciconfig_read" },
+ { 273, "pciconfig_write" },
+ { 274, "mq_open" },
+ { 275, "mq_unlink" },
+ { 276, "mq_timedsend" },
+ { 277, "mq_timedreceive" },
+ { 278, "mq_notify" },
+ { 279, "mq_getsetattr" },
+ { 280, "waitid" },
+ { 281, "socket" },
+ { 282, "bind" },
+ { 283, "connect" },
+ { 284, "listen" },
+ { 285, "accept" },
+ { 286, "getsockname" },
+ { 287, "getpeername" },
+ { 288, "socketpair" },
+ { 289, "send" },
+ { 290, "sendto" },
+ { 291, "recv" },
+ { 292, "recvfrom" },
+ { 293, "shutdown" },
+ { 294, "setsockopt" },
+ { 295, "getsockopt" },
+ { 296, "sendmsg" },
+ { 297, "rcvmsg" },
+ { 298, "semop" },
+ { 299, "semget" },
+ { 300, "semctl" },
+ { 301, "msgsend" },
+ { 302, "msgrcv" },
+ { 303, "msgget" },
+ { 304, "msgctl" },
+ { 305, "shmat" },
+ { 306, "shmdt" },
+ { 307, "shmget" },
+ { 308, "shmctl" },
+ { 309, "add_key" },
+ { 310, "request_key" },
+ { 311, "keyctl" },
+ { 312, "semtimedop" },
+ { 313, "vserver" },
+ { 314, "ioprio_set" },
+ { 315, "ioprio_get" },
+ { 316, "inotify_init" },
+ { 317, "inotify_add_watch" },
+ { 318, "inotify_rm_watch" },
+ { 319, "mbind" },
+ { 320, "get_mempolicy" },
+ { 321, "set_mempolicy" },
+ { 322, "openat" },
+ { 323, "mkdirat" },
+ { 324, "mknodat" },
+ { 325, "fchownat" },
+ { 326, "futimesat" },
+ { 327, "fstatat64" },
+ { 328, "unlinkat" },
+ { 329, "renameat" },
+ { 330, "linkat" },
+ { 331, "symlinkat" },
+ { 332, "readlinkat" },
+ { 333, "fchmodat" },
+ { 334, "faccessat" },
+ { 335, "pselect6" },
+ { 336, "ppoll" },
+ { 337, "unshare" },
+ { 338, "set_robust_list" },
+ { 339, "get_robust_list" },
+ { 340, "splice" },
+ { 341, "arm_sync_file_range" },
+ { 342, "tee" },
+ { 343, "vmsplice" },
+ { 344, "move_pages" },
+ { 345, "getcpu" },
+ { 346, "epoll_pwait" },
};
PowerLinuxProcess::PowerLinuxProcess(ProcessParams * params,
- ObjectFile *objFile)
- : PowerProcess(params, objFile),
- Num_Syscall_Descs(sizeof(syscallDescs) / sizeof(SyscallDesc))
-{
-}
+ ObjectFile *objFile) :
+ PowerProcess(params, objFile)
+{}
SyscallDesc*
PowerLinuxProcess::getDesc(int callnum)
{
- if (callnum < 0 || callnum > Num_Syscall_Descs)
- return NULL;
-
- return &syscallDescs[callnum];
+ return syscallDescs.get(callnum);
}
void
void syscall(ThreadContext *tc, Fault *fault) override;
- /// Array of syscall descriptors, indexed by call number.
- static SyscallDescABI<SyscallABI> syscallDescs[];
-
- const int Num_Syscall_Descs;
+ /// Syscall descriptors, indexed by call number.
+ static SyscallDescTable<SyscallABI> syscallDescs;
};
#endif // __POWER_LINUX_PROCESS_HH__
return 0;
}
-std::map<int, SyscallDescABI<RiscvProcess::SyscallABI>>
- RiscvLinuxProcess64::syscallDescs = {
- {0, { "io_setup" }},
- {1, { "io_destroy" }},
- {2, { "io_submit" }},
- {3, { "io_cancel" }},
- {4, { "io_getevents" }},
- {5, { "setxattr" }},
- {6, { "lsetxattr" }},
- {7, { "fsetxattr" }},
- {8, { "getxattr" }},
- {9, { "lgetxattr" }},
- {10, { "fgetxattr" }},
- {11, { "listxattr" }},
- {12, { "llistxattr" }},
- {13, { "flistxattr" }},
- {14, { "removexattr" }},
- {15, { "lremovexattr" }},
- {16, { "fremovexattr" }},
- {17, { "getcwd", getcwdFunc }},
- {18, { "lookup_dcookie" }},
- {19, { "eventfd2" }},
- {20, { "epoll_create1" }},
- {21, { "epoll_ctl" }},
- {22, { "epoll_pwait" }},
- {23, { "dup", dupFunc }},
- {24, { "dup3" }},
- {25, { "fcntl", fcntl64Func }},
- {26, { "inotify_init1" }},
- {27, { "inotify_add_watch" }},
- {28, { "inotify_rm_watch" }},
- {29, { "ioctl", ioctlFunc<RiscvLinux64> }},
- {30, { "ioprio_get" }},
- {31, { "ioprio_set" }},
- {32, { "flock" }},
- {33, { "mknodat" }},
- {34, { "mkdirat" }},
- {35, { "unlinkat", unlinkatFunc<RiscvLinux64> }},
- {36, { "symlinkat" }},
- {37, { "linkat" }},
- {38, { "renameat", renameatFunc<RiscvLinux64> }},
- {39, { "umount2" }},
- {40, { "mount" }},
- {41, { "pivot_root" }},
- {42, { "nfsservctl" }},
- {43, { "statfs", statfsFunc<RiscvLinux64> }},
- {44, { "fstatfs", fstatfsFunc<RiscvLinux64> }},
- {45, { "truncate", truncateFunc }},
- {46, { "ftruncate", ftruncate64Func }},
- {47, { "fallocate", fallocateFunc }},
- {48, { "faccessat", faccessatFunc<RiscvLinux64> }},
- {49, { "chdir" }},
- {50, { "fchdir" }},
- {51, { "chroot" }},
- {52, { "fchmod", fchmodFunc<RiscvLinux64> }},
- {53, { "fchmodat" }},
- {54, { "fchownat" }},
- {55, { "fchown", fchownFunc }},
- {56, { "openat", openatFunc<RiscvLinux64> }},
- {57, { "close", closeFunc }},
- {58, { "vhangup" }},
- {59, { "pipe2" }},
- {60, { "quotactl" }},
- {61, { "getdents64" }},
- {62, { "lseek", lseekFunc }},
- {63, { "read", readFunc<RiscvLinux64> }},
- {64, { "write", writeFunc<RiscvLinux64> }},
- {66, { "writev", writevFunc<RiscvLinux64> }},
- {67, { "pread64" }},
- {68, { "pwrite64", pwrite64Func<RiscvLinux64> }},
- {69, { "preadv" }},
- {70, { "pwritev" }},
- {71, { "sendfile" }},
- {72, { "pselect6" }},
- {73, { "ppoll" }},
- {74, { "signalfd64" }},
- {75, { "vmsplice" }},
- {76, { "splice" }},
- {77, { "tee" }},
- {78, { "readlinkat", readlinkatFunc<RiscvLinux64> }},
- {79, { "fstatat", fstatat64Func<RiscvLinux64> }},
- {80, { "fstat", fstat64Func<RiscvLinux64> }},
- {81, { "sync" }},
- {82, { "fsync" }},
- {83, { "fdatasync" }},
- {84, { "sync_file_range2" }},
- {85, { "timerfd_create" }},
- {86, { "timerfd_settime" }},
- {87, { "timerfd_gettime" }},
- {88, { "utimensat" }},
- {89, { "acct" }},
- {90, { "capget" }},
- {91, { "capset" }},
- {92, { "personality" }},
- {93, { "exit", exitFunc }},
- {94, { "exit_group", exitGroupFunc }},
- {95, { "waitid" }},
- {96, { "set_tid_address", setTidAddressFunc }},
- {97, { "unshare" }},
- {98, { "futex", futexFunc<RiscvLinux64> }},
- {99, { "set_robust_list", ignoreWarnOnceFunc }},
- {100, { "get_robust_list", ignoreWarnOnceFunc }},
- {101, { "nanosleep", ignoreWarnOnceFunc }},
- {102, { "getitimer" }},
- {103, { "setitimer" }},
- {104, { "kexec_load" }},
- {105, { "init_module" }},
- {106, { "delete_module" }},
- {107, { "timer_create" }},
- {108, { "timer_gettime" }},
- {109, { "timer_getoverrun" }},
- {110, { "timer_settime" }},
- {111, { "timer_delete" }},
- {112, { "clock_settime" }},
- {113, { "clock_gettime", clock_gettimeFunc<RiscvLinux64> }},
- {114, { "clock_getres", clock_getresFunc<RiscvLinux64> }},
- {115, { "clock_nanosleep" }},
- {116, { "syslog" }},
- {117, { "ptrace" }},
- {118, { "sched_setparam" }},
- {119, { "sched_setscheduler" }},
- {120, { "sched_getscheduler" }},
- {121, { "sched_getparam" }},
- {122, { "sched_setaffinity" }},
- {123, { "sched_getaffinity" }},
- {124, { "sched_yield", ignoreWarnOnceFunc }},
- {125, { "sched_get_priority_max" }},
- {126, { "sched_get_priority_min" }},
- {127, { "scheD_rr_get_interval" }},
- {128, { "restart_syscall" }},
- {129, { "kill" }},
- {130, { "tkill" }},
- {131, { "tgkill", tgkillFunc<RiscvLinux64> }},
- {132, { "sigaltstack" }},
- {133, { "rt_sigsuspend", ignoreWarnOnceFunc }},
- {134, { "rt_sigaction", ignoreWarnOnceFunc }},
- {135, { "rt_sigprocmask", ignoreWarnOnceFunc }},
- {136, { "rt_sigpending", ignoreWarnOnceFunc }},
- {137, { "rt_sigtimedwait", ignoreWarnOnceFunc }},
- {138, { "rt_sigqueueinfo", ignoreWarnOnceFunc }},
- {139, { "rt_sigreturn", ignoreWarnOnceFunc }},
- {140, { "setpriority" }},
- {141, { "getpriority" }},
- {142, { "reboot" }},
- {143, { "setregid" }},
- {144, { "setgid" }},
- {145, { "setreuid" }},
- {146, { "setuid", ignoreFunc }},
- {147, { "setresuid" }},
- {148, { "getresuid" }},
- {149, { "getresgid" }},
- {150, { "getresgid" }},
- {151, { "setfsuid" }},
- {152, { "setfsgid" }},
- {153, { "times", timesFunc<RiscvLinux64> }},
- {154, { "setpgid", setpgidFunc }},
- {155, { "getpgid" }},
- {156, { "getsid" }},
- {157, { "setsid" }},
- {158, { "getgroups" }},
- {159, { "setgroups" }},
- {160, { "uname", unameFunc64 }},
- {161, { "sethostname" }},
- {162, { "setdomainname" }},
- {163, { "getrlimit", getrlimitFunc<RiscvLinux64> }},
- {164, { "setrlimit", ignoreFunc }},
- {165, { "getrusage", getrusageFunc<RiscvLinux64> }},
- {166, { "umask", umaskFunc }},
- {167, { "prctl" }},
- {168, { "getcpu" }},
- {169, { "gettimeofday", gettimeofdayFunc<RiscvLinux64> }},
- {170, { "settimeofday" }},
- {171, { "adjtimex" }},
- {172, { "getpid", getpidFunc }},
- {173, { "getppid", getppidFunc }},
- {174, { "getuid", getuidFunc }},
- {175, { "geteuid", geteuidFunc }},
- {176, { "getgid", getgidFunc }},
- {177, { "getegid", getegidFunc }},
- {178, { "gettid", gettidFunc }},
- {179, { "sysinfo", sysinfoFunc<RiscvLinux64> }},
- {180, { "mq_open" }},
- {181, { "mq_unlink" }},
- {182, { "mq_timedsend" }},
- {183, { "mq_timedrecieve" }},
- {184, { "mq_notify" }},
- {185, { "mq_getsetattr" }},
- {186, { "msgget" }},
- {187, { "msgctl" }},
- {188, { "msgrcv" }},
- {189, { "msgsnd" }},
- {190, { "semget" }},
- {191, { "semctl" }},
- {192, { "semtimedop" }},
- {193, { "semop" }},
- {194, { "shmget" }},
- {195, { "shmctl" }},
- {196, { "shmat" }},
- {197, { "shmdt" }},
- {198, { "socket" }},
- {199, { "socketpair" }},
- {200, { "bind" }},
- {201, { "listen" }},
- {202, { "accept" }},
- {203, { "connect" }},
- {204, { "getsockname" }},
- {205, { "getpeername" }},
- {206, { "sendo" }},
- {207, { "recvfrom" }},
- {208, { "setsockopt" }},
- {209, { "getsockopt" }},
- {210, { "shutdown" }},
- {211, { "sendmsg" }},
- {212, { "recvmsg" }},
- {213, { "readahead" }},
- {214, { "brk", brkFunc }},
- {215, { "munmap", munmapFunc }},
- {216, { "mremap", mremapFunc<RiscvLinux64> }},
- {217, { "add_key" }},
- {218, { "request_key" }},
- {219, { "keyctl" }},
- {220, { "clone", cloneBackwardsFunc<RiscvLinux64> }},
- {221, { "execve", execveFunc<RiscvLinux64> }},
- {222, { "mmap", mmapFunc<RiscvLinux64> }},
- {223, { "fadvise64" }},
- {224, { "swapon" }},
- {225, { "swapoff" }},
- {226, { "mprotect", ignoreFunc }},
- {227, { "msync", ignoreFunc }},
- {228, { "mlock", ignoreFunc }},
- {229, { "munlock", ignoreFunc }},
- {230, { "mlockall", ignoreFunc }},
- {231, { "munlockall", ignoreFunc }},
- {232, { "mincore", ignoreFunc }},
- {233, { "madvise", ignoreFunc }},
- {234, { "remap_file_pages" }},
- {235, { "mbind", ignoreFunc }},
- {236, { "get_mempolicy" }},
- {237, { "set_mempolicy" }},
- {238, { "migrate_pages" }},
- {239, { "move_pages" }},
- {240, { "tgsigqueueinfo" }},
- {241, { "perf_event_open" }},
- {242, { "accept4" }},
- {243, { "recvmmsg" }},
- {260, { "wait4" }},
- {261, { "prlimit64", prlimitFunc<RiscvLinux64> }},
- {262, { "fanotify_init" }},
- {263, { "fanotify_mark" }},
- {264, { "name_to_handle_at" }},
- {265, { "open_by_handle_at" }},
- {266, { "clock_adjtime" }},
- {267, { "syncfs" }},
- {268, { "setns" }},
- {269, { "sendmmsg" }},
- {270, { "process_vm_ready" }},
- {271, { "process_vm_writev" }},
- {272, { "kcmp" }},
- {273, { "finit_module" }},
- {274, { "sched_setattr" }},
- {275, { "sched_getattr" }},
- {276, { "renameat2" }},
- {277, { "seccomp" }},
- {278, { "getrandom" }},
- {279, { "memfd_create" }},
- {280, { "bpf" }},
- {281, { "execveat" }},
- {282, { "userfaultid" }},
- {283, { "membarrier" }},
- {284, { "mlock2" }},
- {285, { "copy_file_range" }},
- {286, { "preadv2" }},
- {287, { "pwritev2" }},
- {1024, { "open", openFunc<RiscvLinux64> }},
- {1025, { "link" }},
- {1026, { "unlink", unlinkFunc }},
- {1027, { "mknod" }},
- {1028, { "chmod", chmodFunc<RiscvLinux64> }},
- {1029, { "chown", chownFunc }},
- {1030, { "mkdir", mkdirFunc }},
- {1031, { "rmdir" }},
- {1032, { "lchown" }},
- {1033, { "access", accessFunc }},
- {1034, { "rename", renameFunc }},
- {1035, { "readlink", readlinkFunc }},
- {1036, { "symlink" }},
- {1037, { "utimes", utimesFunc<RiscvLinux64> }},
- {1038, { "stat", stat64Func<RiscvLinux64> }},
- {1039, { "lstat", lstat64Func<RiscvLinux64> }},
- {1040, { "pipe", pipeFunc }},
- {1041, { "dup2", dup2Func }},
- {1042, { "epoll_create" }},
- {1043, { "inotifiy_init" }},
- {1044, { "eventfd" }},
- {1045, { "signalfd" }},
- {1046, { "sendfile" }},
- {1047, { "ftruncate", ftruncate64Func }},
- {1048, { "truncate", truncate64Func }},
- {1049, { "stat", stat64Func<RiscvLinux64> }},
- {1050, { "lstat", lstat64Func<RiscvLinux64> }},
- {1051, { "fstat", fstat64Func<RiscvLinux64> }},
- {1052, { "fcntl", fcntl64Func }},
- {1053, { "fadvise64" }},
- {1054, { "newfstatat" }},
- {1055, { "fstatfs", fstatfsFunc<RiscvLinux64> }},
- {1056, { "statfs", statfsFunc<RiscvLinux64> }},
- {1057, { "lseek", lseekFunc }},
- {1058, { "mmap", mmapFunc<RiscvLinux64> }},
- {1059, { "alarm" }},
- {1060, { "getpgrp" }},
- {1061, { "pause" }},
- {1062, { "time", timeFunc<RiscvLinux64> }},
- {1063, { "utime" }},
- {1064, { "creat" }},
- {1065, { "getdents" }},
- {1066, { "futimesat" }},
- {1067, { "select" }},
- {1068, { "poll" }},
- {1069, { "epoll_wait" }},
- {1070, { "ustat" }},
- {1071, { "vfork" }},
- {1072, { "oldwait4" }},
- {1073, { "recv" }},
- {1074, { "send" }},
- {1075, { "bdflush" }},
- {1076, { "umount" }},
- {1077, { "uselib" }},
- {1078, { "sysctl" }},
- {1079, { "fork" }},
- {2011, { "getmainvars" }}
+SyscallDescTable<RiscvProcess::SyscallABI>
+ RiscvLinuxProcess64::syscallDescs = {
+ { 0, "io_setup" },
+ { 1, "io_destroy" },
+ { 2, "io_submit" },
+ { 3, "io_cancel" },
+ { 4, "io_getevents" },
+ { 5, "setxattr" },
+ { 6, "lsetxattr" },
+ { 7, "fsetxattr" },
+ { 8, "getxattr" },
+ { 9, "lgetxattr" },
+ { 10, "fgetxattr" },
+ { 11, "listxattr" },
+ { 12, "llistxattr" },
+ { 13, "flistxattr" },
+ { 14, "removexattr" },
+ { 15, "lremovexattr" },
+ { 16, "fremovexattr" },
+ { 17, "getcwd", getcwdFunc },
+ { 18, "lookup_dcookie" },
+ { 19, "eventfd2" },
+ { 20, "epoll_create1" },
+ { 21, "epoll_ctl" },
+ { 22, "epoll_pwait" },
+ { 23, "dup", dupFunc },
+ { 24, "dup3" },
+ { 25, "fcntl", fcntl64Func },
+ { 26, "inotify_init1" },
+ { 27, "inotify_add_watch" },
+ { 28, "inotify_rm_watch" },
+ { 29, "ioctl", ioctlFunc<RiscvLinux64> },
+ { 30, "ioprio_get" },
+ { 31, "ioprio_set" },
+ { 32, "flock" },
+ { 33, "mknodat" },
+ { 34, "mkdirat" },
+ { 35, "unlinkat", unlinkatFunc<RiscvLinux64> },
+ { 36, "symlinkat" },
+ { 37, "linkat" },
+ { 38, "renameat", renameatFunc<RiscvLinux64> },
+ { 39, "umount2" },
+ { 40, "mount" },
+ { 41, "pivot_root" },
+ { 42, "nfsservctl" },
+ { 43, "statfs", statfsFunc<RiscvLinux64> },
+ { 44, "fstatfs", fstatfsFunc<RiscvLinux64> },
+ { 45, "truncate", truncateFunc },
+ { 46, "ftruncate", ftruncate64Func },
+ { 47, "fallocate", fallocateFunc },
+ { 48, "faccessat", faccessatFunc<RiscvLinux64> },
+ { 49, "chdir" },
+ { 50, "fchdir" },
+ { 51, "chroot" },
+ { 52, "fchmod", fchmodFunc<RiscvLinux64> },
+ { 53, "fchmodat" },
+ { 54, "fchownat" },
+ { 55, "fchown", fchownFunc },
+ { 56, "openat", openatFunc<RiscvLinux64> },
+ { 57, "close", closeFunc },
+ { 58, "vhangup" },
+ { 59, "pipe2" },
+ { 60, "quotactl" },
+ { 61, "getdents64" },
+ { 62, "lseek", lseekFunc },
+ { 63, "read", readFunc<RiscvLinux64> },
+ { 64, "write", writeFunc<RiscvLinux64> },
+ { 66, "writev", writevFunc<RiscvLinux64> },
+ { 67, "pread64" },
+ { 68, "pwrite64", pwrite64Func<RiscvLinux64> },
+ { 69, "preadv" },
+ { 70, "pwritev" },
+ { 71, "sendfile" },
+ { 72, "pselect6" },
+ { 73, "ppoll" },
+ { 74, "signalfd64" },
+ { 75, "vmsplice" },
+ { 76, "splice" },
+ { 77, "tee" },
+ { 78, "readlinkat", readlinkatFunc<RiscvLinux64> },
+ { 79, "fstatat", fstatat64Func<RiscvLinux64> },
+ { 80, "fstat", fstat64Func<RiscvLinux64> },
+ { 81, "sync" },
+ { 82, "fsync" },
+ { 83, "fdatasync" },
+ { 84, "sync_file_range2" },
+ { 85, "timerfd_create" },
+ { 86, "timerfd_settime" },
+ { 87, "timerfd_gettime" },
+ { 88, "utimensat" },
+ { 89, "acct" },
+ { 90, "capget" },
+ { 91, "capset" },
+ { 92, "personality" },
+ { 93, "exit", exitFunc },
+ { 94, "exit_group", exitGroupFunc },
+ { 95, "waitid" },
+ { 96, "set_tid_address", setTidAddressFunc },
+ { 97, "unshare" },
+ { 98, "futex", futexFunc<RiscvLinux64> },
+ { 99, "set_robust_list", ignoreWarnOnceFunc },
+ { 100, "get_robust_list", ignoreWarnOnceFunc },
+ { 101, "nanosleep", ignoreWarnOnceFunc },
+ { 102, "getitimer" },
+ { 103, "setitimer" },
+ { 104, "kexec_load" },
+ { 105, "init_module" },
+ { 106, "delete_module" },
+ { 107, "timer_create" },
+ { 108, "timer_gettime" },
+ { 109, "timer_getoverrun" },
+ { 110, "timer_settime" },
+ { 111, "timer_delete" },
+ { 112, "clock_settime" },
+ { 113, "clock_gettime", clock_gettimeFunc<RiscvLinux64> },
+ { 114, "clock_getres", clock_getresFunc<RiscvLinux64> },
+ { 115, "clock_nanosleep" },
+ { 116, "syslog" },
+ { 117, "ptrace" },
+ { 118, "sched_setparam" },
+ { 119, "sched_setscheduler" },
+ { 120, "sched_getscheduler" },
+ { 121, "sched_getparam" },
+ { 122, "sched_setaffinity" },
+ { 123, "sched_getaffinity" },
+ { 124, "sched_yield", ignoreWarnOnceFunc },
+ { 125, "sched_get_priority_max" },
+ { 126, "sched_get_priority_min" },
+ { 127, "scheD_rr_get_interval" },
+ { 128, "restart_syscall" },
+ { 129, "kill" },
+ { 130, "tkill" },
+ { 131, "tgkill", tgkillFunc<RiscvLinux64> },
+ { 132, "sigaltstack" },
+ { 133, "rt_sigsuspend", ignoreWarnOnceFunc },
+ { 134, "rt_sigaction", ignoreWarnOnceFunc },
+ { 135, "rt_sigprocmask", ignoreWarnOnceFunc },
+ { 136, "rt_sigpending", ignoreWarnOnceFunc },
+ { 137, "rt_sigtimedwait", ignoreWarnOnceFunc },
+ { 138, "rt_sigqueueinfo", ignoreWarnOnceFunc },
+ { 139, "rt_sigreturn", ignoreWarnOnceFunc },
+ { 140, "setpriority" },
+ { 141, "getpriority" },
+ { 142, "reboot" },
+ { 143, "setregid" },
+ { 144, "setgid" },
+ { 145, "setreuid" },
+ { 146, "setuid", ignoreFunc },
+ { 147, "setresuid" },
+ { 148, "getresuid" },
+ { 149, "getresgid" },
+ { 150, "getresgid" },
+ { 151, "setfsuid" },
+ { 152, "setfsgid" },
+ { 153, "times", timesFunc<RiscvLinux64> },
+ { 154, "setpgid", setpgidFunc },
+ { 155, "getpgid" },
+ { 156, "getsid" },
+ { 157, "setsid" },
+ { 158, "getgroups" },
+ { 159, "setgroups" },
+ { 160, "uname", unameFunc64 },
+ { 161, "sethostname" },
+ { 162, "setdomainname" },
+ { 163, "getrlimit", getrlimitFunc<RiscvLinux64> },
+ { 164, "setrlimit", ignoreFunc },
+ { 165, "getrusage", getrusageFunc<RiscvLinux64> },
+ { 166, "umask", umaskFunc },
+ { 167, "prctl" },
+ { 168, "getcpu" },
+ { 169, "gettimeofday", gettimeofdayFunc<RiscvLinux64> },
+ { 170, "settimeofday" },
+ { 171, "adjtimex" },
+ { 172, "getpid", getpidFunc },
+ { 173, "getppid", getppidFunc },
+ { 174, "getuid", getuidFunc },
+ { 175, "geteuid", geteuidFunc },
+ { 176, "getgid", getgidFunc },
+ { 177, "getegid", getegidFunc },
+ { 178, "gettid", gettidFunc },
+ { 179, "sysinfo", sysinfoFunc<RiscvLinux64> },
+ { 180, "mq_open" },
+ { 181, "mq_unlink" },
+ { 182, "mq_timedsend" },
+ { 183, "mq_timedrecieve" },
+ { 184, "mq_notify" },
+ { 185, "mq_getsetattr" },
+ { 186, "msgget" },
+ { 187, "msgctl" },
+ { 188, "msgrcv" },
+ { 189, "msgsnd" },
+ { 190, "semget" },
+ { 191, "semctl" },
+ { 192, "semtimedop" },
+ { 193, "semop" },
+ { 194, "shmget" },
+ { 195, "shmctl" },
+ { 196, "shmat" },
+ { 197, "shmdt" },
+ { 198, "socket" },
+ { 199, "socketpair" },
+ { 200, "bind" },
+ { 201, "listen" },
+ { 202, "accept" },
+ { 203, "connect" },
+ { 204, "getsockname" },
+ { 205, "getpeername" },
+ { 206, "sendo" },
+ { 207, "recvfrom" },
+ { 208, "setsockopt" },
+ { 209, "getsockopt" },
+ { 210, "shutdown" },
+ { 211, "sendmsg" },
+ { 212, "recvmsg" },
+ { 213, "readahead" },
+ { 214, "brk", brkFunc },
+ { 215, "munmap", munmapFunc },
+ { 216, "mremap", mremapFunc<RiscvLinux64> },
+ { 217, "add_key" },
+ { 218, "request_key" },
+ { 219, "keyctl" },
+ { 220, "clone", cloneBackwardsFunc<RiscvLinux64> },
+ { 221, "execve", execveFunc<RiscvLinux64> },
+ { 222, "mmap", mmapFunc<RiscvLinux64> },
+ { 223, "fadvise64" },
+ { 224, "swapon" },
+ { 225, "swapoff" },
+ { 226, "mprotect", ignoreFunc },
+ { 227, "msync", ignoreFunc },
+ { 228, "mlock", ignoreFunc },
+ { 229, "munlock", ignoreFunc },
+ { 230, "mlockall", ignoreFunc },
+ { 231, "munlockall", ignoreFunc },
+ { 232, "mincore", ignoreFunc },
+ { 233, "madvise", ignoreFunc },
+ { 234, "remap_file_pages" },
+ { 235, "mbind", ignoreFunc },
+ { 236, "get_mempolicy" },
+ { 237, "set_mempolicy" },
+ { 238, "migrate_pages" },
+ { 239, "move_pages" },
+ { 240, "tgsigqueueinfo" },
+ { 241, "perf_event_open" },
+ { 242, "accept4" },
+ { 243, "recvmmsg" },
+ { 260, "wait4" },
+ { 261, "prlimit64", prlimitFunc<RiscvLinux64> },
+ { 262, "fanotify_init" },
+ { 263, "fanotify_mark" },
+ { 264, "name_to_handle_at" },
+ { 265, "open_by_handle_at" },
+ { 266, "clock_adjtime" },
+ { 267, "syncfs" },
+ { 268, "setns" },
+ { 269, "sendmmsg" },
+ { 270, "process_vm_ready" },
+ { 271, "process_vm_writev" },
+ { 272, "kcmp" },
+ { 273, "finit_module" },
+ { 274, "sched_setattr" },
+ { 275, "sched_getattr" },
+ { 276, "renameat2" },
+ { 277, "seccomp" },
+ { 278, "getrandom" },
+ { 279, "memfd_create" },
+ { 280, "bpf" },
+ { 281, "execveat" },
+ { 282, "userfaultid" },
+ { 283, "membarrier" },
+ { 284, "mlock2" },
+ { 285, "copy_file_range" },
+ { 286, "preadv2" },
+ { 287, "pwritev2" },
+ { 1024, "open", openFunc<RiscvLinux64> },
+ { 1025, "link" },
+ { 1026, "unlink", unlinkFunc },
+ { 1027, "mknod" },
+ { 1028, "chmod", chmodFunc<RiscvLinux64> },
+ { 1029, "chown", chownFunc },
+ { 1030, "mkdir", mkdirFunc },
+ { 1031, "rmdir" },
+ { 1032, "lchown" },
+ { 1033, "access", accessFunc },
+ { 1034, "rename", renameFunc },
+ { 1035, "readlink", readlinkFunc },
+ { 1036, "symlink" },
+ { 1037, "utimes", utimesFunc<RiscvLinux64> },
+ { 1038, "stat", stat64Func<RiscvLinux64> },
+ { 1039, "lstat", lstat64Func<RiscvLinux64> },
+ { 1040, "pipe", pipeFunc },
+ { 1041, "dup2", dup2Func },
+ { 1042, "epoll_create" },
+ { 1043, "inotifiy_init" },
+ { 1044, "eventfd" },
+ { 1045, "signalfd" },
+ { 1046, "sendfile" },
+ { 1047, "ftruncate", ftruncate64Func },
+ { 1048, "truncate", truncate64Func },
+ { 1049, "stat", stat64Func<RiscvLinux64> },
+ { 1050, "lstat", lstat64Func<RiscvLinux64> },
+ { 1051, "fstat", fstat64Func<RiscvLinux64> },
+ { 1052, "fcntl", fcntl64Func },
+ { 1053, "fadvise64" },
+ { 1054, "newfstatat" },
+ { 1055, "fstatfs", fstatfsFunc<RiscvLinux64> },
+ { 1056, "statfs", statfsFunc<RiscvLinux64> },
+ { 1057, "lseek", lseekFunc },
+ { 1058, "mmap", mmapFunc<RiscvLinux64> },
+ { 1059, "alarm" },
+ { 1060, "getpgrp" },
+ { 1061, "pause" },
+ { 1062, "time", timeFunc<RiscvLinux64> },
+ { 1063, "utime" },
+ { 1064, "creat" },
+ { 1065, "getdents" },
+ { 1066, "futimesat" },
+ { 1067, "select" },
+ { 1068, "poll" },
+ { 1069, "epoll_wait" },
+ { 1070, "ustat" },
+ { 1071, "vfork" },
+ { 1072, "oldwait4" },
+ { 1073, "recv" },
+ { 1074, "send" },
+ { 1075, "bdflush" },
+ { 1076, "umount" },
+ { 1077, "uselib" },
+ { 1078, "sysctl" },
+ { 1079, "fork" },
+ { 2011, "getmainvars" }
};
-std::map<int, SyscallDescABI<RiscvProcess::SyscallABI>>
+SyscallDescTable<RiscvProcess::SyscallABI>
RiscvLinuxProcess32::syscallDescs = {
- {0, { "io_setup" }},
- {1, { "io_destroy" }},
- {2, { "io_submit" }},
- {3, { "io_cancel" }},
- {4, { "io_getevents" }},
- {5, { "setxattr" }},
- {6, { "lsetxattr" }},
- {7, { "fsetxattr" }},
- {8, { "getxattr" }},
- {9, { "lgetxattr" }},
- {10, { "fgetxattr" }},
- {11, { "listxattr" }},
- {12, { "llistxattr" }},
- {13, { "flistxattr" }},
- {14, { "removexattr" }},
- {15, { "lremovexattr" }},
- {16, { "fremovexattr" }},
- {17, { "getcwd", getcwdFunc }},
- {18, { "lookup_dcookie" }},
- {19, { "eventfd2" }},
- {20, { "epoll_create1" }},
- {21, { "epoll_ctl" }},
- {22, { "epoll_pwait" }},
- {23, { "dup", dupFunc }},
- {24, { "dup3" }},
- {25, { "fcntl", fcntlFunc }},
- {26, { "inotify_init1" }},
- {27, { "inotify_add_watch" }},
- {28, { "inotify_rm_watch" }},
- {29, { "ioctl", ioctlFunc<RiscvLinux32> }},
- {30, { "ioprio_get" }},
- {31, { "ioprio_set" }},
- {32, { "flock" }},
- {33, { "mknodat" }},
- {34, { "mkdirat" }},
- {35, { "unlinkat", unlinkatFunc<RiscvLinux32> }},
- {36, { "symlinkat" }},
- {37, { "linkat" }},
- {38, { "renameat", renameatFunc<RiscvLinux32> }},
- {39, { "umount2" }},
- {40, { "mount" }},
- {41, { "pivot_root" }},
- {42, { "nfsservctl" }},
- {43, { "statfs", statfsFunc<RiscvLinux32> }},
- {44, { "fstatfs", fstatfsFunc<RiscvLinux32> }},
- {45, { "truncate", truncateFunc }},
- {46, { "ftruncate", ftruncateFunc }},
- {47, { "fallocate", fallocateFunc }},
- {48, { "faccessat", faccessatFunc<RiscvLinux32> }},
- {49, { "chdir" }},
- {50, { "fchdir" }},
- {51, { "chroot" }},
- {52, { "fchmod", fchmodFunc<RiscvLinux32> }},
- {53, { "fchmodat" }},
- {54, { "fchownat" }},
- {55, { "fchown", fchownFunc }},
- {56, { "openat", openatFunc<RiscvLinux32> }},
- {57, { "close", closeFunc }},
- {58, { "vhangup" }},
- {59, { "pipe2" }},
- {60, { "quotactl" }},
- {61, { "getdents64" }},
- {62, { "lseek", lseekFunc }},
- {63, { "read", readFunc<RiscvLinux32> }},
- {64, { "write", writeFunc<RiscvLinux32> }},
- {66, { "writev", writevFunc<RiscvLinux32> }},
- {67, { "pread64" }},
- {68, { "pwrite64", pwrite64Func<RiscvLinux32> }},
- {69, { "preadv" }},
- {70, { "pwritev" }},
- {71, { "sendfile" }},
- {72, { "pselect6" }},
- {73, { "ppoll" }},
- {74, { "signalfd64" }},
- {75, { "vmsplice" }},
- {76, { "splice" }},
- {77, { "tee" }},
- {78, { "readlinkat", readlinkatFunc<RiscvLinux32> }},
- {79, { "fstatat" }},
- {80, { "fstat", fstatFunc<RiscvLinux32> }},
- {81, { "sync" }},
- {82, { "fsync" }},
- {83, { "fdatasync" }},
- {84, { "sync_file_range2" }},
- {85, { "timerfd_create" }},
- {86, { "timerfd_settime" }},
- {87, { "timerfd_gettime" }},
- {88, { "utimensat" }},
- {89, { "acct" }},
- {90, { "capget" }},
- {91, { "capset" }},
- {92, { "personality" }},
- {93, { "exit", exitFunc }},
- {94, { "exit_group", exitGroupFunc }},
- {95, { "waitid" }},
- {96, { "set_tid_address", setTidAddressFunc }},
- {97, { "unshare" }},
- {98, { "futex", futexFunc<RiscvLinux32> }},
- {99, { "set_robust_list", ignoreWarnOnceFunc }},
- {100, { "get_robust_list", ignoreWarnOnceFunc }},
- {101, { "nanosleep" }},
- {102, { "getitimer" }},
- {103, { "setitimer" }},
- {104, { "kexec_load" }},
- {105, { "init_module" }},
- {106, { "delete_module" }},
- {107, { "timer_create" }},
- {108, { "timer_gettime" }},
- {109, { "timer_getoverrun" }},
- {110, { "timer_settime" }},
- {111, { "timer_delete" }},
- {112, { "clock_settime" }},
- {113, { "clock_gettime", clock_gettimeFunc<RiscvLinux32> }},
- {114, { "clock_getres", clock_getresFunc<RiscvLinux32> }},
- {115, { "clock_nanosleep" }},
- {116, { "syslog" }},
- {117, { "ptrace" }},
- {118, { "sched_setparam" }},
- {119, { "sched_setscheduler" }},
- {120, { "sched_getscheduler" }},
- {121, { "sched_getparam" }},
- {122, { "sched_setaffinity" }},
- {123, { "sched_getaffinity" }},
- {124, { "sched_yield", ignoreWarnOnceFunc }},
- {125, { "sched_get_priority_max" }},
- {126, { "sched_get_priority_min" }},
- {127, { "scheD_rr_get_interval" }},
- {128, { "restart_syscall" }},
- {129, { "kill" }},
- {130, { "tkill" }},
- {131, { "tgkill", tgkillFunc<RiscvLinux32> }},
- {132, { "sigaltstack" }},
- {133, { "rt_sigsuspend", ignoreWarnOnceFunc }},
- {134, { "rt_sigaction", ignoreWarnOnceFunc }},
- {135, { "rt_sigprocmask", ignoreWarnOnceFunc }},
- {136, { "rt_sigpending", ignoreWarnOnceFunc }},
- {137, { "rt_sigtimedwait", ignoreWarnOnceFunc }},
- {138, { "rt_sigqueueinfo", ignoreWarnOnceFunc }},
- {139, { "rt_sigreturn", ignoreWarnOnceFunc }},
- {140, { "setpriority" }},
- {141, { "getpriority" }},
- {142, { "reboot" }},
- {143, { "setregid" }},
- {144, { "setgid" }},
- {145, { "setreuid" }},
- {146, { "setuid", ignoreFunc }},
- {147, { "setresuid" }},
- {148, { "getresuid" }},
- {149, { "getresgid" }},
- {150, { "getresgid" }},
- {151, { "setfsuid" }},
- {152, { "setfsgid" }},
- {153, { "times", timesFunc<RiscvLinux32> }},
- {154, { "setpgid", setpgidFunc }},
- {155, { "getpgid" }},
- {156, { "getsid" }},
- {157, { "setsid" }},
- {158, { "getgroups" }},
- {159, { "setgroups" }},
- {160, { "uname", unameFunc32 }},
- {161, { "sethostname" }},
- {162, { "setdomainname" }},
- {163, { "getrlimit", getrlimitFunc<RiscvLinux32> }},
- {164, { "setrlimit", ignoreFunc }},
- {165, { "getrusage", getrusageFunc<RiscvLinux32> }},
- {166, { "umask", umaskFunc }},
- {167, { "prctl" }},
- {168, { "getcpu" }},
- {169, { "gettimeofday", gettimeofdayFunc<RiscvLinux32> }},
- {170, { "settimeofday" }},
- {171, { "adjtimex" }},
- {172, { "getpid", getpidFunc }},
- {173, { "getppid", getppidFunc }},
- {174, { "getuid", getuidFunc }},
- {175, { "geteuid", geteuidFunc }},
- {176, { "getgid", getgidFunc }},
- {177, { "getegid", getegidFunc }},
- {178, { "gettid", gettidFunc }},
- {179, { "sysinfo", sysinfoFunc<RiscvLinux32> }},
- {180, { "mq_open" }},
- {181, { "mq_unlink" }},
- {182, { "mq_timedsend" }},
- {183, { "mq_timedrecieve" }},
- {184, { "mq_notify" }},
- {185, { "mq_getsetattr" }},
- {186, { "msgget" }},
- {187, { "msgctl" }},
- {188, { "msgrcv" }},
- {189, { "msgsnd" }},
- {190, { "semget" }},
- {191, { "semctl" }},
- {192, { "semtimedop" }},
- {193, { "semop" }},
- {194, { "shmget" }},
- {195, { "shmctl" }},
- {196, { "shmat" }},
- {197, { "shmdt" }},
- {198, { "socket" }},
- {199, { "socketpair" }},
- {200, { "bind" }},
- {201, { "listen" }},
- {202, { "accept" }},
- {203, { "connect" }},
- {204, { "getsockname" }},
- {205, { "getpeername" }},
- {206, { "sendo" }},
- {207, { "recvfrom" }},
- {208, { "setsockopt" }},
- {209, { "getsockopt" }},
- {210, { "shutdown" }},
- {211, { "sendmsg" }},
- {212, { "recvmsg" }},
- {213, { "readahead" }},
- {214, { "brk", brkFunc }},
- {215, { "munmap", munmapFunc }},
- {216, { "mremap", mremapFunc<RiscvLinux32> }},
- {217, { "add_key" }},
- {218, { "request_key" }},
- {219, { "keyctl" }},
- {220, { "clone", cloneBackwardsFunc<RiscvLinux32> }},
- {221, { "execve", execveFunc<RiscvLinux32> }},
- {222, { "mmap", mmapFunc<RiscvLinux32> }},
- {223, { "fadvise64" }},
- {224, { "swapon" }},
- {225, { "swapoff" }},
- {226, { "mprotect", ignoreFunc }},
- {227, { "msync", ignoreFunc }},
- {228, { "mlock", ignoreFunc }},
- {229, { "munlock", ignoreFunc }},
- {230, { "mlockall", ignoreFunc }},
- {231, { "munlockall", ignoreFunc }},
- {232, { "mincore", ignoreFunc }},
- {233, { "madvise", ignoreFunc }},
- {234, { "remap_file_pages" }},
- {235, { "mbind", ignoreFunc }},
- {236, { "get_mempolicy" }},
- {237, { "set_mempolicy" }},
- {238, { "migrate_pages" }},
- {239, { "move_pages" }},
- {240, { "tgsigqueueinfo" }},
- {241, { "perf_event_open" }},
- {242, { "accept4" }},
- {243, { "recvmmsg" }},
- {260, { "wait4" }},
- {261, { "prlimit64", prlimitFunc<RiscvLinux32> }},
- {262, { "fanotify_init" }},
- {263, { "fanotify_mark" }},
- {264, { "name_to_handle_at" }},
- {265, { "open_by_handle_at" }},
- {266, { "clock_adjtime" }},
- {267, { "syncfs" }},
- {268, { "setns" }},
- {269, { "sendmmsg" }},
- {270, { "process_vm_ready" }},
- {271, { "process_vm_writev" }},
- {272, { "kcmp" }},
- {273, { "finit_module" }},
- {274, { "sched_setattr" }},
- {275, { "sched_getattr" }},
- {276, { "renameat2" }},
- {277, { "seccomp" }},
- {278, { "getrandom" }},
- {279, { "memfd_create" }},
- {280, { "bpf" }},
- {281, { "execveat" }},
- {282, { "userfaultid" }},
- {283, { "membarrier" }},
- {284, { "mlock2" }},
- {285, { "copy_file_range" }},
- {286, { "preadv2" }},
- {287, { "pwritev2" }},
- {1024, { "open", openFunc<RiscvLinux32> }},
- {1025, { "link" }},
- {1026, { "unlink", unlinkFunc }},
- {1027, { "mknod" }},
- {1028, { "chmod", chmodFunc<RiscvLinux32> }},
- {1029, { "chown", chownFunc }},
- {1030, { "mkdir", mkdirFunc }},
- {1031, { "rmdir" }},
- {1032, { "lchown" }},
- {1033, { "access", accessFunc }},
- {1034, { "rename", renameFunc }},
- {1035, { "readlink", readlinkFunc }},
- {1036, { "symlink" }},
- {1037, { "utimes", utimesFunc<RiscvLinux32> }},
- {1038, { "stat", statFunc<RiscvLinux32> }},
- {1039, { "lstat", lstatFunc<RiscvLinux32> }},
- {1040, { "pipe", pipeFunc }},
- {1041, { "dup2", dup2Func }},
- {1042, { "epoll_create" }},
- {1043, { "inotifiy_init" }},
- {1044, { "eventfd" }},
- {1045, { "signalfd" }},
- {1046, { "sendfile" }},
- {1047, { "ftruncate", ftruncateFunc }},
- {1048, { "truncate", truncateFunc }},
- {1049, { "stat", statFunc<RiscvLinux32> }},
- {1050, { "lstat", lstatFunc<RiscvLinux32> }},
- {1051, { "fstat", fstatFunc<RiscvLinux32> }},
- {1052, { "fcntl", fcntlFunc }},
- {1053, { "fadvise64" }},
- {1054, { "newfstatat" }},
- {1055, { "fstatfs", fstatfsFunc<RiscvLinux32> }},
- {1056, { "statfs", statfsFunc<RiscvLinux32> }},
- {1057, { "lseek", lseekFunc }},
- {1058, { "mmap", mmapFunc<RiscvLinux32> }},
- {1059, { "alarm" }},
- {1060, { "getpgrp" }},
- {1061, { "pause" }},
- {1062, { "time", timeFunc<RiscvLinux32> }},
- {1063, { "utime" }},
- {1064, { "creat" }},
- {1065, { "getdents" }},
- {1066, { "futimesat" }},
- {1067, { "select" }},
- {1068, { "poll" }},
- {1069, { "epoll_wait" }},
- {1070, { "ustat" }},
- {1071, { "vfork" }},
- {1072, { "oldwait4" }},
- {1073, { "recv" }},
- {1074, { "send" }},
- {1075, { "bdflush" }},
- {1076, { "umount" }},
- {1077, { "uselib" }},
- {1078, { "sysctl" }},
- {1079, { "fork" }},
- {2011, { "getmainvars" }}
+ { 0, "io_setup" },
+ { 1, "io_destroy" },
+ { 2, "io_submit" },
+ { 3, "io_cancel" },
+ { 4, "io_getevents" },
+ { 5, "setxattr" },
+ { 6, "lsetxattr" },
+ { 7, "fsetxattr" },
+ { 8, "getxattr" },
+ { 9, "lgetxattr" },
+ { 10, "fgetxattr" },
+ { 11, "listxattr" },
+ { 12, "llistxattr" },
+ { 13, "flistxattr" },
+ { 14, "removexattr" },
+ { 15, "lremovexattr" },
+ { 16, "fremovexattr" },
+ { 17, "getcwd", getcwdFunc },
+ { 18, "lookup_dcookie" },
+ { 19, "eventfd2" },
+ { 20, "epoll_create1" },
+ { 21, "epoll_ctl" },
+ { 22, "epoll_pwait" },
+ { 23, "dup", dupFunc },
+ { 24, "dup3" },
+ { 25, "fcntl", fcntlFunc },
+ { 26, "inotify_init1" },
+ { 27, "inotify_add_watch" },
+ { 28, "inotify_rm_watch" },
+ { 29, "ioctl", ioctlFunc<RiscvLinux32> },
+ { 30, "ioprio_get" },
+ { 31, "ioprio_set" },
+ { 32, "flock" },
+ { 33, "mknodat" },
+ { 34, "mkdirat" },
+ { 35, "unlinkat", unlinkatFunc<RiscvLinux32> },
+ { 36, "symlinkat" },
+ { 37, "linkat" },
+ { 38, "renameat", renameatFunc<RiscvLinux32> },
+ { 39, "umount2" },
+ { 40, "mount" },
+ { 41, "pivot_root" },
+ { 42, "nfsservctl" },
+ { 43, "statfs", statfsFunc<RiscvLinux32> },
+ { 44, "fstatfs", fstatfsFunc<RiscvLinux32> },
+ { 45, "truncate", truncateFunc },
+ { 46, "ftruncate", ftruncateFunc },
+ { 47, "fallocate", fallocateFunc },
+ { 48, "faccessat", faccessatFunc<RiscvLinux32> },
+ { 49, "chdir" },
+ { 50, "fchdir" },
+ { 51, "chroot" },
+ { 52, "fchmod", fchmodFunc<RiscvLinux32> },
+ { 53, "fchmodat" },
+ { 54, "fchownat" },
+ { 55, "fchown", fchownFunc },
+ { 56, "openat", openatFunc<RiscvLinux32> },
+ { 57, "close", closeFunc },
+ { 58, "vhangup" },
+ { 59, "pipe2" },
+ { 60, "quotactl" },
+ { 61, "getdents64" },
+ { 62, "lseek", lseekFunc },
+ { 63, "read", readFunc<RiscvLinux32> },
+ { 64, "write", writeFunc<RiscvLinux32> },
+ { 66, "writev", writevFunc<RiscvLinux32> },
+ { 67, "pread64" },
+ { 68, "pwrite64", pwrite64Func<RiscvLinux32> },
+ { 69, "preadv" },
+ { 70, "pwritev" },
+ { 71, "sendfile" },
+ { 72, "pselect6" },
+ { 73, "ppoll" },
+ { 74, "signalfd64" },
+ { 75, "vmsplice" },
+ { 76, "splice" },
+ { 77, "tee" },
+ { 78, "readlinkat", readlinkatFunc<RiscvLinux32> },
+ { 79, "fstatat" },
+ { 80, "fstat", fstatFunc<RiscvLinux32> },
+ { 81, "sync" },
+ { 82, "fsync" },
+ { 83, "fdatasync" },
+ { 84, "sync_file_range2" },
+ { 85, "timerfd_create" },
+ { 86, "timerfd_settime" },
+ { 87, "timerfd_gettime" },
+ { 88, "utimensat" },
+ { 89, "acct" },
+ { 90, "capget" },
+ { 91, "capset" },
+ { 92, "personality" },
+ { 93, "exit", exitFunc },
+ { 94, "exit_group", exitGroupFunc },
+ { 95, "waitid" },
+ { 96, "set_tid_address", setTidAddressFunc },
+ { 97, "unshare" },
+ { 98, "futex", futexFunc<RiscvLinux32> },
+ { 99, "set_robust_list", ignoreWarnOnceFunc },
+ { 100, "get_robust_list", ignoreWarnOnceFunc },
+ { 101, "nanosleep" },
+ { 102, "getitimer" },
+ { 103, "setitimer" },
+ { 104, "kexec_load" },
+ { 105, "init_module" },
+ { 106, "delete_module" },
+ { 107, "timer_create" },
+ { 108, "timer_gettime" },
+ { 109, "timer_getoverrun" },
+ { 110, "timer_settime" },
+ { 111, "timer_delete" },
+ { 112, "clock_settime" },
+ { 113, "clock_gettime", clock_gettimeFunc<RiscvLinux32> },
+ { 114, "clock_getres", clock_getresFunc<RiscvLinux32> },
+ { 115, "clock_nanosleep" },
+ { 116, "syslog" },
+ { 117, "ptrace" },
+ { 118, "sched_setparam" },
+ { 119, "sched_setscheduler" },
+ { 120, "sched_getscheduler" },
+ { 121, "sched_getparam" },
+ { 122, "sched_setaffinity" },
+ { 123, "sched_getaffinity" },
+ { 124, "sched_yield", ignoreWarnOnceFunc },
+ { 125, "sched_get_priority_max" },
+ { 126, "sched_get_priority_min" },
+ { 127, "scheD_rr_get_interval" },
+ { 128, "restart_syscall" },
+ { 129, "kill" },
+ { 130, "tkill" },
+ { 131, "tgkill", tgkillFunc<RiscvLinux32> },
+ { 132, "sigaltstack" },
+ { 133, "rt_sigsuspend", ignoreWarnOnceFunc },
+ { 134, "rt_sigaction", ignoreWarnOnceFunc },
+ { 135, "rt_sigprocmask", ignoreWarnOnceFunc },
+ { 136, "rt_sigpending", ignoreWarnOnceFunc },
+ { 137, "rt_sigtimedwait", ignoreWarnOnceFunc },
+ { 138, "rt_sigqueueinfo", ignoreWarnOnceFunc },
+ { 139, "rt_sigreturn", ignoreWarnOnceFunc },
+ { 140, "setpriority" },
+ { 141, "getpriority" },
+ { 142, "reboot" },
+ { 143, "setregid" },
+ { 144, "setgid" },
+ { 145, "setreuid" },
+ { 146, "setuid", ignoreFunc },
+ { 147, "setresuid" },
+ { 148, "getresuid" },
+ { 149, "getresgid" },
+ { 150, "getresgid" },
+ { 151, "setfsuid" },
+ { 152, "setfsgid" },
+ { 153, "times", timesFunc<RiscvLinux32> },
+ { 154, "setpgid", setpgidFunc },
+ { 155, "getpgid" },
+ { 156, "getsid" },
+ { 157, "setsid" },
+ { 158, "getgroups" },
+ { 159, "setgroups" },
+ { 160, "uname", unameFunc32 },
+ { 161, "sethostname" },
+ { 162, "setdomainname" },
+ { 163, "getrlimit", getrlimitFunc<RiscvLinux32> },
+ { 164, "setrlimit", ignoreFunc },
+ { 165, "getrusage", getrusageFunc<RiscvLinux32> },
+ { 166, "umask", umaskFunc },
+ { 167, "prctl" },
+ { 168, "getcpu" },
+ { 169, "gettimeofday", gettimeofdayFunc<RiscvLinux32> },
+ { 170, "settimeofday" },
+ { 171, "adjtimex" },
+ { 172, "getpid", getpidFunc },
+ { 173, "getppid", getppidFunc },
+ { 174, "getuid", getuidFunc },
+ { 175, "geteuid", geteuidFunc },
+ { 176, "getgid", getgidFunc },
+ { 177, "getegid", getegidFunc },
+ { 178, "gettid", gettidFunc },
+ { 179, "sysinfo", sysinfoFunc<RiscvLinux32> },
+ { 180, "mq_open" },
+ { 181, "mq_unlink" },
+ { 182, "mq_timedsend" },
+ { 183, "mq_timedrecieve" },
+ { 184, "mq_notify" },
+ { 185, "mq_getsetattr" },
+ { 186, "msgget" },
+ { 187, "msgctl" },
+ { 188, "msgrcv" },
+ { 189, "msgsnd" },
+ { 190, "semget" },
+ { 191, "semctl" },
+ { 192, "semtimedop" },
+ { 193, "semop" },
+ { 194, "shmget" },
+ { 195, "shmctl" },
+ { 196, "shmat" },
+ { 197, "shmdt" },
+ { 198, "socket" },
+ { 199, "socketpair" },
+ { 200, "bind" },
+ { 201, "listen" },
+ { 202, "accept" },
+ { 203, "connect" },
+ { 204, "getsockname" },
+ { 205, "getpeername" },
+ { 206, "sendo" },
+ { 207, "recvfrom" },
+ { 208, "setsockopt" },
+ { 209, "getsockopt" },
+ { 210, "shutdown" },
+ { 211, "sendmsg" },
+ { 212, "recvmsg" },
+ { 213, "readahead" },
+ { 214, "brk", brkFunc },
+ { 215, "munmap", munmapFunc },
+ { 216, "mremap", mremapFunc<RiscvLinux32> },
+ { 217, "add_key" },
+ { 218, "request_key" },
+ { 219, "keyctl" },
+ { 220, "clone", cloneBackwardsFunc<RiscvLinux32> },
+ { 221, "execve", execveFunc<RiscvLinux32> },
+ { 222, "mmap", mmapFunc<RiscvLinux32> },
+ { 223, "fadvise64" },
+ { 224, "swapon" },
+ { 225, "swapoff" },
+ { 226, "mprotect", ignoreFunc },
+ { 227, "msync", ignoreFunc },
+ { 228, "mlock", ignoreFunc },
+ { 229, "munlock", ignoreFunc },
+ { 230, "mlockall", ignoreFunc },
+ { 231, "munlockall", ignoreFunc },
+ { 232, "mincore", ignoreFunc },
+ { 233, "madvise", ignoreFunc },
+ { 234, "remap_file_pages" },
+ { 235, "mbind", ignoreFunc },
+ { 236, "get_mempolicy" },
+ { 237, "set_mempolicy" },
+ { 238, "migrate_pages" },
+ { 239, "move_pages" },
+ { 240, "tgsigqueueinfo" },
+ { 241, "perf_event_open" },
+ { 242, "accept4" },
+ { 243, "recvmmsg" },
+ { 260, "wait4" },
+ { 261, "prlimit64", prlimitFunc<RiscvLinux32> },
+ { 262, "fanotify_init" },
+ { 263, "fanotify_mark" },
+ { 264, "name_to_handle_at" },
+ { 265, "open_by_handle_at" },
+ { 266, "clock_adjtime" },
+ { 267, "syncfs" },
+ { 268, "setns" },
+ { 269, "sendmmsg" },
+ { 270, "process_vm_ready" },
+ { 271, "process_vm_writev" },
+ { 272, "kcmp" },
+ { 273, "finit_module" },
+ { 274, "sched_setattr" },
+ { 275, "sched_getattr" },
+ { 276, "renameat2" },
+ { 277, "seccomp" },
+ { 278, "getrandom" },
+ { 279, "memfd_create" },
+ { 280, "bpf" },
+ { 281, "execveat" },
+ { 282, "userfaultid" },
+ { 283, "membarrier" },
+ { 284, "mlock2" },
+ { 285, "copy_file_range" },
+ { 286, "preadv2" },
+ { 287, "pwritev2" },
+ { 1024, "open", openFunc<RiscvLinux32> },
+ { 1025, "link" },
+ { 1026, "unlink", unlinkFunc },
+ { 1027, "mknod" },
+ { 1028, "chmod", chmodFunc<RiscvLinux32> },
+ { 1029, "chown", chownFunc },
+ { 1030, "mkdir", mkdirFunc },
+ { 1031, "rmdir" },
+ { 1032, "lchown" },
+ { 1033, "access", accessFunc },
+ { 1034, "rename", renameFunc },
+ { 1035, "readlink", readlinkFunc },
+ { 1036, "symlink" },
+ { 1037, "utimes", utimesFunc<RiscvLinux32> },
+ { 1038, "stat", statFunc<RiscvLinux32> },
+ { 1039, "lstat", lstatFunc<RiscvLinux32> },
+ { 1040, "pipe", pipeFunc },
+ { 1041, "dup2", dup2Func },
+ { 1042, "epoll_create" },
+ { 1043, "inotifiy_init" },
+ { 1044, "eventfd" },
+ { 1045, "signalfd" },
+ { 1046, "sendfile" },
+ { 1047, "ftruncate", ftruncateFunc },
+ { 1048, "truncate", truncateFunc },
+ { 1049, "stat", statFunc<RiscvLinux32> },
+ { 1050, "lstat", lstatFunc<RiscvLinux32> },
+ { 1051, "fstat", fstatFunc<RiscvLinux32> },
+ { 1052, "fcntl", fcntlFunc },
+ { 1053, "fadvise64" },
+ { 1054, "newfstatat" },
+ { 1055, "fstatfs", fstatfsFunc<RiscvLinux32> },
+ { 1056, "statfs", statfsFunc<RiscvLinux32> },
+ { 1057, "lseek", lseekFunc },
+ { 1058, "mmap", mmapFunc<RiscvLinux32> },
+ { 1059, "alarm" },
+ { 1060, "getpgrp" },
+ { 1061, "pause" },
+ { 1062, "time", timeFunc<RiscvLinux32> },
+ { 1063, "utime" },
+ { 1064, "creat" },
+ { 1065, "getdents" },
+ { 1066, "futimesat" },
+ { 1067, "select" },
+ { 1068, "poll" },
+ { 1069, "epoll_wait" },
+ { 1070, "ustat" },
+ { 1071, "vfork" },
+ { 1072, "oldwait4" },
+ { 1073, "recv" },
+ { 1074, "send" },
+ { 1075, "bdflush" },
+ { 1076, "umount" },
+ { 1077, "uselib" },
+ { 1078, "sysctl" },
+ { 1079, "fork" },
+ { 2011, "getmainvars" }
};
RiscvLinuxProcess64::RiscvLinuxProcess64(ProcessParams * params,
SyscallDesc*
RiscvLinuxProcess64::getDesc(int callnum)
{
- return syscallDescs.find(callnum) != syscallDescs.end() ?
- &syscallDescs.at(callnum) : nullptr;
+ return syscallDescs.get(callnum);
}
void
SyscallDesc*
RiscvLinuxProcess32::getDesc(int callnum)
{
- return syscallDescs.find(callnum) != syscallDescs.end() ?
- &syscallDescs.at(callnum) : nullptr;
+ return syscallDescs.get(callnum);
}
void
void syscall(ThreadContext *tc, Fault *fault) override;
- /// Array of syscall descriptors, indexed by call number.
- static std::map<int, SyscallDescABI<SyscallABI>> syscallDescs;
+ /// Syscall descriptors, indexed by call number.
+ static SyscallDescTable<SyscallABI> syscallDescs;
};
class RiscvLinuxProcess32 : public RiscvProcess32
void syscall(ThreadContext *tc, Fault *fault) override;
/// Array of syscall descriptors, indexed by call number.
- static std::map<int, SyscallDescABI<SyscallABI>> syscallDescs;
+ static SyscallDescTable<SyscallABI> syscallDescs;
};
#endif // __RISCV_LINUX_PROCESS_HH__
SyscallDesc*
SparcLinuxProcess::getDesc(int callnum)
{
- if (callnum < 0 || callnum >= Num_Syscall_Descs)
- return NULL;
- return &syscallDescs[callnum];
+ return syscallDescs.get(callnum);
}
SyscallDesc*
SparcLinuxProcess::getDesc32(int callnum)
{
- if (callnum < 0 || callnum >= Num_Syscall32_Descs)
- return NULL;
- return &syscall32Descs[callnum];
+ return syscall32Descs.get(callnum);
}
Sparc32LinuxProcess::Sparc32LinuxProcess(ProcessParams * params,
class SparcLinuxProcess
{
public:
- /// Array of syscall descriptors, indexed by call number.
- static SyscallDescABI<Sparc64Process::SyscallABI> syscallDescs[];
+ /// 64 bit syscall descriptors, indexed by call number.
+ static SyscallDescTable<Sparc64Process::SyscallABI> syscallDescs;
- /// Array of 32 bit compatibility syscall descriptors,
- /// indexed by call number.
- static SyscallDescABI<Sparc32Process::SyscallABI> syscall32Descs[];
+ /// 32 bit compatibility syscall descriptors, indexed by call number.
+ static SyscallDescTable<Sparc32Process::SyscallABI> syscall32Descs;
SyscallDesc *getDesc(int callnum);
SyscallDesc *getDesc32(int callnum);
return 0;
}
-SyscallDescABI<Sparc32Process::SyscallABI>
- SparcLinuxProcess::syscall32Descs[] = {
- /* 0 */ { "restart_syscall" },
- /* 1 */ { "exit", exitFunc }, // 32 bit
- /* 2 */ { "fork" },
- /* 3 */ { "read", readFunc<Sparc32Linux> },
- /* 4 */ { "write", writeFunc<Sparc32Linux> },
- /* 5 */ { "open", openFunc<Sparc32Linux> }, // 32 bit
- /* 6 */ { "close", closeFunc },
- /* 7 */ { "wait4" }, // 32 bit
- /* 8 */ { "creat" }, // 32 bit
- /* 9 */ { "link" },
- /* 10 */ { "unlink", unlinkFunc },
- /* 11 */ { "execv" },
- /* 12 */ { "chdir" },
- /* 13 */ { "chown", chownFunc }, // 32 bit
- /* 14 */ { "mknod" },
- /* 15 */ { "chmod" },
- /* 16 */ { "lchown" }, // 32 bit
- /* 17 */ { "brk", brkFunc },
- /* 18 */ { "perfctr" }, // 32 bit
- /* 19 */ { "lseek", lseekFunc }, // 32 bit
- /* 20 */ { "getpid", getpidFunc },
- /* 21 */ { "capget" },
- /* 22 */ { "capset" },
- /* 23 */ { "setuid", ignoreFunc }, // 32 bit
- /* 24 */ { "getuid", getuidFunc }, // 32 bit
- /* 25 */ { "time" },
- /* 26 */ { "ptrace" },
- /* 27 */ { "alarm" },
- /* 28 */ { "sigaltstack" }, // 32 bit
- /* 29 */ { "pause" }, // 32 bit
- /* 30 */ { "utime" },
- /* 31 */ { "lchown32" },
- /* 32 */ { "fchown32" },
- /* 33 */ { "access" }, // 32 bit
- /* 34 */ { "nice" }, // 32 bit
- /* 35 */ { "chown32" },
- /* 36 */ { "sync" },
- /* 37 */ { "kill" }, // 32 bit
- /* 38 */ { "stat" },
- /* 39 */ { "sendfile" }, // 32 bit
- /* 40 */ { "lstat" },
- /* 41 */ { "dup" },
- /* 42 */ { "pipe", pipePseudoFunc },
- /* 43 */ { "times", ignoreFunc },
- /* 44 */ { "getuid32" },
- /* 45 */ { "umount2" }, // 32 bit
- /* 46 */ { "setgid" }, // 32 bit
- /* 47 */ { "getgid", getgidFunc }, // 32 bit
- /* 48 */ { "signal" }, // 32 bit
- /* 49 */ { "geteuid", geteuidFunc }, // 32 bit
- /* 50 */ { "getegid", getegidFunc }, // 32 bit
- /* 51 */ { "acct" },
- /* 52 */ { "memory_ordering" },
- /* 53 */ { "getgid32" },
- /* 54 */ { "ioctl" },
- /* 55 */ { "reboot" }, // 32 bit
- /* 56 */ { "mmap2" }, // 32 bit
- /* 57 */ { "symlink" },
- /* 58 */ { "readlink", readlinkFunc }, // 32 bit
- /* 59 */ { "execve" }, // 32 bit
- /* 60 */ { "umask" }, // 32 bit
- /* 61 */ { "chroot" },
- /* 62 */ { "fstat" },
- /* 63 */ { "fstat64", fstat64Func<Sparc32Linux> },
- /* 64 */ { "getpagesize" },
- /* 65 */ { "msync" }, // 32 bit
- /* 66 */ { "vfork" },
- /* 67 */ { "pread64" }, // 32 bit
- /* 68 */ { "pwrite64" }, // 32 bit
- /* 69 */ { "geteuid32" },
- /* 70 */ { "getegid32" },
- /* 71 */ { "mmap", mmapFunc<Sparc32Linux> },
- /* 72 */ { "setreuid32" },
- /* 73 */ { "munmap", munmapFunc },
- /* 74 */ { "mprotect", ignoreFunc },
- /* 75 */ { "madvise" },
- /* 76 */ { "vhangup" },
- /* 77 */ { "truncate64" }, // 32 bit
- /* 78 */ { "mincore" },
- /* 79 */ { "getgroups" }, // 32 bit
- /* 80 */ { "setgroups" }, // 32 bit
- /* 81 */ { "getpgrp" },
- /* 82 */ { "setgroups32" }, // 32 bit
- /* 83 */ { "setitimer" }, // 32 bit
- /* 84 */ { "ftruncate64" }, // 32 bit
- /* 85 */ { "swapon" }, // 32 bit
- /* 86 */ { "getitimer" }, // 32 bit
- /* 87 */ { "setuid32" },
- /* 88 */ { "sethostname" }, // 32 bit
- /* 89 */ { "setgid32" },
- /* 90 */ { "dup2" },
- /* 91 */ { "setfsuid32" },
- /* 92 */ { "fcntl" },
- /* 93 */ { "select" }, // 32 bit
- /* 94 */ { "setfsgid32" },
- /* 95 */ { "fsync" },
- /* 96 */ { "setpriority" }, // 32 bit
- /* 97 */ { "socket" },
- /* 98 */ { "connect" },
- /* 99 */ { "accept" },
- /* 100 */ { "getpriority" }, // 32 bit
- /* 101 */ { "rt_sigreturn" }, // 32 bit
- /* 102 */ { "rt_sigaction", ignoreFunc }, // 32 bit
- /* 103 */ { "rt_sigprocmask", ignoreFunc }, // 32 bit
- /* 104 */ { "rt_sigpending" }, // 32 bit
- /* 105 */ { "rt_sigtimedwait" },
- /* 106 */ { "rt_sigqueueinfo" }, // 32 bit
- /* 107 */ { "rt_sigsuspend" },
- /* 108 */ { "setresuid32" },
- /* 109 */ { "getresuid32", getresuidFunc },
- /* 110 */ { "setresgid32", ignoreFunc },
- /* 111 */ { "getresgid32" },
- /* 112 */ { "setregid32" },
- /* 113 */ { "revcmsg" },
- /* 114 */ { "sendmsg" },
- /* 115 */ { "getgroups32" }, // 32 bit
- /* 116 */ { "gettimeofday", gettimeofdayFunc<Sparc32Linux> }, // 32 bit
- /* 117 */ { "getrusage" }, // 32 bit
- /* 118 */ { "getsockopt" },
- /* 119 */ { "getcwd", getcwdFunc },
- /* 120 */ { "readv" },
- /* 121 */ { "writev" },
- /* 122 */ { "settimeofday" }, // 32 bit
- /* 123 */ { "fchown" }, // 32 bit
- /* 124 */ { "fchmod" },
- /* 125 */ { "recvfrom" },
- /* 126 */ { "setreuid" }, // 32 bit
- /* 127 */ { "setregid" }, // 32 bit
- /* 128 */ { "rename", renameFunc },
- /* 129 */ { "truncate" },
- /* 130 */ { "ftruncate" },
- /* 131 */ { "flock" },
- /* 132 */ { "lstat64" },
- /* 133 */ { "sendto" },
- /* 134 */ { "shutdown" },
- /* 135 */ { "socketpair" },
- /* 136 */ { "mkdir", mkdirFunc }, // 32 bit
- /* 137 */ { "rmdir" },
- /* 138 */ { "utimes" }, // 32 bit
- /* 139 */ { "stat64" },
- /* 140 */ { "sendfile64" }, // 32 bit
- /* 141 */ { "getpeername" },
- /* 142 */ { "futex" }, // 32 bit
- /* 143 */ { "gettid" },
- /* 144 */ { "getrlimit" },
- /* 145 */ { "setrlimit" },
- /* 146 */ { "pivot_root" },
- /* 147 */ { "prctl" }, // 32 bit
- /* 148 */ { "pciconfig_read" },
- /* 149 */ { "pciconfig_write" },
- /* 150 */ { "getsockname" },
- /* 151 */ { "inotify_init" },
- /* 152 */ { "inotify_add_watch" },
- /* 153 */ { "poll" },
- /* 154 */ { "getdents64" },
- /* 155 */ { "fcntl64" },
- /* 156 */ { "inotify_rm_watch" },
- /* 157 */ { "statfs" },
- /* 158 */ { "fstatfs" },
- /* 159 */ { "umount" },
- /* 160 */ { "sched_setaffinity" },
- /* 161 */ { "sched_getaffinity" },
- /* 162 */ { "getdomainname" }, // 32 bit
- /* 163 */ { "setdomainname" }, // 32 bit
- /* 164 */ { "ni_syscall" },
- /* 165 */ { "quotactl" },
- /* 166 */ { "set_tid_address" },
- /* 167 */ { "mount" },
- /* 168 */ { "ustat" },
- /* 169 */ { "setxattr" }, // 32 bit
- /* 170 */ { "lsetxattr" }, // 32 bit
- /* 171 */ { "fsetxattr" }, // 32 bit
- /* 172 */ { "getxattr" },
- /* 173 */ { "lgetxattr" },
- /* 174 */ { "getdents" },
- /* 175 */ { "setsid" },
- /* 176 */ { "fchdir" },
- /* 177 */ { "fgetxattr" }, // 32 bit
- /* 178 */ { "listxattr" },
- /* 179 */ { "llistxattr" },
- /* 180 */ { "flistxattr" }, // 32 bit
- /* 181 */ { "removexattr" },
- /* 182 */ { "lremovexattr" },
- /* 183 */ { "sigpending" },
- /* 184 */ { "query_module" },
- /* 185 */ { "setpgid" }, // 32 bit
- /* 186 */ { "fremovexattr" }, // 32 bit
- /* 187 */ { "tkill" }, // 32 bit
- /* 188 */ { "exit_group", exitGroupFunc }, // 32 bit
- /* 189 */ { "uname", unameFunc },
- /* 190 */ { "init_module" }, // 32 bit
- /* 191 */ { "personality" },
- /* 192 */ { "remap_file_pages" },
- /* 193 */ { "epoll_create" }, // 32 bit
- /* 194 */ { "epoll_ctl" }, // 32 bit
- /* 195 */ { "epoll_wait" }, // 32 bit
- /* 196 */ { "ioprio_set" }, // 32 bit
- /* 197 */ { "getppid", getppidFunc },
- /* 198 */ { "sigaction" }, // 32 bit
- /* 199 */ { "sgetmask" },
- /* 200 */ { "ssetmask" },
- /* 201 */ { "sigsuspend" },
- /* 202 */ { "oldlstat" },
- /* 203 */ { "uselib" },
- /* 204 */ { "readdir" },
- /* 205 */ { "readahead" }, // 32 bit
- /* 206 */ { "socketcall" }, // 32 bit
- /* 207 */ { "syslog" }, // 32 bit
- /* 208 */ { "lookup_dcookie" }, // 32 bit
- /* 209 */ { "fadvise64" }, // 32 bit
- /* 210 */ { "fadvise64_64" }, // 32 bit
- /* 211 */ { "tgkill" }, // 32 bit
- /* 212 */ { "waitpid" }, // 32 bit
- /* 213 */ { "swapoff" },
- /* 214 */ { "sysinfo", sysinfoFunc<Sparc32Linux> }, // 32 bit
- /* 215 */ { "ipc" }, // 32 bit
- /* 216 */ { "sigreturn" }, // 32 bit
- /* 217 */ { "clone", cloneFunc<Sparc32Linux> },
- /* 218 */ { "ioprio_get" }, // 32 bit
- /* 219 */ { "adjtimex" }, // 32 bit
- /* 220 */ { "sigprocmask" }, // 32 bit
- /* 221 */ { "create_module" },
- /* 222 */ { "delete_module" }, // 32 bit
- /* 223 */ { "get_kernel_syms" },
- /* 224 */ { "getpgid" }, // 32 bit
- /* 225 */ { "bdflush" }, // 32 bit
- /* 226 */ { "sysfs" }, // 32 bit
- /* 227 */ { "afs_syscall" },
- /* 228 */ { "setfsuid" }, // 32 bit
- /* 229 */ { "setfsgid" }, // 32 bit
- /* 230 */ { "_newselect" }, // 32 bit
- /* 231 */ { "time", ignoreFunc },
- /* 232 */ { "oldstat" },
- /* 233 */ { "stime" },
- /* 234 */ { "statfs64" },
- /* 235 */ { "fstatfs64" },
- /* 236 */ { "_llseek", _llseekFunc },
- /* 237 */ { "mlock" },
- /* 238 */ { "munlock" },
- /* 239 */ { "mlockall" }, // 32 bit
- /* 240 */ { "munlockall" },
- /* 241 */ { "sched_setparam" }, // 32 bit
- /* 242 */ { "sched_getparam" }, // 32 bit
- /* 243 */ { "sched_setscheduler" }, // 32 bit
- /* 244 */ { "sched_getscheduler" }, // 32 bit
- /* 245 */ { "sched_yield" },
- /* 246 */ { "sched_get_priority_max" }, // 32 bit
- /* 247 */ { "sched_get_priority_min" }, // 32 bit
- /* 248 */ { "sched_rr_get_interval" }, // 32 bit
- /* 249 */ { "nanosleep" },
- /* 250 */ { "mremap", mremapFunc<Sparc32Linux> }, // 32 bit
- /* 251 */ { "_sysctl" }, // 32 bit
- /* 252 */ { "getsid" }, // 32 bit
- /* 253 */ { "fdatasync" },
- /* 254 */ { "nfsservctl" }, // 32 bit
- /* 255 */ { "aplib" },
- /* 256 */ { "clock_settime" },
- /* 257 */ { "clock_gettime" },
- /* 258 */ { "clock_getres" },
- /* 259 */ { "clock_nanosleep" }, // 32 bit
- /* 260 */ { "sched_getaffinity" },
- /* 261 */ { "sched_setaffinity" },
- /* 262 */ { "timer_settime" }, // 32 bit
- /* 263 */ { "timer_gettime" },
- /* 264 */ { "timer_getoverrun" },
- /* 265 */ { "timer_delete" },
- /* 266 */ { "timer_create" },
- /* 267 */ { "vserver" },
- /* 268 */ { "io_setup" },
- /* 269 */ { "io_destroy" },
- /* 270 */ { "io_submit" }, // 32 bit
- /* 271 */ { "io_cancel" },
- /* 272 */ { "io_getevents" },
- /* 273 */ { "mq_open" }, // 32 bit
- /* 274 */ { "mq_unlink" },
- /* 275 */ { "mq_timedsend" },
- /* 276 */ { "mq_timedreceive" },
- /* 277 */ { "mq_notify" },
- /* 278 */ { "mq_getsetattr" },
- /* 279 */ { "waitid" },
- /* 280 */ { "sys_setaltroot" },
- /* 281 */ { "add_key" },
- /* 282 */ { "request_key" },
- /* 283 */ { "keyctl" },
- /* 284 */ { "openat" },
- /* 285 */ { "mkdirat" },
- /* 286 */ { "mknodat" },
- /* 287 */ { "fchownat" },
- /* 288 */ { "futimesat" },
- /* 289 */ { "fstatat64" },
- /* 290 */ { "unlinkat" },
- /* 291 */ { "renameat" },
- /* 292 */ { "linkat" },
- /* 293 */ { "symlinkat" },
- /* 294 */ { "readlinkat" },
- /* 295 */ { "fchmodat" },
- /* 296 */ { "faccessat" },
- /* 297 */ { "pselect6" },
- /* 298 */ { "ppoll" },
- /* 299 */ { "unshare" }
+SyscallDescTable<Sparc32Process::SyscallABI>
+ SparcLinuxProcess::syscall32Descs = {
+ { 0, "restart_syscall" },
+ { 1, "exit", exitFunc }, // 32 bit
+ { 2, "fork" },
+ { 3, "read", readFunc<Sparc32Linux> },
+ { 4, "write", writeFunc<Sparc32Linux> },
+ { 5, "open", openFunc<Sparc32Linux> }, // 32 bit
+ { 6, "close", closeFunc },
+ { 7, "wait4" }, // 32 bit
+ { 8, "creat" }, // 32 bit
+ { 9, "link" },
+ { 10, "unlink", unlinkFunc },
+ { 11, "execv" },
+ { 12, "chdir" },
+ { 13, "chown", chownFunc }, // 32 bit
+ { 14, "mknod" },
+ { 15, "chmod" },
+ { 16, "lchown" }, // 32 bit
+ { 17, "brk", brkFunc },
+ { 18, "perfctr" }, // 32 bit
+ { 19, "lseek", lseekFunc }, // 32 bit
+ { 20, "getpid", getpidFunc },
+ { 21, "capget" },
+ { 22, "capset" },
+ { 23, "setuid", ignoreFunc }, // 32 bit
+ { 24, "getuid", getuidFunc }, // 32 bit
+ { 25, "time" },
+ { 26, "ptrace" },
+ { 27, "alarm" },
+ { 28, "sigaltstack" }, // 32 bit
+ { 29, "pause" }, // 32 bit
+ { 30, "utime" },
+ { 31, "lchown32" },
+ { 32, "fchown32" },
+ { 33, "access" }, // 32 bit
+ { 34, "nice" }, // 32 bit
+ { 35, "chown32" },
+ { 36, "sync" },
+ { 37, "kill" }, // 32 bit
+ { 38, "stat" },
+ { 39, "sendfile" }, // 32 bit
+ { 40, "lstat" },
+ { 41, "dup" },
+ { 42, "pipe", pipePseudoFunc },
+ { 43, "times", ignoreFunc },
+ { 44, "getuid32" },
+ { 45, "umount2" }, // 32 bit
+ { 46, "setgid" }, // 32 bit
+ { 47, "getgid", getgidFunc }, // 32 bit
+ { 48, "signal" }, // 32 bit
+ { 49, "geteuid", geteuidFunc }, // 32 bit
+ { 50, "getegid", getegidFunc }, // 32 bit
+ { 51, "acct" },
+ { 52, "memory_ordering" },
+ { 53, "getgid32" },
+ { 54, "ioctl" },
+ { 55, "reboot" }, // 32 bit
+ { 56, "mmap2" }, // 32 bit
+ { 57, "symlink" },
+ { 58, "readlink", readlinkFunc }, // 32 bit
+ { 59, "execve" }, // 32 bit
+ { 60, "umask" }, // 32 bit
+ { 61, "chroot" },
+ { 62, "fstat" },
+ { 63, "fstat64", fstat64Func<Sparc32Linux> },
+ { 64, "getpagesize" },
+ { 65, "msync" }, // 32 bit
+ { 66, "vfork" },
+ { 67, "pread64" }, // 32 bit
+ { 68, "pwrite64" }, // 32 bit
+ { 69, "geteuid32" },
+ { 70, "getegid32" },
+ { 71, "mmap", mmapFunc<Sparc32Linux> },
+ { 72, "setreuid32" },
+ { 73, "munmap", munmapFunc },
+ { 74, "mprotect", ignoreFunc },
+ { 75, "madvise" },
+ { 76, "vhangup" },
+ { 77, "truncate64" }, // 32 bit
+ { 78, "mincore" },
+ { 79, "getgroups" }, // 32 bit
+ { 80, "setgroups" }, // 32 bit
+ { 81, "getpgrp" },
+ { 82, "setgroups32" }, // 32 bit
+ { 83, "setitimer" }, // 32 bit
+ { 84, "ftruncate64" }, // 32 bit
+ { 85, "swapon" }, // 32 bit
+ { 86, "getitimer" }, // 32 bit
+ { 87, "setuid32" },
+ { 88, "sethostname" }, // 32 bit
+ { 89, "setgid32" },
+ { 90, "dup2" },
+ { 91, "setfsuid32" },
+ { 92, "fcntl" },
+ { 93, "select" }, // 32 bit
+ { 94, "setfsgid32" },
+ { 95, "fsync" },
+ { 96, "setpriority" }, // 32 bit
+ { 97, "socket" },
+ { 98, "connect" },
+ { 99, "accept" },
+ { 100, "getpriority" }, // 32 bit
+ { 101, "rt_sigreturn" }, // 32 bit
+ { 102, "rt_sigaction", ignoreFunc }, // 32 bit
+ { 103, "rt_sigprocmask", ignoreFunc }, // 32 bit
+ { 104, "rt_sigpending" }, // 32 bit
+ { 105, "rt_sigtimedwait" },
+ { 106, "rt_sigqueueinfo" }, // 32 bit
+ { 107, "rt_sigsuspend" },
+ { 108, "setresuid32" },
+ { 109, "getresuid32", getresuidFunc },
+ { 110, "setresgid32", ignoreFunc },
+ { 111, "getresgid32" },
+ { 112, "setregid32" },
+ { 113, "revcmsg" },
+ { 114, "sendmsg" },
+ { 115, "getgroups32" }, // 32 bit
+ { 116, "gettimeofday", gettimeofdayFunc<Sparc32Linux> }, // 32 bit
+ { 117, "getrusage" }, // 32 bit
+ { 118, "getsockopt" },
+ { 119, "getcwd", getcwdFunc },
+ { 120, "readv" },
+ { 121, "writev" },
+ { 122, "settimeofday" }, // 32 bit
+ { 123, "fchown" }, // 32 bit
+ { 124, "fchmod" },
+ { 125, "recvfrom" },
+ { 126, "setreuid" }, // 32 bit
+ { 127, "setregid" }, // 32 bit
+ { 128, "rename", renameFunc },
+ { 129, "truncate" },
+ { 130, "ftruncate" },
+ { 131, "flock" },
+ { 132, "lstat64" },
+ { 133, "sendto" },
+ { 134, "shutdown" },
+ { 135, "socketpair" },
+ { 136, "mkdir", mkdirFunc }, // 32 bit
+ { 137, "rmdir" },
+ { 138, "utimes" }, // 32 bit
+ { 139, "stat64" },
+ { 140, "sendfile64" }, // 32 bit
+ { 141, "getpeername" },
+ { 142, "futex" }, // 32 bit
+ { 143, "gettid" },
+ { 144, "getrlimit" },
+ { 145, "setrlimit" },
+ { 146, "pivot_root" },
+ { 147, "prctl" }, // 32 bit
+ { 148, "pciconfig_read" },
+ { 149, "pciconfig_write" },
+ { 150, "getsockname" },
+ { 151, "inotify_init" },
+ { 152, "inotify_add_watch" },
+ { 153, "poll" },
+ { 154, "getdents64" },
+ { 155, "fcntl64" },
+ { 156, "inotify_rm_watch" },
+ { 157, "statfs" },
+ { 158, "fstatfs" },
+ { 159, "umount" },
+ { 160, "sched_setaffinity" },
+ { 161, "sched_getaffinity" },
+ { 162, "getdomainname" }, // 32 bit
+ { 163, "setdomainname" }, // 32 bit
+ { 164, "ni_syscall" },
+ { 165, "quotactl" },
+ { 166, "set_tid_address" },
+ { 167, "mount" },
+ { 168, "ustat" },
+ { 169, "setxattr" }, // 32 bit
+ { 170, "lsetxattr" }, // 32 bit
+ { 171, "fsetxattr" }, // 32 bit
+ { 172, "getxattr" },
+ { 173, "lgetxattr" },
+ { 174, "getdents" },
+ { 175, "setsid" },
+ { 176, "fchdir" },
+ { 177, "fgetxattr" }, // 32 bit
+ { 178, "listxattr" },
+ { 179, "llistxattr" },
+ { 180, "flistxattr" }, // 32 bit
+ { 181, "removexattr" },
+ { 182, "lremovexattr" },
+ { 183, "sigpending" },
+ { 184, "query_module" },
+ { 185, "setpgid" }, // 32 bit
+ { 186, "fremovexattr" }, // 32 bit
+ { 187, "tkill" }, // 32 bit
+ { 188, "exit_group", exitGroupFunc }, // 32 bit
+ { 189, "uname", unameFunc },
+ { 190, "init_module" }, // 32 bit
+ { 191, "personality" },
+ { 192, "remap_file_pages" },
+ { 193, "epoll_create" }, // 32 bit
+ { 194, "epoll_ctl" }, // 32 bit
+ { 195, "epoll_wait" }, // 32 bit
+ { 196, "ioprio_set" }, // 32 bit
+ { 197, "getppid", getppidFunc },
+ { 198, "sigaction" }, // 32 bit
+ { 199, "sgetmask" },
+ { 200, "ssetmask" },
+ { 201, "sigsuspend" },
+ { 202, "oldlstat" },
+ { 203, "uselib" },
+ { 204, "readdir" },
+ { 205, "readahead" }, // 32 bit
+ { 206, "socketcall" }, // 32 bit
+ { 207, "syslog" }, // 32 bit
+ { 208, "lookup_dcookie" }, // 32 bit
+ { 209, "fadvise64" }, // 32 bit
+ { 210, "fadvise64_64" }, // 32 bit
+ { 211, "tgkill" }, // 32 bit
+ { 212, "waitpid" }, // 32 bit
+ { 213, "swapoff" },
+ { 214, "sysinfo", sysinfoFunc<Sparc32Linux> }, // 32 bit
+ { 215, "ipc" }, // 32 bit
+ { 216, "sigreturn" }, // 32 bit
+ { 217, "clone", cloneFunc<Sparc32Linux> },
+ { 218, "ioprio_get" }, // 32 bit
+ { 219, "adjtimex" }, // 32 bit
+ { 220, "sigprocmask" }, // 32 bit
+ { 221, "create_module" },
+ { 222, "delete_module" }, // 32 bit
+ { 223, "get_kernel_syms" },
+ { 224, "getpgid" }, // 32 bit
+ { 225, "bdflush" }, // 32 bit
+ { 226, "sysfs" }, // 32 bit
+ { 227, "afs_syscall" },
+ { 228, "setfsuid" }, // 32 bit
+ { 229, "setfsgid" }, // 32 bit
+ { 230, "_newselect" }, // 32 bit
+ { 231, "time", ignoreFunc },
+ { 232, "oldstat" },
+ { 233, "stime" },
+ { 234, "statfs64" },
+ { 235, "fstatfs64" },
+ { 236, "_llseek", _llseekFunc },
+ { 237, "mlock" },
+ { 238, "munlock" },
+ { 239, "mlockall" }, // 32 bit
+ { 240, "munlockall" },
+ { 241, "sched_setparam" }, // 32 bit
+ { 242, "sched_getparam" }, // 32 bit
+ { 243, "sched_setscheduler" }, // 32 bit
+ { 244, "sched_getscheduler" }, // 32 bit
+ { 245, "sched_yield" },
+ { 246, "sched_get_priority_max" }, // 32 bit
+ { 247, "sched_get_priority_min" }, // 32 bit
+ { 248, "sched_rr_get_interval" }, // 32 bit
+ { 249, "nanosleep" },
+ { 250, "mremap", mremapFunc<Sparc32Linux> }, // 32 bit
+ { 251, "_sysctl" }, // 32 bit
+ { 252, "getsid" }, // 32 bit
+ { 253, "fdatasync" },
+ { 254, "nfsservctl" }, // 32 bit
+ { 255, "aplib" },
+ { 256, "clock_settime" },
+ { 257, "clock_gettime" },
+ { 258, "clock_getres" },
+ { 259, "clock_nanosleep" }, // 32 bit
+ { 260, "sched_getaffinity" },
+ { 261, "sched_setaffinity" },
+ { 262, "timer_settime" }, // 32 bit
+ { 263, "timer_gettime" },
+ { 264, "timer_getoverrun" },
+ { 265, "timer_delete" },
+ { 266, "timer_create" },
+ { 267, "vserver" },
+ { 268, "io_setup" },
+ { 269, "io_destroy" },
+ { 270, "io_submit" }, // 32 bit
+ { 271, "io_cancel" },
+ { 272, "io_getevents" },
+ { 273, "mq_open" }, // 32 bit
+ { 274, "mq_unlink" },
+ { 275, "mq_timedsend" },
+ { 276, "mq_timedreceive" },
+ { 277, "mq_notify" },
+ { 278, "mq_getsetattr" },
+ { 279, "waitid" },
+ { 280, "sys_setaltroot" },
+ { 281, "add_key" },
+ { 282, "request_key" },
+ { 283, "keyctl" },
+ { 284, "openat" },
+ { 285, "mkdirat" },
+ { 286, "mknodat" },
+ { 287, "fchownat" },
+ { 288, "futimesat" },
+ { 289, "fstatat64" },
+ { 290, "unlinkat" },
+ { 291, "renameat" },
+ { 292, "linkat" },
+ { 293, "symlinkat" },
+ { 294, "readlinkat" },
+ { 295, "fchmodat" },
+ { 296, "faccessat" },
+ { 297, "pselect6" },
+ { 298, "ppoll" },
+ { 299, "unshare" }
};
-const int SparcLinuxProcess::Num_Syscall32_Descs =
- sizeof(SparcLinuxProcess::syscall32Descs) / sizeof(SyscallDesc);
-
-SyscallDescABI<Sparc64Process::SyscallABI>
- SparcLinuxProcess::syscallDescs[] = {
- /* 0 */ { "restart_syscall" },
- /* 1 */ { "exit", exitFunc },
- /* 2 */ { "fork" },
- /* 3 */ { "read", readFunc<SparcLinux> },
- /* 4 */ { "write", writeFunc<SparcLinux> },
- /* 5 */ { "open", openFunc<SparcLinux> },
- /* 6 */ { "close", closeFunc },
- /* 7 */ { "wait4" },
- /* 8 */ { "creat" },
- /* 9 */ { "link" },
- /* 10 */ { "unlink", unlinkFunc },
- /* 11 */ { "execv" },
- /* 12 */ { "chdir" },
- /* 13 */ { "chown", chownFunc },
- /* 14 */ { "mknod" },
- /* 15 */ { "chmod", chmodFunc<Linux> },
- /* 16 */ { "lchown" },
- /* 17 */ { "brk", brkFunc },
- /* 18 */ { "perfctr" },
- /* 19 */ { "lseek", lseekFunc },
- /* 20 */ { "getpid", getpidFunc },
- /* 21 */ { "capget" },
- /* 22 */ { "capset" },
- /* 23 */ { "setuid", ignoreFunc },
- /* 24 */ { "getuid", getuidFunc },
- /* 25 */ { "time" },
- /* 26 */ { "ptrace" },
- /* 27 */ { "alarm" },
- /* 28 */ { "sigaltstack" },
- /* 29 */ { "pause" },
- /* 30 */ { "utime" },
- /* 31 */ { "lchown32" },
- /* 32 */ { "fchown32" },
- /* 33 */ { "access" },
- /* 34 */ { "nice" },
- /* 35 */ { "chown32" },
- /* 36 */ { "sync" },
- /* 37 */ { "kill" },
- /* 38 */ { "stat" },
- /* 39 */ { "sendfile" },
- /* 40 */ { "lstat" },
- /* 41 */ { "dup" },
- /* 42 */ { "pipe", pipePseudoFunc },
- /* 43 */ { "times", ignoreFunc },
- /* 44 */ { "getuid32" },
- /* 45 */ { "umount2" },
- /* 46 */ { "setgid" },
- /* 47 */ { "getgid", getgidFunc },
- /* 48 */ { "signal" },
- /* 49 */ { "geteuid", geteuidFunc },
- /* 50 */ { "getegid", getegidFunc },
- /* 51 */ { "acct" },
- /* 52 */ { "memory_ordering" },
- /* 53 */ { "getgid32" },
- /* 54 */ { "ioctl" },
- /* 55 */ { "reboot" },
- /* 56 */ { "mmap2" },
- /* 57 */ { "symlink" },
- /* 58 */ { "readlink", readlinkFunc },
- /* 59 */ { "execve" },
- /* 60 */ { "umask" },
- /* 61 */ { "chroot" },
- /* 62 */ { "fstat", fstatFunc<SparcLinux> },
- /* 63 */ { "fstat64" },
- /* 64 */ { "getpagesize" },
- /* 65 */ { "msync" },
- /* 66 */ { "vfork" },
- /* 67 */ { "pread64" },
- /* 68 */ { "pwrite64" },
- /* 69 */ { "geteuid32" },
- /* 70 */ { "getegid32" },
- /* 71 */ { "mmap", mmapFunc<SparcLinux> },
- /* 72 */ { "setreuid32" },
- /* 73 */ { "munmap", munmapFunc },
- /* 74 */ { "mprotect", ignoreFunc },
- /* 75 */ { "madvise" },
- /* 76 */ { "vhangup" },
- /* 77 */ { "truncate64" },
- /* 78 */ { "mincore" },
- /* 79 */ { "getgroups" },
- /* 80 */ { "setgroups" },
- /* 81 */ { "getpgrp" },
- /* 82 */ { "setgroups32" },
- /* 83 */ { "setitimer" },
- /* 84 */ { "ftruncate64" },
- /* 85 */ { "swapon" },
- /* 86 */ { "getitimer" },
- /* 87 */ { "setuid32" },
- /* 88 */ { "sethostname" },
- /* 89 */ { "setgid32" },
- /* 90 */ { "dup2" },
- /* 91 */ { "setfsuid32" },
- /* 92 */ { "fcntl" },
- /* 93 */ { "select" },
- /* 94 */ { "setfsgid32" },
- /* 95 */ { "fsync" },
- /* 96 */ { "setpriority" },
- /* 97 */ { "socket" },
- /* 98 */ { "connect" },
- /* 99 */ { "accept" },
- /* 100 */ { "getpriority" },
- /* 101 */ { "rt_sigreturn" },
- /* 102 */ { "rt_sigaction", ignoreFunc },
- /* 103 */ { "rt_sigprocmask", ignoreFunc },
- /* 104 */ { "rt_sigpending" },
- /* 105 */ { "rt_sigtimedwait" },
- /* 106 */ { "rt_sigqueueinfo" },
- /* 107 */ { "rt_sigsuspend" },
- /* 108 */ { "setresuid" },
- /* 109 */ { "getresuid", getresuidFunc },
- /* 110 */ { "setresgid", ignoreFunc },
- /* 111 */ { "getresgid" },
- /* 112 */ { "setregid32" },
- /* 113 */ { "recvmsg" },
- /* 114 */ { "sendmsg" },
- /* 115 */ { "getgroups32" },
- /* 116 */ { "gettimeofday", gettimeofdayFunc<SparcLinux> },
- /* 117 */ { "getrusage" },
- /* 118 */ { "getsockopt" },
- /* 119 */ { "getcwd" },
- /* 120 */ { "readv" },
- /* 121 */ { "writev" },
- /* 122 */ { "settimeofday" },
- /* 123 */ { "fchown" },
- /* 124 */ { "fchmod" },
- /* 125 */ { "recvfrom" },
- /* 126 */ { "setreuid" },
- /* 127 */ { "setregid" },
- /* 128 */ { "rename", renameFunc },
- /* 129 */ { "truncate" },
- /* 130 */ { "ftruncate" },
- /* 131 */ { "flock" },
- /* 132 */ { "lstat64" },
- /* 133 */ { "sendto" },
- /* 134 */ { "shutdown" },
- /* 135 */ { "socketpair" },
- /* 136 */ { "mkdir", mkdirFunc },
- /* 137 */ { "rmdir" },
- /* 138 */ { "utimes" },
- /* 139 */ { "stat64" },
- /* 140 */ { "sendfile64" },
- /* 141 */ { "getpeername" },
- /* 142 */ { "futex" },
- /* 143 */ { "gettid" },
- /* 144 */ { "getrlimit" },
- /* 145 */ { "setrlimit" },
- /* 146 */ { "pivot_root" },
- /* 147 */ { "prctl" },
- /* 148 */ { "pciconfig_read" },
- /* 149 */ { "pciconfig_write" },
- /* 150 */ { "getsockname" },
- /* 151 */ { "inotify_init" },
- /* 152 */ { "inotify_add_watch" },
- /* 153 */ { "poll" },
- /* 154 */ { "getdents64" },
- /* 155 */ { "fcntl64" },
- /* 156 */ { "inotify_rm_watch" },
- /* 157 */ { "statfs" },
- /* 158 */ { "fstatfs" },
- /* 159 */ { "umount" },
- /* 160 */ { "sched_set_affinity" },
- /* 161 */ { "sched_get_affinity" },
- /* 162 */ { "getdomainname" },
- /* 163 */ { "setdomainname" },
- /* 164 */ { "utrap_install" },
- /* 165 */ { "quotactl" },
- /* 166 */ { "set_tid_address" },
- /* 167 */ { "mount" },
- /* 168 */ { "ustat" },
- /* 169 */ { "setxattr" },
- /* 170 */ { "lsetxattr" },
- /* 171 */ { "fsetxattr" },
- /* 172 */ { "getxattr" },
- /* 173 */ { "lgetxattr" },
- /* 174 */ { "getdents" },
- /* 175 */ { "setsid" },
- /* 176 */ { "fchdir" },
- /* 177 */ { "fgetxattr" },
- /* 178 */ { "listxattr" },
- /* 179 */ { "llistxattr" },
- /* 180 */ { "flistxattr" },
- /* 181 */ { "removexattr" },
- /* 182 */ { "lremovexattr" },
- /* 183 */ { "sigpending" },
- /* 184 */ { "query_module" },
- /* 185 */ { "setpgid" },
- /* 186 */ { "fremovexattr" },
- /* 187 */ { "tkill" },
- /* 188 */ { "exit_group", exitGroupFunc },
- /* 189 */ { "uname", unameFunc },
- /* 190 */ { "init_module" },
- /* 191 */ { "personality" },
- /* 192 */ { "remap_file_pages" },
- /* 193 */ { "epoll_create" },
- /* 194 */ { "epoll_ctl" },
- /* 195 */ { "epoll_wait" },
- /* 196 */ { "ioprio_set" },
- /* 197 */ { "getppid", getppidFunc },
- /* 198 */ { "sigaction", ignoreFunc },
- /* 199 */ { "sgetmask" },
- /* 200 */ { "ssetmask" },
- /* 201 */ { "sigsuspend" },
- /* 202 */ { "oldlstat" },
- /* 203 */ { "uselib" },
- /* 204 */ { "readdir" },
- /* 205 */ { "readahead" },
- /* 206 */ { "socketcall" },
- /* 207 */ { "syslog" },
- /* 208 */ { "lookup_dcookie" },
- /* 209 */ { "fadvise64" },
- /* 210 */ { "fadvise64_64" },
- /* 211 */ { "tgkill" },
- /* 212 */ { "waitpid" },
- /* 213 */ { "swapoff" },
- /* 214 */ { "sysinfo", sysinfoFunc<SparcLinux> },
- /* 215 */ { "ipc" },
- /* 216 */ { "sigreturn" },
- /* 217 */ { "clone", cloneFunc<SparcLinux> },
- /* 218 */ { "ioprio_get" },
- /* 219 */ { "adjtimex" },
- /* 220 */ { "sigprocmask" },
- /* 221 */ { "create_module" },
- /* 222 */ { "delete_module" },
- /* 223 */ { "get_kernel_syms" },
- /* 224 */ { "getpgid" },
- /* 225 */ { "bdflush" },
- /* 226 */ { "sysfs" },
- /* 227 */ { "afs_syscall" },
- /* 228 */ { "setfsuid" },
- /* 229 */ { "setfsgid" },
- /* 230 */ { "_newselect" },
- /* 231 */ { "time", ignoreFunc },
- /* 232 */ { "oldstat" },
- /* 233 */ { "stime" },
- /* 234 */ { "statfs64" },
- /* 235 */ { "fstatfs64" },
- /* 236 */ { "_llseek", _llseekFunc },
- /* 237 */ { "mlock" },
- /* 238 */ { "munlock" },
- /* 239 */ { "mlockall" },
- /* 240 */ { "munlockall" },
- /* 241 */ { "sched_setparam" },
- /* 242 */ { "sched_getparam" },
- /* 243 */ { "sched_setscheduler" },
- /* 244 */ { "sched_getscheduler" },
- /* 245 */ { "sched_yield" },
- /* 246 */ { "sched_get_priority_max" },
- /* 247 */ { "sched_get_priority_min" },
- /* 248 */ { "sched_rr_get_interval" },
- /* 249 */ { "nanosleep" },
- /* 250 */ { "mremap", mremapFunc<SparcLinux> },
- /* 251 */ { "_sysctl" },
- /* 252 */ { "getsid" },
- /* 253 */ { "fdatasync" },
- /* 254 */ { "nfsservctl" },
- /* 255 */ { "aplib" },
- /* 256 */ { "clock_settime" },
- /* 257 */ { "clock_gettime" },
- /* 258 */ { "clock_getres" },
- /* 259 */ { "clock_nanosleep" },
- /* 260 */ { "sched_getaffinity" },
- /* 261 */ { "sched_setaffinity" },
- /* 262 */ { "timer_settime" },
- /* 263 */ { "timer_gettime" },
- /* 264 */ { "timer_getoverrun" },
- /* 265 */ { "timer_delete" },
- /* 266 */ { "timer_create" },
- /* 267 */ { "vserver" },
- /* 268 */ { "io_setup" },
- /* 269 */ { "io_destroy" },
- /* 270 */ { "io_submit" },
- /* 271 */ { "io_cancel" },
- /* 272 */ { "io_getevents" },
- /* 273 */ { "mq_open" },
- /* 274 */ { "mq_unlink" },
- /* 275 */ { "mq_timedsend" },
- /* 276 */ { "mq_timedreceive" },
- /* 277 */ { "mq_notify" },
- /* 278 */ { "mq_getsetattr" },
- /* 279 */ { "waitid" },
- /* 280 */ { "sys_setaltroot" },
- /* 281 */ { "add_key" },
- /* 282 */ { "request_key" },
- /* 283 */ { "keyctl" }
+SyscallDescTable<Sparc64Process::SyscallABI>
+ SparcLinuxProcess::syscallDescs = {
+ { 0, "restart_syscall" },
+ { 1, "exit", exitFunc },
+ { 2, "fork" },
+ { 3, "read", readFunc<SparcLinux> },
+ { 4, "write", writeFunc<SparcLinux> },
+ { 5, "open", openFunc<SparcLinux> },
+ { 6, "close", closeFunc },
+ { 7, "wait4" },
+ { 8, "creat" },
+ { 9, "link" },
+ { 10, "unlink", unlinkFunc },
+ { 11, "execv" },
+ { 12, "chdir" },
+ { 13, "chown", chownFunc },
+ { 14, "mknod" },
+ { 15, "chmod", chmodFunc<Linux> },
+ { 16, "lchown" },
+ { 17, "brk", brkFunc },
+ { 18, "perfctr" },
+ { 19, "lseek", lseekFunc },
+ { 20, "getpid", getpidFunc },
+ { 21, "capget" },
+ { 22, "capset" },
+ { 23, "setuid", ignoreFunc },
+ { 24, "getuid", getuidFunc },
+ { 25, "time" },
+ { 26, "ptrace" },
+ { 27, "alarm" },
+ { 28, "sigaltstack" },
+ { 29, "pause" },
+ { 30, "utime" },
+ { 31, "lchown32" },
+ { 32, "fchown32" },
+ { 33, "access" },
+ { 34, "nice" },
+ { 35, "chown32" },
+ { 36, "sync" },
+ { 37, "kill" },
+ { 38, "stat" },
+ { 39, "sendfile" },
+ { 40, "lstat" },
+ { 41, "dup" },
+ { 42, "pipe", pipePseudoFunc },
+ { 43, "times", ignoreFunc },
+ { 44, "getuid32" },
+ { 45, "umount2" },
+ { 46, "setgid" },
+ { 47, "getgid", getgidFunc },
+ { 48, "signal" },
+ { 49, "geteuid", geteuidFunc },
+ { 50, "getegid", getegidFunc },
+ { 51, "acct" },
+ { 52, "memory_ordering" },
+ { 53, "getgid32" },
+ { 54, "ioctl" },
+ { 55, "reboot" },
+ { 56, "mmap2" },
+ { 57, "symlink" },
+ { 58, "readlink", readlinkFunc },
+ { 59, "execve" },
+ { 60, "umask" },
+ { 61, "chroot" },
+ { 62, "fstat", fstatFunc<SparcLinux> },
+ { 63, "fstat64" },
+ { 64, "getpagesize" },
+ { 65, "msync" },
+ { 66, "vfork" },
+ { 67, "pread64" },
+ { 68, "pwrite64" },
+ { 69, "geteuid32" },
+ { 70, "getegid32" },
+ { 71, "mmap", mmapFunc<SparcLinux> },
+ { 72, "setreuid32" },
+ { 73, "munmap", munmapFunc },
+ { 74, "mprotect", ignoreFunc },
+ { 75, "madvise" },
+ { 76, "vhangup" },
+ { 77, "truncate64" },
+ { 78, "mincore" },
+ { 79, "getgroups" },
+ { 80, "setgroups" },
+ { 81, "getpgrp" },
+ { 82, "setgroups32" },
+ { 83, "setitimer" },
+ { 84, "ftruncate64" },
+ { 85, "swapon" },
+ { 86, "getitimer" },
+ { 87, "setuid32" },
+ { 88, "sethostname" },
+ { 89, "setgid32" },
+ { 90, "dup2" },
+ { 91, "setfsuid32" },
+ { 92, "fcntl" },
+ { 93, "select" },
+ { 94, "setfsgid32" },
+ { 95, "fsync" },
+ { 96, "setpriority" },
+ { 97, "socket" },
+ { 98, "connect" },
+ { 99, "accept" },
+ { 100, "getpriority" },
+ { 101, "rt_sigreturn" },
+ { 102, "rt_sigaction", ignoreFunc },
+ { 103, "rt_sigprocmask", ignoreFunc },
+ { 104, "rt_sigpending" },
+ { 105, "rt_sigtimedwait" },
+ { 106, "rt_sigqueueinfo" },
+ { 107, "rt_sigsuspend" },
+ { 108, "setresuid" },
+ { 109, "getresuid", getresuidFunc },
+ { 110, "setresgid", ignoreFunc },
+ { 111, "getresgid" },
+ { 112, "setregid32" },
+ { 113, "recvmsg" },
+ { 114, "sendmsg" },
+ { 115, "getgroups32" },
+ { 116, "gettimeofday", gettimeofdayFunc<SparcLinux> },
+ { 117, "getrusage" },
+ { 118, "getsockopt" },
+ { 119, "getcwd" },
+ { 120, "readv" },
+ { 121, "writev" },
+ { 122, "settimeofday" },
+ { 123, "fchown" },
+ { 124, "fchmod" },
+ { 125, "recvfrom" },
+ { 126, "setreuid" },
+ { 127, "setregid" },
+ { 128, "rename", renameFunc },
+ { 129, "truncate" },
+ { 130, "ftruncate" },
+ { 131, "flock" },
+ { 132, "lstat64" },
+ { 133, "sendto" },
+ { 134, "shutdown" },
+ { 135, "socketpair" },
+ { 136, "mkdir", mkdirFunc },
+ { 137, "rmdir" },
+ { 138, "utimes" },
+ { 139, "stat64" },
+ { 140, "sendfile64" },
+ { 141, "getpeername" },
+ { 142, "futex" },
+ { 143, "gettid" },
+ { 144, "getrlimit" },
+ { 145, "setrlimit" },
+ { 146, "pivot_root" },
+ { 147, "prctl" },
+ { 148, "pciconfig_read" },
+ { 149, "pciconfig_write" },
+ { 150, "getsockname" },
+ { 151, "inotify_init" },
+ { 152, "inotify_add_watch" },
+ { 153, "poll" },
+ { 154, "getdents64" },
+ { 155, "fcntl64" },
+ { 156, "inotify_rm_watch" },
+ { 157, "statfs" },
+ { 158, "fstatfs" },
+ { 159, "umount" },
+ { 160, "sched_set_affinity" },
+ { 161, "sched_get_affinity" },
+ { 162, "getdomainname" },
+ { 163, "setdomainname" },
+ { 164, "utrap_install" },
+ { 165, "quotactl" },
+ { 166, "set_tid_address" },
+ { 167, "mount" },
+ { 168, "ustat" },
+ { 169, "setxattr" },
+ { 170, "lsetxattr" },
+ { 171, "fsetxattr" },
+ { 172, "getxattr" },
+ { 173, "lgetxattr" },
+ { 174, "getdents" },
+ { 175, "setsid" },
+ { 176, "fchdir" },
+ { 177, "fgetxattr" },
+ { 178, "listxattr" },
+ { 179, "llistxattr" },
+ { 180, "flistxattr" },
+ { 181, "removexattr" },
+ { 182, "lremovexattr" },
+ { 183, "sigpending" },
+ { 184, "query_module" },
+ { 185, "setpgid" },
+ { 186, "fremovexattr" },
+ { 187, "tkill" },
+ { 188, "exit_group", exitGroupFunc },
+ { 189, "uname", unameFunc },
+ { 190, "init_module" },
+ { 191, "personality" },
+ { 192, "remap_file_pages" },
+ { 193, "epoll_create" },
+ { 194, "epoll_ctl" },
+ { 195, "epoll_wait" },
+ { 196, "ioprio_set" },
+ { 197, "getppid", getppidFunc },
+ { 198, "sigaction", ignoreFunc },
+ { 199, "sgetmask" },
+ { 200, "ssetmask" },
+ { 201, "sigsuspend" },
+ { 202, "oldlstat" },
+ { 203, "uselib" },
+ { 204, "readdir" },
+ { 205, "readahead" },
+ { 206, "socketcall" },
+ { 207, "syslog" },
+ { 208, "lookup_dcookie" },
+ { 209, "fadvise64" },
+ { 210, "fadvise64_64" },
+ { 211, "tgkill" },
+ { 212, "waitpid" },
+ { 213, "swapoff" },
+ { 214, "sysinfo", sysinfoFunc<SparcLinux> },
+ { 215, "ipc" },
+ { 216, "sigreturn" },
+ { 217, "clone", cloneFunc<SparcLinux> },
+ { 218, "ioprio_get" },
+ { 219, "adjtimex" },
+ { 220, "sigprocmask" },
+ { 221, "create_module" },
+ { 222, "delete_module" },
+ { 223, "get_kernel_syms" },
+ { 224, "getpgid" },
+ { 225, "bdflush" },
+ { 226, "sysfs" },
+ { 227, "afs_syscall" },
+ { 228, "setfsuid" },
+ { 229, "setfsgid" },
+ { 230, "_newselect" },
+ { 231, "time", ignoreFunc },
+ { 232, "oldstat" },
+ { 233, "stime" },
+ { 234, "statfs64" },
+ { 235, "fstatfs64" },
+ { 236, "_llseek", _llseekFunc },
+ { 237, "mlock" },
+ { 238, "munlock" },
+ { 239, "mlockall" },
+ { 240, "munlockall" },
+ { 241, "sched_setparam" },
+ { 242, "sched_getparam" },
+ { 243, "sched_setscheduler" },
+ { 244, "sched_getscheduler" },
+ { 245, "sched_yield" },
+ { 246, "sched_get_priority_max" },
+ { 247, "sched_get_priority_min" },
+ { 248, "sched_rr_get_interval" },
+ { 249, "nanosleep" },
+ { 250, "mremap", mremapFunc<SparcLinux> },
+ { 251, "_sysctl" },
+ { 252, "getsid" },
+ { 253, "fdatasync" },
+ { 254, "nfsservctl" },
+ { 255, "aplib" },
+ { 256, "clock_settime" },
+ { 257, "clock_gettime" },
+ { 258, "clock_getres" },
+ { 259, "clock_nanosleep" },
+ { 260, "sched_getaffinity" },
+ { 261, "sched_setaffinity" },
+ { 262, "timer_settime" },
+ { 263, "timer_gettime" },
+ { 264, "timer_getoverrun" },
+ { 265, "timer_delete" },
+ { 266, "timer_create" },
+ { 267, "vserver" },
+ { 268, "io_setup" },
+ { 269, "io_destroy" },
+ { 270, "io_submit" },
+ { 271, "io_cancel" },
+ { 272, "io_getevents" },
+ { 273, "mq_open" },
+ { 274, "mq_unlink" },
+ { 275, "mq_timedsend" },
+ { 276, "mq_timedreceive" },
+ { 277, "mq_notify" },
+ { 278, "mq_getsetattr" },
+ { 279, "waitid" },
+ { 280, "sys_setaltroot" },
+ { 281, "add_key" },
+ { 282, "request_key" },
+ { 283, "keyctl" }
};
-const int SparcLinuxProcess::Num_Syscall_Descs =
- sizeof(SparcLinuxProcess::syscallDescs) / sizeof(SyscallDesc);
-
} // namespace SparcISA
}
-SyscallDescABI<Sparc64Process::SyscallABI>
- SparcSolarisProcess::syscallDescs[] = {
- /* 0 */ { "syscall" },
- /* 1 */ { "exit", exitFunc },
- /* 2 */ { "fork" },
- /* 3 */ { "read", readFunc<SparcSolaris> },
- /* 4 */ { "write", writeFunc<SparcSolaris> },
- /* 5 */ { "open", openFunc<SparcSolaris> },
- /* 6 */ { "close", closeFunc },
- /* 7 */ { "wait" },
- /* 8 */ { "creat" },
- /* 9 */ { "link" },
- /* 10 */ { "unlink", unlinkFunc },
- /* 11 */ { "exec" },
- /* 12 */ { "chdir" },
- /* 13 */ { "time" },
- /* 14 */ { "mknod" },
- /* 15 */ { "chmod", chmodFunc<Solaris> },
- /* 16 */ { "chown", chownFunc },
- /* 17 */ { "brk", brkFunc },
- /* 18 */ { "stat" },
- /* 19 */ { "lseek", lseekFunc },
- /* 20 */ { "getpid", getpidFunc },
- /* 21 */ { "mount" },
- /* 22 */ { "umount" },
- /* 23 */ { "setuid", ignoreFunc },
- /* 24 */ { "getuid", getuidFunc },
- /* 25 */ { "stime" },
- /* 26 */ { "pcsample" },
- /* 27 */ { "alarm" },
- /* 28 */ { "fstat", fstatFunc<SparcSolaris> },
- /* 29 */ { "pause" },
- /* 30 */ { "utime" },
- /* 31 */ { "stty" },
- /* 32 */ { "gtty" },
- /* 33 */ { "access" },
- /* 34 */ { "nice" },
- /* 35 */ { "statfs" },
- /* 36 */ { "sync" },
- /* 37 */ { "kill" },
- /* 38 */ { "fstatfs" },
- /* 39 */ { "pgrpsys" },
- /* 40 */ { "xenix" },
- /* 41 */ { "dup" },
- /* 42 */ { "pipe", pipePseudoFunc },
- /* 43 */ { "times" },
- /* 44 */ { "profil" },
- /* 45 */ { "plock" },
- /* 46 */ { "setgid" },
- /* 47 */ { "getgid", getgidFunc },
- /* 48 */ { "signal" },
- /* 49 */ { "msgsys" },
- /* 50 */ { "syssun" },
- /* 51 */ { "acct" },
- /* 52 */ { "shmsys" },
- /* 53 */ { "semsys" },
- /* 54 */ { "ioctl" },
- /* 55 */ { "uadmin" },
- /* 56 */ { "RESERVED" },
- /* 57 */ { "utssys" },
- /* 58 */ { "fdsync" },
- /* 59 */ { "execve" },
- /* 60 */ { "umask", umaskFunc },
- /* 61 */ { "chroot" },
- /* 62 */ { "fcntl" },
- /* 63 */ { "ulimit" },
- /* 64 */ { "reserved_64" },
- /* 65 */ { "reserved_65" },
- /* 66 */ { "reserved_66" },
- /* 67 */ { "reserved_67" },
- /* 68 */ { "reserved_68" },
- /* 69 */ { "reserved_69" },
- /* 70 */ { "tasksys" },
- /* 71 */ { "acctctl" },
- /* 72 */ { "reserved_72" },
- /* 73 */ { "getpagesizes" },
- /* 74 */ { "rctlsys" },
- /* 75 */ { "issetugid" },
- /* 76 */ { "fsat" },
- /* 77 */ { "lwp_park" },
- /* 78 */ { "sendfilev" },
- /* 79 */ { "rmdir" },
- /* 80 */ { "mkdir" },
- /* 81 */ { "getdents" },
- /* 82 */ { "reserved_82" },
- /* 83 */ { "reserved_83" },
- /* 84 */ { "sysfs" },
- /* 85 */ { "getmsg" },
- /* 86 */ { "putmsg" },
- /* 87 */ { "poll" },
- /* 88 */ { "lstat" },
- /* 89 */ { "symlink" },
- /* 90 */ { "readlink", readlinkFunc },
- /* 91 */ { "setgroups" },
- /* 92 */ { "getgroups" },
- /* 93 */ { "fchmod" },
- /* 94 */ { "fchown" },
- /* 95 */ { "sigprocmask" },
- /* 96 */ { "sigsuspend" },
- /* 97 */ { "sigaltstack" },
- /* 98 */ { "sigaction" },
- /* 99 */ { "sigpending" },
- /* 100 */ { "context" },
- /* 101 */ { "evsys" },
- /* 102 */ { "evtrapret" },
- /* 103 */ { "statvfs" },
- /* 104 */ { "fstatvfs" },
- /* 105 */ { "getloadavg" },
- /* 106 */ { "nfssys" },
- /* 107 */ { "waitsys" },
- /* 108 */ { "sigsendsys" },
- /* 109 */ { "hrtsys" },
- /* 110 */ { "acancel" },
- /* 111 */ { "async" },
- /* 112 */ { "priocntlsys" },
- /* 113 */ { "pathconf" },
- /* 114 */ { "mincore" },
- /* 115 */ { "mmap", mmapFunc<SparcSolaris> },
- /* 116 */ { "mprotect" },
- /* 117 */ { "munmap", munmapFunc },
- /* 118 */ { "fpathconf" },
- /* 119 */ { "vfork" },
- /* 120 */ { "fchdir" },
- /* 121 */ { "readv" },
- /* 122 */ { "writev" },
- /* 123 */ { "xstat" },
- /* 124 */ { "lxstat" },
- /* 125 */ { "fxstat" },
- /* 126 */ { "xmknod" },
- /* 127 */ { "clocal" },
- /* 128 */ { "setrlimit" },
- /* 129 */ { "getrlimit" },
- /* 130 */ { "lchown" },
- /* 131 */ { "memcntl" },
- /* 132 */ { "getpmsg" },
- /* 133 */ { "putpmsg" },
- /* 134 */ { "rename" },
- /* 135 */ { "uname", unameFunc },
- /* 136 */ { "setegid" },
- /* 137 */ { "sysconfig" },
- /* 138 */ { "adjtime" },
- /* 139 */ { "systeminfo" },
- /* 140 */ { "reserved_140" },
- /* 141 */ { "seteuid" },
- /* 142 */ { "vtrace" },
- /* 143 */ { "fork1" },
- /* 144 */ { "sigtimedwait" },
- /* 145 */ { "lwp_info" },
- /* 146 */ { "yield" },
- /* 147 */ { "lwp_sema_wait" },
- /* 148 */ { "lwp_sema_post" },
- /* 149 */ { "lwp_sema_trywait" },
- /* 150 */ { "lwp_detach" },
- /* 151 */ { "corectl" },
- /* 152 */ { "modctl" },
- /* 153 */ { "fchroot" },
- /* 154 */ { "utimes" },
- /* 155 */ { "vhangup" },
- /* 156 */ { "gettimeofday" },
- /* 157 */ { "getitimer" },
- /* 158 */ { "setitimer" },
- /* 159 */ { "lwp_create" },
- /* 160 */ { "lwp_exit" },
- /* 161 */ { "lwp_suspend" },
- /* 162 */ { "lwp_continue" },
- /* 163 */ { "lwp_kill" },
- /* 164 */ { "lwp_self" },
- /* 165 */ { "lwp_setprivate" },
- /* 166 */ { "lwp_getprivate" },
- /* 167 */ { "lwp_wait" },
- /* 168 */ { "lwp_mutex_wakeup" },
- /* 169 */ { "lwp_mutex_lock" },
- /* 170 */ { "lwp_cond_wait" },
- /* 171 */ { "lwp_cond_signal" },
- /* 172 */ { "lwp_cond_broadcast" },
- /* 173 */ { "pread" },
- /* 174 */ { "pwrite" },
- /* 175 */ { "llseek" },
- /* 176 */ { "inst_sync" },
- /* 177 */ { "srmlimitsys" },
- /* 178 */ { "kaio" },
- /* 179 */ { "cpc" },
- /* 180 */ { "lgrpsys_meminfosys" },
- /* 181 */ { "rusagesys" },
- /* 182 */ { "reserved_182" },
- /* 183 */ { "reserved_183" },
- /* 184 */ { "tsolsys" },
- /* 185 */ { "acl" },
- /* 186 */ { "auditsys" },
- /* 187 */ { "processor_bind" },
- /* 188 */ { "processor_info" },
- /* 189 */ { "p_online" },
- /* 190 */ { "sigqueue" },
- /* 191 */ { "clock_gettime" },
- /* 192 */ { "clock_settime" },
- /* 193 */ { "clock_getres" },
- /* 194 */ { "timer_create" },
- /* 195 */ { "timer_delete" },
- /* 196 */ { "timer_settime" },
- /* 197 */ { "timer_gettime" },
- /* 198 */ { "timer_getoverrun" },
- /* 199 */ { "nanosleep" },
- /* 200 */ { "facl" },
- /* 201 */ { "door" },
- /* 202 */ { "setreuid" },
- /* 203 */ { "setregid" },
- /* 204 */ { "install_utrap" },
- /* 205 */ { "signotify" },
- /* 206 */ { "schedctl" },
- /* 207 */ { "pset" },
- /* 208 */ { "sparc_utrap_install" },
- /* 209 */ { "resolvepath" },
- /* 210 */ { "signotifywait" },
- /* 211 */ { "lwp_sigredirect" },
- /* 212 */ { "lwp_alarm" },
- /* 213 */ { "getdents64" },
- /* 214 */ { "mmap64" },
- /* 215 */ { "stat64" },
- /* 216 */ { "lstat64" },
- /* 217 */ { "fstat64" },
- /* 218 */ { "statvfs64" },
- /* 219 */ { "fstatvfs64" },
- /* 220 */ { "setrlimit64" },
- /* 221 */ { "getrlimit64" },
- /* 222 */ { "pread64" },
- /* 223 */ { "pwrite64" },
- /* 224 */ { "creat64" },
- /* 225 */ { "open64" },
- /* 226 */ { "rpcsys" },
- /* 227 */ { "reserved_227" },
- /* 228 */ { "reserved_228" },
- /* 229 */ { "reserved_229" },
- /* 230 */ { "so_socket" },
- /* 231 */ { "so_socketpair" },
- /* 232 */ { "bind" },
- /* 233 */ { "listen" },
- /* 234 */ { "accept" },
- /* 235 */ { "connect" },
- /* 236 */ { "shutdown" },
- /* 237 */ { "recv" },
- /* 238 */ { "recvfrom" },
- /* 239 */ { "recvmsg" },
- /* 240 */ { "send" },
- /* 241 */ { "sendmsg" },
- /* 242 */ { "sendto" },
- /* 243 */ { "getpeername" },
- /* 244 */ { "getsockname" },
- /* 245 */ { "getsockopt" },
- /* 246 */ { "setsockopt" },
- /* 247 */ { "sockconfig" },
- /* 248 */ { "ntp_gettime" },
- /* 249 */ { "ntp_adjtime" },
- /* 250 */ { "lwp_mutex_unlock" },
- /* 251 */ { "lwp_mutex_trylock" },
- /* 252 */ { "lwp_mutex_init" },
- /* 253 */ { "cladm" },
- /* 254 */ { "lwp_sigtimedwait" },
- /* 255 */ { "umount2" }
+SyscallDescTable<Sparc64Process::SyscallABI>
+ SparcSolarisProcess::syscallDescs = {
+ { 0, "syscall" },
+ { 1, "exit", exitFunc },
+ { 2, "fork" },
+ { 3, "read", readFunc<SparcSolaris> },
+ { 4, "write", writeFunc<SparcSolaris> },
+ { 5, "open", openFunc<SparcSolaris> },
+ { 6, "close", closeFunc },
+ { 7, "wait" },
+ { 8, "creat" },
+ { 9, "link" },
+ { 10, "unlink", unlinkFunc },
+ { 11, "exec" },
+ { 12, "chdir" },
+ { 13, "time" },
+ { 14, "mknod" },
+ { 15, "chmod", chmodFunc<Solaris> },
+ { 16, "chown", chownFunc },
+ { 17, "brk", brkFunc },
+ { 18, "stat" },
+ { 19, "lseek", lseekFunc },
+ { 20, "getpid", getpidFunc },
+ { 21, "mount" },
+ { 22, "umount" },
+ { 23, "setuid", ignoreFunc },
+ { 24, "getuid", getuidFunc },
+ { 25, "stime" },
+ { 26, "pcsample" },
+ { 27, "alarm" },
+ { 28, "fstat", fstatFunc<SparcSolaris> },
+ { 29, "pause" },
+ { 30, "utime" },
+ { 31, "stty" },
+ { 32, "gtty" },
+ { 33, "access" },
+ { 34, "nice" },
+ { 35, "statfs" },
+ { 36, "sync" },
+ { 37, "kill" },
+ { 38, "fstatfs" },
+ { 39, "pgrpsys" },
+ { 40, "xenix" },
+ { 41, "dup" },
+ { 42, "pipe", pipePseudoFunc },
+ { 43, "times" },
+ { 44, "profil" },
+ { 45, "plock" },
+ { 46, "setgid" },
+ { 47, "getgid", getgidFunc },
+ { 48, "signal" },
+ { 49, "msgsys" },
+ { 50, "syssun" },
+ { 51, "acct" },
+ { 52, "shmsys" },
+ { 53, "semsys" },
+ { 54, "ioctl" },
+ { 55, "uadmin" },
+ { 56, "RESERVED" },
+ { 57, "utssys" },
+ { 58, "fdsync" },
+ { 59, "execve" },
+ { 60, "umask", umaskFunc },
+ { 61, "chroot" },
+ { 62, "fcntl" },
+ { 63, "ulimit" },
+ { 64, "reserved_64" },
+ { 65, "reserved_65" },
+ { 66, "reserved_66" },
+ { 67, "reserved_67" },
+ { 68, "reserved_68" },
+ { 69, "reserved_69" },
+ { 70, "tasksys" },
+ { 71, "acctctl" },
+ { 72, "reserved_72" },
+ { 73, "getpagesizes" },
+ { 74, "rctlsys" },
+ { 75, "issetugid" },
+ { 76, "fsat" },
+ { 77, "lwp_park" },
+ { 78, "sendfilev" },
+ { 79, "rmdir" },
+ { 80, "mkdir" },
+ { 81, "getdents" },
+ { 82, "reserved_82" },
+ { 83, "reserved_83" },
+ { 84, "sysfs" },
+ { 85, "getmsg" },
+ { 86, "putmsg" },
+ { 87, "poll" },
+ { 88, "lstat" },
+ { 89, "symlink" },
+ { 90, "readlink", readlinkFunc },
+ { 91, "setgroups" },
+ { 92, "getgroups" },
+ { 93, "fchmod" },
+ { 94, "fchown" },
+ { 95, "sigprocmask" },
+ { 96, "sigsuspend" },
+ { 97, "sigaltstack" },
+ { 98, "sigaction" },
+ { 99, "sigpending" },
+ { 100, "context" },
+ { 101, "evsys" },
+ { 102, "evtrapret" },
+ { 103, "statvfs" },
+ { 104, "fstatvfs" },
+ { 105, "getloadavg" },
+ { 106, "nfssys" },
+ { 107, "waitsys" },
+ { 108, "sigsendsys" },
+ { 109, "hrtsys" },
+ { 110, "acancel" },
+ { 111, "async" },
+ { 112, "priocntlsys" },
+ { 113, "pathconf" },
+ { 114, "mincore" },
+ { 115, "mmap", mmapFunc<SparcSolaris> },
+ { 116, "mprotect" },
+ { 117, "munmap", munmapFunc },
+ { 118, "fpathconf" },
+ { 119, "vfork" },
+ { 120, "fchdir" },
+ { 121, "readv" },
+ { 122, "writev" },
+ { 123, "xstat" },
+ { 124, "lxstat" },
+ { 125, "fxstat" },
+ { 126, "xmknod" },
+ { 127, "clocal" },
+ { 128, "setrlimit" },
+ { 129, "getrlimit" },
+ { 130, "lchown" },
+ { 131, "memcntl" },
+ { 132, "getpmsg" },
+ { 133, "putpmsg" },
+ { 134, "rename" },
+ { 135, "uname", unameFunc },
+ { 136, "setegid" },
+ { 137, "sysconfig" },
+ { 138, "adjtime" },
+ { 139, "systeminfo" },
+ { 140, "reserved_140" },
+ { 141, "seteuid" },
+ { 142, "vtrace" },
+ { 143, "fork1" },
+ { 144, "sigtimedwait" },
+ { 145, "lwp_info" },
+ { 146, "yield" },
+ { 147, "lwp_sema_wait" },
+ { 148, "lwp_sema_post" },
+ { 149, "lwp_sema_trywait" },
+ { 150, "lwp_detach" },
+ { 151, "corectl" },
+ { 152, "modctl" },
+ { 153, "fchroot" },
+ { 154, "utimes" },
+ { 155, "vhangup" },
+ { 156, "gettimeofday" },
+ { 157, "getitimer" },
+ { 158, "setitimer" },
+ { 159, "lwp_create" },
+ { 160, "lwp_exit" },
+ { 161, "lwp_suspend" },
+ { 162, "lwp_continue" },
+ { 163, "lwp_kill" },
+ { 164, "lwp_self" },
+ { 165, "lwp_setprivate" },
+ { 166, "lwp_getprivate" },
+ { 167, "lwp_wait" },
+ { 168, "lwp_mutex_wakeup" },
+ { 169, "lwp_mutex_lock" },
+ { 170, "lwp_cond_wait" },
+ { 171, "lwp_cond_signal" },
+ { 172, "lwp_cond_broadcast" },
+ { 173, "pread" },
+ { 174, "pwrite" },
+ { 175, "llseek" },
+ { 176, "inst_sync" },
+ { 177, "srmlimitsys" },
+ { 178, "kaio" },
+ { 179, "cpc" },
+ { 180, "lgrpsys_meminfosys" },
+ { 181, "rusagesys" },
+ { 182, "reserved_182" },
+ { 183, "reserved_183" },
+ { 184, "tsolsys" },
+ { 185, "acl" },
+ { 186, "auditsys" },
+ { 187, "processor_bind" },
+ { 188, "processor_info" },
+ { 189, "p_online" },
+ { 190, "sigqueue" },
+ { 191, "clock_gettime" },
+ { 192, "clock_settime" },
+ { 193, "clock_getres" },
+ { 194, "timer_create" },
+ { 195, "timer_delete" },
+ { 196, "timer_settime" },
+ { 197, "timer_gettime" },
+ { 198, "timer_getoverrun" },
+ { 199, "nanosleep" },
+ { 200, "facl" },
+ { 201, "door" },
+ { 202, "setreuid" },
+ { 203, "setregid" },
+ { 204, "install_utrap" },
+ { 205, "signotify" },
+ { 206, "schedctl" },
+ { 207, "pset" },
+ { 208, "sparc_utrap_install" },
+ { 209, "resolvepath" },
+ { 210, "signotifywait" },
+ { 211, "lwp_sigredirect" },
+ { 212, "lwp_alarm" },
+ { 213, "getdents64" },
+ { 214, "mmap64" },
+ { 215, "stat64" },
+ { 216, "lstat64" },
+ { 217, "fstat64" },
+ { 218, "statvfs64" },
+ { 219, "fstatvfs64" },
+ { 220, "setrlimit64" },
+ { 221, "getrlimit64" },
+ { 222, "pread64" },
+ { 223, "pwrite64" },
+ { 224, "creat64" },
+ { 225, "open64" },
+ { 226, "rpcsys" },
+ { 227, "reserved_227" },
+ { 228, "reserved_228" },
+ { 229, "reserved_229" },
+ { 230, "so_socket" },
+ { 231, "so_socketpair" },
+ { 232, "bind" },
+ { 233, "listen" },
+ { 234, "accept" },
+ { 235, "connect" },
+ { 236, "shutdown" },
+ { 237, "recv" },
+ { 238, "recvfrom" },
+ { 239, "recvmsg" },
+ { 240, "send" },
+ { 241, "sendmsg" },
+ { 242, "sendto" },
+ { 243, "getpeername" },
+ { 244, "getsockname" },
+ { 245, "getsockopt" },
+ { 246, "setsockopt" },
+ { 247, "sockconfig" },
+ { 248, "ntp_gettime" },
+ { 249, "ntp_adjtime" },
+ { 250, "lwp_mutex_unlock" },
+ { 251, "lwp_mutex_trylock" },
+ { 252, "lwp_mutex_init" },
+ { 253, "cladm" },
+ { 254, "lwp_sigtimedwait" },
+ { 255, "umount2" }
};
SparcSolarisProcess::SparcSolarisProcess(ProcessParams * params,
ObjectFile *objFile)
- : Sparc64Process(params, objFile),
- Num_Syscall_Descs(sizeof(syscallDescs) / sizeof(SyscallDesc))
-{
- // The sparc syscall table must be <= 284 entries because that is all there
- // is space for.
- assert(Num_Syscall_Descs <= 284);
-}
-
-
+ : Sparc64Process(params, objFile)
+{}
SyscallDesc*
SparcSolarisProcess::getDesc(int callnum)
{
- if (callnum < 0 || callnum >= Num_Syscall_Descs)
- return NULL;
- return &syscallDescs[callnum];
+ return syscallDescs.get(callnum);
}
void
void syscall(ThreadContext *tc, Fault *fault) override;
/// Array of syscall descriptors, indexed by call number.
- static SyscallDescABI<Sparc64Process::SyscallABI> syscallDescs[];
-
- const int Num_Syscall_Descs;
+ static SyscallDescTable<Sparc64Process::SyscallABI> syscallDescs;
};
INTREG_RDI, INTREG_RSI, INTREG_RDX, INTREG_R10W, INTREG_R8W, INTREG_R9W
};
-static SyscallDescABI<X86_64LinuxProcess::SyscallABI> syscallDescs64[] = {
- /* 0 */ { "read", readFunc<X86Linux64> },
- /* 1 */ { "write", writeFunc<X86Linux64> },
- /* 2 */ { "open", openFunc<X86Linux64> },
- /* 3 */ { "close", closeFunc },
- /* 4 */ { "stat", stat64Func<X86Linux64> },
- /* 5 */ { "fstat", fstat64Func<X86Linux64> },
- /* 6 */ { "lstat", lstat64Func<X86Linux64> },
- /* 7 */ { "poll", pollFunc<X86Linux64> },
- /* 8 */ { "lseek", lseekFunc },
- /* 9 */ { "mmap", mmapFunc<X86Linux64> },
- /* 10 */ { "mprotect", ignoreFunc },
- /* 11 */ { "munmap", munmapFunc },
- /* 12 */ { "brk", brkFunc },
- /* 13 */ { "rt_sigaction", ignoreWarnOnceFunc },
- /* 14 */ { "rt_sigprocmask", ignoreWarnOnceFunc },
- /* 15 */ { "rt_sigreturn" },
- /* 16 */ { "ioctl", ioctlFunc<X86Linux64> },
- /* 17 */ { "pread64", pread64Func<X86Linux64> },
- /* 18 */ { "pwrite64", pwrite64Func<X86Linux64> },
- /* 19 */ { "readv", readvFunc<X86Linux64> },
- /* 20 */ { "writev", writevFunc<X86Linux64> },
- /* 21 */ { "access", ignoreFunc },
- /* 22 */ { "pipe", pipeFunc },
- /* 23 */ { "select", selectFunc<X86Linux64> },
- /* 24 */ { "sched_yield", ignoreFunc },
- /* 25 */ { "mremap", mremapFunc<X86Linux64> },
- /* 26 */ { "msync" },
- /* 27 */ { "mincore" },
- /* 28 */ { "madvise", ignoreFunc },
- /* 29 */ { "shmget" },
- /* 30 */ { "shmat" },
- /* 31 */ { "shmctl" },
- /* 32 */ { "dup", dupFunc },
- /* 33 */ { "dup2", dup2Func },
- /* 34 */ { "pause" },
- /* 35 */ { "nanosleep", ignoreWarnOnceFunc },
- /* 36 */ { "getitimer" },
- /* 37 */ { "alarm" },
- /* 38 */ { "setitimer" },
- /* 39 */ { "getpid", getpidFunc },
- /* 40 */ { "sendfile" },
- /* 41 */ { "socket", socketFunc<X86Linux64> },
- /* 42 */ { "connect", connectFunc },
- /* 43 */ { "accept", acceptFunc<X86Linux64> },
- /* 44 */ { "sendto", sendtoFunc },
- /* 45 */ { "recvfrom", recvfromFunc },
- /* 46 */ { "sendmsg", sendmsgFunc },
- /* 47 */ { "recvmsg", recvmsgFunc },
- /* 48 */ { "shutdown", shutdownFunc },
- /* 49 */ { "bind", bindFunc },
- /* 50 */ { "listen", listenFunc },
- /* 51 */ { "getsockname", getsocknameFunc },
- /* 52 */ { "getpeername", getpeernameFunc },
- /* 53 */ { "socketpair", socketpairFunc<X86Linux64> },
- /* 54 */ { "setsockopt", setsockoptFunc },
- /* 55 */ { "getsockopt", getsockoptFunc },
- /* 56 */ { "clone", cloneFunc<X86Linux64> },
- /* 57 */ { "fork" },
- /* 58 */ { "vfork" },
- /* 59 */ { "execve", execveFunc<X86Linux64> },
- /* 60 */ { "exit", exitFunc },
- /* 61 */ { "wait4", wait4Func<X86Linux64> },
- /* 62 */ { "kill" },
- /* 63 */ { "uname", unameFunc },
- /* 64 */ { "semget" },
- /* 65 */ { "semop" },
- /* 66 */ { "semctl" },
- /* 67 */ { "shmdt" },
- /* 68 */ { "msgget" },
- /* 69 */ { "msgsnd" },
- /* 70 */ { "msgrcv" },
- /* 71 */ { "msgctl" },
- /* 72 */ { "fcntl", fcntlFunc },
- /* 73 */ { "flock" },
- /* 74 */ { "fsync" },
- /* 75 */ { "fdatasync" },
- /* 76 */ { "truncate", truncateFunc },
- /* 77 */ { "ftruncate", ftruncateFunc },
+static SyscallDescTable<X86_64LinuxProcess::SyscallABI> syscallDescs64 = {
+ { 0, "read", readFunc<X86Linux64> },
+ { 1, "write", writeFunc<X86Linux64> },
+ { 2, "open", openFunc<X86Linux64> },
+ { 3, "close", closeFunc },
+ { 4, "stat", stat64Func<X86Linux64> },
+ { 5, "fstat", fstat64Func<X86Linux64> },
+ { 6, "lstat", lstat64Func<X86Linux64> },
+ { 7, "poll", pollFunc<X86Linux64> },
+ { 8, "lseek", lseekFunc },
+ { 9, "mmap", mmapFunc<X86Linux64> },
+ { 10, "mprotect", ignoreFunc },
+ { 11, "munmap", munmapFunc },
+ { 12, "brk", brkFunc },
+ { 13, "rt_sigaction", ignoreWarnOnceFunc },
+ { 14, "rt_sigprocmask", ignoreWarnOnceFunc },
+ { 15, "rt_sigreturn" },
+ { 16, "ioctl", ioctlFunc<X86Linux64> },
+ { 17, "pread64", pread64Func<X86Linux64> },
+ { 18, "pwrite64", pwrite64Func<X86Linux64> },
+ { 19, "readv", readvFunc<X86Linux64> },
+ { 20, "writev", writevFunc<X86Linux64> },
+ { 21, "access", ignoreFunc },
+ { 22, "pipe", pipeFunc },
+ { 23, "select", selectFunc<X86Linux64> },
+ { 24, "sched_yield", ignoreFunc },
+ { 25, "mremap", mremapFunc<X86Linux64> },
+ { 26, "msync" },
+ { 27, "mincore" },
+ { 28, "madvise", ignoreFunc },
+ { 29, "shmget" },
+ { 30, "shmat" },
+ { 31, "shmctl" },
+ { 32, "dup", dupFunc },
+ { 33, "dup2", dup2Func },
+ { 34, "pause" },
+ { 35, "nanosleep", ignoreWarnOnceFunc },
+ { 36, "getitimer" },
+ { 37, "alarm" },
+ { 38, "setitimer" },
+ { 39, "getpid", getpidFunc },
+ { 40, "sendfile" },
+ { 41, "socket", socketFunc<X86Linux64> },
+ { 42, "connect", connectFunc },
+ { 43, "accept", acceptFunc<X86Linux64> },
+ { 44, "sendto", sendtoFunc },
+ { 45, "recvfrom", recvfromFunc },
+ { 46, "sendmsg", sendmsgFunc },
+ { 47, "recvmsg", recvmsgFunc },
+ { 48, "shutdown", shutdownFunc },
+ { 49, "bind", bindFunc },
+ { 50, "listen", listenFunc },
+ { 51, "getsockname", getsocknameFunc },
+ { 52, "getpeername", getpeernameFunc },
+ { 53, "socketpair", socketpairFunc<X86Linux64> },
+ { 54, "setsockopt", setsockoptFunc },
+ { 55, "getsockopt", getsockoptFunc },
+ { 56, "clone", cloneFunc<X86Linux64> },
+ { 57, "fork" },
+ { 58, "vfork" },
+ { 59, "execve", execveFunc<X86Linux64> },
+ { 60, "exit", exitFunc },
+ { 61, "wait4", wait4Func<X86Linux64> },
+ { 62, "kill" },
+ { 63, "uname", unameFunc },
+ { 64, "semget" },
+ { 65, "semop" },
+ { 66, "semctl" },
+ { 67, "shmdt" },
+ { 68, "msgget" },
+ { 69, "msgsnd" },
+ { 70, "msgrcv" },
+ { 71, "msgctl" },
+ { 72, "fcntl", fcntlFunc },
+ { 73, "flock" },
+ { 74, "fsync" },
+ { 75, "fdatasync" },
+ { 76, "truncate", truncateFunc },
+ { 77, "ftruncate", ftruncateFunc },
#if defined(SYS_getdents)
- /* 78 */ { "getdents", getdentsFunc },
+ { 78, "getdents", getdentsFunc },
#else
- /* 78 */ { "getdents" },
+ { 78, "getdents" },
#endif
- /* 79 */ { "getcwd", getcwdFunc },
- /* 80 */ { "chdir", chdirFunc },
- /* 81 */ { "fchdir" },
- /* 82 */ { "rename", renameFunc },
- /* 83 */ { "mkdir", mkdirFunc },
- /* 84 */ { "rmdir", rmdirFunc },
- /* 85 */ { "creat" },
- /* 86 */ { "link", linkFunc },
- /* 87 */ { "unlink", unlinkFunc },
- /* 88 */ { "symlink", symlinkFunc },
- /* 89 */ { "readlink", readlinkFunc },
- /* 90 */ { "chmod" },
- /* 91 */ { "fchmod" },
- /* 92 */ { "chown" },
- /* 93 */ { "fchown" },
- /* 94 */ { "lchown" },
- /* 95 */ { "umask", umaskFunc },
- /* 96 */ { "gettimeofday", gettimeofdayFunc<X86Linux64> },
- /* 97 */ { "getrlimit", getrlimitFunc<X86Linux64> },
- /* 98 */ { "getrusage", getrusageFunc<X86Linux64> },
- /* 99 */ { "sysinfo", sysinfoFunc<X86Linux64> },
- /* 100 */ { "times", timesFunc<X86Linux64> },
- /* 101 */ { "ptrace" },
- /* 102 */ { "getuid", getuidFunc },
- /* 103 */ { "syslog" },
- /* 104 */ { "getgid", getgidFunc },
- /* 105 */ { "setuid" },
- /* 106 */ { "setgid" },
- /* 107 */ { "geteuid", geteuidFunc },
- /* 108 */ { "getegid", getegidFunc },
- /* 109 */ { "setpgid", setpgidFunc },
- /* 110 */ { "getppid", getppidFunc },
- /* 111 */ { "getpgrp", getpgrpFunc },
- /* 112 */ { "setsid" },
- /* 113 */ { "setreuid" },
- /* 114 */ { "setregid" },
- /* 115 */ { "getgroups" },
- /* 116 */ { "setgroups" },
- /* 117 */ { "setresuid", ignoreFunc },
- /* 118 */ { "getresuid" },
- /* 119 */ { "setresgid" },
- /* 120 */ { "getresgid" },
- /* 121 */ { "getpgid" },
- /* 122 */ { "setfsuid" },
- /* 123 */ { "setfsgid" },
- /* 124 */ { "getsid" },
- /* 125 */ { "capget" },
- /* 126 */ { "capset" },
- /* 127 */ { "rt_sigpending" },
- /* 128 */ { "rt_sigtimedwait" },
- /* 129 */ { "rt_sigqueueinfo" },
- /* 130 */ { "rt_sigsuspend" },
- /* 131 */ { "sigaltstack" },
- /* 132 */ { "utime" },
- /* 133 */ { "mknod", mknodFunc },
- /* 134 */ { "uselib" },
- /* 135 */ { "personality" },
- /* 136 */ { "ustat" },
- /* 137 */ { "statfs", statfsFunc<X86Linux64> },
- /* 138 */ { "fstatfs", fstatfsFunc<X86Linux64> },
- /* 139 */ { "sysfs" },
- /* 140 */ { "getpriority" },
- /* 141 */ { "setpriority", ignoreFunc },
- /* 142 */ { "sched_setparam" },
- /* 143 */ { "sched_getparam" },
- /* 144 */ { "sched_setscheduler" },
- /* 145 */ { "sched_getscheduler" },
- /* 146 */ { "sched_get_priority_max" },
- /* 147 */ { "sched_get_priority_min" },
- /* 148 */ { "sched_rr_get_interval" },
- /* 149 */ { "mlock" },
- /* 150 */ { "munlock" },
- /* 151 */ { "mlockall" },
- /* 152 */ { "munlockall" },
- /* 153 */ { "vhangup" },
- /* 154 */ { "modify_ldt" },
- /* 155 */ { "pivot_root" },
- /* 156 */ { "_sysctl" },
- /* 157 */ { "prctl" },
- /* 158 */ { "arch_prctl", archPrctlFunc },
- /* 159 */ { "adjtimex" },
- /* 160 */ { "setrlimit", ignoreFunc },
- /* 161 */ { "chroot" },
- /* 162 */ { "sync" },
- /* 163 */ { "acct" },
- /* 164 */ { "settimeofday" },
- /* 165 */ { "mount" },
- /* 166 */ { "umount2" },
- /* 167 */ { "swapon" },
- /* 168 */ { "swapoff" },
- /* 169 */ { "reboot" },
- /* 170 */ { "sethostname" },
- /* 171 */ { "setdomainname" },
- /* 172 */ { "iopl" },
- /* 173 */ { "ioperm" },
- /* 174 */ { "create_module" },
- /* 175 */ { "init_module" },
- /* 176 */ { "delete_module" },
- /* 177 */ { "get_kernel_syms" },
- /* 178 */ { "query_module" },
- /* 179 */ { "quotactl" },
- /* 180 */ { "nfsservctl" },
- /* 181 */ { "getpmsg" },
- /* 182 */ { "putpmsg" },
- /* 183 */ { "afs_syscall" },
- /* 184 */ { "tuxcall" },
- /* 185 */ { "security" },
- /* 186 */ { "gettid", gettidFunc },
- /* 187 */ { "readahead" },
- /* 188 */ { "setxattr" },
- /* 189 */ { "lsetxattr" },
- /* 190 */ { "fsetxattr" },
- /* 191 */ { "getxattr" },
- /* 192 */ { "lgetxattr" },
- /* 193 */ { "fgetxattr" },
- /* 194 */ { "listxattr" },
- /* 195 */ { "llistxattr" },
- /* 196 */ { "flistxattr" },
- /* 197 */ { "removexattr" },
- /* 198 */ { "lremovexattr" },
- /* 199 */ { "fremovexattr" },
- /* 200 */ { "tkill" },
- /* 201 */ { "time", timeFunc<X86Linux64> },
- /* 202 */ { "futex", futexFunc<X86Linux64> },
- /* 203 */ { "sched_setaffinity" },
- /* 204 */ { "sched_getaffinity", ignoreFunc },
- /* 205 */ { "set_thread_area" },
- /* 206 */ { "io_setup" },
- /* 207 */ { "io_destroy" },
- /* 208 */ { "io_getevents" },
- /* 209 */ { "io_submit" },
- /* 210 */ { "io_cancel" },
- /* 211 */ { "get_thread_area" },
- /* 212 */ { "lookup_dcookie" },
- /* 213 */ { "epoll_create" },
- /* 214 */ { "epoll_ctl_old" },
- /* 215 */ { "epoll_wait_old" },
- /* 216 */ { "remap_file_pages" },
- /* 217 */ { "getdents64" },
- /* 218 */ { "set_tid_address", setTidAddressFunc },
- /* 219 */ { "restart_syscall" },
- /* 220 */ { "semtimedop" },
- /* 221 */ { "fadvise64", ignoreFunc },
- /* 222 */ { "timer_create" },
- /* 223 */ { "timer_settime" },
- /* 224 */ { "timer_gettime" },
- /* 225 */ { "timer_getoverrun" },
- /* 226 */ { "timer_delete" },
- /* 227 */ { "clock_settime" },
- /* 228 */ { "clock_gettime", clock_gettimeFunc<X86Linux64> },
- /* 229 */ { "clock_getres", clock_getresFunc<X86Linux64> },
- /* 230 */ { "clock_nanosleep" },
- /* 231 */ { "exit_group", exitGroupFunc },
- /* 232 */ { "epoll_wait" },
- /* 233 */ { "epoll_ctl" },
- /* 234 */ { "tgkill", tgkillFunc<X86Linux64> },
- /* 235 */ { "utimes" },
- /* 236 */ { "vserver" },
- /* 237 */ { "mbind" },
- /* 238 */ { "set_mempolicy" },
- /* 239 */ { "get_mempolicy", ignoreFunc },
- /* 240 */ { "mq_open" },
- /* 241 */ { "mq_unlink" },
- /* 242 */ { "mq_timedsend" },
- /* 243 */ { "mq_timedreceive" },
- /* 244 */ { "mq_notify" },
- /* 245 */ { "mq_getsetattr" },
- /* 246 */ { "kexec_load" },
- /* 247 */ { "waitid" },
- /* 248 */ { "add_key" },
- /* 249 */ { "request_key" },
- /* 250 */ { "keyctl" },
- /* 251 */ { "ioprio_set" },
- /* 252 */ { "ioprio_get" },
- /* 253 */ { "inotify_init" },
- /* 254 */ { "inotify_add_watch" },
- /* 255 */ { "inotify_rm_watch" },
- /* 256 */ { "migrate_pages" },
- /* 257 */ { "openat", openatFunc<X86Linux64> },
- /* 258 */ { "mkdirat" },
- /* 259 */ { "mknodat" },
- /* 260 */ { "fchownat" },
- /* 261 */ { "futimesat" },
- /* 262 */ { "newfstatat" },
- /* 263 */ { "unlinkat" },
- /* 264 */ { "renameat" },
- /* 265 */ { "linkat" },
- /* 266 */ { "symlinkat" },
- /* 267 */ { "readlinkat", readlinkFunc },
- /* 268 */ { "fchmodat" },
- /* 269 */ { "faccessat" },
- /* 270 */ { "pselect6" },
- /* 271 */ { "ppoll" },
- /* 272 */ { "unshare" },
- /* 273 */ { "set_robust_list", ignoreFunc },
- /* 274 */ { "get_robust_list" },
- /* 275 */ { "splice" },
- /* 276 */ { "tee" },
- /* 277 */ { "sync_file_range" },
- /* 278 */ { "vmsplice" },
- /* 279 */ { "move_pages" },
- /* 280 */ { "utimensat" },
- /* 281 */ { "epoll_pwait" },
- /* 282 */ { "signalfd" },
- /* 283 */ { "timerfd_create" },
- /* 284 */ { "eventfd", eventfdFunc<X86Linux64> },
- /* 285 */ { "fallocate", fallocateFunc },
- /* 286 */ { "timerfd_settime" },
- /* 287 */ { "timerfd_gettime" },
- /* 288 */ { "accept4" },
- /* 289 */ { "signalfd4" },
- /* 290 */ { "eventfd2", eventfdFunc<X86Linux64> },
- /* 291 */ { "epoll_create1" },
- /* 292 */ { "dup3" },
- /* 293 */ { "pipe2", pipe2Func },
- /* 294 */ { "inotify_init1" },
- /* 295 */ { "preadv" },
- /* 296 */ { "pwritev" },
- /* 297 */ { "rt_tgsigqueueinfo" },
- /* 298 */ { "perf_event_open" },
- /* 299 */ { "recvmmsg" },
- /* 300 */ { "fanotify_init" },
- /* 301 */ { "fanotify_mark" },
- /* 302 */ { "prlimit64", prlimitFunc<X86Linux64> },
- /* 303 */ { "name_to_handle_at" },
- /* 304 */ { "open_by_handle_at" },
- /* 305 */ { "clock_adjtime" },
- /* 306 */ { "syncfs" },
- /* 307 */ { "sendmmsg" },
- /* 308 */ { "setns" },
- /* 309 */ { "getcpu" },
- /* 310 */ { "proess_vm_readv" },
- /* 311 */ { "proess_vm_writev" },
- /* 312 */ { "kcmp" },
- /* 313 */ { "finit_module" },
+ { 79, "getcwd", getcwdFunc },
+ { 80, "chdir", chdirFunc },
+ { 81, "fchdir" },
+ { 82, "rename", renameFunc },
+ { 83, "mkdir", mkdirFunc },
+ { 84, "rmdir", rmdirFunc },
+ { 85, "creat" },
+ { 86, "link", linkFunc },
+ { 87, "unlink", unlinkFunc },
+ { 88, "symlink", symlinkFunc },
+ { 89, "readlink", readlinkFunc },
+ { 90, "chmod" },
+ { 91, "fchmod" },
+ { 92, "chown" },
+ { 93, "fchown" },
+ { 94, "lchown" },
+ { 95, "umask", umaskFunc },
+ { 96, "gettimeofday", gettimeofdayFunc<X86Linux64> },
+ { 97, "getrlimit", getrlimitFunc<X86Linux64> },
+ { 98, "getrusage", getrusageFunc<X86Linux64> },
+ { 99, "sysinfo", sysinfoFunc<X86Linux64> },
+ { 100, "times", timesFunc<X86Linux64> },
+ { 101, "ptrace" },
+ { 102, "getuid", getuidFunc },
+ { 103, "syslog" },
+ { 104, "getgid", getgidFunc },
+ { 105, "setuid" },
+ { 106, "setgid" },
+ { 107, "geteuid", geteuidFunc },
+ { 108, "getegid", getegidFunc },
+ { 109, "setpgid", setpgidFunc },
+ { 110, "getppid", getppidFunc },
+ { 111, "getpgrp", getpgrpFunc },
+ { 112, "setsid" },
+ { 113, "setreuid" },
+ { 114, "setregid" },
+ { 115, "getgroups" },
+ { 116, "setgroups" },
+ { 117, "setresuid", ignoreFunc },
+ { 118, "getresuid" },
+ { 119, "setresgid" },
+ { 120, "getresgid" },
+ { 121, "getpgid" },
+ { 122, "setfsuid" },
+ { 123, "setfsgid" },
+ { 124, "getsid" },
+ { 125, "capget" },
+ { 126, "capset" },
+ { 127, "rt_sigpending" },
+ { 128, "rt_sigtimedwait" },
+ { 129, "rt_sigqueueinfo" },
+ { 130, "rt_sigsuspend" },
+ { 131, "sigaltstack" },
+ { 132, "utime" },
+ { 133, "mknod", mknodFunc },
+ { 134, "uselib" },
+ { 135, "personality" },
+ { 136, "ustat" },
+ { 137, "statfs", statfsFunc<X86Linux64> },
+ { 138, "fstatfs", fstatfsFunc<X86Linux64> },
+ { 139, "sysfs" },
+ { 140, "getpriority" },
+ { 141, "setpriority", ignoreFunc },
+ { 142, "sched_setparam" },
+ { 143, "sched_getparam" },
+ { 144, "sched_setscheduler" },
+ { 145, "sched_getscheduler" },
+ { 146, "sched_get_priority_max" },
+ { 147, "sched_get_priority_min" },
+ { 148, "sched_rr_get_interval" },
+ { 149, "mlock" },
+ { 150, "munlock" },
+ { 151, "mlockall" },
+ { 152, "munlockall" },
+ { 153, "vhangup" },
+ { 154, "modify_ldt" },
+ { 155, "pivot_root" },
+ { 156, "_sysctl" },
+ { 157, "prctl" },
+ { 158, "arch_prctl", archPrctlFunc },
+ { 159, "adjtimex" },
+ { 160, "setrlimit", ignoreFunc },
+ { 161, "chroot" },
+ { 162, "sync" },
+ { 163, "acct" },
+ { 164, "settimeofday" },
+ { 165, "mount" },
+ { 166, "umount2" },
+ { 167, "swapon" },
+ { 168, "swapoff" },
+ { 169, "reboot" },
+ { 170, "sethostname" },
+ { 171, "setdomainname" },
+ { 172, "iopl" },
+ { 173, "ioperm" },
+ { 174, "create_module" },
+ { 175, "init_module" },
+ { 176, "delete_module" },
+ { 177, "get_kernel_syms" },
+ { 178, "query_module" },
+ { 179, "quotactl" },
+ { 180, "nfsservctl" },
+ { 181, "getpmsg" },
+ { 182, "putpmsg" },
+ { 183, "afs_syscall" },
+ { 184, "tuxcall" },
+ { 185, "security" },
+ { 186, "gettid", gettidFunc },
+ { 187, "readahead" },
+ { 188, "setxattr" },
+ { 189, "lsetxattr" },
+ { 190, "fsetxattr" },
+ { 191, "getxattr" },
+ { 192, "lgetxattr" },
+ { 193, "fgetxattr" },
+ { 194, "listxattr" },
+ { 195, "llistxattr" },
+ { 196, "flistxattr" },
+ { 197, "removexattr" },
+ { 198, "lremovexattr" },
+ { 199, "fremovexattr" },
+ { 200, "tkill" },
+ { 201, "time", timeFunc<X86Linux64> },
+ { 202, "futex", futexFunc<X86Linux64> },
+ { 203, "sched_setaffinity" },
+ { 204, "sched_getaffinity", ignoreFunc },
+ { 205, "set_thread_area" },
+ { 206, "io_setup" },
+ { 207, "io_destroy" },
+ { 208, "io_getevents" },
+ { 209, "io_submit" },
+ { 210, "io_cancel" },
+ { 211, "get_thread_area" },
+ { 212, "lookup_dcookie" },
+ { 213, "epoll_create" },
+ { 214, "epoll_ctl_old" },
+ { 215, "epoll_wait_old" },
+ { 216, "remap_file_pages" },
+ { 217, "getdents64" },
+ { 218, "set_tid_address", setTidAddressFunc },
+ { 219, "restart_syscall" },
+ { 220, "semtimedop" },
+ { 221, "fadvise64", ignoreFunc },
+ { 222, "timer_create" },
+ { 223, "timer_settime" },
+ { 224, "timer_gettime" },
+ { 225, "timer_getoverrun" },
+ { 226, "timer_delete" },
+ { 227, "clock_settime" },
+ { 228, "clock_gettime", clock_gettimeFunc<X86Linux64> },
+ { 229, "clock_getres", clock_getresFunc<X86Linux64> },
+ { 230, "clock_nanosleep" },
+ { 231, "exit_group", exitGroupFunc },
+ { 232, "epoll_wait" },
+ { 233, "epoll_ctl" },
+ { 234, "tgkill", tgkillFunc<X86Linux64> },
+ { 235, "utimes" },
+ { 236, "vserver" },
+ { 237, "mbind" },
+ { 238, "set_mempolicy" },
+ { 239, "get_mempolicy", ignoreFunc },
+ { 240, "mq_open" },
+ { 241, "mq_unlink" },
+ { 242, "mq_timedsend" },
+ { 243, "mq_timedreceive" },
+ { 244, "mq_notify" },
+ { 245, "mq_getsetattr" },
+ { 246, "kexec_load" },
+ { 247, "waitid" },
+ { 248, "add_key" },
+ { 249, "request_key" },
+ { 250, "keyctl" },
+ { 251, "ioprio_set" },
+ { 252, "ioprio_get" },
+ { 253, "inotify_init" },
+ { 254, "inotify_add_watch" },
+ { 255, "inotify_rm_watch" },
+ { 256, "migrate_pages" },
+ { 257, "openat", openatFunc<X86Linux64> },
+ { 258, "mkdirat" },
+ { 259, "mknodat" },
+ { 260, "fchownat" },
+ { 261, "futimesat" },
+ { 262, "newfstatat" },
+ { 263, "unlinkat" },
+ { 264, "renameat" },
+ { 265, "linkat" },
+ { 266, "symlinkat" },
+ { 267, "readlinkat", readlinkFunc },
+ { 268, "fchmodat" },
+ { 269, "faccessat" },
+ { 270, "pselect6" },
+ { 271, "ppoll" },
+ { 272, "unshare" },
+ { 273, "set_robust_list", ignoreFunc },
+ { 274, "get_robust_list" },
+ { 275, "splice" },
+ { 276, "tee" },
+ { 277, "sync_file_range" },
+ { 278, "vmsplice" },
+ { 279, "move_pages" },
+ { 280, "utimensat" },
+ { 281, "epoll_pwait" },
+ { 282, "signalfd" },
+ { 283, "timerfd_create" },
+ { 284, "eventfd", eventfdFunc<X86Linux64> },
+ { 285, "fallocate", fallocateFunc },
+ { 286, "timerfd_settime" },
+ { 287, "timerfd_gettime" },
+ { 288, "accept4" },
+ { 289, "signalfd4" },
+ { 290, "eventfd2", eventfdFunc<X86Linux64> },
+ { 291, "epoll_create1" },
+ { 292, "dup3" },
+ { 293, "pipe2", pipe2Func },
+ { 294, "inotify_init1" },
+ { 295, "preadv" },
+ { 296, "pwritev" },
+ { 297, "rt_tgsigqueueinfo" },
+ { 298, "perf_event_open" },
+ { 299, "recvmmsg" },
+ { 300, "fanotify_init" },
+ { 301, "fanotify_mark" },
+ { 302, "prlimit64", prlimitFunc<X86Linux64> },
+ { 303, "name_to_handle_at" },
+ { 304, "open_by_handle_at" },
+ { 305, "clock_adjtime" },
+ { 306, "syncfs" },
+ { 307, "sendmmsg" },
+ { 308, "setns" },
+ { 309, "getcpu" },
+ { 310, "proess_vm_readv" },
+ { 311, "proess_vm_writev" },
+ { 312, "kcmp" },
+ { 313, "finit_module" },
};
-X86_64LinuxProcess::X86_64LinuxProcess(ProcessParams * params,
- ObjectFile *objFile)
- : X86_64Process(params, objFile, syscallDescs64,
- sizeof(syscallDescs64) / sizeof(SyscallDesc))
-{}
-
void
X86_64LinuxProcess::syscall(ThreadContext *tc, Fault *fault)
{
doSyscall(tc->readIntReg(INTREG_RAX), tc, fault);
}
+SyscallDesc *
+X86_64LinuxProcess::getDesc(int callnum)
+{
+ return syscallDescs64.get(callnum);
+}
+
void
X86_64LinuxProcess::clone(ThreadContext *old_tc, ThreadContext *new_tc,
Process *process, RegVal flags)
INTREG_EBX, INTREG_ECX, INTREG_EDX, INTREG_ESI, INTREG_EDI, INTREG_EBP
};
-static SyscallDescABI<I386LinuxProcess::SyscallABI> syscallDescs32[] = {
- /* 0 */ { "restart_syscall" },
- /* 1 */ { "exit", exitFunc },
- /* 2 */ { "fork" },
- /* 3 */ { "read", readFunc<X86Linux32> },
- /* 4 */ { "write", writeFunc<X86Linux32> },
- /* 5 */ { "open", openFunc<X86Linux32> },
- /* 6 */ { "close", closeFunc },
- /* 7 */ { "waitpid" },
- /* 8 */ { "creat" },
- /* 9 */ { "link" },
- /* 10 */ { "unlink" },
- /* 11 */ { "execve", execveFunc<X86Linux32> },
- /* 12 */ { "chdir", chdirFunc },
- /* 13 */ { "time", timeFunc<X86Linux32> },
- /* 14 */ { "mknod", mknodFunc },
- /* 15 */ { "chmod" },
- /* 16 */ { "lchown" },
- /* 17 */ { "break" },
- /* 18 */ { "oldstat" },
- /* 19 */ { "lseek" },
- /* 20 */ { "getpid", getpidFunc },
- /* 21 */ { "mount" },
- /* 22 */ { "umount" },
- /* 23 */ { "setuid" },
- /* 24 */ { "getuid", getuidFunc },
- /* 25 */ { "stime" },
- /* 26 */ { "ptrace" },
- /* 27 */ { "alarm" },
- /* 28 */ { "oldfstat" },
- /* 29 */ { "pause" },
- /* 30 */ { "utime" },
- /* 31 */ { "stty" },
- /* 32 */ { "gtty" },
- /* 33 */ { "access", ignoreFunc },
- /* 34 */ { "nice" },
- /* 35 */ { "ftime" },
- /* 36 */ { "sync" },
- /* 37 */ { "kill" },
- /* 38 */ { "rename" },
- /* 39 */ { "mkdir", mkdirFunc },
- /* 40 */ { "rmdir", mkdirFunc },
- /* 41 */ { "dup", dupFunc },
- /* 42 */ { "pipe", pipeFunc },
- /* 43 */ { "times", timesFunc<X86Linux32> },
- /* 44 */ { "prof" },
- /* 45 */ { "brk", brkFunc },
- /* 46 */ { "setgid" },
- /* 47 */ { "getgid", getgidFunc },
- /* 48 */ { "signal" },
- /* 49 */ { "geteuid", geteuidFunc },
- /* 50 */ { "getegid", getegidFunc },
- /* 51 */ { "acct" },
- /* 52 */ { "umount2" },
- /* 53 */ { "lock" },
- /* 54 */ { "ioctl", ioctlFunc<X86Linux32> },
- /* 55 */ { "fcntl", fcntlFunc },
- /* 56 */ { "mpx" },
- /* 57 */ { "setpgid", setpgidFunc },
- /* 58 */ { "ulimit" },
- /* 59 */ { "oldolduname" },
- /* 60 */ { "umask", umaskFunc },
- /* 61 */ { "chroot" },
- /* 62 */ { "ustat" },
- /* 63 */ { "dup2", dup2Func },
- /* 64 */ { "getppid" },
- /* 65 */ { "getpgrp" },
- /* 66 */ { "setsid" },
- /* 67 */ { "sigaction" },
- /* 68 */ { "sgetmask" },
- /* 69 */ { "ssetmask" },
- /* 70 */ { "setreuid" },
- /* 71 */ { "setregid" },
- /* 72 */ { "sigsuspend" },
- /* 73 */ { "sigpending" },
- /* 74 */ { "sethostname" },
- /* 75 */ { "setrlimit", ignoreFunc },
- /* 76 */ { "getrlimit", getrlimitFunc<X86Linux32> },
- /* 77 */ { "getrusage", getrusageFunc<X86Linux32> },
- /* 78 */ { "gettimeofday" },
- /* 79 */ { "settimeofday" },
- /* 80 */ { "getgroups" },
- /* 81 */ { "setgroups" },
- /* 82 */ { "select", selectFunc<X86Linux32> },
- /* 83 */ { "symlink" },
- /* 84 */ { "oldlstat" },
- /* 85 */ { "readlink", readlinkFunc },
- /* 86 */ { "uselib" },
- /* 87 */ { "swapon" },
- /* 88 */ { "reboot" },
- /* 89 */ { "readdir" },
- /* 90 */ { "mmap" },
- /* 91 */ { "munmap", munmapFunc },
- /* 92 */ { "truncate", truncateFunc },
- /* 93 */ { "ftruncate", ftruncateFunc },
- /* 94 */ { "fchmod" },
- /* 95 */ { "fchown" },
- /* 96 */ { "getpriority" },
- /* 97 */ { "setpriority", ignoreFunc },
- /* 98 */ { "profil" },
- /* 99 */ { "statfs", ignoreFunc },
- /* 100 */ { "fstatfs" },
- /* 101 */ { "ioperm" },
- /* 102 */ { "socketcall" },
- /* 103 */ { "syslog" },
- /* 104 */ { "setitimer" },
- /* 105 */ { "getitimer" },
- /* 106 */ { "stat" },
- /* 107 */ { "lstat" },
- /* 108 */ { "fstat" },
- /* 109 */ { "olduname" },
- /* 110 */ { "iopl" },
- /* 111 */ { "vhangup" },
- /* 112 */ { "idle" },
- /* 113 */ { "vm86old" },
- /* 114 */ { "wait4", wait4Func<X86Linux32> },
- /* 115 */ { "swapoff" },
- /* 116 */ { "sysinfo", sysinfoFunc<X86Linux32> },
- /* 117 */ { "ipc" },
- /* 118 */ { "fsync" },
- /* 119 */ { "sigreturn" },
- /* 120 */ { "clone", cloneFunc<X86Linux32> },
- /* 121 */ { "setdomainname" },
- /* 122 */ { "uname", unameFunc },
- /* 123 */ { "modify_ldt" },
- /* 124 */ { "adjtimex" },
- /* 125 */ { "mprotect", ignoreFunc },
- /* 126 */ { "sigprocmask" },
- /* 127 */ { "create_module" },
- /* 128 */ { "init_module" },
- /* 129 */ { "delete_module" },
- /* 130 */ { "get_kernel_syms" },
- /* 131 */ { "quotactl" },
- /* 132 */ { "getpgid" },
- /* 133 */ { "fchdir" },
- /* 134 */ { "bdflush" },
- /* 135 */ { "sysfs" },
- /* 136 */ { "personality" },
- /* 137 */ { "afs_syscall" },
- /* 138 */ { "setfsuid" },
- /* 139 */ { "setfsgid" },
- /* 140 */ { "_llseek", _llseekFunc },
+static SyscallDescTable<I386LinuxProcess::SyscallABI> syscallDescs32 = {
+ { 0, "restart_syscall" },
+ { 1, "exit", exitFunc },
+ { 2, "fork" },
+ { 3, "read", readFunc<X86Linux32> },
+ { 4, "write", writeFunc<X86Linux32> },
+ { 5, "open", openFunc<X86Linux32> },
+ { 6, "close", closeFunc },
+ { 7, "waitpid" },
+ { 8, "creat" },
+ { 9, "link" },
+ { 10, "unlink" },
+ { 11, "execve", execveFunc<X86Linux32> },
+ { 12, "chdir", chdirFunc },
+ { 13, "time", timeFunc<X86Linux32> },
+ { 14, "mknod", mknodFunc },
+ { 15, "chmod" },
+ { 16, "lchown" },
+ { 17, "break" },
+ { 18, "oldstat" },
+ { 19, "lseek" },
+ { 20, "getpid", getpidFunc },
+ { 21, "mount" },
+ { 22, "umount" },
+ { 23, "setuid" },
+ { 24, "getuid", getuidFunc },
+ { 25, "stime" },
+ { 26, "ptrace" },
+ { 27, "alarm" },
+ { 28, "oldfstat" },
+ { 29, "pause" },
+ { 30, "utime" },
+ { 31, "stty" },
+ { 32, "gtty" },
+ { 33, "access", ignoreFunc },
+ { 34, "nice" },
+ { 35, "ftime" },
+ { 36, "sync" },
+ { 37, "kill" },
+ { 38, "rename" },
+ { 39, "mkdir", mkdirFunc },
+ { 40, "rmdir", mkdirFunc },
+ { 41, "dup", dupFunc },
+ { 42, "pipe", pipeFunc },
+ { 43, "times", timesFunc<X86Linux32> },
+ { 44, "prof" },
+ { 45, "brk", brkFunc },
+ { 46, "setgid" },
+ { 47, "getgid", getgidFunc },
+ { 48, "signal" },
+ { 49, "geteuid", geteuidFunc },
+ { 50, "getegid", getegidFunc },
+ { 51, "acct" },
+ { 52, "umount2" },
+ { 53, "lock" },
+ { 54, "ioctl", ioctlFunc<X86Linux32> },
+ { 55, "fcntl", fcntlFunc },
+ { 56, "mpx" },
+ { 57, "setpgid", setpgidFunc },
+ { 58, "ulimit" },
+ { 59, "oldolduname" },
+ { 60, "umask", umaskFunc },
+ { 61, "chroot" },
+ { 62, "ustat" },
+ { 63, "dup2", dup2Func },
+ { 64, "getppid" },
+ { 65, "getpgrp" },
+ { 66, "setsid" },
+ { 67, "sigaction" },
+ { 68, "sgetmask" },
+ { 69, "ssetmask" },
+ { 70, "setreuid" },
+ { 71, "setregid" },
+ { 72, "sigsuspend" },
+ { 73, "sigpending" },
+ { 74, "sethostname" },
+ { 75, "setrlimit", ignoreFunc },
+ { 76, "getrlimit", getrlimitFunc<X86Linux32> },
+ { 77, "getrusage", getrusageFunc<X86Linux32> },
+ { 78, "gettimeofday" },
+ { 79, "settimeofday" },
+ { 80, "getgroups" },
+ { 81, "setgroups" },
+ { 82, "select", selectFunc<X86Linux32> },
+ { 83, "symlink" },
+ { 84, "oldlstat" },
+ { 85, "readlink", readlinkFunc },
+ { 86, "uselib" },
+ { 87, "swapon" },
+ { 88, "reboot" },
+ { 89, "readdir" },
+ { 90, "mmap" },
+ { 91, "munmap", munmapFunc },
+ { 92, "truncate", truncateFunc },
+ { 93, "ftruncate", ftruncateFunc },
+ { 94, "fchmod" },
+ { 95, "fchown" },
+ { 96, "getpriority" },
+ { 97, "setpriority", ignoreFunc },
+ { 98, "profil" },
+ { 99, "statfs", ignoreFunc },
+ { 100, "fstatfs" },
+ { 101, "ioperm" },
+ { 102, "socketcall" },
+ { 103, "syslog" },
+ { 104, "setitimer" },
+ { 105, "getitimer" },
+ { 106, "stat" },
+ { 107, "lstat" },
+ { 108, "fstat" },
+ { 109, "olduname" },
+ { 110, "iopl" },
+ { 111, "vhangup" },
+ { 112, "idle" },
+ { 113, "vm86old" },
+ { 114, "wait4", wait4Func<X86Linux32> },
+ { 115, "swapoff" },
+ { 116, "sysinfo", sysinfoFunc<X86Linux32> },
+ { 117, "ipc" },
+ { 118, "fsync" },
+ { 119, "sigreturn" },
+ { 120, "clone", cloneFunc<X86Linux32> },
+ { 121, "setdomainname" },
+ { 122, "uname", unameFunc },
+ { 123, "modify_ldt" },
+ { 124, "adjtimex" },
+ { 125, "mprotect", ignoreFunc },
+ { 126, "sigprocmask" },
+ { 127, "create_module" },
+ { 128, "init_module" },
+ { 129, "delete_module" },
+ { 130, "get_kernel_syms" },
+ { 131, "quotactl" },
+ { 132, "getpgid" },
+ { 133, "fchdir" },
+ { 134, "bdflush" },
+ { 135, "sysfs" },
+ { 136, "personality" },
+ { 137, "afs_syscall" },
+ { 138, "setfsuid" },
+ { 139, "setfsgid" },
+ { 140, "_llseek", _llseekFunc },
#if defined(SYS_getdents)
- /* 141 */ { "getdents", getdentsFunc },
+ { 141, "getdents", getdentsFunc },
#else
- /* 141 */ { "getdents" },
+ { 141, "getdents" },
#endif
- /* 142 */ { "_newselect" },
- /* 143 */ { "flock" },
- /* 144 */ { "msync" },
- /* 145 */ { "readv", readvFunc<X86Linux32> },
- /* 146 */ { "writev", writevFunc<X86Linux32> },
- /* 147 */ { "getsid" },
- /* 148 */ { "fdatasync" },
- /* 149 */ { "_sysctl" },
- /* 150 */ { "mlock" },
- /* 151 */ { "munlock" },
- /* 152 */ { "mlockall" },
- /* 153 */ { "munlockall" },
- /* 154 */ { "sched_setparam" },
- /* 155 */ { "sched_getparam" },
- /* 156 */ { "sched_setscheduler" },
- /* 157 */ { "sched_getscheduler" },
- /* 158 */ { "sched_yield", ignoreFunc },
- /* 159 */ { "sched_get_priority_max" },
- /* 160 */ { "sched_get_priority_min" },
- /* 161 */ { "sched_rr_get_interval" },
- /* 162 */ { "nanosleep", ignoreFunc },
- /* 163 */ { "mremap" },
- /* 164 */ { "setresuid", ignoreFunc },
- /* 165 */ { "getresuid" },
- /* 166 */ { "vm86" },
- /* 167 */ { "query_module" },
- /* 168 */ { "poll", pollFunc<X86Linux32> },
- /* 169 */ { "nfsservctl" },
- /* 170 */ { "setresgid" },
- /* 171 */ { "getresgid" },
- /* 172 */ { "prctl" },
- /* 173 */ { "rt_sigreturn" },
- /* 174 */ { "rt_sigaction", ignoreFunc },
- /* 175 */ { "rt_sigprocmask", ignoreFunc },
- /* 176 */ { "rt_sigpending" },
- /* 177 */ { "rt_sigtimedwait" },
- /* 178 */ { "rt_sigqueueinfo" },
- /* 179 */ { "rt_sigsuspend" },
- /* 180 */ { "pread64", pread64Func<X86Linux64> },
- /* 181 */ { "pwrite64", pwrite64Func<X86Linux64> },
- /* 182 */ { "chown" },
- /* 183 */ { "getcwd", getcwdFunc },
- /* 184 */ { "capget" },
- /* 185 */ { "capset" },
- /* 186 */ { "sigaltstack" },
- /* 187 */ { "sendfile" },
- /* 188 */ { "getpmsg" },
- /* 189 */ { "putpmsg" },
- /* 190 */ { "vfork" },
- /* 191 */ { "ugetrlimit", ignoreFunc },
- /* 192 */ { "mmap2", mmap2Func<X86Linux32> },
- /* 193 */ { "truncate64", truncate64Func },
- /* 194 */ { "ftruncate64", ftruncate64Func },
- /* 195 */ { "stat64", stat64Func<X86Linux32> },
- /* 196 */ { "lstat64" },
- /* 197 */ { "fstat64", fstat64Func<X86Linux32> },
- /* 198 */ { "lchown32" },
- /* 199 */ { "getuid32", getuidFunc },
- /* 200 */ { "getgid32", getgidFunc },
- /* 201 */ { "geteuid32", geteuidFunc },
- /* 202 */ { "getegid32", getegidFunc },
- /* 203 */ { "setreuid32" },
- /* 204 */ { "setregid32" },
- /* 205 */ { "getgroups32" },
- /* 206 */ { "setgroups32" },
- /* 207 */ { "fchown32" },
- /* 208 */ { "setresuid32" },
- /* 209 */ { "getresuid32" },
- /* 210 */ { "setresgid32" },
- /* 211 */ { "getresgid32" },
- /* 212 */ { "chown32" },
- /* 213 */ { "setuid32" },
- /* 214 */ { "setgid32" },
- /* 215 */ { "setfsuid32" },
- /* 216 */ { "setfsgid32" },
- /* 217 */ { "pivot_root" },
- /* 218 */ { "mincore" },
- /* 219 */ { "madvise", ignoreFunc },
- /* 220 */ { "madvise1" },
- /* 221 */ { "getdents64" },
- /* 222 */ { "fcntl64" },
- /* 223 */ { "unused" },
- /* 224 */ { "gettid", gettidFunc },
- /* 225 */ { "readahead" },
- /* 226 */ { "setxattr" },
- /* 227 */ { "lsetxattr" },
- /* 228 */ { "fsetxattr" },
- /* 229 */ { "getxattr" },
- /* 230 */ { "lgetxattr" },
- /* 231 */ { "fgetxattr" },
- /* 232 */ { "listxattr" },
- /* 233 */ { "llistxattr" },
- /* 234 */ { "flistxattr" },
- /* 235 */ { "removexattr" },
- /* 236 */ { "lremovexattr" },
- /* 237 */ { "fremovexattr" },
- /* 238 */ { "tkill" },
- /* 239 */ { "sendfile64" },
- /* 240 */ { "futex" },
- /* 241 */ { "sched_setaffinity" },
- /* 242 */ { "sched_getaffinity", ignoreFunc },
- /* 243 */ { "set_thread_area", setThreadArea32Func },
- /* 244 */ { "get_thread_area" },
- /* 245 */ { "io_setup" },
- /* 246 */ { "io_destroy" },
- /* 247 */ { "io_getevents" },
- /* 248 */ { "io_submit" },
- /* 249 */ { "io_cancel" },
- /* 250 */ { "fadvise64" },
- /* 251 */ { "unused" },
- /* 252 */ { "exit_group", exitFunc },
- /* 253 */ { "lookup_dcookie" },
- /* 254 */ { "epoll_create" },
- /* 255 */ { "epoll_ctl" },
- /* 256 */ { "epoll_wait" },
- /* 257 */ { "remap_file_pages" },
- /* 258 */ { "set_tid_address", setTidAddressFunc },
- /* 259 */ { "timer_create" },
- /* 260 */ { "timer_settime" },
- /* 261 */ { "timer_gettime" },
- /* 262 */ { "timer_getoverrun" },
- /* 263 */ { "timer_delete" },
- /* 264 */ { "clock_settime" },
- /* 265 */ { "clock_gettime", clock_gettimeFunc<X86Linux32> },
- /* 266 */ { "clock_getres" },
- /* 267 */ { "clock_nanosleep" },
- /* 268 */ { "statfs64" },
- /* 269 */ { "fstatfs64" },
- /* 270 */ { "tgkill", tgkillFunc<X86Linux32> },
- /* 271 */ { "utimes" },
- /* 272 */ { "fadvise64_64" },
- /* 273 */ { "vserver" },
- /* 274 */ { "mbind" },
- /* 275 */ { "get_mempolicy", ignoreFunc },
- /* 276 */ { "set_mempolicy" },
- /* 277 */ { "mq_open" },
- /* 278 */ { "mq_unlink" },
- /* 279 */ { "mq_timedsend" },
- /* 280 */ { "mq_timedreceive" },
- /* 281 */ { "mq_notify" },
- /* 282 */ { "mq_getsetattr" },
- /* 283 */ { "kexec_load" },
- /* 284 */ { "waitid" },
- /* 285 */ { "sys_setaltroot" },
- /* 286 */ { "add_key" },
- /* 287 */ { "request_key" },
- /* 288 */ { "keyctl" },
- /* 289 */ { "ioprio_set" },
- /* 290 */ { "ioprio_get" },
- /* 291 */ { "inotify_init" },
- /* 292 */ { "inotify_add_watch" },
- /* 293 */ { "inotify_rm_watch" },
- /* 294 */ { "migrate_pages" },
- /* 295 */ { "openat", openatFunc<X86Linux32> },
- /* 296 */ { "mkdirat" },
- /* 297 */ { "mknodat" },
- /* 298 */ { "fchownat" },
- /* 299 */ { "futimesat" },
- /* 300 */ { "fstatat64" },
- /* 301 */ { "unlinkat" },
- /* 302 */ { "renameat" },
- /* 303 */ { "linkat" },
- /* 304 */ { "symlinkat" },
- /* 305 */ { "readlinkat", readlinkFunc },
- /* 306 */ { "fchmodat" },
- /* 307 */ { "faccessat" },
- /* 308 */ { "pselect6" },
- /* 309 */ { "ppoll" },
- /* 310 */ { "unshare" },
- /* 311 */ { "set_robust_list", ignoreFunc },
- /* 312 */ { "get_robust_list", ignoreFunc },
- /* 313 */ { "splice" },
- /* 314 */ { "sync_file_range" },
- /* 315 */ { "tee" },
- /* 316 */ { "vmsplice" },
- /* 317 */ { "move_pages" },
- /* 318 */ { "getcpu" },
- /* 319 */ { "epoll_pwait" },
- /* 320 */ { "utimensat" },
- /* 321 */ { "signalfd" },
- /* 322 */ { "timerfd" },
- /* 323 */ { "eventfd", eventfdFunc<X86Linux32> }
+ { 142, "_newselect" },
+ { 143, "flock" },
+ { 144, "msync" },
+ { 145, "readv", readvFunc<X86Linux32> },
+ { 146, "writev", writevFunc<X86Linux32> },
+ { 147, "getsid" },
+ { 148, "fdatasync" },
+ { 149, "_sysctl" },
+ { 150, "mlock" },
+ { 151, "munlock" },
+ { 152, "mlockall" },
+ { 153, "munlockall" },
+ { 154, "sched_setparam" },
+ { 155, "sched_getparam" },
+ { 156, "sched_setscheduler" },
+ { 157, "sched_getscheduler" },
+ { 158, "sched_yield", ignoreFunc },
+ { 159, "sched_get_priority_max" },
+ { 160, "sched_get_priority_min" },
+ { 161, "sched_rr_get_interval" },
+ { 162, "nanosleep", ignoreFunc },
+ { 163, "mremap" },
+ { 164, "setresuid", ignoreFunc },
+ { 165, "getresuid" },
+ { 166, "vm86" },
+ { 167, "query_module" },
+ { 168, "poll", pollFunc<X86Linux32> },
+ { 169, "nfsservctl" },
+ { 170, "setresgid" },
+ { 171, "getresgid" },
+ { 172, "prctl" },
+ { 173, "rt_sigreturn" },
+ { 174, "rt_sigaction", ignoreFunc },
+ { 175, "rt_sigprocmask", ignoreFunc },
+ { 176, "rt_sigpending" },
+ { 177, "rt_sigtimedwait" },
+ { 178, "rt_sigqueueinfo" },
+ { 179, "rt_sigsuspend" },
+ { 180, "pread64", pread64Func<X86Linux64> },
+ { 181, "pwrite64", pwrite64Func<X86Linux64> },
+ { 182, "chown" },
+ { 183, "getcwd", getcwdFunc },
+ { 184, "capget" },
+ { 185, "capset" },
+ { 186, "sigaltstack" },
+ { 187, "sendfile" },
+ { 188, "getpmsg" },
+ { 189, "putpmsg" },
+ { 190, "vfork" },
+ { 191, "ugetrlimit", ignoreFunc },
+ { 192, "mmap2", mmap2Func<X86Linux32> },
+ { 193, "truncate64", truncate64Func },
+ { 194, "ftruncate64", ftruncate64Func },
+ { 195, "stat64", stat64Func<X86Linux32> },
+ { 196, "lstat64" },
+ { 197, "fstat64", fstat64Func<X86Linux32> },
+ { 198, "lchown32" },
+ { 199, "getuid32", getuidFunc },
+ { 200, "getgid32", getgidFunc },
+ { 201, "geteuid32", geteuidFunc },
+ { 202, "getegid32", getegidFunc },
+ { 203, "setreuid32" },
+ { 204, "setregid32" },
+ { 205, "getgroups32" },
+ { 206, "setgroups32" },
+ { 207, "fchown32" },
+ { 208, "setresuid32" },
+ { 209, "getresuid32" },
+ { 210, "setresgid32" },
+ { 211, "getresgid32" },
+ { 212, "chown32" },
+ { 213, "setuid32" },
+ { 214, "setgid32" },
+ { 215, "setfsuid32" },
+ { 216, "setfsgid32" },
+ { 217, "pivot_root" },
+ { 218, "mincore" },
+ { 219, "madvise", ignoreFunc },
+ { 220, "madvise1" },
+ { 221, "getdents64" },
+ { 222, "fcntl64" },
+ { 223, "unused" },
+ { 224, "gettid", gettidFunc },
+ { 225, "readahead" },
+ { 226, "setxattr" },
+ { 227, "lsetxattr" },
+ { 228, "fsetxattr" },
+ { 229, "getxattr" },
+ { 230, "lgetxattr" },
+ { 231, "fgetxattr" },
+ { 232, "listxattr" },
+ { 233, "llistxattr" },
+ { 234, "flistxattr" },
+ { 235, "removexattr" },
+ { 236, "lremovexattr" },
+ { 237, "fremovexattr" },
+ { 238, "tkill" },
+ { 239, "sendfile64" },
+ { 240, "futex" },
+ { 241, "sched_setaffinity" },
+ { 242, "sched_getaffinity", ignoreFunc },
+ { 243, "set_thread_area", setThreadArea32Func },
+ { 244, "get_thread_area" },
+ { 245, "io_setup" },
+ { 246, "io_destroy" },
+ { 247, "io_getevents" },
+ { 248, "io_submit" },
+ { 249, "io_cancel" },
+ { 250, "fadvise64" },
+ { 251, "unused" },
+ { 252, "exit_group", exitFunc },
+ { 253, "lookup_dcookie" },
+ { 254, "epoll_create" },
+ { 255, "epoll_ctl" },
+ { 256, "epoll_wait" },
+ { 257, "remap_file_pages" },
+ { 258, "set_tid_address", setTidAddressFunc },
+ { 259, "timer_create" },
+ { 260, "timer_settime" },
+ { 261, "timer_gettime" },
+ { 262, "timer_getoverrun" },
+ { 263, "timer_delete" },
+ { 264, "clock_settime" },
+ { 265, "clock_gettime", clock_gettimeFunc<X86Linux32> },
+ { 266, "clock_getres" },
+ { 267, "clock_nanosleep" },
+ { 268, "statfs64" },
+ { 269, "fstatfs64" },
+ { 270, "tgkill", tgkillFunc<X86Linux32> },
+ { 271, "utimes" },
+ { 272, "fadvise64_64" },
+ { 273, "vserver" },
+ { 274, "mbind" },
+ { 275, "get_mempolicy", ignoreFunc },
+ { 276, "set_mempolicy" },
+ { 277, "mq_open" },
+ { 278, "mq_unlink" },
+ { 279, "mq_timedsend" },
+ { 280, "mq_timedreceive" },
+ { 281, "mq_notify" },
+ { 282, "mq_getsetattr" },
+ { 283, "kexec_load" },
+ { 284, "waitid" },
+ { 285, "sys_setaltroot" },
+ { 286, "add_key" },
+ { 287, "request_key" },
+ { 288, "keyctl" },
+ { 289, "ioprio_set" },
+ { 290, "ioprio_get" },
+ { 291, "inotify_init" },
+ { 292, "inotify_add_watch" },
+ { 293, "inotify_rm_watch" },
+ { 294, "migrate_pages" },
+ { 295, "openat", openatFunc<X86Linux32> },
+ { 296, "mkdirat" },
+ { 297, "mknodat" },
+ { 298, "fchownat" },
+ { 299, "futimesat" },
+ { 300, "fstatat64" },
+ { 301, "unlinkat" },
+ { 302, "renameat" },
+ { 303, "linkat" },
+ { 304, "symlinkat" },
+ { 305, "readlinkat", readlinkFunc },
+ { 306, "fchmodat" },
+ { 307, "faccessat" },
+ { 308, "pselect6" },
+ { 309, "ppoll" },
+ { 310, "unshare" },
+ { 311, "set_robust_list", ignoreFunc },
+ { 312, "get_robust_list", ignoreFunc },
+ { 313, "splice" },
+ { 314, "sync_file_range" },
+ { 315, "tee" },
+ { 316, "vmsplice" },
+ { 317, "move_pages" },
+ { 318, "getcpu" },
+ { 319, "epoll_pwait" },
+ { 320, "utimensat" },
+ { 321, "signalfd" },
+ { 322, "timerfd" },
+ { 323, "eventfd", eventfdFunc<X86Linux32> }
};
-I386LinuxProcess::I386LinuxProcess(ProcessParams * params, ObjectFile *objFile)
- : I386Process(params, objFile, syscallDescs32,
- sizeof(syscallDescs32) / sizeof(SyscallDesc))
-{}
-
void
I386LinuxProcess::syscall(ThreadContext *tc, Fault *fault)
{
doSyscall(tc->readIntReg(INTREG_RAX), tc, fault);
}
+SyscallDesc *
+I386LinuxProcess::getDesc(int callnum)
+{
+ return syscallDescs32.get(callnum);
+}
+
void
I386LinuxProcess::clone(ThreadContext *old_tc, ThreadContext *new_tc,
Process *process, RegVal flags)
struct ProcessParams;
struct ThreadContext;
-namespace X86ISA {
+namespace X86ISA
+{
class X86_64LinuxProcess : public X86_64Process
{
public:
- /// Constructor.
- X86_64LinuxProcess(ProcessParams * params, ObjectFile *objFile);
+ using X86_64Process::X86_64Process;
void syscall(ThreadContext *tc, Fault *fault) override;
+ SyscallDesc *getDesc(int callnum) override;
void clone(ThreadContext *old_tc, ThreadContext *new_tc, Process *process,
RegVal flags) override;
class I386LinuxProcess : public I386Process
{
public:
- /// Constructor.
- I386LinuxProcess(ProcessParams * params, ObjectFile *objFile);
+ using I386Process::I386Process;
void syscall(ThreadContext *tc, Fault *fault) override;
+ SyscallDesc *getDesc(int callnum) override;
void clone(ThreadContext *old_tc, ThreadContext *new_tc, Process *process,
RegVal flags) override;
LongModePTE<29, 21>,
LongModePTE<20, 12> > ArchPageTable;
-X86Process::X86Process(ProcessParams *params, ObjectFile *objFile,
- SyscallDesc *_syscallDescs, int _numSyscallDescs)
- : Process(params, params->useArchPT ?
- static_cast<EmulationPageTable *>(
+X86Process::X86Process(ProcessParams *params, ObjectFile *objFile) :
+ Process(params, params->useArchPT ?
+ static_cast<EmulationPageTable *>(
new ArchPageTable(params->name, params->pid,
params->system, PageBytes)) :
- new EmulationPageTable(params->name, params->pid,
- PageBytes),
- objFile),
- syscallDescs(_syscallDescs), numSyscallDescs(_numSyscallDescs)
+ new EmulationPageTable(params->name, params->pid,
+ PageBytes),
+ objFile)
{
}
*process = *this;
}
-X86_64Process::X86_64Process(ProcessParams *params, ObjectFile *objFile,
- SyscallDesc *_syscallDescs, int _numSyscallDescs)
- : X86Process(params, objFile, _syscallDescs, _numSyscallDescs)
+X86_64Process::X86_64Process(ProcessParams *params, ObjectFile *objFile) :
+ X86Process(params, objFile)
{
-
vsyscallPage.base = 0xffffffffff600000ULL;
vsyscallPage.size = PageBytes;
vsyscallPage.vtimeOffset = 0x400;
}
-I386Process::I386Process(ProcessParams *params, ObjectFile *objFile,
- SyscallDesc *_syscallDescs, int _numSyscallDescs)
- : X86Process(params, objFile, _syscallDescs, _numSyscallDescs)
+I386Process::I386Process(ProcessParams *params, ObjectFile *objFile) :
+ X86Process(params, objFile)
{
if (kvmInSE)
panic("KVM CPU model does not support 32 bit processes");
next_thread_stack_base, mmap_end);
}
-SyscallDesc*
-X86Process::getDesc(int callnum)
-{
- if (callnum < 0 || callnum >= numSyscallDescs)
- return NULL;
- return &syscallDescs[callnum];
-}
-
void
X86_64Process::initState()
{
Addr _gdtStart;
Addr _gdtSize;
- SyscallDesc *syscallDescs;
- const int numSyscallDescs;
-
- X86Process(ProcessParams * params, ObjectFile *objFile,
- SyscallDesc *_syscallDescs, int _numSyscallDescs);
+ X86Process(ProcessParams * params, ObjectFile *objFile);
template<class IntType>
void argsInit(int pageSize,
Addr gdtSize()
{ return _gdtSize; }
- SyscallDesc* getDesc(int callnum) override;
-
void clone(ThreadContext *old_tc, ThreadContext *new_tc,
Process *process, RegVal flags) override;
_gdtStart = in._gdtStart;
_gdtSize = in._gdtSize;
- syscallDescs = in.syscallDescs;
return *this;
}
class X86_64Process : public X86Process
{
protected:
- X86_64Process(ProcessParams *params, ObjectFile *objFile,
- SyscallDesc *_syscallDescs, int _numSyscallDescs);
-
class VSyscallPage
{
public:
VSyscallPage vsyscallPage;
public:
+ X86_64Process(ProcessParams *params, ObjectFile *objFile);
+
void argsInit(int pageSize);
void initState() override;
class I386Process : public X86Process
{
protected:
- I386Process(ProcessParams *params, ObjectFile *objFile,
- SyscallDesc *_syscallDescs, int _numSyscallDescs);
-
class VSyscallPage
{
public:
VSyscallPage vsyscallPage;
public:
+ I386Process(ProcessParams *params, ObjectFile *objFile);
+
void argsInit(int pageSize);
void initState() override;
#define __SIM_SYSCALL_DESC_HH__
#include <functional>
+#include <map>
#include <string>
+#include "base/logging.hh"
#include "base/types.hh"
#include "cpu/thread_context.hh"
#include "sim/guest_abi.hh"
*/
void doSyscall(int callnum, ThreadContext *tc, Fault *fault);
- std::string name() { return _name; }
+ std::string name() const { return _name; }
+ int num() const { return _num; }
/**
* For use within the system call executor if new threads are created and
std::function<SyscallReturn(SyscallDesc *, int num, ThreadContext *)>;
using Dumper = std::function<std::string(std::string, ThreadContext *)>;
- SyscallDesc(const char *name, Executor exec, Dumper dump) :
- _name(name), executor(exec), dumper(dump)
+ SyscallDesc(int num, const char *name, Executor exec, Dumper dump) :
+ _name(name), _num(num), executor(exec), dumper(dump)
{}
private:
/** System call name (e.g., open, mmap, clone, socket, etc.) */
std::string _name;
+ int _num;
/** Mechanism for ISAs to connect to the emul function definitions */
Executor executor;
public:
// Constructors which plumb in buildExecutor.
template <typename ...Args>
- SyscallDescABI(const char *name, ABIExecutor<Args...> target) :
- SyscallDesc(name, buildExecutor<Args...>(target),
- buildDumper<Args...>())
+ SyscallDescABI(int num, const char *name, ABIExecutor<Args...> target) :
+ SyscallDesc(num, name, buildExecutor<Args...>(target),
+ buildDumper<Args...>())
{}
template <typename ...Args>
- SyscallDescABI(const char *name, ABIExecutorPtr<Args...> target) :
- SyscallDescABI(name, ABIExecutor<Args...>(target))
+ SyscallDescABI(int num, const char *name, ABIExecutorPtr<Args...> target) :
+ SyscallDescABI(num, name, ABIExecutor<Args...>(target))
{}
- SyscallDescABI(const char *name) :
- SyscallDescABI(name, ABIExecutor<>(unimplementedFunc))
+ SyscallDescABI(int num, const char *name) :
+ SyscallDescABI(num, name, ABIExecutor<>(unimplementedFunc))
{}
void
}
};
+template <typename ABI>
+class SyscallDescTable
+{
+ private:
+ std::map<int, SyscallDescABI<ABI>> _descs;
+
+ public:
+ SyscallDescTable(std::initializer_list<SyscallDescABI<ABI>> descs)
+ {
+ for (auto &desc: descs) {
+ auto res = _descs.insert({desc.num(), desc});
+ panic_if(!res.second, "Failed to insert desc %s", desc.name());
+ }
+ }
+
+ SyscallDesc
+ *get(int num)
+ {
+ auto it = _descs.find(num);
+ if (it == _descs.end())
+ return nullptr;
+ return &it->second;
+ }
+};
+
#endif // __SIM_SYSCALL_DESC_HH__