Commit Graph

8706 Commits

Author SHA1 Message Date
Vanellope
b0d27320ab Fix the resizing algorithm of panels ##visual 2018-10-27 00:30:47 +02:00
radare
4f30ffc7d3
Add asm.section.perm and asm.section.name (#11952) 2018-10-26 23:26:32 +02:00
radare
95cd299e8b
Initial import of the REvent API ##refactor 2018-10-26 23:23:51 +02:00
Maijin
2519780a6a Remove SR commands ##refactoring 2018-10-26 22:32:30 +02:00
Riccardo Schirone
c09ba158fe
sync sdb and adapt r2 codebase (#11953)
add improvements of SdbHt from sdb
2018-10-26 15:54:32 +02:00
Adrian Studer
1064853c33 Stop pdR when encountering a ret (#11930) 2018-10-26 14:43:32 +02:00
pancake
11c02de20c Fix #11936 - Optimize RCons.hud with cache ##refactor 2018-10-26 00:58:47 +02:00
pancake
778ba010ce Fix build and start refactor of r_cons_hud() ##refactor 2018-10-26 00:24:56 +02:00
Vanellope
6479311b08 Fix help in panels ##visual (#11943) 2018-10-25 23:43:21 +02:00
Maijin
337dd0d909
Remove Sf command ##refactoring 2018-10-25 21:20:16 +02:00
Vanellope
bbd07a2f7f Fix : command ##visual (#11940) 2018-10-25 19:40:56 +02:00
radare
2420cb53d2
Kill anal.bb.align variable ##refactor 2018-10-25 15:34:09 +02:00
Vanellope
3050203ac0 Change the default panels depending on the analysis ##visual 2018-10-25 12:52:41 +02:00
Maijin
357255edbc Fix #11879 - Move aae in aaa ##anal (#11933) 2018-10-25 12:51:59 +02:00
Vanellope
3e27396b92 Deleting a panel in zoom mode breaks the whole layout and now it does not. (#11931) 2018-10-25 10:00:02 +02:00
Maijin
d5aeac178a
Add golang symbols detection in aaa Fix #10959 2018-10-25 09:45:28 +02:00
davidpolverari
8a22c89461 Fix #11923: Early null check in cmd_info.c iz cmd (#11928) 2018-10-24 18:46:14 +02:00
David CARLIER
45618e6231 Fix hints memory leak when analysing functions ##leaks 2018-10-24 18:45:53 +02:00
Riccardo Schirone
6115f00455
remove r_bin_load_io2 and rename MODE defines ##refactor
PR #11888 

* bin: no need for 2 r_bin_load_io APIs
* bin: remove io-related unused functions
* r_bin.h: remove some old comments
* r_bin.h: group together related APIs
* extract print/set modes in r_types, to remove dups in r_bin and r_core
* clang-format-diff: fix ternary operator indent for pancake
2018-10-24 16:54:57 +02:00
pancake
4d4ce2f49c Code cleanup in the mach0 parser ##refactor 2018-10-24 13:05:29 +02:00
a1ext
b56af23ee7 Null terminate buffer to fix garbage in psi, psb and psz ##visual
* Avoid unnecessary memsets
2018-10-23 22:27:01 +02:00
Vanellope
ef03d1096f Properly support the Hud in panels ?? && _ ##visual 2018-10-23 21:50:57 +02:00
Vanellope
2c3ace4777 First step to support xrefs in visual panels ##panels 2018-10-23 21:40:31 +02:00
Vanellope
89dd8a57da Handle / key in visual panels to set scr.highlight ##visual 2018-10-23 21:39:19 +02:00
radare
e49bca77b9
Improve AAP for ARM32 (#11909) 2018-10-23 21:33:39 +02:00
Paul
567cdb1fcf initiatized -> initialized (#11905) 2018-10-22 23:35:55 +02:00
minhnxd
f95120bb4e Check for NULL on obj member before calling r_list_length (#11894) 2018-10-22 17:26:59 +02:00
Florian Märkl
52ff4b4d8e Fix pdJ for asm.xrefs.fold and max 2018-10-21 18:28:44 +02:00
Riccardo Schirone
64d16fc506 Some code cleanup and asserts in RBin ##refactor
* libr/bin: no need to allocate RBinOptions on the heap
* bin: start using r_return_* around, that's just the beginning
* bin: remove io_owned since it's not used anywhere
* io: make r_io_bind return nothing
* bin: remove unused functions and simplify r_bin_load_io
r_bin_load_io was calling r_bin_load_io2 with UT64_MAX as sz parameter,
but r_bin_load_io2 just returns false if (st64)sz is less than 0, so
that call is actually useless and can be removed.
* bin/bin: fix some preconditions
* bin/open: fix precondition to check for bin and filename too
2018-10-21 01:27:15 +02:00
Collin Reilly Clark
c595ebe447 remove duplicate word
This address is is not part of the arenas -> This address is not part of the arenas
2018-10-21 01:23:50 +02:00
pancake
f89ee17b24 Fix null deref in aav for static builds 2018-10-20 18:32:38 +02:00
Khairul Kasmiran
c8515c7722 ie: set hvaddr of elf entry0 from hpaddr 2018-10-20 02:20:01 +02:00
pancake
a33fc03725 Fix visual panels glitch and handle 's' in zoom mode ##visual
* And remove dead code
2018-10-20 02:12:30 +02:00
radare
e7d3706b8f
Fix gcc8 warnings and rename core/asm.c to casm.c ##refactor 2018-10-20 01:23:15 +02:00
radare
3eeaa1817c
Fix cyclomatic complexity computation when jump tables are involved ##anal (#11840)
* Add asserts and checks to ensure the graph is correct before analysis
* Use correct E-N+2P formulae
* Run afbe right after af to get the jmptbl info loaded asap
2018-10-19 13:55:12 +02:00
radare
6bc3d5562f
Fix #11851 - Cursor and echo glitches in Visual ##visual 2018-10-19 13:42:38 +02:00
radare
ff640a3ff6
Fix #11838 - Use op.val in aar and honor asm.var.submin ##anal 2018-10-19 02:08:54 +02:00
MK
3c74828055 Fix #11856 dmh puts "No Heap section" error msg twice (#11857) 2018-10-19 02:02:38 +02:00
Vanellope
297b097827 Removed a really meaningless piece of code (#11861) 2018-10-19 02:00:09 +02:00
Khairul Azhar Kasmiran
856f8bcc8e Fix displaying ESIL function comments in the graph ##visual 2018-10-18 17:23:56 +02:00
radare
136db63c05 Fix help and autocompletion for id* (#11845) 2018-10-18 11:52:33 +08:00
Riccardo Schirone
55bdcbb94c core/cbin: vaddr/paddr were switched in iz ##bugs (#11839) 2018-10-17 22:40:54 +08:00
F3real
70afbcc36e Fix leaks in cbin and cmd 2018-10-16 02:19:40 +02:00
pancake
4205cdabee Fix memory leaks in RReg 2018-10-16 00:17:44 +02:00
radare
c8356abb03
Add zign hash using sha256 (#11822) 2018-10-15 19:13:18 +02:00
rfc2119
dca5c9e3d7 Fix asm.describe=1 when asm.cmt.right=0 (#11803) 2018-10-15 16:52:14 +02:00
radare
4f81a35adb
Improve and update help message for the $F variables (#11819)
* Improve and update help message for the $F variables

* oops
2018-10-15 16:18:21 +02:00
Luca Di Bartolomeo
3bf4288577 Print marks on flags if asm.offset=false (#11773) 2018-10-15 13:48:59 +02:00
Khairul Azhar Kasmiran
de0301b9ae disasm.c: Realign after sparse to start of basic block if needed (#11810) 2018-10-14 17:39:46 +08:00
Stefan Ilic
a061c504cf Fix leak in cfile (#11809) 2018-10-14 17:37:45 +08:00
pancake
b66374d937 Fix uninitialized use of variable in visual panels 2018-10-13 13:24:13 +02:00
Khairul Azhar Kasmiran
84d7142131 disasm.c: Add ds_comment_start/middle/end + use case (#11802)
* disasm.c: Add ds_comment_start/middle/end + use case
* For backwards compatibility
2018-10-13 01:40:35 +02:00
Florian Märkl
1293fb792f Fix tj (#11797) 2018-10-12 12:18:38 +02:00
Riccardo Schirone
d6aab51c2b WIP: gcc8 warnings (#11795)
* arch/ebc: fix style and remove gcc8 warnings
* parse/parse_ppc_pseudo: fix gcc8 warnings
* parse/parse_mips_pseudo: fix gcc8 warnings
* anal/esil: fix strncat usage
* shlr/tcc: fix snprintf usage
* parse/parse_dalvik_pseudo: fix sprintf -> snprintf
* lang/vala: fix gcc8 warnings
* core/vmenus: fix snprintf usage
2018-10-12 12:17:29 +02:00
Florian Märkl
1dad5dfd1c Fix #11794 - Fix escaping realname in axtj 2018-10-12 11:50:46 +02:00
David CARLIER
7995271176 Fix few code paths. (#11792) 2018-10-12 00:10:07 +02:00
Khairul Azhar Kasmiran
0aa09a07ec
RParse.relsub_addr: int -> ut64 (#11791) 2018-10-11 21:51:13 +08:00
Florian Märkl
b37e0ffa42 Fix #11785 - oc hang (#11790) 2018-10-11 20:00:59 +08:00
pancake
22cd188423 Fix crashes in nN, w, add space and other stuff for visual panels 2018-10-11 13:01:20 +02:00
Riccardo Schirone
c19023834e core/cmd_type: use sdb API sdb_foreach_list_filter 2018-10-11 09:53:22 +02:00
Riccardo Schirone
eb57550978 core/cbin: fix uses of ht_* api 2018-10-11 09:53:22 +02:00
Riccardo Schirone
8f376b10cc
cmd_type: refactoring code to print type structs/enums/etc. (#11782)
cmd_type: refactoring code to print type structs/enums/etc.
2018-10-11 01:30:24 +02:00
Khairul Azhar Kasmiran
c7a9ab9d74 Fix arm relsub when both pointer addr and pointed-to addr have flags (#11780)
* Fix arm relsub when both pointer addr and pointed-to addr have flags
* Add comment stating extra implication
* Print flag if exists, otherwise address but not both
2018-10-11 01:17:48 +08:00
fcasal
871662e74c Fix comments and whitespace (#11781) 2018-10-10 12:19:56 +08:00
Luca Di Bartolomeo
b7a9dd64e4 Avoid centering graph nodes too big for the current terminal size (#11771) 2018-10-09 12:30:40 +08:00
Jānis Džeriņš
0cd5c5dadc Make up lines even more beautiful (#11770)
Use dashed line from the same Unicode block as other line drawing
characters.  This ensures that they all are present in the same font,
are the same width and align perfectly.
2018-10-09 00:18:47 +02:00
Riccardo Schirone
ab4578a546
remove random warnings when compiling (#11767)
* remove random warnings when compiling

* debug_native: provide r_debug_handle_signals on windows
2018-10-08 13:21:50 +02:00
pancake
6a75230ea9 Fix #11634 - Crash in visual disasm for large dalvik instruction 2018-10-08 12:54:38 +02:00
pancake
816463ed70 Fix warnings in dmh 2018-10-08 11:33:51 +02:00
bannsec
a5d29f3d20 Fixing a couple MemLeaks (#11766) 2018-10-08 09:55:13 +02:00
pancake
de099c9806 Fix pCx 2018-10-08 00:12:05 +02:00
pancake
15aff17004 Fix oobread in pxr 2018-10-07 23:43:23 +02:00
radare
9235b015be
Fix #11751 - fix asm.pseudo crash after RStrBuf in RAsmOp (#11755) 2018-10-07 11:50:59 +02:00
pancake
5fbffa1769 Fix left shift (long vs ut64) 2018-10-07 11:49:28 +02:00
pancake
88ebd1d772 Fix an assert in aac 2018-10-07 02:35:02 +02:00
pancake
b4eb643556 Fix #11748 - Implement tuj 2018-10-07 02:25:09 +02:00
pancake
71ad7aa138 Implement tsj command 2018-10-07 02:21:21 +02:00
pancake
305be74a8c Implement tej to print enums in json 2018-10-07 02:11:13 +02:00
pancake
1c57059e89 Fix assert in ic 2018-10-07 00:38:39 +02:00
Riccardo Schirone
018af047d9
core/cmd_print: fix ASAN crash (#11742) 2018-10-05 15:22:07 +02:00
Riccardo Schirone
e2278cc50f
sync sdb: some refactoring on how to access base SdbKv fields (#11741) 2018-10-05 15:21:46 +02:00
pancake
786feaa80b Fix one crash and one assert in the graph and remove one useless warning 2018-10-04 16:12:32 +02:00
pancake
088ead5872 Fix last cov 2018-10-04 04:25:24 +02:00
saucec0de
b06c44385b Fix debugging in FreeBSD 11.2 (#11726) 2018-10-04 02:48:15 +02:00
David CARLIER
036db696d1 Fix couple of leaks. (#11716) 2018-10-02 15:24:27 +02:00
radare
d997fb62ba
Fix pd-x, tests pd -x and pd--x too (#11709) 2018-10-02 05:53:35 +02:00
pancake
92f5af1e79 Upgrade to the latest Sdb 2018-10-02 05:18:39 +02:00
pancake
5a7347f12f Implement tfj and optimize it with latest sdb (separate commit) 2018-10-02 05:18:39 +02:00
pancake
f0b7941741 Implement aefa and arA commands 2018-10-02 05:18:39 +02:00
Riccardo Schirone
5073d6b4e1 core/disasm: make flaglist variable const RList * 2018-10-01 21:07:51 +02:00
radare
f7be81edbb
Fix instruments leaks (#11695)
* Fix a small memleak in the disasm reflines
* Fix huge args leaks in r_parse for arm
* Fix another memleak
* Fix memleak in VR
* Fix memleak related to bad use of r_list_join
* Fix warnings
* Fix two rlist related asserts
2018-10-01 19:57:33 +02:00
Vanellope
6525f1b28e Window mode is supported so that user can move around the panels by hjkl, not only by too many Tabs (#11681) 2018-10-01 10:05:23 -04:00
Vanellope
66b865995a Refactoring a too big function (#11700) 2018-10-01 10:04:36 -04:00
Riccardo Schirone
7677ef9246 Memleaks (fix #11389) (#11674)
* util/strbuf: r_return ification!
* r_core_anal_hasrefs returns malloced string, free it after use
* util/list: r_return ification
* anal/fcn: prevent memleaks of RListIter objects in fcn->fcn_locs
The fcn_locs list was not freed because we don't need to free functions
from fcn_locs but we free them in core->anal. However, the list->free
method was set, even if never used, so I removed it.
Moreover, we should free the fcn_locs list anyway (but not the elements
inside) because the RListIter elements have been allocated on the heap.
* egg: remove *uck message
* core/cbin: check returned list before using it
* core/cbin: check list before using it
* util/strbuf: fix r_return condition in strbuf_append
* libr/core: fix some possible NULL deref and avoid function ptr casts
* only fcn->fcn_locs doesn't need the free function, the others do
2018-10-01 09:33:30 -04:00
radare
9e9dd12a4c Delete nowarn (#11694)
* NYI means not-yet-implemented
* Kill file.nowarn configuration variable
2018-10-01 15:55:08 +08:00
radare
47297f6d0a
Initial implementatil of asm.tailsub (#11696) 2018-09-30 11:41:19 -04:00
Jan Scheer
5e010d94a3 Fix pae/pade only print first line of ESIL expression (#11677) (#11686) 2018-09-29 17:56:46 -07:00
David CARLIER
70a651f019 Couple of leak fixes and dead code cleanup (#11682) 2018-09-28 11:39:50 +02:00
radare
18de6e4aff
Command repeat is now ut64 (#11656) 2018-09-27 15:18:15 -07:00
Neven Sajko
211566922b Remove three unused functions (#11633) 2018-09-27 14:14:38 -07:00