Commit graph

165 commits

Author SHA1 Message Date
Giovanni
4ffdf2766d
Bump libdemangle (#3743) 2023-08-10 21:51:52 +08:00
Anton Kochkov
3278ec77d0
ci: use clang-format from LLVM 16 (#3696)
Co-authored-by: wargio <wargio@libero.it>
2023-08-01 09:11:26 +08:00
Anton Kochkov
dd6c3a6437 Update Tree-Sitter C grammer 2023-07-23 19:04:05 +08:00
Anton Kochkov
07747e2ba8
Update rz-libdemangle (#3680) 2023-07-21 13:01:23 +08:00
Giovanni
8f2eb45b84
Add bin.demangle.flags to allow users to simplify or not mangled strings (#3659) 2023-07-17 23:31:09 +08:00
billow
e456c60e20 Fix tests for capstone v3/v4/v5
Co-authored-by: wargio <wargio@libero.it>
2023-07-16 13:22:47 +08:00
billow
6e57bf6261 Adding new cs-based tricore analysis and asm plugin 2023-07-16 13:22:47 +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
Giovanni
09ec12d607
Update libdemangle to 2c90eaa (#3614) 2023-06-29 13:53:22 +08:00
Giovanni
3ba4118615
Update blake3 commit (#3586) 2023-06-18 14:54:28 +08:00
Anton Kochkov
3f18c11609
Update capstone project URL (#3580)
Co-authored-by: yossizap <yossizap@gmail.com>
2023-06-16 15:33:44 +08:00
billow
6eb14128ad
Adding tricore support for rz_debug_plugin_gdb (#3557) 2023-06-06 12:53:51 +08:00
Giovanni
0efc031365
Bump libdemangle version (#3558) 2023-06-06 12:18:43 +08:00
wargio
c85b1afa4c Rewrite how bins are loaded into RzBinObject
This commit rewrites completely how RzBinPlugin are used to load info
into the RzBinObject structure.

Main changes are:
- Avoid looping multiple times to set the same data:
  now the data is cycled only once to rebase addresses, demangle strings
  and to make each loaded structure similar to each other.

- rz_bin_demangle is now demangling only strings:
  the old implementation was a hack over a hack to add classes & methods
  into the RzBinObject while demangling a string.
  This allowed methods and classes to be added to RzBinObject when for
  example invoking `is` or other printing commands.
  This was meant to be an "optimization" to avoid looping and doing
  things on-the-fly.

- Now the demangling is done after guessing the language used in the bin.
  This is done to avoid looping to various demanglers hoping that a
  string is going to be correctly demangled.
  After each string is demangled, the string is given to the language
  related function which adds classes, methods and fields into the
  RzBinObject fields.

- Swift handling is a special case, since the demangler can be disabled
  via -Duse_swift_demangler.
  The issue with the swift demangler is that is not correctly demangling
  strings and outputting swift code, but instead is creating something
  that sometimes works, sometimes doesn't.
  Also the old code only added fields and never methods for "reasons",
  and the new code just uses what the old code was doing as is.

- The new code also takes advantage of the language detection, which now
  happens before the demangling of symbols, imports and relocs.
2023-06-01 23:16:09 +08:00
wargio
cc08a23d03 Fix return types and args 2023-05-09 15:42:21 +08:00
Riccardo Schirone
29623e19a6 subprojects/libzip: patch zip_win32_file_operations 2023-05-09 09:31:56 +08:00
Riccardo Schirone
71c9a7f07b subprojects/xz: update to 5.4.3
Recently builds on Windows are failing due to intrin.h being required
for some functions. This has been fixed in the new 5.4.3 release.
2023-05-09 09:31:56 +08:00
Giovanni
9339ad128f
Bump rz-libdemangle version to fix windows build (#3490) 2023-04-26 22:19:36 +08:00
Giovanni
616c63e4cc
Bump libdemangle version (#3487) 2023-04-26 12:49:37 +08:00
Giovanni
29c1aa8187
Demangle rust and add classes/methods and bump lib version (#3481) 2023-04-24 23:55:50 +08:00
Giovanni
f115011642
Bump version of libdemangle to support Delphi C++ (#3472)
* Bump version of libdemangle to support Delphi C++
* Removed some WITH_GPL barriers.
2023-04-20 15:05:36 +08:00
Giovanni
7670834a9c
Update libmspack to v1.11 (#3468) 2023-04-18 17:23:18 +08:00
Siddharth Mishra
9ab709bc34
Improve cmd_help.yaml and fix random number generator (#3452)
* Improve cmd_help.yaml and fix a small bug
* Add support for 64bit random numbers
* Make a distinction between 32- and 64-bit PRNG
* Add documentation for new functions
* Change the RBTree test to use 32-bit random numbers
2023-04-07 20:22:01 +08:00
brightprogrammer
16e722cffc
Replace rz_core_cmd0 calls in tui/panels.c and port cmd_help commands to RzShell as cmd_math (#3421) 2023-03-30 18:36:48 +08:00
Giovanni
c7dfbbcdcd
Fix ar naming and io read/write api (#3419) 2023-03-10 06:21:39 +00:00
Giovanni
eb3f7f80c5
Fix archive file io plugin (#3417)
* Fix loading .lib/.a files
* Add windows lib test for ar:// uri
2023-03-10 08:13:26 +08:00
Giovanni
8d46a25203
Updated libmspack to latest commit (#3349)
Fixed url for lz4 dep
2023-02-05 13:23:02 +08:00
Anton Kochkov
8bd0d3356d Update xz (liblzma) to 5.4.1 2023-02-02 13:50:52 +08:00
Anton Kochkov
d765127a33 Update liblz4 to 1.9.4 2023-02-02 13:50:52 +08:00
Anton Kochkov
a68be33f38 Update zlib to 1.2.13 2023-02-02 13:50:52 +08:00
Anton Kochkov
0ffa5e3233 Update tree-sitter to 0.20.7 2023-01-31 19:06:55 +08:00
Riccardo Schirone
c4767cf1ac
Fix plugin removal and clean code (#3277)
* cmd: Fix summary of few "L" sub-commands
* util: start decluttering plugins handling

- Add Doxygen docs
- Remove unused API functions and make others internal only
- Use RzLibType enum for plugin type instead of int

* util: move dlopen/dlsym/dlclose to rz_sys
* util: make rz_lib_open/close return bool
* util: simplify rz_lib_add_handler and rz_lib_open*
* libs: implement rz_*_plugin_del to remove a plugin
* core: remove commands from RzCmd when removing plugins
* librz: call plugins 'fini' method when removing a plugin
* core/cmd: do not fail if the hashmap removal fails

When removing a group command, the inner command might have the same
name, thus it would result in trying to remove the same name twice.
Ignore it, as it is fine.

* librz: make RzCrypto plugins handling like the others
* librz/crypto: add rz_crypto_reset and use it
* librz: allocate the plugin structures before adding them
2023-01-16 13:32:46 +01:00
Giovanni
55e690990b
Fix endianness for win pagedump and winkd (#3204) 2022-12-09 11:41:28 +01:00
wargio
bc5eb09782 Removed rzbochs 2022-12-04 16:53:58 +01:00
Anton Kochkov
33b2c6362e
Fix debugless build on E2K (Elbrus) platforms (#3165) 2022-11-06 21:08:09 +08:00
Giovanni
e453f8ba76
Use only x64 for optimizations and portable for x86 (#3135) 2022-10-27 15:14:03 +02:00
Giovanni
5168303b6d
Update blake3 to use cpu extensions (#3108) 2022-10-26 23:27:08 +02:00
Khairul Azhar Kasmiran
f3a4200c4e
Fix gcc12-asan mpc -Wformat-overflow= warnings (#3081) 2022-10-09 18:54:08 +08:00
Giovanni
5b1e5e6762
Support blake3 hash algo (#3030) 2022-09-17 18:38:21 +02:00
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
ade374378e
Add free-pascal demangling support (#3011)
* Add free-pascal demangling support
* Fixed tests
2022-09-06 10:39:58 +08:00
Khairul Azhar Kasmiran
f09d8e0ee4
Fix gcc12 rzgdb -Wuse-after-free warning (#3004) 2022-09-04 13:45:48 +08:00
Giovanni
3752e24b98
Update rz-libdemangle (#2984) 2022-08-27 02:35:07 +02:00
Riccardo Schirone
9ba89d8116 core/cmd: rewrite rz_cmd_macro API 2022-08-26 07:53:43 +08:00
Anton Kochkov
fe1af40ad2 Update libdemangle.wrap 2022-08-24 22:08:34 +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
Riccardo Schirone
efdafde7da Remove sdb.wrap file 2022-07-19 11:46:35 +02:00
Riccardo Schirone
6c665c6098 Use Rizin specific macros instead of the ones from SDB 2022-07-17 12:11:13 +02:00
Riccardo Schirone
0c9b295dd9
lzma: fix compilation on s390x (#2801) 2022-07-11 19:54:59 +08:00
Riccardo Schirone
3363579337 Update libzip to v1.9.2 2022-07-04 19:05:50 +08:00