rizin/test/db/cmd/cmd_afvd
Anton Kochkov 3c59df7e98
Refactor RzTypes to use structs instead of SDB + New Tree-Sitter based C Parser (#1047)
- Removed oldshell version of `t` (types) commands
- Removed `tk` command because types storage switched to the hashtable
- Added `tfc` command to show the calling convention of the function or set it
- Added `tsl` (RZ_OUTPUT_MODE_LONG) to show structure members' sizes and offsets
- Added `tul` (RZ_OUTPUT_MODE_LONG) to show union members' sizes
- Switched the types storage to the hashtable instead of SDB
- Added load and export from/to SDB for standard type libraries and serialization for Projects
- Changed all `char *type` occurences to the proper `RzType`
- Added `RzCallable` type for the function/class method types
- Changed all function types API to use the `RzCallable` API
- Switched the function types (`RzCallable`) storage to the hashtable instead of SDB
- Added a connection between `RzAnalysisFunction` and `RzCallable` - `rz_analysis_function_derive_type()` API function to derive new `RzCallable` type from the `RzAnalysisFunction` even if it doesn't exist in the RzTypeDB.
- Moved type links to the RzAnalysis where they belong
- Removed TCC and MPC-based parsers
- Added Tree-Sitter-based parser for C grammar (see `librz/type/parser/*`)
- Reworked type databases in `librz/analysis/d/` to be consistent with C standard, libc, platform-specific definitions
- Switched the type links from `char *` to `RzType`
- Switched the type links from SDB to the hashtable
- Added concept of the "type paths", e.g. `a.b[20].c` where `b` is a member of `a` (`a` is either structure or a union) and `c` is a member of `b`, and `b` is an array where we take 20-th element.
- Added concept of the typeclasses (a bit similar to Haskell) for numerical types: `None` (the most generic one), `Num` (includes `Integral` and `Floating`), `Integral` (includes `Signed Integral` and `Unsigned Integral`), `Floating`.
- Added concept of type equality (`rz_types_equal(a, b)` API function)
- Added Doxygen documentation to every API function in the `librz/type/*`.
- Updated the project format from **V2** to **V3**, added migration.
2021-07-20 01:46:45 +08:00

28 lines
734 B
Text

NAME=afvd
FILE==
CMDS=<<EOF
e analysis.vars.stackname=true
e asm.arch=x86
e asm.bits=64
wx 554889e54883ec2848897c24204889742418488995e0ffffff48898dd8ffffff4883c4285dc3
af
aei
aeim
dr rdi=0x1111111111111111
dr rsi=0x2222222222222222
dr rdx=0x3333333333333333
dr rcx=0x4444444444444444
7ds
afvd
EOF
EXPECT=<<EOF
arg arg1 = : rdi : 0x1111111111111111
arg arg2 = : rsi : 0x2222222222222222
arg arg3 = : rdx : 0x3333333333333333
arg arg4 = : rcx : 0x4444444444444444
var var_28h = int64_t : 0x00177fd8 = (qword)0x3333333333333333
var var_30h = int64_t : 0x00177fd0 = (qword)0x4444444444444444
var var_10h = int64_t : 0x00177ff0 = (qword)0x1111111111111111
var var_18h = int64_t : 0x00177fe8 = (qword)0x2222222222222222
EOF
RUN