427 Commits

Author SHA1 Message Date
Florian Märkl
dc960582c6 Fix agfJ 2019-02-15 11:26:46 +01:00
pancake
0901c48871 Implement aaFa, optimize and improve boundary checks 2019-02-14 02:49:02 +01:00
pancake
f1b32b351b Fix aaF sort issue, honor a2f and fix big allocation in analysis ##anal 2019-02-14 02:49:02 +01:00
blenk92
bb91451b3f Use pj for agfj (and others) + rename pj_sn and pj_ksn to pj_N and pj_kN 2019-02-13 11:44:42 +01:00
blenk92
94a1c89d58 Fix invalid json in agfj under some situations (#13051)
If, for whatever reason, a basic block with negative size is
contained in a function the json produced is not valid.
2019-02-12 10:51:28 +01:00
pancake
3cbf5d5f5b Initial implementation of aaF ##anal 2019-02-04 07:12:13 +01:00
pancake
9bdb3d0665 Fix some assert issues and other crap 2019-02-03 19:21:08 +01:00
Riccardo Schirone
a88c7e1e3b Kill RIOSection ##refactor 2019-01-31 10:53:34 -06:00
pancake
b9460c353c Implement EXPERIMENTAL emu.lazy (20% faster analysis with aae) ##anal 2019-01-29 15:22:04 -06:00
blenk92
a8f5b045c4 Fix aae - set pc to current offset ##anal 2019-01-28 09:29:30 -06:00
Itay Cohen
9409e39ed4 Add new command: pifc and pifcj ##print 2019-01-24 00:11:11 +08:00
Itay Cohen
b9f4e09b31 Add quiet and json for aflm ##print 2019-01-22 09:42:19 +01:00
Itay Cohen
472329c136 Add JSON support for /g ##anal 2019-01-21 01:25:59 +01:00
pancake
392981a3ed Improve callgraph dot output 'agCd' ##graph 2019-01-21 00:13:49 +01:00
r4dix10
7f1263544c Fix #12738 - afi displays if function has been traced ##anal 2019-01-20 23:42:52 +01:00
Florian Märkl
bbe5c2a31e Fix agfJ for quotes in function names 2019-01-20 14:13:41 +01:00
Florian Märkl
f80a47ab60 Move Palette to RConsContext to make RCoreTask less racy ##cons 2019-01-18 11:58:49 +01:00
pancake
f045fde1e4 Initial implementation of aflm - makestyle function list ##anal 2019-01-18 02:28:07 +01:00
Maijin
c3bf8d161b
Use pj in anj ##refactor 2019-01-17 13:02:28 +01:00
radare
570c05a86b
Implement aht to change the opcode type via anal hints, fix ao ##anal 2019-01-17 00:26:39 +01:00
Itay Cohen
a3058427f1 Make afij ref-types more readable for human animals ##anal 2019-01-16 22:19:47 +01:00
radare
eea35e7c66
Move r_anal_op_hint() into r_anal_op via R_ANAL_OP_MASK_HINT ##anal 2019-01-16 16:22:45 +01:00
Itay Cohen
b67ed47582 Fix afns and add JSON support ##anal 2019-01-15 12:09:32 +01:00
Riccardo Schirone
320a258977
Remove flag list in RFlags and just use hashtable (#12703)
* Do not directly use flags->flags, but use r_flags_foreach functions
* Remove list of flags because unnecessary
* Do not free flagitem when we just need to change the name(aka key)
* Use skiplist to iterate, so we get order for free
* Use RIOMap instead of RIOSection which is being killed
* Free flagitems when ht is freed

There's already the hashtable that can serve to iterate all flagitems.
2019-01-14 14:15:12 +01:00
radare
ab3a7be704
Almost completely kill RIOSection from io and core (-218LOC) ##refactoring
* Use RBinSection, RDebugMap or RIOMap instead
* Remove omps command
* Fix segfault in ?E+
* Improve anal.eobjmp (bug spotted after almost killing iosections)
2019-01-13 03:07:51 +01:00
radare
b81e1821b1
Improve ESIL xrefs and string discovery with aae on arm32 ##anal 2019-01-10 18:19:52 +01:00
blenk92
0e7f5b894f Fix wrong splitting of functions in aac ##anal 2019-01-01 23:36:11 +01:00
radare
acc7a2543d
Use add-sorted instead of append+sort ##anal 2018-12-31 00:22:33 +01:00
pancake
40ec362d00 Use PFMT64x instead of llx 2018-12-27 12:29:19 +01:00
blenk92
b06a21d4db Ensure that function names are unqiue (#12567) 2018-12-27 12:26:35 +01:00
blenk92
00a8f132bf Fix different behaviour of agCj, agCv and agCd (#12540) 2018-12-22 10:00:21 +01:00
blenk92
26d7c0018e Fix different behaviour of agfv and advj (#12512) 2018-12-19 00:41:24 +08:00
dav1901
5b644dcb74 Minor cleanups/fixes (#12478) 2018-12-14 00:17:50 +01:00
dav1901
024d65e288 Fix few more clang warnings (#12429) 2018-12-11 10:28:01 +01:00
pancake
df90a3c462 Fix #12384 - Crash in fuzzed macho binary 2018-12-03 15:55:13 +01:00
pancake
a66d2556a0 Fix assert in aaa when entrypoint is wrong 2018-12-03 15:26:15 +01:00
pancake
7d8bfc462e is_pure -> is-pure 2018-11-29 18:11:17 +01:00
bart1e
20a4168548 Detecting pure functions and add afip command ##anal 2018-11-29 17:00:26 +01:00
radare
d34af95fae
Fix agc (only show call refs, not data) (#12315) 2018-11-25 14:40:20 +01:00
Khairul Azhar Kasmiran
6e7f980ee8 afi refs: remove trailing space (#12318) 2018-11-25 14:39:00 +01:00
Khairul Azhar Kasmiran
f1fee53ae0
Add missing space in afi locals (#12317) 2018-11-25 13:05:37 +08:00
Khairul Azhar Kasmiran
0d74e2f51a Fix #12300 - Remove spurious xrefs to fcn addr (#12302) 2018-11-23 20:50:34 +01:00
Álvaro Felipe Melchor
23d01f869c Improvements arm/thumb analysis ##anal
* anal: arm: emulate correctly BX PC in arm32/thumb ##anal
* anal: arm: handle BX PC in analysis to propagate bits

PC is well known without ESIL, that way it is possible to propagate the
bits to correctly create the hints

* anal: arm: modify r_anal_build_range_on_hints ##anal

This function now accepts a second parameter that specify when to
dispose hints when overlapping.

The rationale is that if this is performed in a continuos basis, old
ranges are lost when in a latter stage in the analysis is inserted a new
hint.

For example, if we have something like

0x80000 -> 16 bits
0x82000 -> 16 bits

With the previous logic this would have been become

0x8000 -> 16 bits

However, during analysis a new hint like this might happen

0x8100 -> 32 bits

Therefore, 0x8200 which was 16 bits is lost.  With the second parameter
update, we postpone this until the user print the disassembly - we wait
until the end to clean up hints to speed up the looks up. However,
during analysis we mantain all the hints.

* anal: arm: handle better anal hints to increase performance ##anal

new API r_anal_hint_get_bits_at

This saves time for example on r_anal_build_range_on_hints without the
need to use heap for RAnalHints speeding up the analysis

Added cb when calling r_anal_hint_set_bits and rbtree for anal ranges
which improves lookups

fix __anal_range_tree_find_bits_at

fix conflicts and coding style

* arm: set anal hint when BL instruction
2018-11-22 21:31:54 +01:00
radare
40c2fecfeb
Use r_return in RAnalOp, reduce some code paths in xrefs search ##anal (#12263) 2018-11-22 16:24:04 +01:00
Riccardo Schirone
d5c8b91c0b
fix some covs (#12238) 2018-11-20 10:15:18 +01:00
dav1901
8e7aea3198 Minor cleanups (#12231) 2018-11-19 22:55:34 +01:00
Khairul Azhar Kasmiran
ef9ddac95e Simplify r_anal_fcn_add_bb() (#12226) 2018-11-19 21:09:27 +01:00
dav1901
23fb5bc197 Fix minor leak (#12220) 2018-11-19 16:22:33 +01:00
Ayman Khamouma (ak42)
4dede6866e Fix r_core_anal_graph_to and abt, abtj commands ##anal 2018-11-19 02:35:23 +01:00
Riccardo Schirone
e44b272157
Do not check vaddr for isValidSymbol (#12176)
The only fact that there is no paddr, means the symbol is not present in
the file, so there's nothing to analyze (at least statically)
2018-11-15 14:04:09 +01:00