* 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
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
This fixes the following minor issues:
* Errors like "Cannot create flag (...) because there is already (...)
flag" during debug startup
* Unnecessary seeks during .dm* causing io reads and e.g. delays of up
to 5s on x86 macOS during debug startup
* Flags are now created in the "maps" flagspace, rather than globally,
making them easier to clean up later
* Flags now have the same size as the maps and not +1
* expose `rz_core_debug_step_until_frame()` API
* expose `rz_core_debug_step_over()` API
* expose `rz_core_debug_step_skip()` API
* expose `rz_core_debug_step_back()` API
* 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
On thumb/arm, the current analysis->bits value may not be equal to the
bitness of code that a breakpoint is supposed to be set to. This caused
software breakpoints to be created with incorrect data.
Now the bits for an address is queried by bp through a callback instead
of using a global bp->bits value which would usually correspond to the
current seek, but not the breakpoint addr.
* Added rz_core_is_debug() to check for debug mode instead of hard-coding "cfg.debug"
* rz_core_reg_default() uses the above to get the currently relevant RzReg
* rz_core_debug_regs2flags() -> rz_core_reg_update_flags() uses the above
to update the flags.
* C352467: Free the heap allocated string after appending to `RzStrBuf`
* Remove unused variable `nofail`
* C352453: Free `fieldstr` after appending to `format`
* C350836: Free `name` before returning inside the loop
* C349252, C349231: Free `ta` when breaking halfway through the loop
* C349248: Free `pj` before breaking from switch statement
* C366622: Check result of `strtok` (`fcnname_aux`) for `NULL`
* Free `RzList` before returning from macro `SYNC_READ`
* Fixes Coverity issues 366625, 366624, 366623, 366621 and probably
a few others as well
* C366620: Check `arg` for `NULL` before dereferncing in `strchr`
* C366618: Cleanup `parse_lis` and use `rz_str_*` API instead of C `str` API
* Fix `SYNC_` macros in `cmd_regs.c` to no return prematurely
* C365952: Check `x` for `NULL` before dereferencing
* C365936: Use a wider integer type for the bitshift
* C365808: Fix double free of `real_type`
* C365805: Remove redundant `NULL` check for `path`
* Show group-level details of commands
Details can be defined at either a group command or its subcommand of
the same name. If define on group-level it will also be shown in the
group help without needing ??.
* Fix > $ redirection for errored command and leak
* Rewrite ar and dr commands with newshell
Breaking changes:
ar* => arf, ar- => arf-, ar. => ar*
ar, => art, ar? => arq
ar0 => ara0, arb => arab, ars => araS
arC => arpC
arn => arR
art => arT
arf => arF
Removed: drm, aer
* Support building for Windows on ARM
* Fix usage of reserved function name on ARM
* Fix architecture dependent `CONTEXT` fields access
* Fixes for debugging on Windows on ARM
* Fix breakpoint behavior on windows on ARM
* Fix register profile when debugging
* Remove `drx` error message if not supported
* Add support for hardware breakpoints
* Disable support for hardware single-stepping
* Fix Windows Message breakpoints on ARM
* Fix software single-stepping on return instruction on ARM
* Consider link register as destination for return instructions
* Fix setting debug bits to 16
* Rename `r12` to `ip` for windows arm register profile
* Remove debug bits hardcoding on windows
* Add 32bit registers to Windows ARM64 register profile
* Fix software step breakpoint alignment when entering thumb mode
* Define `RZ_TEST_ARCH` for `arm` and `arm64`
* Use `StackWalk64` API for backtracing on Windows
* Fix software single-stepping ARM in thumb mode
* Sync `asm.bits` with debugger
* Cleanup windows_debug.c
* Add SPDX for cross-arm64-windows.txt
* Add floating point control register flags
* Fix Windows Arm register profile alignment
* Keep `drx` warning
* Added rz_analysis_get_address_bits() instead of arch-specific hacks in core
* flags are only set for address-sized registers
* dr/ar show registers of any size by default, but hiding registers that are entirely
covered by others