return tc->readIntReg(FirstArgumentReg + i++);
}
-void
-AlphaProcess::setSyscallArg(ThreadContext *tc, int i, RegVal val)
-{
- assert(i < 6);
- tc->setIntReg(FirstArgumentReg + i, val);
-}
-
void
AlphaProcess::setSyscallReturn(ThreadContext *tc, SyscallReturn sysret)
{
RegVal getSyscallArg(ThreadContext *tc, int &i) override;
/// Explicitly import the otherwise hidden getSyscallArg
using Process::getSyscallArg;
- void setSyscallArg(ThreadContext *tc, int i, RegVal val) override;
void setSyscallReturn(ThreadContext *tc,
SyscallReturn return_value) override;
return getSyscallArg(tc, i);
}
-
-void
-ArmProcess32::setSyscallArg(ThreadContext *tc, int i, RegVal val)
-{
- assert(i < 6);
- tc->setIntReg(ArgumentReg0 + i, val);
-}
-
-void
-ArmProcess64::setSyscallArg(ThreadContext *tc, int i, RegVal val)
-{
- assert(i < 8);
- tc->setIntReg(ArgumentReg0 + i, val);
-}
-
void
ArmProcess32::setSyscallReturn(ThreadContext *tc, SyscallReturn sysret)
{
RegVal getSyscallArg(ThreadContext *tc, int &i, int width) override;
RegVal getSyscallArg(ThreadContext *tc, int &i) override;
- void setSyscallArg(ThreadContext *tc, int i, RegVal val) override;
void setSyscallReturn(ThreadContext *tc,
SyscallReturn return_value) override;
};
RegVal getSyscallArg(ThreadContext *tc, int &i, int width) override;
RegVal getSyscallArg(ThreadContext *tc, int &i) override;
- void setSyscallArg(ThreadContext *tc, int i, RegVal val) override;
void setSyscallReturn(ThreadContext *tc,
SyscallReturn return_value) override;
};
return tc->readIntReg(FirstArgumentReg + i++);
}
-void
-MipsProcess::setSyscallArg(ThreadContext *tc, int i, RegVal val)
-{
- assert(i < 6);
- tc->setIntReg(FirstArgumentReg + i, val);
-}
-
void
MipsProcess::setSyscallReturn(ThreadContext *tc, SyscallReturn sysret)
{
RegVal getSyscallArg(ThreadContext *tc, int &i);
/// Explicitly import the otherwise hidden getSyscallArg
using Process::getSyscallArg;
- void setSyscallArg(ThreadContext *tc, int i, RegVal val);
void setSyscallReturn(ThreadContext *tc, SyscallReturn return_value);
};
assert(i < 6);
return tc->readIntReg(ArgumentReg0 + i++);
}
-
-void
-PowerLinuxProcess::setSyscallArg(ThreadContext *tc, int i, RegVal val)
-{
- // Linux apparently allows more parameter than the ABI says it should.
- // This limit may need to be increased even further.
- assert(i < 6);
- tc->setIntReg(ArgumentReg0 + i, val);
-}
RegVal getSyscallArg(ThreadContext *tc, int &i);
/// Explicitly import the otherwise hidden getSyscallArg
using Process::getSyscallArg;
- void setSyscallArg(ThreadContext *tc, int i, RegVal val);
/// Array of syscall descriptors, indexed by call number.
static SyscallDesc syscallDescs[];
return tc->readIntReg(ArgumentReg0 + i++);
}
-void
-PowerProcess::setSyscallArg(ThreadContext *tc, int i, RegVal val)
-{
- assert(i < 5);
- tc->setIntReg(ArgumentReg0 + i, val);
-}
-
void
PowerProcess::setSyscallReturn(ThreadContext *tc, SyscallReturn sysret)
{
RegVal getSyscallArg(ThreadContext *tc, int &i);
/// Explicitly import the otherwise hidden getSyscallArg
using Process::getSyscallArg;
- void setSyscallArg(ThreadContext *tc, int i, RegVal val);
void setSyscallReturn(ThreadContext *tc, SyscallReturn return_value);
};
return retval;
}
-void
-RiscvProcess::setSyscallArg(ThreadContext *tc, int i, RegVal val)
-{
- tc->setIntReg(SyscallArgumentRegs[i], val);
-}
-
void
RiscvProcess::setSyscallReturn(ThreadContext *tc, SyscallReturn sysret)
{
RegVal getSyscallArg(ThreadContext *tc, int &i) override;
/// Explicitly import the otherwise hidden getSyscallArg
using Process::getSyscallArg;
- void setSyscallArg(ThreadContext *tc, int i, RegVal val) override;
void setSyscallReturn(ThreadContext *tc,
SyscallReturn return_value) override;
return bits(tc->readIntReg(FirstArgumentReg + i++), 31, 0);
}
-void
-Sparc32Process::setSyscallArg(ThreadContext *tc, int i, RegVal val)
-{
- assert(i < 6);
- tc->setIntReg(FirstArgumentReg + i, bits(val, 31, 0));
-}
-
RegVal
Sparc64Process::getSyscallArg(ThreadContext *tc, int &i)
{
return tc->readIntReg(FirstArgumentReg + i++);
}
-void
-Sparc64Process::setSyscallArg(ThreadContext *tc, int i, RegVal val)
-{
- assert(i < 6);
- tc->setIntReg(FirstArgumentReg + i, val);
-}
-
void
SparcProcess::setSyscallReturn(ThreadContext *tc, SyscallReturn sysret)
{
RegVal getSyscallArg(ThreadContext *tc, int &i);
/// Explicitly import the otherwise hidden getSyscallArg
using Process::getSyscallArg;
-
- void setSyscallArg(ThreadContext *tc, int i, RegVal val);
};
class Sparc64Process : public SparcProcess
RegVal getSyscallArg(ThreadContext *tc, int &i);
/// Explicitly import the otherwise hidden getSyscallArg
using Process::getSyscallArg;
-
- void setSyscallArg(ThreadContext *tc, int i, RegVal val);
};
#endif // __SPARC_PROCESS_HH__
return tc->readIntReg(ArgumentReg[i++]);
}
-void
-X86_64Process::setSyscallArg(ThreadContext *tc, int i, RegVal val)
-{
- assert(i < NumArgumentRegs);
- return tc->setIntReg(ArgumentReg[i], val);
-}
-
void
X86_64Process::clone(ThreadContext *old_tc, ThreadContext *new_tc,
Process *p, RegVal flags)
return retVal;
}
-void
-I386Process::setSyscallArg(ThreadContext *tc, int i, RegVal val)
-{
- assert(i < NumArgumentRegs);
- return tc->setIntReg(ArgumentReg[i], val);
-}
-
void
I386Process::clone(ThreadContext *old_tc, ThreadContext *new_tc,
Process *p, RegVal flags)
RegVal getSyscallArg(ThreadContext *tc, int &i) override;
/// Explicitly import the otherwise hidden getSyscallArg
using Process::getSyscallArg;
- void setSyscallArg(ThreadContext *tc, int i, RegVal val) override;
void clone(ThreadContext *old_tc, ThreadContext *new_tc,
Process *process, RegVal flags) override;
};
Fault *fault) override;
RegVal getSyscallArg(ThreadContext *tc, int &i) override;
RegVal getSyscallArg(ThreadContext *tc, int &i, int width) override;
- void setSyscallArg(ThreadContext *tc, int i, RegVal val) override;
void clone(ThreadContext *old_tc, ThreadContext *new_tc,
Process *process, RegVal flags) override;
};
virtual void syscall(int64_t callnum, ThreadContext *tc, Fault *fault);
virtual RegVal getSyscallArg(ThreadContext *tc, int &i) = 0;
virtual RegVal getSyscallArg(ThreadContext *tc, int &i, int width);
- virtual void setSyscallArg(ThreadContext *tc, int i, RegVal val) = 0;
virtual void setSyscallReturn(ThreadContext *tc,
SyscallReturn return_value) = 0;
virtual SyscallDesc *getDesc(int callnum) = 0;