* Optimize cmd_print tests
* Fix nullderef in bfile_string.c and optimize cmd_i
* Disable esil runs on appveyor
* Fix obviously wrong time scale in rz-test
* Add more info about -e option when in log mode or verbose
This allows to test for assembly characteristics which are only valid in a certain context.
Here we also fix a bug in rz-asm, which didn't incremented the address before disassembly.
Adds the core implementation of the new search.
The rough architecture is the following:
A search for a certain type of information (strings, bytes, keys etc.)
creates a collections of items to search for (byte patterns, regular expressions etc.).
Then specifies some settings how the search (number of threads, maxum hits...)
and the finding is performed (string length, inverse match etc.).
It also defines a search space, which is currently only the IO buffer.
But can be anything in the future, like a graphs or the knowledge base.
The search splits up the search space into windows (for IO: address ranges)
and dispatches each search window into a 'find()' thread.
The 'find()' handler (provided by a specific search implementation)
checks the given window and produces search hits matching the elements in the search collection.
The main search handler collects the hits of the dispatched workers
and returns them to the user.
Note: The byte and string search implementations are added in the next two commits.
Part 6/9. Likely won't build in between parts.
Co-authored-by: wargio <deroad@kumo.xn--q9jyb4c>
* Revert "rz-test: Set default test dir to '.' (#4741)"
This reverts commit 9051d00b25.
* Add comment for rz_test_chdir()
* Add comment for rz_test_chdir_fromtest()
- 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 *)`
* Replace OpenBSD regex library with PCRE2.
PCRE2 has way better performance than the OpenBSD
library (something around 20 times faster).
The following flags are enabled for every pattern:
- PCRE2_UTF
- PCRE2_MATCH_INVALID_UTF
- PCRE2_NO_UTF_CHECK
All the others are optional.
Changes made:
- Adds PCRE2 as subproject.
- Changes the API away from POSIX to PCRE2.
- Edits many regex patterns because:
- ' ' is skipped in patterns, if the EXTENDED flag is set for matching. '\s' must be set now.
- '.' doesn't match newlines by default.
- Changes the API so matches and their groups are bundled into PVectors.
- Moves the regex component to rz_util.
* Fix cross build - add copy of PCRE2 dependecy
Meson currently doesn't support subprojects to be native and non-native at the same time.
See: https://github.com/mesonbuild/meson/issues/10947
Unfortunately, sdb depends on rz_util which in turn depends on PCRE2.
Excluding PCRE2 from the native build makes linking of rz_util not possible anymore.
Adding it, will make Meson complain that the dependencies cannot be mixed.
Hence, we compile a copy of PCRE2 for the native build if required.
Adds /*<type>*/ comments and a linter check from rz-bindgen to enforce
their existence and consistency
Also includes the following fixes made when adding the annotations:
* removed unused intern_table arguments in pyc_dis.c, pyc_dis.h, asm_pyc.c
* removed unused classes argument from place_nodes in agraph.c
* removed unused recurse and recurse_bb functions in canalysis.c
* removed unused vars field from RzPrint struct
* removed unused RzAnalysisType* structs from rz_analysis.h
* removed unused list field from RzEgg struct
* fixed bug in bp_plugin.c where duplication-checking logic iterates over the wrong list
* removed unused q_regs field from RzDebug struct
* removed unused backtrace field from RzDebugPlugin struct
* removed unused classes_list field from RzBinNXOObj struct
* removed unused methods_list and classes_list fields from RzBinZimgObj struct