rizin/test/db/cmd/cmd_afb
Riccardo Schirone 144ba639dc
Convert s commands to newshell (#375)
* Rename `sj`/`s*` and move them under `sH`. Remove `s=`
* Rename `s-*` to `sH-`
* Use `sd` for "seek delta", which moves relative to the current offset
* Enforce <cmd> <arg> syntax. So no more `s+16` but `s +16`. Command
  `sHr` is for redo history, `sHu` for undo history. If one wants to move
  relative to the current address, they need to do `sd +10`/`sd -10`.
* Remove `ss` commands in favour of `cmd.seek.silent`. This was anyway
  used mainly for scripts, so no need to replicate all `s` commands
  under `ss`.

Change a bit rz_core_seek API to avoid dupped entries in seek history.
2021-01-20 10:30:20 +08:00

58 lines
737 B
Text

NAME=af localflag
FILE=bins/mach0/mac-ls2
CMDS=<<EOF
aaa
afi~?
afi.
afb.
EOF
EXPECT=<<EOF
33
entry0
0x1000011e8 0x100001211 00:0000 41 j 0x100001216 f 0x100001211
EOF
RUN
NAME=ab opaddr
FILE=bins/mach0/mac-ls2
CMDS=<<EOF
e cfg.json.num=hex
af
ab
sd +1
ab~opaddr
sd +1
ab~opaddr
abj~{}
sd +1
ab~opaddr
sd +1
ab~opaddr
EOF
EXPECT=<<EOF
jump: 0x100001216
fail: 0x100001211
opaddr: 0x1000011e8
addr: 0x1000011e8
size: 41
inputs: 0
outputs: 2
ninstr: 14
traced: false
opaddr: 0x1000011e9
opaddr: 0x1000011e9
{
"jump": "0x100001216",
"fail": "0x100001211",
"opaddr": "0x1000011e9",
"addr": "0x1000011e8",
"size": 41,
"inputs": 0,
"outputs": 2,
"ninstr": 14,
"traced": false
}
opaddr: 0x1000011e9
opaddr: 0x1000011ec
EOF
RUN