Commit graph

51 commits

Author SHA1 Message Date
Giovanni
5e7fa12b5a
Add RzConfigValidator for validating (on set) owned variables (#6356) 2026-05-16 16:12:13 +02:00
Florian Märkl
8a187c0176
Remove RzConfig.lock and re-introduce rz_config_lock for compatibility (#6315)
rz_config_lock() is still in use by some external plugins. It should be
removed completely once plugins have migrated to the new API.
For now, it is a no-op to not break compilation of plugins.
2026-05-05 23:40:28 +08:00
Giovanni
bd44250fd6
Add new implementation of RzConfig (#5820) 2026-05-03 15:34:48 +08:00
Khairul Azhar Kasmiran
c8878d3139
Convert %ll format specifiers to PFMT64 (#6267)
* Convert `%ll` format specifiers to PFMT64
* Remove ` ""` at end of some PFMT64
2026-04-22 05:57:04 +08:00
Giovanni
693dff153b
Move arch config into function (#5902) 2026-02-17 18:19:40 +08:00
Giovanni
827a0ed1bb
Fix doxygen comments to use \<something> notation (#5720) 2026-01-02 19:05:37 +08:00
Khairul Azhar Kasmiran
c1fc1419e4
Rename some rz_list funcs to rz_list_XXX_val (part 1) (#5671)
* Rename rz_list_find_ptr() to rz_list_find_val()
* Rename rz_list_delete_data() to rz_list_delete_val()
2025-12-25 22:01:49 +08:00
Giovanni
266fe6b3c7
Split rz_core_get_boundaries_prot and rewrite the code. (#4724) 2024-11-19 12:51:26 +08:00
Giovanni
83980f04c6
Use st64 instead of int for rz_config_set_i_cb (#4704) 2024-11-08 16:05:51 +08:00
Rot127
9e2de0dd50
RzAsm/RzAnalysis pointer sharing changes before RzArch and Hexagon fixes (#4667)
* Attempt of passing pointers from RzAsm to RzAnalysis and wise versa.
* Refactor Hexagon module to make use of hacky pointer sharing.
* Refactor plugin specific configutations.
Because static values are no longer allowed, it has to be sure
that the 'user' pointer for the config value setter is always the plugin data.
So the plugin can change its internal state, according to the configuration value.
This was not possible before.
Also it adds a seperated hash map for plugin values. So they are logically more separated.

* Fix the whole pre-decoding logic for Hexagon.
Also resolves the problems with not knowing what is a valid instruction and which one not.
Leads to way more stability in decoding.

* Formatting and docs.
* Save utf8 flag to state to save memcpy.
* Fix inconsistency in function declaration.
* Fix token tests and fix hexagon plugin to handle none IO buffers.
* Fix test. Empty buffer before printing same instruction again.
* Assign state to rz_reverse struct so it can be passed o hex_get_il_op() in analysis_hexagon.c
* Rename and document alignment fields better.
* Add test for out of order packet decoding.
* Add ownership information
* Import relative headers.
2024-10-17 15:30:40 +08:00
Giovanni
db1e4993a0
Replace strdup with rz_str_dup (#4634) 2024-09-15 19:12:07 +08:00
pelijah
706a6bf6c2
sdb: remove unused cas and expire features (#4487) 2024-05-12 18:27:54 +08:00
pelijah
f818ca4296
Refactor sdb_foreach and related APIs (#4471)
* Refactor sdb_foreach and related APIs
* Strengthen bounds check in sdb_dump_next()
* Switch to RzPVector
* Use length info in filter_noreturn()
* Fix cmp function
* Remove unused sdb_like() API
* Pass SdbKv to SdbForeachCallback
* Add sdbkv_dup_value() helper
2024-05-07 07:57:52 +08:00
pelijah
f2d8e0db3d
Add HtSP, HtSS, HtSU, SetS (#4415)
- All `ht_*_new0()` are removed
- `freefn` field of HT options was renamed to `finiKV`
- `finiKV_user` fields was added to HT options
- Added `ht_*_new_opt_size` API
- `HtSP` and `HtUP` are created with `ValueFree` callback  that allows to reduce extra LOC and prevent bugs
- `SetP` replaced with `SetS` (based on `HtSP`)
- `rz_th_ht_*_new0()` and `rz_th_ht_*_new_opt()` are replaced with `rz_th_ht_*_new(HtXX *)`
2024-04-16 20:27:48 +08:00
Anton Kochkov
25fd417a28
Add user pointer to RzListComparator (#4204) 2024-02-11 13:28:33 +08:00
Riccardo Schirone
3b903caa96
librz: add some initial documentation (#3782) 2023-10-13 13:46:19 +08:00
wargio
cc08a23d03 Fix return types and args 2023-05-09 15:42:21 +08:00
Florian Märkl
6479bd53ab
Add missing project migrations tests up to v9 and fix leaks (#3205)
Even though many of the migrations were trivial, for all previous
versions X it is important to have both tests for X->X+1 migrations
and loading X in current rizin.
See leading comment in test_project_migrate.c for details.
Leaks detected by these tests were also fixed.
2022-11-27 09:39:10 +08:00
Florian Märkl
4e5857cacf
Meson refactor: collect modules in dict and centralize config (#2945)
Duplicated code for pkg-config and cmake configuration is avoided by
letting every rizin module register itself in a global dictionary
called "modules" which is then iterated in one place to perform any
shared logic, inspired by how qemu handles multiple targets in its meson
build system.

This is an almost pure refactor, so the resulting .pc/.cmake files
should be identical with the following exceptions:
- rz_reg.pc does not have plugindir anymore as rz_reg has no plugins.
- Some other modules have their dependencies in .pc files altered to be
  consistent with cmake.
2022-08-20 19:59:27 +02:00
wingdeans
a6a7a5f530 Fix annotation inconsistencies 2022-08-03 00:29:56 -04:00
Riccardo Schirone
8939fdbd7d
Use add_global_arguments instead of passing cflags/ldflags all around (#2812)
See also 66a0e22293/docs/TESTING_WITH_SANITIZERS.md (clang)
2022-07-17 21:33:51 +08:00
Riccardo Schirone
ce6ac3e467 meson: use major/minor only in the lib soversion 2022-05-10 21:04:43 +02:00
Riccardo Schirone
30cbd237d3 RzCore: save/restore bits and arch config values while printing 2022-04-07 16:41:54 +02:00
Rot127
628d04f713
Add RzConfig for asm plugins (#2488)
* Add function to add config node to config by `RzConfigNode*`
* Move `SET<NODE>` macros to `rz_config.h`
* Add un/set functions for plugin specific configs.
* Add RzConfig and node setter to hexagon plugin.
* Use plugins RzConfig to determine sdk syntax setting.
* Use plugins RzConfig to determine if numbers should be signed.
* Use plugins RzConfig to determine if immediate hash should be printed.
* Remove unused parameter `rz_asm`.
* Remove unused variable.
* Remove unused callback.
* Remove unused flags from `RzAsm`
* Fix asm tests: Add NULL check; Set correct sign in asm test.
2022-04-03 20:44:50 +08:00
Giovanni
bfec86a12e
Add option to install sigdb systemwise and custom user location for additional signatures (#2328) 2022-02-28 14:32:38 +01:00
Riccardo Schirone
6f40dfe493
Move remaining things from shlr/ to meson subprojects (#2126)
* Move binrz meson directives to binrz/ dir

* Move rizin-shell-parser to a subproject

* Move bochs to a meson subproject

* Move rzqnx to meson subproject

* Move winkd to a meson subproject

* Move rzar to a meson subproject

* Move rzw32dbg_wrap to a meson subproject

* Move ptrace-wrap to a meson subproject

* Move rzgdb to a meson subproject

* Rename w32dbg_wrap to rzw32dbg_wrap

* Update CODEOWNERS

* Remove old references to shlr

* Move shlr/heap stuff in core and remove shlr/arm

* Move spp to a meson subproject

* Remove last references to shlr

* Remove use_webui option

* Move include files directives to librz/include/meson.build

* Move librz meson directives into librz/meson.build

* Handle d/ directories inside the specific module meson.build

* Move plugins listing to specific module meson.build

* Move rzheap to its own subproject

* Fix js linter and licenses

* Use meson.override_dependency for all rz_ modules
2021-12-22 09:20:39 +08:00
Riccardo Schirone
47e1cb8335
Provide CMake config files for CMake projects (#2057)
* Remove wrong librz.pc.in file
* Add plugindir variable to .pc files to allow easy plugin configuration
* Add CMake config files to find Rizin in CMake projects
* Add CI jobs to check cmake files
* Provide workaround for mesonbuild/meson#9702
* Use .lib suffix and no prefix on MSVC to make CMake files work
* Disable cmake files on static libraries build
2021-12-17 09:16:25 +00:00
Khairul Azhar Kasmiran
906ece4211
Add asan build for clang (#1910) 2021-11-17 21:02:02 +08:00
Anton Kochkov
66bc96f06f
Various fixes RzCons, RzUtil, RzConfig (#1940)
* Fix CID 316906
* Fix CID 316025
* Fix CID 316354
* Fix CID 357820
* Fix CID 316852
* Fix CID 316944
* Fix CID 316836
2021-11-05 17:59:05 +08:00
Aswin C
dba3fb0197
Use PJ in config_print_node() (#1488)
* Remove `cb_printf` from `RzConfig`
* Rename `rz_config_list` to `rz_core_config_print_all`
* Remove `rz_cmd_eval` and run clang-format
2021-09-09 13:46:08 +02:00
Anton Kochkov
c319449fed Add some missing copyright marks 2021-03-08 15:33:54 +08:00
Riccardo Schirone
53bf5c497f SPDX Copyright text for all files based on history
- Add LICENSES directory
- Download additional licenses used
- Add .reuse directory
- Add doc about SPDX/reuse

Co-authored-by: Florian Märkl <info@florianmaerkl.de>
2021-03-05 19:39:15 +08:00
wargio
9a8b2bdb91 Fix #584 - Memleak 2021-02-11 19:23:37 +08:00
Anton Kochkov
337c310795 Use rz_config_get_b() API in disasm and visual 2021-02-03 22:32:08 +08:00
Anton Kochkov
cd84486c00 Use RZ_STR_ISNOTEMPTY vs IS_NULLSTR 2021-02-03 22:32:08 +08:00
Anton Kochkov
48d34e1571 Add rz_config_* API for booleans 2021-02-03 22:32:08 +08:00
Riccardo Schirone
cee8d470c2 Remove Makefiles and many related scripts 2021-01-28 11:57:28 +01:00
Anton Kochkov
a0be4e2e64 Run clang-format 2021-01-21 22:05:44 +08:00
Riccardo Schirone
15c8ce093f Improve error messages and don't print inside RzConfig 2021-01-05 23:33:32 -06:00
Riccardo Schirone
0abb2c8bfc Convert 'e' commands to newshell ##newshell 2021-01-05 23:33:32 -06:00
Maijin
2886a6f835
Remove unused callback.c (#261)
* Remove unused callback.c
* Remove missing entry from indent-whitelist.sh
* Remove callback.o

Co-authored-by: Maijin <maijin21@gmail.com>
Co-authored-by: Giovanni <561184+wargio@users.noreply.github.com>
2020-12-28 13:19:22 +08:00
Florian Märkl
da4703d757
Add Exclusions to RzConfig Loading (#223) 2020-12-21 14:26:31 +01:00
Giovanni
35a9ef94c9
Code and comments cleanup (#108) 2020-12-04 18:11:51 +08:00
Anton Kochkov
539f60a1a8
Rename radare to rizin (#68)
* Rename radare to rizin

- Rename REvent to RzEvent
- Rename RBreakpoint to RzBreakpoint
- Rename RRune to RzRune

* Remove unnecessary files
2020-11-04 18:56:27 +08:00
Florian Märkl
6572b63794
Use Standard SPDX Header Comments (#51) 2020-10-27 09:04:11 +01:00
Florian Märkl
4e18226c8d
Add new Projects Implementation (#12) 2020-10-26 15:17:33 +01:00
Anton Kochkov
1ef15faaee Rename R2DEPS to RZ_DEPS 2020-10-23 15:19:22 +08:00
Riccardo Schirone
7ceebc725e Mass renaming r2 to rz/rizin 2020-10-13 12:43:34 +02:00
Florian Märkl
0d536e1a89
Rename RPVector -> RzPVector 2020-10-02 16:32:35 +02:00
Riccardo Schirone
502e91aff7
Rename R_ and R2_ to RZ_ (#8)
* Rename R2_ -> RZ_
* Rename R_ -> RZ_
* Rename R2R_ -> RZ_TEST_
* Rename R2R defines and types to RZ_TEST/RzTest
* Keep R_ for REIL registers
2020-10-02 16:09:13 +02:00