$ r2 -a arm -b 64 mfan
Not enough data for SClassRoT
Not enough data for SClassRoT
mach0_classes.c handle the buffer of the mach instead of the whole
fatmach file. Thus we should revert physical addresses by obj->boffset on
sections.
Complements commmit 637e6db by reverting to the old axf behavior of
showing xrefs from a single address instead of the whole function,
but only if that specific address has xrefs. Otherwise it shows the
xrefs of the whole function
References #5113
This command is like dmi. It will list all the sections of the mapped
library by either shelling-out to rabin2 or calling r_core_info --
depending on whether filtering by library name was requested.
---
v3:
* more formatting (pancake)
* r_str_escape and quote the value passed in RABIN2_PREFIX env var (pancake)
v2:
* formatting (pancake)
* don't break out of the loop early
* only strdup when I must [^1] (pancake)
* I can't use r_sys_cmdf because then I can't filter the output with ~
* reduce noise a little by calling r_sys_cmd_strf directly
* iterate over the modules, not the maps
[^1]: The strdup of r_get_config(...,"bin.prefix") is needed because otherwise
we loose the original bin.prefix during the r_set_config(...,
"bin.prefix") calls in the loop.
review comments on dbg_maps
This fixes a valgrind read past buffer error... I was seeing when
testing t.archos/Linux-x86_64/dbg_maps
```
Invalid read of size 8
==11424== at 0x4C2F79E: memcpy@@GLIBC_2.14 (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==11424== by 0x693C702: r_reg_set_bytes (arena.c:118)
[...]
==11424== Address 0xa144430 is 0 bytes after a block of size 304 alloc'd
==11424== at 0x4C2CC70: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==11424== by 0x5D49EE6: r_debug_reg_sync (dreg.c:60)
[...]
```
---
v2:
* don't forget spaces around '+' (pancake)
* Fix bits_ranges memory leak in anal.c
* Fix anal->reg memory leak and prevent use after free in plugin.c
* Fix reg->allregs memory leak in reg.c
* Fix dbg->plugins memory leak in debug.c
* Fix io->plugin_default memory leak in io.c
* Fix plugin_free not deallocating plugin in bin.c
* Adapt to style guidelines
* Fix memory leak in r_bin_object_free and resolve double free
* Fix o->kv memory leak in r_bin_object_set_items
* Fix memory leak pushing arena on reg init
* Fix io->plugin_default memory leak in io.c
* Adapt to style guidelines
* Fix pfile memory leak in radare2.c
* Add braces to if in bin.c