win32
¤
SimSystemWin32
¤
SimSystemWin32(
stdin=None,
stdout=None,
stderr=None,
fd=None,
sockets=None,
socket_queue=None,
argv=None,
argc=None,
environ=None,
auxv=None,
tls_modules=None,
sigmask=None,
pid=None,
ppid=None,
uid=None,
gid=None,
brk=None,
)
Bases: SimStatePlugin
Data storage and interaction mechanisms for states with an environment conforming to win32.
Available as state.win32
.
Source code in sema_toolchain/sema_scdg/application/plugin/win32.py
153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 |
|
close
¤
close(fd)
Closes the given file descriptor (an AST). Returns whether the operation succeeded (a concrete boolean)
Source code in sema_toolchain/sema_scdg/application/plugin/win32.py
451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 |
|
dump_file_by_path
¤
dump_file_by_path(path, **kwargs)
Returns the concrete content for a file by path.
:param path: file path as string :param kwargs: passed to state.solver.eval :return: file contents as string
Source code in sema_toolchain/sema_scdg/application/plugin/win32.py
617 618 619 620 621 622 623 624 625 626 627 628 |
|
dumps
¤
dumps(fd, **kwargs)
Returns the concrete content for a file descriptor.
BACKWARD COMPATIBILITY: if you ask for file descriptors 0 1 or 2, it will return the data from stdin, stdout, or stderr as a flat string.
:param fd: A file descriptor. :return: The concrete content. :rtype: str
Source code in sema_toolchain/sema_scdg/application/plugin/win32.py
630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 |
|
get_fd
¤
get_fd(fd)
Looks up the SimFileDescriptor associated with the given number (an AST). If the number is concrete and does not map to anything, return None. If the number is symbolic, constrain it to an open fd and create a new file for it.
Source code in sema_toolchain/sema_scdg/application/plugin/win32.py
425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 |
|
open
¤
open(name, flags, preferred_fd=None)
Open a symbolic file. Basically open(2).
:param name: Path of the symbolic file, as a string or bytes. :type name: string or bytes :param flags: File operation flags, a bitfield of constants from open(2), as an AST :param preferred_fd: Assign this fd if it's not already claimed. :return: The file descriptor number allocated (maps through win32.get_fd to a SimFileDescriptor) or None if the open fails.
mode
from open(2) is unsupported at present.
Source code in sema_toolchain/sema_scdg/application/plugin/win32.py
337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 |
|
sigmask
¤
sigmask(sigsetsize=None)
Gets the current sigmask. If it's blank, a new one is created (of sigsetsize).
:param sigsetsize: the size (in bytes of the sigmask set) :return: the sigmask
Source code in sema_toolchain/sema_scdg/application/plugin/win32.py
526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 |
|
sigprocmask
¤
sigprocmask(how, new_mask, sigsetsize, valid_ptr=True)
Updates the signal mask.
:param how: the "how" argument of sigprocmask (see manpage) :param new_mask: the mask modification to apply :param sigsetsize: the size (in bytes of the sigmask set) :param valid_ptr: is set if the new_mask was not NULL
Source code in sema_toolchain/sema_scdg/application/plugin/win32.py
542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 |
|
Win32ProcFS
¤
Bases: SimMount
The virtual file system mounted at /proc (as of now, on Linux).