truss: add fake __NSEC syscall name for ape
This commit is contained in:
parent
e485362b0b
commit
8726990cf5
1 changed files with 2 additions and 4 deletions
|
@ -153,15 +153,13 @@ trussapecalls = {
|
||||||
"_PREAD",
|
"_PREAD",
|
||||||
"_PWRITE",
|
"_PWRITE",
|
||||||
"_TSEMACQUIRE",
|
"_TSEMACQUIRE",
|
||||||
|
"__NSEC",
|
||||||
};
|
};
|
||||||
|
|
||||||
defn addressof(pattern) {
|
defn addressof(pattern) {
|
||||||
// translate to ape system calls if we have an ape binary
|
// translate to ape system calls if we have an ape binary
|
||||||
if _addressof("_EXITS") != 0 then {
|
if _addressof("_EXITS") != 0 then
|
||||||
pattern = trussapecalls[match(pattern, trusscalls)];
|
pattern = trussapecalls[match(pattern, trusscalls)];
|
||||||
if pattern == {} then
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
if regexp("(seek|_SEEK)", pattern) && (objtype=="amd64" || objtype == "power64" || objtype == "alpha") then
|
if regexp("(seek|_SEEK)", pattern) && (objtype=="amd64" || objtype == "power64" || objtype == "alpha") then
|
||||||
pattern = "_" + pattern;
|
pattern = "_" + pattern;
|
||||||
return _addressof(pattern);
|
return _addressof(pattern);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue