Previously, on macOS we were detaching properly when the user quit rizin
after an interactive `rz -d <file>` session, but not on
`rz -d -Qc <cmd> <file>`, which would leave behind a zombie process.
Now, the process is detached and keeps running, which also matches the
behavior on Linux. Hence the `dk 9` additions in the tests, to not
spoil the output with whatever the processes print.
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
Entire files are now avoided to be built by checking in meson rather
than using #if DEBUGGER. This now also includes bsd_debug.c, which
is currently slightly broken on OpenBSD/sparc64 and caused compile
errors even with -Ddebugger=false.
Although the reg profile was not really used yet it will be relevant for the RZIL uplifting.
Introduces:
* Double/quadruple registers now properly overlap with their counterparts.
* Registers have correct types assigned (vec, ctr, sys etc. Before, all regs were of type gbr)
* Consistent register names (asm name style: c3:2, r31 etc, alias style: lc1:sa1, lr etc.)
* Adds _tmp registers in the profile. Later used by uplifted instructions (think of .new registers).
There may be multiple maps containing the current seek. This indicates
only the highest-priority one, which is also the one whose data is
visible at the seek address.
* 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
* 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
* 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
* Add `db` commands in `cmd_debug.yaml`
* Use bool instead of int as return value
* Port `db` commands to newshell
* Fix integration tests. Use `db- <addr>`, instead of `db-<addr>`
* Fix `dbW` handler and update `rz_w32_add_winmsg_breakpoint`
* Remove checks for `argc` in `cmd_debug.c` (from review)
* Fix failing Windows tests
* Change control flow in conditional expressions
* Use `RzCmdStateOutput` in handler for `dbt` to print backtrace in various formats
* Use forward slash (/) instead of pipe (|) for command descriptions
* Use output modes for printing breakpoints in `db` handler
* Remove extra newline while printing breakpoints in JSON format
* Change description for `dbc` command
* Update descriptions and handlers; Remove <addr> argument wherever necessary
* Use `RZ_CMD_ARG_TYPE_CHOICES` for perm in `dbw`
* Add details for `dbC` and `dbw`
* Add quiet printing mode for breakpoints
* Remove unnecessary <addr> argument for `db` commands
* Also add a quiet output mode for `dbl` and `dbt`
* Return if no breakpoint found in function `add_breakpoint`
* Update tests for new `db` commands
* Update `db` command descriptions
* Remove `dbi.` redundant command
* Add details for iterating through the list of breakpoints
* Extract `rz_debug_bp_add_noreturn_func` into `debug.c` as RZ_API
* Fix `dbil` handler and `dbg_bps` test
* Shift the noreturn function breakpoint to `cdebug.c`
* Format according to clang-format
* Fix failing integration tests
* TODO: Find why `db- @@c:dblq` is failing, and fix the bug
* Update `db` commands
* Use `db- @@c:dblq` instead of `db-*`
* This will also work as a test for command edits (see https://github.com/rizinorg/rizin/pull/1806)
* Add function to check if a register is a system register
* Only checks for ARM64 system registers as of now
* Check for system registers in ARM64 when printing registers using "dr"
* Does not completely remove the unnecessary register, but removes a
huge number of useless registers printed by "dr"
* Rename `RZ_REG_TYPE_ALL` to `RZ_REG_TYPE_ANY`
* ADd register types for "sys" and "pauth": `RZ_REG_TYPE_SYS` and
`RZ_REG_TYPE_PAUTH` respectively
* Remove `rz_reg_is_system_reg`
* Add `sys` and `pauth` register profiles
* Update debug tests to account for new arenas and register profiles
* REplace "pauth" with "sec" reg profile
* Update integration tests to account for new register profiles: `sys`, `sec`
* Start to create some RzBinObject specific API
Adding some unit tests
Fix for new relocs storage system
Fix test_bin unit test for oob-write
* Add `iA` command to newshell
Add `ie`/`iee` commands
Add support for `is`/`iE` commands
Add support for `ii` command
Add support for `il` command
Add support for `iM` command
Add support for `ir` command
Add support for `iS`/`iSS` commands
Add support for `iz` command
Add support for `i` command
Add support for `ic` command
Add support for `iC` command
Add support for `ih` and `iHH` commands
Add support for `iI` command
Add support for `iL` command
Fix descriptions of commands already converted
Add support for `idp` commands
Add support for `iD` command
Add support for `im` commands
Add support for `iR` command
Add support for `it` command
Add support for `iV` commands
Add support for `iw` command
Add support for `ix` commands
Add support for `iZ` command
Add support for `ik` command
Add support for `is.` command
Add support for `iS.` command
Reduce arguments in print_arch
Few Doxygen and ownership annotations
Add support for `iS=` command
Add support for `izz` and `izzz` commands
Add support for `ib` command
Add support for `ic*` command
Put section flags as the last field of the table
* Proper language detection.
* Rewritten blang.c
* implemented `icc/icm/icf <class name>`
* ignore blocks when printing langs
Remove num from `iA` output
* Fixed flags on java and added class column
Add support for `ia` commands
Fix `iCj` command
* RzBin: add rz_bin_object_sections_mapping_list API
* Fix rz-bin for new API
Remove unused va var in rz-bin.c
Fix `iA`/`-A` output
* implemented classdump_cpp
* Support namespaces
Use `icc`, `icl` does not exist anymore
Update output of broken tests for `icc`
Add `rz_return_*()` asserts in new `*_print()` functions
* Provide rz_core_bin_print API
* Select which parts to print also based on the mode
* Return bool from all `rz_core_bin_*_print()` API
* Use RzBinFile in new `rz_core_bin_*_print()` API
* Restore `dbg_dmi` test
* Remove oldshell handlers for `i` commands
* Remove `ieq` call in rizin, not needed
* Allow NULL `bf` in `rz_cmd_info_handler()`
* Re-add support for RZ_BIN_PREFIX for symbols/sections/segments/imports/relocs
* Move `ib` command to `obR`
* Show 'N/A' in `i` command when info are not available
* Assert on bf->o, just to be sure
* Make error messages clearer in `idp` commands
Co-authored-by: wargio <wargio@libero.it>
Co-authored-by: Giovanni <561184+wargio@users.noreply.github.com>
* Convert `dts` to the newshell
* Add a test for `dts-`
* Add a change in defining dts_cd which was missed before
* Update the test for `dts-` with a couple of `ds` instructions
* Fix the test for `dts-` with `dsb`
* Automatically demangle tcache pointer if glibc ver >= 2.32
* Automatically demangle fastbin pointer if glibc ver >= 2.32
* Updated test
* Use get_next_pointer function
* Refactor code to remove `dbg.glibc.demangle` option
* Removed malloc from output of `dmh`
* Printing top chunk size in dmh
* removed `dmh` output indentation
* Added `dmhv` as verbose version of `dmh`
* Added new function to print a heap chunk and changed `dmh` output format
* Fixed bug regarding printing top chunk currently
* Added gef style bin description for main arena as `dmhd` command
* Added test for `dmhv`
* Added documentation for new functions
* Added 2 basic test for `dmhd`
* Added back brk_start, brk_end and other minor changes
* Reused `dmht` code for tcache description
* Reused `dmhf` code for `dmhd fast`
* Hexdump format changed to bytes from half words in `dmhv`
* Added message if tcache is not available