rizin/test/db/cmd/cmd_aea
Rot127 7b2737fb99
Port ae commands to RzShell (#4732)
* Port ae command to RzShell

* Port aepc to RzShell.

* Port aek commands to RzShell

* Fix help of ported ae commands

* Port aeb to RzShell

* Port aex command to RzShell

* Remove ae* command.

It was marked as not working and had no direct advantage.
With the transition to RzIL it becomes obsolete.

* Port aef commands to RzShell

* Port ae?? command to aeH

* Fix off by one error

* Port ael commands to RzShell.

* Port aea command to RzShell.

* Highlight ESIL is used for emulation in ae commands.

* Make ae parameter mandatory

* Remove a*

It executed not existing commands

* Remove legacy ae command handler.

* Fix ae tests by putting expressions in strings.

They contain special/illegal argument characters for the RzShell.

* Fix parameter order of aea command.

For the most common case people just pass a number.
Hence, it must be the first argument.

* Run yamllint
2024-11-26 21:19:40 +08:00

120 lines
1.4 KiB
Text

NAME=aea 5
FILE==
ARGS=-a x86 -b64
CMDS=wx 4889e5b8ffff000089c2c1ea1f01d0;aea 5
EXPECT=<<EOF
I: rsp eax edx
A: rsp rbp rax eax rdx cf edx zf pf sf of af
R: rsp eax edx
W: rbp rax rdx cf edx zf pf sf eax of af
V: 0 65535 1
N: rsp
EOF
RUN
NAME=aeaj 5
FILE==
ARGS=-a x86 -b64
CMDS=wx 4889e5b8ffff000089c2c1ea1f01d0;aeaj 5~{}
EXPECT=<<EOF
{
"A": [
"rsp",
"rbp",
"rax",
"eax",
"rdx",
"cf",
"edx",
"zf",
"pf",
"sf",
"of",
"af"
],
"I": [
"rsp",
"eax",
"edx"
],
"R": [
"rsp",
"eax",
"edx"
],
"W": [
"rbp",
"rax",
"rdx",
"cf",
"edx",
"zf",
"pf",
"sf",
"eax",
"of",
"af"
],
"V": [
"0",
"65535",
"1"
],
"N": [
"rsp"
]
}
EOF
RUN
NAME=aea 15 -A
FILE==
ARGS=-a x86 -b64
CMDS=wx 4889e5b8ffff000089c2c1ea1f01d0;aea 15 d -A
EXPECT=<<EOF
I: rsp eax edx
A: rsp rbp rax eax rdx cf edx zf pf sf of af
R: rsp eax edx
W: rbp rax rdx cf edx zf pf sf eax of af
V: 0 65535 1
N: rsp
EOF
RUN
NAME=aes delay slot
FILE=bins/elf/mipsloop
CMDS=<<EOF
s main
aeim
28aes
ar v0
ar a1
sr PC
pi 2
EOF
EXPECT=<<EOF
v0 = 0x0000000a
a1 = 0x00007a62
lw a0, -segment.LOAD0(gp)
lw t9, -sym.imp.printf(gp)
EOF
RUN
NAME=aes delay slot2
FILE=bins/elf/mipsloop
CMDS=<<EOF
s main
aeim
aesu 0x000804d8
ar v0
ar a1
sr PC
pi 2
EOF
EXPECT=<<EOF
v0 = 0x0000000a
a1 = 0x00007a62
lw a0, -segment.LOAD0(gp)
lw t9, -sym.imp.printf(gp)
EOF
RUN