* Split `rz_core_print_disasm_json` as: `rz_core_print_disasm_json` and `rz_core_disasm` * Use `rz_str_enc_string_as_type` in `ds_init` * Refactor `rz_core_print_disasm` and `rz_core_handle_backwards_disasm` * Add `rz_core_asm_bb_middle` * Move global `disasm_texts` to `RzDisasmState` * Rewrite `core_analysis_bytes_standard` with `rz_core_analysis_bytes` * Add `test_rz_core_print_disasm` and `test_rz_core_analysis_bytes` * Rewrite `rz_core_print_disasm` with `RzCmdStateOutput` * `pdi` -> `pdq` in tests * `pdi` -> `pDq` in tests * `pid` -> `pdq` in tests * `pId` -> `pDq` in tests * `pij` -> `pdj` in tests * `pIj` -> `pDj` in tests * `pdeqq` -> `pdeQ` in tests * Remove `pDJ` from `test/db/json/`
158 lines
1.8 KiB
Text
158 lines
1.8 KiB
Text
NAME=quotes multicommands
|
|
FILE=malloc://128
|
|
CMDS=<<EOF
|
|
e asm.arch=x86
|
|
e asm.bits=64
|
|
wa "nop;nop";pi 3
|
|
EOF
|
|
EXPECT=<<EOF
|
|
nop
|
|
nop
|
|
add byte [rax], al
|
|
EOF
|
|
RUN
|
|
|
|
NAME=quotes multicommands 2
|
|
FILE=malloc://128
|
|
CMDS=<<EOF
|
|
e asm.arch=x86
|
|
e asm.bits=32
|
|
p8 1;wa nop nop;pi 3
|
|
EOF
|
|
EXPECT=<<EOF
|
|
00
|
|
nop
|
|
nop
|
|
add byte [eax], al
|
|
EOF
|
|
RUN
|
|
|
|
NAME=quotes multicommands 2
|
|
FILE=malloc://128
|
|
CMDS=<<EOF
|
|
e asm.arch=x86
|
|
e asm.bits=32
|
|
w "hello;world";wa "inc eax;inc eax";psz
|
|
EOF
|
|
EXPECT=<<EOF
|
|
@@llo;world
|
|
EOF
|
|
RUN
|
|
|
|
NAME=p8 2@x:9090
|
|
FILE=malloc://128
|
|
CMDS=<<EOF
|
|
e asm.arch=x86
|
|
e asm.bits=32
|
|
p8 2 @x:9090
|
|
EOF
|
|
EXPECT=<<EOF
|
|
9090
|
|
EOF
|
|
RUN
|
|
|
|
NAME=pi 2@x:9090
|
|
FILE=malloc://128
|
|
CMDS=<<EOF
|
|
e asm.arch=x86
|
|
e asm.bits=32
|
|
pi 2 @x:9090
|
|
EOF
|
|
EXPECT=<<EOF
|
|
nop
|
|
nop
|
|
EOF
|
|
RUN
|
|
|
|
NAME=pdq 2@x:9090@0x1000
|
|
FILE=malloc://128
|
|
CMDS=<<EOF
|
|
e asm.bytes=true
|
|
e asm.arch=x86
|
|
e asm.bits=32
|
|
pdq 2 @x:9090 @ 0x1000
|
|
EOF
|
|
EXPECT=<<EOF
|
|
0x00001000 90 nop
|
|
0x00001001 90 nop
|
|
EOF
|
|
RUN
|
|
|
|
NAME=pd 2@x:9090
|
|
FILE=malloc://128
|
|
CMDS=<<EOF
|
|
e asm.bytes=true
|
|
e asm.arch=x86
|
|
e asm.bits=32
|
|
pd 2 @x:9090
|
|
EOF
|
|
EXPECT=<<EOF
|
|
0x00000000 90 nop
|
|
0x00000001 90 nop
|
|
EOF
|
|
RUN
|
|
|
|
NAME=pad 9090
|
|
FILE=malloc://128
|
|
CMDS=<<EOF
|
|
e asm.arch=x86
|
|
e asm.bits=32
|
|
pad 9090
|
|
EOF
|
|
EXPECT=<<EOF
|
|
nop
|
|
nop
|
|
EOF
|
|
RUN
|
|
|
|
NAME=pie 90
|
|
FILE=malloc://128
|
|
CMDS=<<EOF
|
|
e asm.arch=x86
|
|
e asm.bits=64
|
|
wx 4989d1
|
|
pie 1
|
|
EOF
|
|
EXPECT=<<EOF
|
|
0x00000000 rdx,r9,=
|
|
EOF
|
|
RUN
|
|
|
|
NAME=pa nop,nop
|
|
FILE=malloc://128
|
|
CMDS=<<EOF
|
|
e asm.arch=x86
|
|
e asm.bits=32
|
|
"pa nop;nop"
|
|
EOF
|
|
EXPECT=<<EOF
|
|
9090
|
|
EOF
|
|
RUN
|
|
|
|
NAME=r2 asm with pa
|
|
FILE==
|
|
BROKEN=1
|
|
CMDS=<<EOF
|
|
e asm.arch=x86
|
|
e asm.bits=32
|
|
f TEST=33
|
|
pa mov eax, TEST
|
|
EOF
|
|
EXPECT=<<EOF
|
|
b821000000
|
|
EOF
|
|
RUN
|
|
|
|
NAME=r2 asm with pa
|
|
FILE==
|
|
CMDS=<<EOF
|
|
e asm.arch=x86
|
|
e asm.bits=32
|
|
f TEST=33
|
|
pa mov eax, 33
|
|
EOF
|
|
EXPECT=<<EOF
|
|
b821000000
|
|
EOF
|
|
RUN
|