rizin/test/db/cmd/display_flag
Anton Kochkov 2f638cad1e Convert f commands to rzshell
* Changed behavior of `f` to only add flag if there is none
* Changed behavior of `f+` to add flag in any case
* Moved listing subcommands from `f` to `fl`
* Moved listing subcommands from `f.` to `f.l`
* Added subcommand `f.l*` to list all local flags in all functions
* Listing flags at the current offset became `fl.`
* Moved `f=` to `fl=`
* Old `fl` (flag length) now became `fL`
* Removed original `fe` commands
* Old `f?` (check if flag exists) now became `fe`
* Removed `fV` commands
* Removed `fn` commands in favor of `fl` and `asm.flags.real=true`
* Removed `fS` commands (`fSo` and `fSn`)
* `fo` became `fortune` and moved from "flags" to "shell" category
* Removed oldshell handlers of the `z` commands
2022-02-03 21:46:42 +08:00

61 lines
1 KiB
Text

NAME=Function labels in comments
FILE=malloc://512
CMDS=<<EOF
e asm.bytes=true
e asm.arch=x86
e asm.bits=16
e asm.nbytes=2
e asm.cmt.col=0
wx 66b801000000b90f006683fb02e2fa66bb01000000c3
af+ 0000:0000 fcn1
afb+ 0 0 22
f. loop1 @ 0000:0009
pd 1 @ 0000:000d
EOF
EXPECT=<<EOF
| `=< 0000:000d e2fa loop 9 ; fcn1.loop1
EOF
RUN
NAME=Function labels in disasm
FILE=malloc://512
CMDS=<<EOF
e asm.bytes=true
e asm.arch=x86
e asm.bits=16
e asm.nbytes=2
wx 66b801000000b90f006683fb02e2fa66bb01000000c3
af+ 0 fnc1
afb+ 0 0 22
f. loop1 @ 9
pd 1 @ 9
EOF
EXPECT=<<EOF
| .loop1:
| 0000:0009 6683. cmp ebx, 2
EOF
RUN
NAME=ANSI injection vuln
FILE=bins/mach0/ansi
CMDS=<<EOF
sp
e asm.bytes=true
e asm.lines=0
e asm.comments=0
pd 1
isq
EOF
EXPECT=<<EOF
;-- section.0.__TEXT.__text:
;-- _rt:
;-- func.100000f50:
0x100000f50 55 push rbp
0x100000000 0 __mh_execute_header
0x100000f60 0 _main
0x100000f50 0 _r\e#8qt
0x100000f8a 0 imp.printf
0x100000f50 0 func.100000f50
0x100000f60 0 func.100000f60
EOF
RUN