mirror of
https://github.com/radareorg/radare2.git
synced 2024-11-28 07:30:33 +00:00
144 lines
2.0 KiB
Plaintext
144 lines
2.0 KiB
Plaintext
NAME=add comment
|
|
FILE=malloc://1024
|
|
EXPECT=<<EOF
|
|
1
|
|
0x00000123
|
|
EOF
|
|
CMDS=<<EOF
|
|
CCa 0x123 hello
|
|
C*~?
|
|
C*~[3]
|
|
EOF
|
|
RUN
|
|
|
|
NAME=#3829 remove comment where another meta is already defined
|
|
FILE=../bins/elf/analysis/main
|
|
EXPECT=<<EOF
|
|
;-- str.Hello_World:
|
|
0x004005c4 .string "Hello World" ; len=12
|
|
EOF
|
|
CMDS=<<EOF
|
|
CCu lol @ str.Hello_World
|
|
CC- @ str.Hello_World
|
|
pd 1 @ str.Hello_World
|
|
EOF
|
|
RUN
|
|
|
|
NAME=add comment
|
|
FILE=malloc://1024
|
|
EXPECT=<<EOF
|
|
1
|
|
EOF
|
|
CMDS=<<EOF
|
|
CC hello
|
|
C*~?
|
|
EOF
|
|
RUN
|
|
|
|
NAME=add comment at
|
|
FILE=malloc://1024
|
|
EXPECT=<<EOF
|
|
1
|
|
CCu base64:aGVsbG8= @ 0x00000008
|
|
EOF
|
|
CMDS=<<EOF
|
|
CCa 8 hello
|
|
C*~?
|
|
CC*
|
|
EOF
|
|
RUN
|
|
|
|
NAME=del comment
|
|
FILE=malloc://1024
|
|
EXPECT=<<EOF
|
|
0
|
|
EOF
|
|
CMDS=<<EOF
|
|
CC hello
|
|
CC-hello
|
|
C*~?
|
|
EOF
|
|
RUN
|
|
|
|
NAME=add two comment
|
|
FILE=malloc://1024
|
|
EXPECT=<<EOF
|
|
2
|
|
EOF
|
|
CMDS=<<EOF
|
|
CC hello @ 0x200
|
|
CC world @ 0x400
|
|
C*~?
|
|
EOF
|
|
RUN
|
|
|
|
NAME=del comment at address
|
|
FILE=malloc://1024
|
|
EXPECT=<<EOF
|
|
1
|
|
EOF
|
|
CMDS=<<EOF
|
|
CC hello @ 0x200
|
|
CC world @ 0x400
|
|
CC-@0x400
|
|
C*~?
|
|
EOF
|
|
RUN
|
|
|
|
NAME=multiline comment
|
|
FILE=malloc://1024
|
|
EXPECT=<<EOF
|
|
1
|
|
1
|
|
; hello world
|
|
0x00000200 0000 add byte [eax], al
|
|
0x00000202 0000 add byte [eax], al
|
|
EOF
|
|
CMDS=<<EOF
|
|
e asm.arch=x86
|
|
e asm.bits=32
|
|
CC hello @ 0x200
|
|
CC world @ 0x200
|
|
CC.@0x200~?
|
|
CC~?
|
|
e asm.profile=simple
|
|
e asm.cmt.right=0
|
|
e scr.color=false
|
|
pd 2 @ 0x200
|
|
EOF
|
|
RUN
|
|
|
|
NAME=cmtright
|
|
FILE=malloc://1024
|
|
EXPECT=<<EOF
|
|
0x00000000 90 nop ; hello
|
|
; hello
|
|
0x00000000 90 nop
|
|
EOF
|
|
CMDS=<<EOF
|
|
e asm.arch=x86
|
|
e asm.bits=64
|
|
CC hello
|
|
e scr.color=false
|
|
wx 90
|
|
e asm.cmt.right=1
|
|
pd 1
|
|
e asm.cmt.right=0
|
|
pd 1
|
|
EOF
|
|
RUN
|
|
|
|
NAME=cmtrefs
|
|
FILE=../bins/elf/analysis/main
|
|
EXPECT=<<EOF
|
|
| 0x0040050f e8ccfeffff call sym.imp.puts ; int puts(const char *s) ; (sym.imp.puts) ; (test.flag) ; (test comment)
|
|
EOF
|
|
CMDS=<<EOF
|
|
aaa
|
|
e asm.cmt.refs = true
|
|
f test.flag @ 0x004003e0
|
|
CC test comment @ 0x004003e0
|
|
pd 1 @ 0x0040050f
|
|
EOF
|
|
RUN
|