Commit graph

255 commits

Author SHA1 Message Date
billow
8e29b959b8 DWARF improve DWARF5 support and refactor
- `RZ_PROJECT_VERSION` 14
- Add `RzCallable`.has_unspecified_parameters
- Add `RzAnalysis`.debug_info
- Add `RzAnalysisVarStorageType` composite and `eval` `pending`
- Support for parse DWARF section "debug_loclists", "debug_ranges", "debug_rnglists"
- Partial support for eval DWARF expr_loc
- Support for anonymous Type, function variable, struct member
- Cache all DWARF information in `RzAnalysisDebugInfo` and remove `SDB` based caching.
- Add arm32, arm64, TriCore DWARF register name
- Fix same name basetype
2023-08-25 23:32:05 +08:00
Riccardo Schirone
3dce9c0563
util, cmd: fix rz_rand64 and %r (#3742) 2023-08-10 18:06:52 +08:00
Anton Kochkov
7febd38e9d
Bump version to v0.7.0 (#3725) 2023-08-04 17:14:15 +08:00
Anton Kochkov
d497840b07
meson: reduce code duplication (#3707) 2023-08-01 16:45:09 +08:00
yossizap
4aadd18f7e Set the default capstone version to v5 instead of v4
Co-authored-by: wargio <wargio@libero.it>
2023-07-16 13:22:47 +08:00
billow
ff6817e084 Fix multiple memory leaks 2023-06-05 22:41:20 +08:00
Riccardo Schirone
478f74a95e build: Introduce EXTRA_PREFIX for loading plugins/resources from another path 2023-05-19 16:42:35 +02:00
Anton Kochkov
300fc28925 Remove dead code in RzUtil alloc 2023-03-01 11:12:03 +08:00
Anton Kochkov
7f6f9049a2
Bump version to v0.6.0 (#3369) 2023-02-16 09:30:58 +08:00
Rizan
bbc5457b7a
Use compiler intrinsics for rz_swap_* functions (#3300)
* Using `__builtin_swap*()` whenever available instead of `rz_swap*()`
* Moved `test_endian()` from test_utils.c to test_endian.h
* Added test cases
2023-01-22 21:30:21 +08:00
Riccardo Schirone
eaec1a8893
build: fix BINDIR_DEPTH computation on Windows (#3075)
Before there was a special case for the root dir and it was implemented
by using `os.sep` as the representation for the root. That did not work
on Windows. This commit rewrite the BINDIR_DEPTH computation's logic to
use Path objects instead.
2022-10-09 10:14:36 +08:00
Giovanni
5b1e5e6762
Support blake3 hash algo (#3030) 2022-09-17 18:38:21 +02:00
Florian Märkl
06ee5e3aaf
Replace meson cmake module usage by plain configure_file() (#2948)
As due to https://github.com/mesonbuild/meson/issues/9702 we are not
using the expansion of @PACKAGE_INIT@ anyway, the cmake module provides
little additional value over a plain configure_file().
More importantly, by not using it, we get full support for muon, which
does not implement the cmake module yet.
2022-08-21 22:01:54 +08:00
Khairul Azhar Kasmiran
54508aee39
Rename rz_version.h.in to rz_build_version.h.in (#2914) 2022-08-13 22:20:36 +08:00
Khairul Azhar Kasmiran
801567c0b7
Move gittip to share/rizin (#2907) 2022-08-11 23:13:38 +08:00
GustavoLCR
c40744eba4
Fix Windows cross build (#2897)
* Fix build without ZLIB
* Fix cyclic include when cross-compiling
* Fixes `rz_util/rz_version.h`->`rz_types.h`->`rz_userconf.h`->`rz_util/rz_version.h`
2022-08-10 21:49:17 +08:00
Khairul Azhar Kasmiran
dc8cd44db4
gittip: Use subprocess.PIPE instead for Python 3.6 compatibility (#2873) 2022-08-06 21:21:07 +08:00
Florian Märkl
b85636317c Drop libuv dependency
libuv was only ever used for the tcp server for almost 4 years. Since
the non-libuv implementation of that is working now, it can be dropped
entirely without sacrificing functionality.
2022-08-06 13:20:52 +02:00
Khairul Azhar Kasmiran
2588aa8a1a
gittip: Use Meson's capture: true for Python 3.6 compatibility (#2869) 2022-08-04 22:37:58 +08:00
Riccardo Schirone
95ea48f537 build: use meson.current_source_dir() instead of '.'
build: remove special code if rizin is compiled as subproject
2022-08-04 11:48:21 +02:00
Khairul Azhar Kasmiran
fc24887c5c
Update on every build the git hash shown by rizin -v (#2863) 2022-08-01 23:28:34 +08:00
GustavoLCR
d3446789c7 Windows: Various fixes
* Fix some XP incompatibility
* Use wide version of APIs
* Remove unused/unnecessary function pointers
2022-07-24 21:00:51 +08:00
GustavoLCR
1b144864a9 Windows: Refactor environment variables
* Implement `rz_sys_clearenv()`
* Use the CRT function `_wputenv_s()` and `_wdupenv_s()`
* Fix `rz_sys_set_environ()`
2022-07-24 21:00:51 +08:00
Riccardo Schirone
a689f0a86e librz: refactor a bit how plugins are built
Rely on RZ_ARRAY_SIZE to add librz plugins instead of NULL terminators.
2022-07-20 22:04:02 +02:00
Riccardo Schirone
fd3a79f9e3 bin: remove Ldr plugins
RzBinLdrPlugins were not used. There was just one for Linux, but it was
not doing anything.
2022-07-20 22:04:02 +02:00
Riccardo Schirone
faac2436b1 Move SDB into RzUtil
* Make SDB code SPDX compliant
* Use some RzUtil functions inside SDB

util: compile natively without any extra dependency
2022-07-19 08:45:20 +02:00
Riccardo Schirone
33974fccc8 util: make zlib dependency optional 2022-07-18 08:39:11 +02: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
6c665c6098 Use Rizin specific macros instead of the ones from SDB 2022-07-17 12:11:13 +02:00
Khairul Azhar Kasmiran
0603a78871
meson: Remove unused version_commit (#2808) 2022-07-14 23:09:49 +08:00
Khairul Azhar Kasmiran
b79201b49a
Remove RZ_BIRTH (#2803) 2022-07-13 17:01:42 +08:00
Anton Kochkov
481f7f5b56 Set default warning level 1 for Meson 2022-07-07 18:08:57 +08:00
Riccardo Schirone
395c2d745d build: keep using meson 0.55.0 functions 2022-07-04 19:05:50 +08:00
Riccardo Schirone
98acbb041a build: use gnu99 globally instead of per-project 2022-07-04 19:05:50 +08:00
Khairul Azhar Kasmiran
1b688fa89e
Meson: Simplify crca_crc hash plugin summary output (#2767) 2022-07-03 09:59:43 +08:00
Riccardo Schirone
2f1e39818e Add liblzma subproject 2022-07-02 10:12:26 +02:00
Giovanni
ea02b0d25f
Remove zignatures and move aaF[l] -> F[al] , zf[sdc] -> F[sdc] (#2682) 2022-06-29 07:49:43 +08:00
Riccardo Schirone
2987e035da hash: use RzHash in most hash APIs 2022-06-28 21:55:26 +08:00
Giovanni
648882d544
Add libmspack and add idpx to extracts compressed pdb (#2728)
* Add libmspack, cabextract and add idpx to extracts compressed pdb
* Remove cabextract from CIs since it is not anymore required.
2022-06-27 23:52:07 +02:00
Riccardo Schirone
d4a2a28bd5 build: check for 'backtrace' presence in meson 2022-06-24 13:30:50 +08:00
Riccardo Schirone
64677f1a01 Bump version to v0.5.0 for development 2022-06-08 10:09:55 +02:00
Riccardo Schirone
fdd7c6200c
Fix compilation on Termux and Haiku (#2671)
* build: fix compilation on Termux by using meson checks
* build: fix compilation on termux, which is recognized as linux

meson identifies termux as "linux" system, however pthread_sigmask is
not available there. Since pthread-fixes.c just defines
uv__pthread_sigmask we include it also in regular linux builds, because
the function is then used automatically instead of pthread_sigmask only
when __ANDROID__ is defined.

* subprojects/rzwinkd: define cc in meson.build before use
2022-06-07 23:44:41 +02:00
Riccardo Schirone
f65aa8add6 build: fix bindir_depth calculation 2022-06-02 08:27:53 +08:00
Riccardo Schirone
72c29e83d5 RzUtil: fix rz_path_prefix in case of portable build
Before this patch the function was using RZ_PREFIX even when IS_PORTABLE
was set, making the function not working well because RZ_PREFIX might
not exist in the system where the portable build is used (the path was
passed to realpath(), which requires an existing path).

This patch fixes the problem by searching for the BINDIR without using
realpath() on the RZ_PREFIX. Moreover, it avoid retrieving the same
prefix every time by saving it in a global variable.

* Add rz_constructor.h to allow defining constructors/destructors on
  multiple compilers.
2022-05-31 23:32:52 +08:00
Riccardo Schirone
ce6ac3e467 meson: use major/minor only in the lib soversion 2022-05-10 21:04:43 +02:00
David CARLIER
d964f85564
rz_file_copy use copy_file_range (linux only) (#2570) 2022-04-29 11:03:12 +02:00
Nicolas Jeker
cb9e96679e
Fix build with use_sys_tree_sitter (#2562) 2022-04-28 01:38:03 +08:00
GustavoLCR
53de45300c
Normalize paths on Windows (#2485, Fix #2124) 2022-04-03 07:44:01 +00:00
Riccardo Schirone
3fd578ef7a build: use run_command(..., check: false) as return code is used
run_command(..., check: true) was introduced because of a breaking
change in newer meson versions
(https://github.com/mesonbuild/meson/issues/9300), however Rizin uses
the return code to see if the subproject is in the right state or not.

Revert back to check: false, so that meson will not fail and we can
detect the failure in our meson.build files.

Signed-off-by: Riccardo Schirone <sirmy15@gmail.com>
2022-03-29 16:53:15 +02:00
Riccardo Schirone
57a5ab5d0b Keep targeting meson 0.55 2022-03-25 17:43:56 +01:00