cstool: support armbe mode

This commit is contained in:
Nguyen Anh Quynh 2017-03-10 20:30:55 +08:00
parent c17b1539c5
commit bb6e792f03

View File

@ -85,11 +85,9 @@ static void usage(char *prog)
if (cs_support(CS_ARCH_ARM)) {
printf(" arm: arm\n");
printf(" armb: arm + big endian\n");
printf(" arml: arm + little endian\n");
printf(" armbe: arm + big endian\n");
printf(" thumb: thumb mode\n");
printf(" thumbbe: thumb + big endian\n");
printf(" thumble: thumb + billtle endian\n");
}
if (cs_support(CS_ARCH_ARM64)) {
@ -191,7 +189,7 @@ int main(int argc, char **argv)
err = cs_open(CS_ARCH_ARM, CS_MODE_ARM, &handle);
}
if (!strcmp(mode, "armb")) {
if (!strcmp(mode, "armb") || !strcmp(mode, "armbe") ) {
arch = CS_ARCH_ARM;
err = cs_open(CS_ARCH_ARM, CS_MODE_ARM + CS_MODE_BIG_ENDIAN, &handle);
}