rizin/test/db/cmd/cmd_ara
Dhruv Maroo 178701f721
Reduce registers shown in the output of dr and Vpp when analysing an ARM64 executable (#1739)
* Add function to check if a register is a system register

* Only checks for ARM64 system registers as of now

* Check for system registers in ARM64 when printing registers using "dr"

* Does not completely remove the unnecessary register, but removes a
  huge number of useless registers printed by "dr"

* Rename `RZ_REG_TYPE_ALL` to `RZ_REG_TYPE_ANY`

* ADd register types for "sys" and "pauth": `RZ_REG_TYPE_SYS` and
  `RZ_REG_TYPE_PAUTH` respectively

* Remove `rz_reg_is_system_reg`

* Add `sys` and `pauth` register profiles

* Update debug tests to account for new arenas and register profiles

* REplace "pauth" with "sec" reg profile

* Update integration tests to account for new register profiles: `sys`, `sec`
2021-09-28 23:49:55 +08:00

106 lines
862 B
Text

NAME=ara swap
FILE==
CMDS=<<EOF
e asm.arch=x86
e asm.bits=64
ara+
ar rax=33
ar rax
aras
ar rax
EOF
EXPECT=<<EOF
0x00000021
0x00000000
EOF
RUN
NAME=ara swap 2
FILE==
CMDS=<<EOF
e asm.arch=x86
e asm.bits=64
ara+
ar rax=33
ar rax
aras
ar rax
aras
ar rax
EOF
EXPECT=<<EOF
0x00000021
0x00000000
0x00000021
EOF
RUN
NAME=ara push
FILE==
CMDS=<<EOF
e asm.arch=x86
e asm.bits=64
ara~?
ara+
ara~?
EOF
EXPECT=<<EOF
20
30
EOF
RUN
NAME=ara pop
FILE==
CMDS=<<EOF
e asm.arch=x86
e asm.bits=64
ara~?
ara+
ara~?
ara-
ara~?
ara-
ara~?
ara-
ara~?
EOF
EXPECT=<<EOF
20
30
20
10
10
EOF
RUN
NAME=arcc+tcc
FILE==
CMDS=<<EOF
e asm.arch=x86
e asm.bits=64
afcl
e asm.arch=arm
e asm.bits=32
arcc
e asm.arch=x86
e asm.bits=64
arcc
tcc `arcc`
afcl
EOF
EXPECT=<<EOF
amd64
amd64syscall
ms
reg
swift
r0 reg(r0, r1, r2, r3)
rdi reg(rdi, rsi, rdx, rcx)
amd64
amd64syscall
ms
reg
swift
EOF
RUN