radare2/test/new/db/cmd/cmd_pd_bytes
2020-01-19 16:56:08 +08:00

84 lines
1.8 KiB
Plaintext

NAME=pD -10 @ 10
FILE=malloc://512
EXPECT=<<EOF
0x00000000 b801000000 mov eax, 1
0x00000005 4839ca cmp rdx, rcx
,=< 0x00000008 7f00 jg 0xa
EOF
CMDS=<<EOF
e asm.arch=x86
e asm.bits=64
e anal.hasnext=0
e asm.linesup=0
wx b8010000004839ca7f00
pD -10 @ 0xa
EOF
RUN
NAME=pD -10 @ 0
FILE=malloc://512
EXPECT=<<EOF
0x00000000 b801000000 mov eax, 1
0x00000005 4839ca cmp rdx, rcx
,=< 0x00000008 7f00 jg 0xa
EOF
CMDS=<<EOF
e asm.arch=x86
e asm.bits=64
e anal.hasnext=0
e asm.linesup=false
wx b8010000004839ca7f00
pD -10 @ 10
EOF
RUN
NAME=pD 5 @ 0
FILE=malloc://512
EXPECT=<<EOF
0x00000000 b801000000 mov eax, 1
EOF
CMDS=<<EOF
e asm.arch=x86
e asm.bits=64
e anal.hasnext=0
wx b8010000004839ca7f00
pD 5
EOF
RUN
NAME=pDj 5 @ 0
FILE=malloc://512
EXPECT=<<EOF
[{"offset":0,"val":1,"esil":"1,rax,=","refptr":false,"fcn_addr":0,"fcn_last":0,"size":5,"opcode":"mov eax, 1","disasm":"mov eax, 1","bytes":"b801000000","family":"cpu","type":"mov","reloc":false,"type_num":9,"type2_num":0}]
EOF
CMDS=<<EOF
e asm.arch=x86
e asm.bits=64
e anal.hasnext=0
wx b8010000004839ca7f00
pDj 5 @ 0
EOF
RUN
NAME=pD -10
FILE=malloc://1024
EXPECT=<<EOF
0x00000000 90 nop
0x00000001 90 nop
0x00000002 90 nop
0x00000003 90 nop
0x00000004 90 nop
0x00000005 90 nop
0x00000006 90 nop
0x00000007 90 nop
0x00000008 90 nop
0x00000009 90 nop
EOF
CMDS=<<EOF
e asm.arch=x86
e asm.bits=64
e asm.linesup=0
wx 90909090909090909090 ; s 10 ; pD -10
EOF
RUN