The cache read must read within the mapped region and not beyond.
Otherwise it would go against the documentation of rz_io_nread_at().
rz_io_cache_read() internally doesn't know about map boundaries so
the length parameter passed to it in rz_io_nread_at()
should only read 'ret' number of bytes.
To give somewhat more introspective what rz_io_cache_read() does,
the return value meaning was changed to success/failure
and an out parameter was added to get the number of bytes read.
Regression from 3b7f2730f2:
rz_io_nread_at stops at unmapped regions, but disassembly being a
user-visible display needs to show gaps as 0xff and mapped regions after
with their contents again instead of just breaking and showing io->Oxff.
The exact meaningd of rz_io_nread_at and rz_io_read_at_mapped have also
been clarified in documentation comments and tests.
* core: 'wow' command was replaced with 'wb'
* io: on_map_skyline returns false when nothing was done
Before this patch on_map_skyline returned true even when the callback
was not called on any part of the skyline. In other words,
reading/writing to an unmapped memory returned true.
This commit changes the behaviour to return false in those cases.
* analysis/esil: mem_read/mem_write were alway returning true
* use o malloc instead of oC
* librz: deal with seek errors
This allows tracing an io map back to the RzCoreFile and thus also its
bin file and other info. This is used in rz-ghidra to determine which
memory ranges can be considered readonly to enable constant propagation.
* Cleanup RzAnalysisRzil when freeing RzAnalysis
* Fix str leaking in rz_core_write_string_at
* Fix buf leaking in rz_core_yank_paste
* Fix memleak in json unit tests
* Fix features leaking in RzBinInfo
* Fix features leaking in RzAsm
* Fix memleaks in RzTable
* Fix test_str_search memleaks
* Fix memleak in test_io.c
* Fix memleaks in RzBuf and test_buf.c
* Fix memleaks in test_cmd.c
* Fix memleaks in test_config.c
* Fix memleaks in RzCons
* Fix hashes leaking in test_bin.c
* Fix memleaks in test_id_storage.c
* Fix memleaks in test_il*.c and adjust APIs
* Disable colors on Windows because terminal looks bad otherwise
* Use environment on Windows to set PATH and make sure unit tests use
the compiled libraries and not the installed ones
* Define ssize_t on Windows as well by using SSIZE_T
Update test_analysis_block.c
Update test_intervaltree.c
Update test_unum.c
* Add RSkyline ##util
* Add `r_vector_len()`
* Optimize io.cache ##io
* Use RSkyline instead of RList
* Add cache skyline for faster reads
* Use PJ API in `wcj`
* Add test and fix