rizin/test/db/cmd/cmd_aea
Florian Märkl 3c2e4bf63a
Rewrite ar and dr with newshell (#2006)
* Show group-level details of commands

Details can be defined at either a group command or its subcommand of
the same name. If define on group-level it will also be shown in the
group help without needing ??.

* Fix > $ redirection for errored command and leak

* Rewrite ar and dr commands with newshell

Breaking changes:
ar* => arf, ar- => arf-, ar. => ar*
ar, => art, ar? => arq
ar0 => ara0, arb => arab, ars => araS
arC => arpC
arn => arR
art => arT
arf => arF
Removed: drm, aer
2021-12-06 19:02:43 +01: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
FILE==
ARGS=-a x86 -b64
CMDS=wx 4889e5b8ffff000089c2c1ea1f01d0;aeA 15
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