cstool: support arm64be

This commit is contained in:
Nguyen Anh Quynh 2017-04-25 21:33:26 +08:00
parent f88ef5fe37
commit c8336e0add

View File

@ -92,6 +92,7 @@ static void usage(char *prog)
if (cs_support(CS_ARCH_ARM64)) {
printf(" arm64: aarch64 mode\n");
printf(" arm64be: aarch64 + big endian\n");
}
if (cs_support(CS_ARCH_MIPS)) {
@ -214,6 +215,11 @@ int main(int argc, char **argv)
err = cs_open(CS_ARCH_ARM64, CS_MODE_LITTLE_ENDIAN, &handle);
}
if (!strcmp(mode, "arm64be")) {
arch = CS_ARCH_ARM64;
err = cs_open(CS_ARCH_ARM64, CS_MODE_BIG_ENDIAN, &handle);
}
if (!strcmp(mode, "mips")) {
arch = CS_ARCH_MIPS;
err = cs_open(CS_ARCH_MIPS, CS_MODE_MIPS32 | CS_MODE_LITTLE_ENDIAN, &handle);