Commit graph

17 commits

Author SHA1 Message Date
wargio
fbad0b4859 Remove agd and add rz_analysis_similarity/match + refactoring
- Introduce the following new methods:
  * `rz_analysis_similarity_basic_block()`
  * `rz_analysis_similarity_function()`
  * `rz_analysis_similarity_basic_block_2()`
  * `rz_analysis_similarity_function_2()`
  * `rz_analysis_match_basic_blocks()`
  * `rz_analysis_match_functions()`
  * `rz_analysis_match_basic_blocks_2()`
  * `rz_analysis_match_functions_2()`
- Remove `RzAnalysisDiff` and its usages
- Remove `librz/analysis/diff.c` entirely to and adds `librz/analysis/similarity.c`
- Remove a lot of unused structures and simplified the code by a lot
- Fix typo in levenshtein
- Remove `librz/core/gdiff.c` and `gdiff` functions since they were unused or only used in rz-diff
- Remove `difftype` (or "color") from `RzANode` which lead to dead code
- Decrease serialized data in projects.
- Add `RzAnalysisVarKind` and `RzAnalysisVarType` and replaces all the hardcoded values
- Remove command `agd`
- Remove all `rz_core_gdiff` usages from `rz_core.h`
- Refactor `rz_analysis_var_list` and `rz_analysis_var_count` due unused argument (`RzAnalysis` was not used)
- Add new method `rz_analysis_var_count_total` to simplify some usages
- Remove `rz_core_graph_diff`
- Add `typedef RzAnalysisFcnType` on `enum``used for function types
- Remove unused `RZ_ANALYSIS_FCN_VARKIND_LOCAL`
- Remove from `RzAnalysisFunction` the following variables:
  * `fingerprint`
  * `fingerprint_size`
  * `diff`
  * `diff_ops`
  * `diff_thbb`
  * `diff_thfcn`
- Remove from `RzAnalysisBlock` the following variables:
  * `fingerprint`
  * `diff`
- Remove `RZ_ANALYSIS_THRESHOLDBB` and `RZ_ANALYSIS_THRESHOLDFCN`
- Remove the following callbacks from `RzAnalysisPlugin`
  * `RzAnalysisDiffBBCallback`
  * `RzAnalysisDiffFcnCallback`
  * `RzAnalysisDiffEvalCallback`
- Fix fancy table columns/rows when a color string is in a cell
- Bumped project version to 9
2022-10-04 20:02:35 +02:00
Riccardo Schirone
27e0d7ae82
RzBin: improve handling of addresses in ELF (#2591)
* RzBin/ELF: avoid the creation of useless flags at 0

Use UT64_MAX as an error value for addresses like symbols, imports,
sections, etc., and do not create flags for those because they are not
meaningful. This is useful for imports that do not have an address in
the virtual/file space and for non-alloc sections (e.g. .comment).
2022-05-10 10:17:35 +08:00
Peiwei Hu
5fa722efab
Refactor RzTable: change the implementation to RzVector (#2536) 2022-04-13 00:57:52 +08:00
Anton Kochkov
d6d214572f
Revert "Refactor RzTable: change the internal storage to RzVector (#2421)" (#2517)
This reverts commit 1748b38ce1.
2022-04-08 18:06:20 +08:00
Peiwei Hu
1748b38ce1
Refactor RzTable: change the internal storage to RzVector (#2421) 2022-04-07 21:13:34 +08:00
Anton Kochkov
2f638cad1e Convert f commands to rzshell
* Changed behavior of `f` to only add flag if there is none
* Changed behavior of `f+` to add flag in any case
* Moved listing subcommands from `f` to `fl`
* Moved listing subcommands from `f.` to `f.l`
* Added subcommand `f.l*` to list all local flags in all functions
* Listing flags at the current offset became `fl.`
* Moved `f=` to `fl=`
* Old `fl` (flag length) now became `fL`
* Removed original `fe` commands
* Old `f?` (check if flag exists) now became `fe`
* Removed `fV` commands
* Removed `fn` commands in favor of `fl` and `asm.flags.real=true`
* Removed `fS` commands (`fSo` and `fSn`)
* `fo` became `fortune` and moved from "flags" to "shell" category
* Removed oldshell handlers of the `z` commands
2022-02-03 21:46:42 +08:00
Riccardo Schirone
afc635f6d1
Convert om commands to rzshell (#2192)
* removal of `omo` command
* use of `oml`, `oml.` and `oml=` to list maps instead of `om`
* removal of RIZIN output from `oml`
* removal of `omn.` and just assume `omn` uses core->offset
2022-01-11 17:29:20 +01:00
Paul I
5914b79982
Convert afl/afi commands to rzhell (#2040)
* Convert afl/afi commands to rzhell
* Reuse code
* Update tests
2021-12-14 17:49:16 +08:00
GustavoLCR
c9acf440cf
Reorganize map skyline segments 2021-08-03 22:44:38 +08:00
Riccardo Schirone
c8c98ecce3
Full table header line (#1239)
* Fully print last column header separator
* Fix table unit tests
* Fix tests
2021-06-28 17:25:25 +08:00
Florian Märkl
58433a72ac Remove now-obsolete io.cache check for ELF Reloc Patching and add more Tests 2021-05-17 17:23:19 +08:00
Khairul Azhar Kasmiran
541d45a752
Fix omtq wrt new table syntax (#1085) 2021-04-28 15:35:58 +02:00
Khairul Azhar Kasmiran
61e6b898f5 table.c: On no op, print column named (new syntax) 2021-04-28 11:25:35 +08:00
Khairul Azhar Kasmiran
371081a0df
table.c: Add ge and le operators (#1073) 2021-04-23 22:57:08 +08:00
Riccardo Schirone
71a0d66cf8 Use : as separator for table query/format
The idea is that we will move all command specifiers to `:`.
2021-04-21 15:26:35 +02:00
Khairul Azhar Kasmiran
ada5be6b28 Do not skip blank lines in ~:s..e (#17872) ##cons 2020-11-03 11:49:26 +08:00
pancake
7c76d85031 Add tests for RTable using r2 commands 2020-09-24 17:19:25 +02:00