radare2/libr/io
Ricardo Quesada 2c3fdba551 Fix for bug 3788
- `r_io_read` calls `r_io_read_at` with vaddrs, and not with maddr
- `r_io_section_maddr_to_vaddr` uses a reverse iterator to check the
  sections
- adds `r_io_section_mget_prev`: this function can be removed if the
  behavior of `r_io_section_mget` is changed to use a reverse iterator

Squashed commit of the following:

commit a31d359bf1
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Wed Dec 9 11:40:54 2015 -0800

    fetches sections starting from the back

commit 0b687439ea
Merge: 8485676 92c1631
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Tue Dec 8 23:40:35 2015 -0800

    Merge branch 'master' of https://github.com/radare/radare2 into revert_3788

commit 8485676cf5
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Tue Dec 8 23:09:05 2015 -0800

    This seems to be the "correct" patch...

    ...but it breaks some tests... apprently searches a few bytes
    out of the section creating some false-positives hits

    I'm just commiting this PR to give an idea of where the bug is

commit 2e4b8de397
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Tue Dec 8 22:46:29 2015 -0800

    not good... reverting

commit 324afba7e2
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Tue Dec 8 22:09:25 2015 -0800

    workaround for bug 3788

commit 6e6283eaa1
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date:   Tue Dec 8 15:14:12 2015 -0800

    Reverts fix for bug #3788

    please, reopen bug #3788
2015-12-09 22:20:54 +01:00
..
p Some refactor/cleanup for agf and io cache (wip) 2015-12-08 14:59:30 +01:00
t rename r_io_open -> r_io_open_nomap and add a new r_io_open that creates a map at 0x0 2014-09-06 23:08:16 +02:00
buffer.c Fix #3286 - Use stdbool.h 2015-09-14 02:08:31 +02:00
cache.c Fix regression in t.anal/x86/emu 2015-12-08 16:49:15 +01:00
desc.c Honor wheelspeed, fix oob in vmenus and more boolification 2015-09-14 16:22:57 +02:00
io.c Fix for bug 3788 2015-12-09 22:20:54 +01:00
Jamroot Remove io/haret plugins (moved to r2e) 2015-01-27 18:35:48 +01:00
Makefile Honor zip configure linkage 2015-02-23 01:07:05 +01:00
map.c Fix r_io_map_get 2015-12-08 01:54:05 +01:00
plugin.c Fix #3286 - Use stdbool.h 2015-09-14 02:08:31 +02:00
README Add initial XCore capstone disassembler and code analysis plugins 2014-05-27 23:08:59 +02:00
section.c Fix for bug 3788 2015-12-09 22:20:54 +01:00
undo.c Fix #3474 2015-10-29 18:51:44 +01:00
undo.h * Change the name of some types 2009-07-08 13:49:55 +02:00
vio.c Honor wheelspeed, fix oob in vmenus and more boolification 2015-09-14 16:22:57 +02:00

RIO design
==========

rio api allows to seamlessly access to underlying IO backends
and define rules on top of it to act as an mmu.

What do io.va means?
--------------------
- obey sections

- Plugins 

Actions
-------
 - open
 - read
 - seek
 - write
 - close

Layers
------
 - cache    caches write ops and modifies reads
 - map      allows to map a certain file at a given offset
 - sections like maps, but provide more information for virtual addressing

Features
--------
 - undo
 - buffer
 - desc

fn read(io: IO) {
	ut64 offset;
	if io.offset
}