Commit graph

14 commits

Author SHA1 Message Date
Dean
59b38e6efa
Add /*<type>*/ comments everywhere (#2986)
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
2022-09-11 13:04:53 +08:00
Giovanni
c89b12a046
Removed plenty of eprintfs in rz_core (#2950) 2022-08-29 00:32:17 +08:00
wingdeans
a6a7a5f530 Fix annotation inconsistencies 2022-08-03 00:29:56 -04:00
billow
aaf08869cf
Expose APIs (#2710)
- `rz_core_bin_get_compile_time`
- `rz_core_analysis_coverage_count`
- `rz_core_analysis_code_count`
- `rz_core_analysis_calls_count`
- `rz_core_sym_name_init`
- `rz_core_sym_name_fini`
- `rz_core_sym_is_export`
- `rz_core_bin_whole_strings`
- `rz_core_analysis_coverage_count`
- `rz_core_analysis_code_count`
- `rz_core_analysis_calls_count`
- `rz_core_analysis_esil_deinit`
- `rz_core_analysis_esil_init_mem_del`
- `rz_core_types_as_c`
- `rz_type_list_c_nl_handler`
- `rz_core_file_open_load`
- `rz_core_config_in_space`

-  rename `SymName` -> `RzSymName`
2022-06-21 10:49:42 +08:00
wargio
d0fed4d590 Added doxygen to rz_core_theme_list 2022-06-03 20:26:52 +02:00
Riccardo Schirone
78bbf5ba80
RzCore: remove as many #include .c as possible in cmd.c (#2378) 2022-03-17 10:30:57 +08:00
Anton Kochkov
538ffe3739 Convert fs commands to rzshell 2022-01-15 09:11:40 +08:00
Riccardo Schirone
64469f2811
Changes in how paths are handled (#1997)
* Remove `RIZIN_EXTRAS` because useless

Extras plugin should be treated as any other regular plugin, they should
not have their own directory. I believe we did not have anyway any
plugin using that directory.

* Do not use `<version>` in `/usr/share`

Users can only install one version of Rizin at a time anyway, thus
splitting the `/usr/share/rizin` directories does not really bring
multi-version install possible. At the same time, we stick to what's
common for other tools, which do not use version in `/usr/share`

* Move plugin directory to `/usr/lib64/rizin/plugins`
* Remove `RZ_HOME_BIN` env var because not useful anymore
* Introduce `rz_util/rz_path` to provide rizin paths
* Use `rz_path_system_sdb_types` whenever it makes sense
* Use some others `rz_path_*` functions instead of custom ones
* Use `rz_path` APIs for themes, fortunes and signatures
* Remove `rz_sys_prefix`
* Reduce the number of defines needed to handle home and system paths
* Reduce the number of `rz_path` functions
* Make the lib debug depending on log level and `RZ_LOG_DEBUG`
* Refactor a bit how directory of plugins are loaded
* Keep supporting old plugins directory for at least 0.4.0
2021-11-30 13:36:38 +08:00
Dhruv Maroo
4295cfe046
Fix memleaks in RzIL and Core (#1974) 2021-11-26 16:26:01 +01:00
Aswin C
4ec188d219
Refactor APIs related to themes and remove global variables from cmd_eval (#1879)
* Refactor `rz_core_theme_nextpal()`

* Add tests for `ecp`, `ecn` and `ecoj`

* Add braces to avoid declaration after the label

* Use `RzCmdStateOutput` in `eco`

* Fix the output of the test for `ecoj`

* Introduce `RzConsPalSeekMode` and refactor `nextpal_item`

* Rename the APIs related to themes

* Rename `rz_core_get_theme` to `rz_core_theme_get`
* Rename `rz_core_load_theme` to `rz_core_theme_load`
* Rename `rz_core_list_themes` to `rz_core_theme_list`

* Add `curtheme` to `RzCore`

* Eliminate all global variables in cmd_eval.c

* Put the loop outside the `switch` in
  `rz_cmd_eval_color_load_theme_handler`
* Remove `getNext` variable and use the `RzListIter`'s `p` variable

* Sort the list of loadable themes

* Use a normal `strcmp` as the comparator function while sorting themes
2021-10-29 20:25:00 +08:00
Anton Kochkov
91ef6da7ad
Various memleak fixes (#1893)
* Fix CID 361180
* Fix CID 359879
* Fix CID 358574
* Fix CID 358570
* Fix CID 358569
* Fix CID 358559
* Fix CID 354016
* Fix CID 352581
* Fix CID 352498
* Fix CID 352484
* Fix CID 352451
* Fix CID 348953
* Fix CID 348937
* Fix CID 348935
* Fix CID 344518
* Fix CID 316930

Co-authored-by: Riccardo Schirone <ret2libc@users.noreply.github.com>
2021-10-27 16:32:45 +08:00
Dhruv Maroo
48656fdb80
Port shell commands to new shell (#1875)
* Create new category for shell commands in new shell
* Port `env` and `exit`
* Port `ls`, `rm`, `sleep`, `uniq`, `uname` to new shell
* Rename `cname`s for shell commands
 * Port `cp`, `cp.` and `echo`
* Port `cd` to newshell
* Add `~` (paths relative to home) handling in `rz_sys_chdir`
* Add `RZ_NONNULL` for `rz_sys_chdir`
* Port `cat`
* Port `mv` and `mkdir` to new shell; Remove old handlers
* Port `pwd`
* Port `sort`
* Remove `cp.` command
* Add `RZ_NONNULL` for arguments of `rz_syscmd_*` functions
* Port `cls` and `clear`
* cd to home when no argument provided
* Fix `mkdir`
* Add alias handling for `cat`
* Fix `mv` command
2021-10-26 12:04:24 +08:00
Aswin C
54b6e53feb
Convert ec to the rzshell (#1809)
* Convert `ec` to the rzshell
* Port the `echo` command
* Make the `color` argument optional for `ecHw`
* Remove `rz_core_echo`
* Make `echo` a part of `e` commands
* Add tests for `eco` and `ecHw`
* Move the definition of `bool2status` to `cmd_eval.c`
* Fix `ecHj` and add a test for it
2021-10-22 13:33:35 +08:00
Anton Kochkov
036f1490d0 Move command handlers to librz/core/cmd 2021-10-18 18:00:17 +08:00
Renamed from librz/core/cmd_eval.c (Browse further)