Update tests and help about asm.leahints -> asm.hint.lea
This commit is contained in:
parent
478c7d2d1d
commit
75f813a4a9
|
@ -184,7 +184,6 @@ static int disassemble(RAsm *a, RAsmOp *op, const ut8 *buf, int len) {
|
|||
r_strbuf_set (&op->buf_asm, "illegal");
|
||||
}
|
||||
}
|
||||
char opstr[128];
|
||||
if (op && !op->size) {
|
||||
op->size = insn->size;
|
||||
if (insn->id == ARM_INS_IT) {
|
||||
|
@ -202,15 +201,15 @@ static int disassemble(RAsm *a, RAsmOp *op, const ut8 *buf, int len) {
|
|||
r_str_cpy (insn->mnemonic, tmpstr);
|
||||
free (tmpstr);
|
||||
}
|
||||
snprintf (opstr, sizeof (opstr), "%s%s%s",
|
||||
char opstr[128];
|
||||
snprintf (opstr, sizeof (opstr) - 1, "%s%s%s",
|
||||
insn->mnemonic,
|
||||
insn->op_str[0]? " ": "",
|
||||
insn->op_str);
|
||||
char *buf_asm = &opstr;
|
||||
if (!disp_hash) {
|
||||
r_str_replace_char (buf_asm, '#', 0);
|
||||
r_str_replace_char (opstr, '#', 0);
|
||||
}
|
||||
r_strbuf_set (&op->buf_asm, buf_asm);
|
||||
r_strbuf_set (&op->buf_asm, opstr);
|
||||
}
|
||||
cs_free (insn, n);
|
||||
beach:
|
||||
|
|
|
@ -631,7 +631,7 @@ repeat:
|
|||
case 'e':
|
||||
r_strbuf_appendf (p, "Visual Evals:\n\n");
|
||||
r_strbuf_appendf (p,
|
||||
" E toggle asm.leahints\n"
|
||||
" E toggle asm.hint.lea\n"
|
||||
" & rotate asm.bits=16,32,64\n"
|
||||
);
|
||||
ret = r_cons_less_str (r_strbuf_get (p), "?");
|
||||
|
|
|
@ -30,7 +30,7 @@ CS_TAR=https://codeload.github.com/capstone-engine/capstone/tar.gz/$(CS_VER)
|
|||
CS_PATCHES=0
|
||||
else
|
||||
CS_TAR=
|
||||
CS_URL_BASE=github.com/aquynh/capstone
|
||||
CS_URL_BASE=github.com/capstone-engine/capstone
|
||||
CS_URL=$(GIT_PREFIX)$(CS_URL_BASE).git
|
||||
CS_ARCHIVE=https://$(CS_URL_BASE)/archive
|
||||
CS_UPD=20201203
|
||||
|
@ -229,7 +229,7 @@ capstone: capstone-$(CS_VER).tar.gz
|
|||
$(MAKE) patch-capstone
|
||||
|
||||
# already implemented in capstone.sh
|
||||
patch-capstone:
|
||||
patch-capstone capstone-patch:
|
||||
ifeq ($(CS_PATCHES),1)
|
||||
if [ -d capstone/.git ]; then \
|
||||
ifeq ($(USE_CS4),1)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
diff --git a/cs.c b/cs.c
|
||||
index 786922b4..ec5cda47 100644
|
||||
index 786922b4..db75c756 100644
|
||||
--- a/cs.c
|
||||
+++ b/cs.c
|
||||
@@ -540,6 +540,7 @@ static void fill_insn(struct cs_struct *handle, cs_insn *insn, char *buffer, MCI
|
||||
|
@ -10,14 +10,14 @@ index 786922b4..ec5cda47 100644
|
|||
insn->size = copy_size;
|
||||
|
||||
// alias instruction might have ID saved in OpcodePub
|
||||
@@ -559,6 +560,10 @@ static void fill_insn(struct cs_struct *handle, cs_insn *insn, char *buffer, MCI
|
||||
if (tab) {
|
||||
strcpy (insn->op_str, tab + 1);
|
||||
}
|
||||
@@ -551,6 +552,10 @@ static void fill_insn(struct cs_struct *handle, cs_insn *insn, char *buffer, MCI
|
||||
postprinter((csh)handle, insn, buffer, mci);
|
||||
|
||||
#ifndef CAPSTONE_DIET
|
||||
+ char *prefix = strchr (buffer, '|');
|
||||
+ if (prefix) {
|
||||
+ *tab = ' ';
|
||||
+ *prefix = ' ';
|
||||
+ }
|
||||
|
||||
// we might have customized mnemonic
|
||||
if (handle->mnem_list) {
|
||||
char *tab = strchr (buffer, '\t');
|
||||
if (tab) {
|
||||
*tab = 0;
|
||||
|
|
|
@ -31,6 +31,7 @@ patch_capstone() {
|
|||
CV=v4
|
||||
fi
|
||||
for patchfile in ../capstone-patches/$CV/*.patch ; do
|
||||
echo "Patch $patchFile"
|
||||
patch -p 1 < "${patchfile}"
|
||||
done
|
||||
}
|
||||
|
|
|
@ -3165,7 +3165,6 @@ FILE=malloc://1023
|
|||
CMDS=<<EOF
|
||||
e asm.calls=false
|
||||
e asm.bits=32
|
||||
e asm.leahints=false
|
||||
e asm.cpu=x86
|
||||
e asm.arch=x86
|
||||
e scr.utf8=true
|
||||
|
@ -3230,7 +3229,6 @@ FILE=malloc://1023
|
|||
CMDS=<<EOF
|
||||
e asm.calls=false
|
||||
e asm.bits=32
|
||||
e asm.leahints=false
|
||||
e asm.cpu=x86
|
||||
e anal.cpu=x86
|
||||
e anal.vars.stackname=true
|
||||
|
|
|
@ -1365,7 +1365,6 @@ FILE=bins/elf/analysis/ls-alxchk
|
|||
CMDS=<<EOF
|
||||
e asm.sub.rel=false
|
||||
e asm.bytes=false
|
||||
e asm.leahints=false
|
||||
e scr.utf8=false
|
||||
e scr.color=false
|
||||
s $S
|
||||
|
@ -1414,7 +1413,6 @@ FILE=bins/elf/analysis/ls-alxchk
|
|||
CMDS=<<EOF
|
||||
e asm.sub.rel=false
|
||||
e asm.bytes=false
|
||||
e asm.leahints=false
|
||||
e scr.utf8=false
|
||||
e scr.color=false
|
||||
s $S
|
||||
|
@ -1456,7 +1454,6 @@ FILE=bins/elf/analysis/ls-alxchk
|
|||
CMDS=<<EOF
|
||||
e asm.sub.rel=false
|
||||
e asm.bytes=false
|
||||
e asm.leahints=false
|
||||
e scr.utf8=false
|
||||
e scr.color=false
|
||||
e asm.lines.wide=true
|
||||
|
@ -1499,7 +1496,6 @@ FILE=bins/elf/analysis/ls-alxchk
|
|||
CMDS=<<EOF
|
||||
e asm.sub.rel=false
|
||||
e asm.bytes=false
|
||||
e asm.leahints=false
|
||||
e scr.utf8=false
|
||||
e scr.color=false
|
||||
e asm.lines.wide=true
|
||||
|
@ -1541,7 +1537,6 @@ FILE=bins/elf/analysis/ls-alxchk
|
|||
CMDS=<<EOF
|
||||
e asm.sub.rel=false
|
||||
e asm.bytes=false
|
||||
e asm.leahints=false
|
||||
e scr.utf8=false
|
||||
e scr.color=false
|
||||
e asm.lines.wide=true
|
||||
|
|
|
@ -270,7 +270,7 @@ ARGS=-m 0x100001000
|
|||
CMDS=<<EOF
|
||||
e io.va
|
||||
e asm.sub.rel=false
|
||||
e asm.leahints=false
|
||||
e asm.hint.lea=false
|
||||
e asm.arch=x86
|
||||
e asm.bits=64
|
||||
e io.va=true
|
||||
|
|
|
@ -2,7 +2,6 @@ NAME=serial subrel
|
|||
FILE=bins/elf/analysis/serial
|
||||
CMDS=<<EOF
|
||||
s 0x00400b35
|
||||
e asm.leahints=false
|
||||
e asm.bytes=false
|
||||
e asm.lines.jmp=false
|
||||
e asm.sub.rel=true
|
||||
|
|
Loading…
Reference in New Issue