2#include <clues/syscalls/memory.hxx>
6bool MmapSystemCall::implementsOldMmap()
const {
8 case ABI::I386:
return true;
17 if (
callNr() == SystemCallNr::MMAP2 || !implementsOldMmap()) {
19 setParameters(hint, length, protection, flags, fd, offset);
22 setParameters(*old_args);
33 const auto &args = *old_args;
34 hint.fill(proc,
Word{cosmos::to_integral(args.addr())});
35 length.fill(proc,
Word{args.length()});
36 protection.fill(proc,
Word{
static_cast<elf_greg_t
>(args.prot().raw())});
37 flags.fill(proc,
Word{
static_cast<elf_greg_t
>(cosmos::to_integral(args.type()) | args.flags().raw())});
38 fd.fill(proc,
Word{
static_cast<elf_greg_t
>(cosmos::to_integral(args.fd()))});
39 offset.fill(proc,
Word{args.offset()});
ABI abi() const
Returns the system call ABi seen during system call entry.
SystemCallNr callNr() const
Returns the system call table number for this system call.
Base class for traced processes.
Combined mmap() arguments for the old variant of mmap() on 32-bit ABIs like I386.
Word
An integer that is able to hold a word for the current architecture.
bool check2ndPass(const Tracee &) override
Check whether a second pass needs to be made processing parameters.
void prepareNewSystemCall() override
Perform any necessary actions before processing a new system call entry event.