-
-
Notifications
You must be signed in to change notification settings - Fork 421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
capstone: add 5.0.3 version #5474
Conversation
@waruqi wasm ci 貌似有点问题,我本地 linux/windows 都是可以的。感觉可能是 emsdk 缓存的问题 |
@waruqi wasm There seems to be a problem with ci. It works fine in my local linux/windows. It feels like it may be a cache problem with emsdk |
暂时没空看,你先禁用 cache 试下 |
I don’t have time to read it yet, so try disabling cache first. |
You can improve test if you want to. assert(package:check_csnippets({test = [[
//code comes from https://www.capstone-engine.org/lang_c.html
#include <stdio.h>
#include <inttypes.h>
#include <capstone/capstone.h>
#define CODE "\\x55\\x48\\x8b\\x05\\xb8\\x13\\x00\\x00"
void test()
{
csh handle;
cs_insn *insn;
size_t count;
cs_open(CS_ARCH_X86, CS_MODE_64, &handle);
count = cs_disasm(handle, CODE, sizeof(CODE)-1, 0x1000, 0, &insn);
if (count > 0) {
size_t j;
for (j = 0; j < count; j++) {
printf("0x%"PRIx64":\\t%s\\t\\t%s\\n", insn[j].address, insn[j].mnemonic,insn[j].op_str);
}
cs_free(insn, count);
} else
printf("ERROR: Failed to disassemble given code!\\n");
cs_close(&handle);
}
]]}, {configs = {languages = "c11"}})) |
end) | ||
|
||
on_test(function (package) | ||
if package:is_plat(os.host()) then | ||
if not package:is_cross() then | ||
os.vrun("cstool -v") | ||
end | ||
assert(package:has_cfuncs("cs_version", {includes = "capstone/capstone.h"})) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
on_test(function (package)
if not package:is_cross() then
os.vrun("cstool -v")
end
assert(package:check_csnippets({test = [[
//code comes from https://www.capstone-engine.org/lang_c.html
#include <stdio.h>
#include <inttypes.h>
#include <capstone/capstone.h>
#define CODE "\\x55\\x48\\x8b\\x05\\xb8\\x13\\x00\\x00"
void test()
{
csh handle;
cs_insn *insn;
size_t count;
cs_open(CS_ARCH_X86, CS_MODE_64, &handle);
count = cs_disasm(handle, CODE, sizeof(CODE)-1, 0x1000, 0, &insn);
if (count > 0) {
size_t j;
for (j = 0; j < count; j++) {
printf("0x%"PRIx64":\\t%s\\t\\t%s\\n", insn[j].address, insn[j].mnemonic,insn[j].op_str);
}
cs_free(insn, count);
} else
printf("ERROR: Failed to disassemble given code!\\n");
cs_close(&handle);
}
]]}, {configs = {languages = "c11"}}))
assert(package:has_cfuncs("cs_version", {includes = "capstone/capstone.h"}))
end)
//code comes from https://www.capstone-engine.org/lang_c.html
add test if you want to.
禁用 wasm ci cache 后可以 |
After disabling wasm ci cache, you can |
No description provided.