Commit graph

12 commits

Author SHA1 Message Date
Paul I
00676b4e39
Convert afc commands to rzshell (#2559) 2022-04-24 20:55:41 +02:00
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
seanachao
a2f8631b6c
Change -, --, = argument and = command meaning (#930)
* Swap = & - R (#615)&(#616)
* Fix R replace =
2021-04-21 16:20:24 +08:00
Anton Kochkov
bae99d4494 librz/core/*.c refactor for RzTypes extraction 2021-03-05 17:41:57 +08:00
Anton Kochkov
d120969b48 Use newshell for tc commands 2021-02-26 18:43:23 +08:00
Anton Kochkov
9526cc8b75 Refactor to use API instead of commands in types 2021-02-18 20:50:47 +08:00
pancake
391caa460a Add amd64syscall calling convention definition ##anal (#18074)
* Call convention support for x86-64 kernel interface (syscall) %rdi, %rsi, %rdx, %r10, %r8, %r9

Co-authored-by: Dreg <dreg@fr33project.org>
Co-authored-by: pancake <pancake@nopcode.org>
2020-12-22 08:26:41 +08:00
Florian Märkl
f56046e32a
Add setters for CC self and error and Tests ##anal (#17704)
* Add setters for CC self and error and Tests ##anal
* Purge sdb_cc on anal purge ##anal
* Add non-nonsensical syntax for self/err CC
2020-09-30 13:39:20 +08:00
pancake
f71ec729ba
Always register the derived CC from the reg profile ##anal (#17685) 2020-09-24 17:17:15 +02:00
pancake
c9e98e4645
Implement tcc-* commmand to unload all calling conventions ##anal (#17688) 2020-09-22 10:03:37 +02:00
pancake
f15f1af521
Fix spacing bugs when parsing the calling convention signatures (#17651) ##types 2020-09-16 19:17:54 +02:00
pancake
346eb5bd38
Move test/new/* into test/ ##tests (#16511) 2020-04-13 19:49:23 +02:00
Renamed from test/new/db/cmd/cmd_tcc (Browse further)