Commit Graph

29 Commits

Author SHA1 Message Date
Liumeo
9478b3a957
Add test and update arm.winedbg (#18117) ##asm 2020-12-28 20:56:52 +01:00
Liumeo
5048074f01
use pj in vtable (#18069) 2020-12-20 02:30:51 +01:00
Lazula
243bc871c3 Multiple refactors in io and util ##io ##util ##refactor
* Add r_io_map macros throughout code base
* Update string NULL-checking with renamed functions r_str_get() and r_str_getf()
* Change string NULL-checks throughout code base to use functions
* Add r_str_get_fail() to specify a custom string to return if NULL-check fails
* Mark JSON to be updated with PJ with "TODO PJ"
* Incidental style updates such as missing spaces
2020-12-13 05:09:13 +01:00
HoundThe
c06ac96f2e
Change Itanium VTable detection heuristic ##anal (#17359)
* Changed vtable detection heuristic that RTTI must be inside the same section as the Vtable
* Add test for PPC binary
2020-08-06 12:25:20 +08:00
Francesco Tamagni
d8b1e6952e Improve itanium RTTI parsing and vtable search ##anal
- add support for arm/arm64
- simplify the heuristics for carving the start of vtables in data const section to not rely on xrefs, instead look for mandatory vtable fields (only for itanium ABI)
- add support for classes recovery from itanium RTTI
- add class name demangling for itanium RTTI
- relax the requirements for detecting the typeinfo flavor, in absence of flags just assume the simplest kind so at least the class name is there
- expose more info from RTTI structures
- use PJ for printing json
2020-05-03 17:55:20 +02:00
pancake
52b1affcb6
Check r_io_read_at return value in VTable ##anal (#16653) 2020-04-20 12:14:50 +02:00
pancake
9c2e406f01 Fix infinite vtable issue when running 'aaa' in bins/fuzzed/elf9 2020-04-13 20:06:33 +02:00
Florian Märkl
5fb9687fba Add __const to potential VTable Sections ##bin 2019-07-01 12:38:12 +02:00
pancake
63ccf0da09 Honor more segments vs sections, for jmptbl, fatmacho, zeropage ##bin 2019-06-10 16:35:01 +02:00
Maijin
e52a67ed70 Add avrr in aaa ##anal 2019-03-24 23:47:35 +01:00
blenk92
129862e2cf Fix avj - in case of no vtables [] shall be returned ##json 2019-01-28 11:30:55 -06:00
David CARLIER
2f8891caaf Few code cleanups. (#12526) 2018-12-21 00:35:41 +01:00
Neven Sajko
4a722e80d8 Add braces to if, else, for, while ... (#11504) 2018-09-13 10:17:26 +02:00
Florian Märkl
462a4db7a8 Fix leak in r_anal_vtable_search() (#11371) 2018-09-03 23:46:42 +02:00
Fangrui Song
30d2d072b0 Fix memleak in fcn.c (#11378) 2018-09-03 23:42:22 +02:00
Florian Märkl
2c1479d338 Use RVector for vtable methods 2018-08-31 15:52:01 +02:00
Florian Märkl
303cc49a3d Add r_anal_vtable_parse_at() 2018-08-31 15:52:01 +02:00
Florian Märkl
56c07e1a96 Fix a leak in VTable search 2018-08-25 11:10:53 +02:00
sivaramaaa
e5bbaffbfe Refactor code to change R_ANAL_OP_MASK_ALL to appropriate value 2018-05-31 19:05:54 +02:00
Riccardo Schirone
b703dfbf17 anal/xrefs: single, global xrefs API
* several bugfixes
* Fix xrefs/refs confusion with asm.cmt.refs
* Also check if xref source is valid offset
* Fix ax* to show type of ref
* anal/xrefs: pass the right hashtable to mylistrefs
* r_anal_refs_get should use anal->refs, not anal->xrefs
* anal/fcn: add xref also when there's a CALL to a noreturn function
* projects: use radare2 output of ax command to save/restore xrefs
* core/cmd_anal: when analyzing calls, we should use REF_TYPE_CALL
* core/canal: use xrefs API, because the list is a just a copy
* core/canal: rename "loc." entries to "fcn." when a CALL is found
* sort xrefs to make results consistent
* core/canal: avoid recomputing function every time during `aan`
* anal: move fcn_refs/xrefs functions to the xrefs.c file
* core/canal.c: avoid iterating fcn xrefs list
* anal/xrefs: compute fcn xrefs by analyzing fcn addresses
* remove other unused functions
* anal/xrefs: remove fcn_xrefs_add and fcn_xrefs_deln
* anal/xrefs: remove old fcn->refs/xrefs
* anal/xrefs: directly store RAnalRef objects in the hash table
* libr: prevent memory leaks when using refs/xrefs
* anal/xrefs: merge anal/ref and anal/xref and clean API

Big xrefs/refs refactoring that provides a more uniform and simple API.
It avoids changes to refs/xrefs except through the API and it keeps all
xrefs/refs info in one single place, to improve consistency.

Thanks to:
Riccardo Schirone <sirmy15@gmail.com>
pancake <pancake@nopcode.org>
rene <rlaemmert@gmail.com>
2018-05-04 21:40:47 +02:00
Florian Märkl
93d9f4ec66 Add mask parameter to r_anal_op() 2018-03-16 11:10:15 +01:00
Florian Märkl
c01bfe9ea1 Make av, avr and avra breakable 2018-03-14 20:05:33 +01:00
Florian Märkl
086c3a144e Add anal.cpp.abi 2018-03-12 23:34:34 +01:00
Florian Märkl
8fb26b919b VTable End on Reference 2018-03-12 23:34:34 +01:00
Florian Märkl
d39970e83b RTTI: Read MSVC Class Hierarchy Descriptor 2018-03-12 23:34:34 +01:00
Florian Märkl
94b486cf3e RTTI: Read MSVC Complete Object Locator 2018-03-12 23:34:34 +01:00
Anton Kochkov
114f59a7e0
Fix vtables detection 2018-03-12 18:28:05 +08:00
Florian Märkl
e61339a3d0 More VTables (#9646)
* List vtable methods without fcn, Merge r_anal_list_vtables() and r_anal_list_vtables_all()

* Additional info in av*
2018-03-10 21:28:27 +01:00
Florian Märkl
59e4408d70 Move VTables from Core to Anal (#9638) 2018-03-09 20:02:39 +08:00