2884 Commits

Author SHA1 Message Date
wargio
9c8286a729 ppc sign hint 2018-06-06 16:51:00 +02:00
sivaramaaa
0ed78a567f
Fix a leak and a gcc warning (#10274) 2018-06-06 17:46:55 +05:30
pancake
4e57af4521 Fix #10269 - rad is not json 2018-06-06 13:11:57 +02:00
sivaramaaa
08d9dfcfcd Added a few enhancment to struct offset propagation 2018-06-05 23:01:18 +02:00
pancake
78319e77b3 Honor dir.prefix in asm.opcodes 2018-06-05 16:01:23 +02:00
pancake
ed56aecbcc Add RAnalOp.sign for MIPS 2018-06-04 15:50:51 +02:00
pancake
9a97d0dd67 Add sign information for arm64 2018-06-04 15:50:51 +02:00
pancake
1183646d16 Fix #7160 - Add RAnalOp.sign, and add support for x86.cs 2018-06-04 15:50:51 +02:00
pancake
1f903954a6 Use a bit more the capstone api for m68k 2018-06-03 18:43:09 +02:00
rrreeezzz
add2ff208a fix axj #10179 (#10240) 2018-06-02 09:58:13 +02:00
sivaramaaa
8cc5f0216c Intial work on struct offset propagation 2018-05-31 19:05:54 +02:00
sivaramaaa
e5bbaffbfe Refactor code to change R_ANAL_OP_MASK_ALL to appropriate value 2018-05-31 19:05:54 +02:00
sivaramaaa
450b285443 Add support for RAnalop.dst/src in few more arch 2018-05-31 19:05:54 +02:00
pancake
66bac273d5 Fix size of array in anal.pic 2018-05-30 22:13:09 +02:00
pancake
92e9604f6a Fixes for the symstall and install with-rpath 2018-05-30 17:06:34 +02:00
pancake
cbeff990a1 Fix last covs 2018-05-30 12:41:57 +02:00
Paul I
cad927a591 Meson: add rule for tags.r2 (#10215) 2018-05-28 23:25:48 +02:00
courk
e8aababb86 Add support for PIC Midrange & Enhanced Midrange (#10199)
* Add support for PIC Midrange & Enhanced Midrange

ESIL support isn't perfect yet: memory mapped registers support is
still missing.

* Fix syntax error in libr/anal/meson.build
2018-05-28 16:20:21 +02:00
sivaramaaa
13da7c809c [WIP] Support RAnalop.dst/src in all archs (#10185)
* Intial work on supporting RAnalop.dst/src in all archs

* Fix struct offset for dst operand in ta command
2018-05-26 11:42:14 +02:00
Giovanni
b3a47c022a Fix bad cast in PPC esil (#10156) 2018-05-22 13:15:11 +02:00
pancake
91a2e5fb9d More killing of strcasecmp/strncasecmp 2018-05-21 22:13:07 +02:00
cyanpencil
6e7e64f48b Additional fixes in agd output format
Fix rebase

Fix whitespace
2018-05-18 10:42:06 +02:00
cyanpencil
9a510f23dc Better error handling in r_anal_diff_fcn
Always fingerprint before calling r_anal_diff_fcn
2018-05-18 10:42:06 +02:00
sivaramaaa
49aa74e10f Refactor types and make array of struct work with ts (#10121)
* Refactor and Move anal/types.c to util/
* Make struct of struct work with .ts and fix ts*
* Array of struct works now with ts
2018-05-18 10:32:31 +02:00
Paul I
7e9f982849 Meson: some cleanup (#10076) 2018-05-16 10:24:35 +02:00
Adrian Studer
8b1257f12f Always return sorted xref/ref lists (#10070) 2018-05-16 10:18:12 +02:00
sivaramaaa
0adef36e84 Fix fcn maxstack issue in variable recovery (#10086)
* Fix afv commands and other issues
* Honor anal.vars
* Fix some issue in stackop due to inconsistent esil
* Fix afvd printing issue
* Fix vars summary and add afv* to help
2018-05-15 23:14:09 +02:00
pancake
f4ad472fd1 Fix 52 oobreads in the avr anal plugin 2018-05-15 14:58:59 +02:00
pancake
d04c78773f Fix #10091 - crash in AVR analysis 2018-05-15 14:44:47 +02:00
sivaramaaa
b4dd6530fe Add command afcf to print "return type function(arg1, arg2...)" (#10075) 2018-05-11 15:27:30 +02:00
pancake
e90fd02b97 Upgrade capstone to fix m68k bugs
Revert "Fix #9855 - Enlarge tmpbuf to 128 bytes because capstone code is crap"
- 11f99872f5d605b287461e2cfb26b68eed70a3a0.
Revert "Fix #9852 - Workaround to avoid capstone-m68k crash"
- 0607b97b0110b25f8b52657c601d83d0ae8029f9.
2018-05-11 12:51:36 +02:00
radare
223232737a
Fix #8874 - pdf works as expected now :) (#10061) 2018-05-10 17:33:34 +02:00
radare
9e08da0fa6
Improve build of libr.a and libr.dylib, fix and improve sys/ios-sdk.sh (#10046)
- Update spp and force hidden visibility
- Use R_API wisely
- RSys.prefix returns const things
- Use -install_name on Apple
- Fix merged lib visibility linking on Linux
- Use OSTYPE instead of BUILD_OS
- Honor crosscompiler-objcopy and support android like linux
- Add extra missing archives
- Fix for android
- Upgrade spp and sdb
- Skip libr. from symstall
- Add --enable-merged configure option
- Use --enable-merged on ios-sdk
- Upgrade sdb again for js0n
- Kill sys/ios-shell.sh
- Msvc dynamic build fix
2018-05-09 23:31:52 +02:00
sivaramaaa
bb2f7c9211 Refactor and optimize afta (#10043)
* Refactor the afta code little bit
* Optimize afta by just emulating previous N instruction to a call
* Remove dupe vars
* Fix some minor issues
* Change type_get_size to type_get_bitsize
2018-05-08 17:05:01 +08:00
Riccardo Schirone
d730bacc08
xrefs fixes (#10034)
* anal/xrefs: more uniform xref type output

* anal/xrefs: reduce confusion of `ax` command

* core/cmd_anal: add commands to add string references

* anal/xrefs: when using radare2 output, ref->at should be the second arg

* core/cmd_anal: remove afx commands, except for listing

Since we removed per-function references, now there are only global
ref/xref info, so there's no need to have per-function commands to
handle refs/xrefs.

* core/canal: use "ax" commands instead of "afx"
2018-05-08 08:41:53 +02:00
pancake
11f99872f5 Fix #9855 - Enlarge tmpbuf to 128 bytes because capstone code is crap 2018-05-06 16:17:25 +02:00
pancake
0607b97b01 Fix #9852 - Workaround to avoid capstone-m68k crash 2018-05-06 16:08:04 +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
Paul I
5180e0220f Add R2_PLUGINS, R2_EXTRAS, R2_BINDINGS macros (#9994) 2018-05-02 15:58:14 +02:00
RagingCactus
dd4761f792 Fix analyzed opcode size for some z80 instructions (#9984)
This bug affected instructions starting with:
  * 0xED (extended instructions)
  * 0xDD (instructions operating on IX register)
  * 0xFD (instructions operating on IY register)
2018-04-29 22:19:55 +02:00
Toizi
eff427e591 Add support for more jump tables (#9974) 2018-04-28 10:13:35 +02:00
Paul I
cc90ec6be5 [WIP] Move hardcoded paths to r_userconf.h (#9959)
* Move hardcoded paths to r_userconf.h

* Add R2_HOME_* macros

* Some cleanup
2018-04-28 10:02:55 +02:00
Marius Guggenmos
c1ef283fb6 switch/case edges are now also added to graph view via afbe 2018-04-26 16:28:07 +02:00
pancake
4d133ff1f9 Use more heap in some places to avoid sdb_fmt corruptions 2018-04-25 12:30:57 +02:00
pancake
0a22f4a36b Fix oobwrite in x86.cs and honor anal.depth in more places 2018-04-25 12:30:57 +02:00
pancake
b99bb97def Improve r_cons_is_breaked coverage 2018-04-25 12:30:57 +02:00
pancake
cf7dcf07dc Fix return value for RBuffer.sparse when reading beyond the end 2018-04-24 13:15:25 +02:00
pancake
faeef90fdf PPC VLE align is 2 not 4, at least for instructions 2018-04-24 12:56:58 +02:00
Anton Kochkov
38ff57c447 Fix build 2018-04-24 18:47:37 +08:00
pancake
f90dea6936 Fix comments in last jmptbl pr 2018-04-24 12:27:03 +02:00