* Moved `rz_analysis_var_list_show()` under rz_core as static function
* Removed `cb_printf()` from RzAnalysis and refactoring zignatures
* Removed newline from matches
* Use `stdout` for ESIL traps
* Converted commands to use RzCmdStateOutput
* Moved rz_print_2bpp_* under rz_core
* Moved rz_print_string to rz_str_stringify_raw_buffer
* Added test for print urlencode and added pu0
* Removed RzCoreString and implemented utf32be/utf16be
ESIL Pins were an untested feature to run a command when emulation hit a
specific address. This can be solved in other ways, e.g. scripting.
Project version 7 has been introduced for this change.
* 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
* 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
The new intermediate language is based on the BAP (Binary Analysis Platform) Core Theory.
It operates on SMT-like bitvectors and their arrays to represent values and memory.
Apart from that, it has also representation for the data and code side effects.
* Rename `sj`/`s*` and move them under `sH`. Remove `s=`
* Rename `s-*` to `sH-`
* Use `sd` for "seek delta", which moves relative to the current offset
* Enforce <cmd> <arg> syntax. So no more `s+16` but `s +16`. Command
`sHr` is for redo history, `sHu` for undo history. If one wants to move
relative to the current address, they need to do `sd +10`/`sd -10`.
* Remove `ss` commands in favour of `cmd.seek.silent`. This was anyway
used mainly for scripts, so no need to replicate all `s` commands
under `ss`.
Change a bit rz_core_seek API to avoid dupped entries in seek history.
* Disable `asm.bytes` by default
* Fix tests by adding `e asm.bytes=true` (1/n)
* Fix tests by adding (2/n)
* Fix tests by adding `e asm.bytes=true` (3/n)
* Fix tests by adding `asm.bytes=true` (4/n)
* Fix test by adding `asm.bytes=true` (5/n)
* Fix mostly all broken tests
* Attemp to fix the rzpipe test
* Attempt to fix the tests in `db/cmd/cmd_pipe`
* Fix tests again
* Fix cmd_pipe test
* Add a test where `asm.bytes` is false
Co-authored-by: Anton Kochkov <anton.kochkov@gmail.com>
* The emitted esil for jalr was incorrect in the case where `rd` and
`rs1` are equal, since then `rs1` is written to as `rd` before adding
the immediate.
For example, `jalr ra ra 0x42` was lifted to the following esil:
4,$$,+,ra,=,ra,66,+,pc,=
While this does correctly set rd to the return address after the call,
pc is not correctly set according to `pc <- ra + 0x42`, but instead
`pc <- pc + 4 + 66`.
This commit flips the order of setting `pc` and `rd`, so that `rd` is
read from before it is written to.
* fix typo in anal_arm esil (does not affect esil execution)
* add af flag setting and sof op for sub overflow, change borrow
* remove the break that was 'breaking' everything, fix warning
* add new sign extension operator and use it to handle signedness in imul
* work on expressions for idiv, div, imul, mul, remove and just modify sub/cmp
* add clz and reorder the sign extension arguments to be in line with all other ops
* add support for many arm64 instructions
* add sign extension to all ldr*s instructions
* make numerous changes to fix REV*, SXT*, LSL, LSR, ASR, SDIV, MOVN and others, to be detailed in PR
* add sxt* to shifted_register_append, use it to fix opcall and ldr / str
* remove unnecessary commented code
* add some comments
* add clz and reorder the sign extension arguments to be in line with all other ops
* add sign extension to all ldr*s instructions
* make numerous changes to fix REV*, SXT*, LSL, LSR, ASR, SDIV, MOVN and others, to be detailed in PR
* add sxt* to shifted_register_append, use it to fix opcall and ldr / str
* fix wrong type check in esil_signext
* change borrow flag back to the way it was
* add example comment to esil_signext
* unbreak movk
* format mask in sub, cmp, and movk as hex
* add test for esil signext operator
* use ULL instead of (ut64) cast in shifts