Using Q_GLOBAL_STATIC meant that the CutterCore was destructed late as
part of a binary destructor. It would then free the RzCore, calling for
example the fini callbacks of all plugins. However global destructors in
shared library plugins may have already been run at this point, leading
to for example rz-ghidra's decompiler_mutex being used after
destruction.
Instead of the Q_GLOBAL_STATIC-managed global object, we are now
handling the lifetime of the CutterCore ourselves and only injecting its
instance to be accessed globally. This can also be a first step towards
making the core instance completely local.
* Convert `iCj` call to the API
* Convert `icj` call to the API
* Convert `iij` call to the API
* Convert `iej` call to the API
* Convert `CClj` call to the API
* Convert `iEj` call to the API
* Convert 'ihj' call to the API
* Convert 'iSSj' call to the API
* Download and install sigdb option and disable swift demangler when libswift is installed
* Remove dir.prefix and use rz_core_analysis_sigdb_list for sigdb
* Use a different color for flirts
* Updated to rizin dev
* Use rz_path_set_prefix to set the prefix path on OSX bundle
This improves how the installed CutterConfig.cmake can be used for
native plugin development:
* Transitive dependencies are resolved automatically
* Version file is included
* Cutter_USER_PLUGINDIR is set to a path that plugins can use as a
default install destination
src/plugins/sample-cpp/CMakeLists.txt is an example for how to use it.
Rizin was also updated to prevent an error with multiple
`find_package()` calls.
This also avoids annoying "ERROR: No function found in ..." beging
printed by afvj when right-clicking anywhere outside a function.
The heuristics in functionIn() also have been adjusted to prefer the
function that has its entrypoint at the given addr, if there is any.
This also introduces a slight behavioral change: Previously, only the
core file with the "raised" io desc was checked, which is RzIO.desc. But
that member is deprecated for good reasons, so now we just check if
there is any core file whose primary fd has write enabled.
The views showing this info have been removed in the past, so it was
unused. This also fixes some errors with latest rizin where
zero-argument f does not exist anymore (it's now fl).
API usage has been adjusted.
There are now also cmake config files directly installed by Rizin itself, so we don't need to keep a custom FindRizin.cmake file in Cutter. This remove that file and just uses `find_package(Rizin COMPONENTS Core)`, which will use the cmake files installed on the system.