mirror of
https://github.com/x64dbg/x64dbg.git
synced 2024-11-23 21:10:14 +00:00
Add a syscall.name expression function
This commit is contained in:
parent
517a855e9a
commit
9e4c1a4d26
@ -169,6 +169,8 @@ void ExpressionFunctions::Init()
|
||||
ExpressionFunctions::Register("streq", ValueTypeNumber, { ValueTypeString, ValueTypeString }, Exprfunc::streq);
|
||||
ExpressionFunctions::Register("strieq", ValueTypeNumber, { ValueTypeString, ValueTypeString }, Exprfunc::strieq);
|
||||
ExpressionFunctions::Register("strlen", ValueTypeNumber, { ValueTypeString }, Exprfunc::strlen);
|
||||
|
||||
ExpressionFunctions::Register("syscall.name", ValueTypeString, { ValueTypeNumber }, Exprfunc::syscall_name);
|
||||
}
|
||||
|
||||
bool ExpressionFunctions::Register(const String & name, const ValueType & returnType, const std::vector<ValueType> & argTypes, const CBEXPRESSIONFUNCTION & cbFunction, void* userdata)
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include "value.h"
|
||||
#include "TraceRecord.h"
|
||||
#include "exhandlerinfo.h"
|
||||
#include "exception.h"
|
||||
#include <vector>
|
||||
#include <regex>
|
||||
#include <string>
|
||||
@ -812,4 +813,10 @@ namespace Exprfunc
|
||||
{
|
||||
return utf16<true>(result, argc, argv, userdata);
|
||||
}
|
||||
|
||||
bool syscall_name(ExpressionValue* result, int argc, const ExpressionValue* argv, void* userdata)
|
||||
{
|
||||
*result = ValueString(SyscallToName(argv[0].number));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -101,4 +101,6 @@ namespace Exprfunc
|
||||
bool utf8_strict(ExpressionValue* result, int argc, const ExpressionValue* argv, void* userdata);
|
||||
bool utf16(ExpressionValue* result, int argc, const ExpressionValue* argv, void* userdata);
|
||||
bool utf16_strict(ExpressionValue* result, int argc, const ExpressionValue* argv, void* userdata);
|
||||
|
||||
bool syscall_name(ExpressionValue* result, int argc, const ExpressionValue* argv, void* userdata);
|
||||
}
|
Loading…
Reference in New Issue
Block a user