Commit graph

597 commits

Author SHA1 Message Date
Riccardo Schirone
a87a77f9e4 core/disasm: asm.bbline should be based on RAnal
The BasicBlock is a concept you can have only with analysis info. This
ensure that the displayed result is correct.
2016-02-24 23:00:41 +01:00
Riccardo Schirone
e727e662db core/disasm: fix bbline reflines 2016-02-24 23:00:41 +01:00
pancake
607491e1ce More fixes for pd@x:90 variants. New tests in r2r 2016-02-22 23:53:29 +01:00
pancake
8d60ef61dc Fix #4110 - Fix pd@x:90 issue 2016-02-22 23:45:36 +01:00
William Robinet
d3ab5f38aa Remove execution bit from source files 2016-02-16 23:21:46 +01:00
William Robinet
0c7cacc2dc Fix typos 2016-02-16 23:21:24 +01:00
pancake
0e69bfd541 Add default noreturn functions, adjust xrefs and fix regression in type 2016-02-16 03:24:47 +01:00
pancake
de4cbb47ad Show flags referenced by the Cd 4|8 pointers 2016-02-16 02:50:02 +01:00
pancake
384cfb1042 Fix last coverities 2016-02-16 02:08:09 +01:00
Riccardo Schirone
82385bdbd1 core/disasm: ds->addr can change, addr remains always the starting value 2016-02-11 11:17:00 +01:00
Álvaro Felipe Melchor
feaaab517b demangle afl and disassembly 2016-02-11 01:32:36 -06:00
Riccardo Schirone
b4fda922cd libr/core: calculate the offset of each disasm row
util/print: fix bug in r_print_row_at_off

core/disasm: fix bug when setting the row offset of last line
2016-02-11 00:14:36 -06:00
Riccardo Schirone
94123f158c core/disasm: review screen_bounds meaning
core/visual: enable screen_bounds only on default modes
2016-02-11 00:14:36 -06:00
pancake
6b79f915df Fix #4095 - VdW chopping down to 32bits 2016-02-10 11:45:25 -06:00
pancake
c9779da737 Fix iopa tests 2016-01-27 03:33:52 +01:00
pancake
75d7faf35e Fix regression in comments in disasm 2016-01-27 02:49:40 +01:00
pancake
86b2cd3812 Fix #3958 - asm.emu obeys asm.cmtright 2016-01-27 02:35:45 +01:00
pancake
bcb065e5dd Fix #4031 and #4030 - asm.jmphints independent from asm.comments 2016-01-27 02:25:25 +01:00
condret
e9aa1bfa80 hardening 2016-01-20 16:13:30 +00:00
condret
ccab168cb5 fix a memleak and implement esil.stacksize for @crowell 2016-01-19 23:36:21 +00:00
pancake
3b4fc2cf9a Fix #3950 - Implement asm.emustr 2016-01-15 00:17:28 +01:00
pancake
beb2dd2f3f Enhance asm.nodup to support invalid instructions and count them 2016-01-11 22:28:22 +01:00
pancake
5ed63681b4 Fix #3921 - do not show dupped instructions with asm.nodup 2016-01-10 22:31:20 +01:00
Riccardo Schirone
a20562d6e8 util/print: fix glitch when cursor is on . at the end of hexpairs
* fix visual instruction alignment when using asm.bytespace
2016-01-08 23:33:57 +01:00
Álvaro Felipe Melchor
c939ba7da9 Fix #3852 & changes in midflags 2015-12-31 02:10:18 +01:00
Judge Dredd (key 6E23685A)
60ecab6324 fix anal.bbline with scr.utf8 bug 2015-12-29 17:59:15 +01:00
pancake
6a274bd3c6 Initial import pds|pdsf to disassemble only strings 2015-12-21 15:53:53 +01:00
pancake
f264b1d1e3 Fix pdf on folded function issue 2015-12-16 15:30:13 +01:00
pancake
25892b084a Show comments in folded functions 2015-12-15 01:03:42 +01:00
pancake
2f9623786f More fixes for the folded functions in disasm 2015-12-15 00:37:33 +01:00
pancake
d0444bbe15 Fix multiple folded functions glitch in disasm 2015-12-15 00:18:44 +01:00
pancake
1f647dd2e6 Refix #3785 2015-12-14 12:11:34 +01:00
pancake
a3d8a3a50d Fix asm.emu regression 2015-12-14 10:57:50 +01:00
pancake
db5a76f8b3 Initial support for fold/unfold functions with afF and Vz 2015-12-14 10:19:07 +01:00
pancake
8dedcf406b Fix #3785 - Fix refline colors in arg/var with custom color theme 2015-12-03 14:48:15 +01:00
Riccardo Schirone
5311241537 core/disasm: add '~' mark when midflags is into effect
'~' is used to notify the user that the instruction is using some bytes
of the next instruction because of asm.midflags.
2015-11-29 12:25:31 +01:00
Riccardo Schirone
fce421b0f0 core/disasm: change cursor when in the middle of an instruction
fix #3748
2015-11-27 20:37:19 +01:00
Riccardo Schirone
3989c94c5a core/disasm: fix some corner cases in the cursor display
fix #3747
2015-11-27 20:37:18 +01:00
Riccardo Schirone
c7a444cb39 core/cmd_meta: fix regression with format memory metadata 2015-11-24 12:45:43 +01:00
pancake
078739dc2b Check if ds->line is null in asm.bbline 2015-11-24 03:11:55 +01:00
pancake
cffa44b2f7 Add ara command and fix RReg.arena.push/pop implementation 2015-11-24 00:58:03 +01:00
pancake
b4308219e7 UJMP also bbsplits 2015-11-23 11:03:10 +01:00
pancake
4c4747aa33 Fix asm.bbline fcnline glitch 2015-11-23 10:30:49 +01:00
pancake
cab871f3e6 Fix #650 - asm.bbline - blankline on every basic block 2015-11-23 01:40:35 +01:00
pancake
6027d6e44e Implement asm.relsub 2015-11-19 23:12:25 +01:00
pancake
30b1fcc208 Initial implementation of the V, comma-ents stuff 2015-11-18 13:03:35 +01:00
pancake
9c9bb2dbd5 Memory optimization for flags (-70%) + some warnfixes + sdb-sync 2015-11-08 23:38:42 +01:00
Riccardo Schirone
24f675e8af core/reflines: improve reflines algorithm 2015-11-07 11:23:31 +01:00
Riccardo Schirone
932ba39978 core/disasm: remove asm.linesup(date) option 2015-11-07 11:23:31 +01:00
Riccardo Schirone
f651209623 core/reflines: start cleaning up the code 2015-11-07 11:23:31 +01:00
pancake
0fdae7223a Do not show OKs in tests + minor code cleanup 2015-11-05 02:07:35 +01:00
pancake
6e01343887 Fix #3653 - asm.pcalign issues 2015-11-02 18:57:01 +01:00
Riccardo Schirone
c8804ee0a8 core/disasm: a little refactoring for show_colors 2015-11-02 15:22:44 +01:00
pancake
72b27776d7 Initial support for function signatures using pf and initial symbol tables 2015-10-30 03:07:22 +01:00
pancake
ec2ac9c640 Initial implementation of asm.emuwrite and asm.emu for CALL and UCALL 2015-10-29 23:37:51 +01:00
pancake
4756e610d9 Add RBin.srcdir and dir.source for asm.dwarf 2015-10-29 12:37:14 +01:00
pancake
894fa1cdf8 Do not abuse rcons for asm.emu.syscall 2015-10-29 11:54:00 +01:00
pancake
6a85a44962 Handle syscalls in asm.emu, better debug.arg and osx-syscalls 2015-10-29 11:22:49 +01:00
pancake
461b714503 Fix objc heap overflow class parsing bug 2015-10-21 12:19:19 +02:00
pancake
620d47675f Workaround for the fixedblock issue 2015-10-21 01:51:34 +02:00
pancake
79d212eafa Fix pdi 2015-10-21 00:26:32 +02:00
pancake
84bd6df03f Fix asm.filter in pi command 2015-10-20 23:48:34 +02:00
pancake
b111057798 Fix #3505 - analyze cmovs a bit 2015-10-18 22:14:06 +02:00
Anton Kochkov
18be7dfc36 Better output with labels 2015-10-18 01:41:59 +03:00
Anton Kochkov
6a6a3befb4 Fix the local flags? 2015-10-18 01:07:58 +03:00
pancake
1d3f36f4d3 Properly fix the mips oobread crash 2015-10-14 15:38:55 +02:00
Riccardo Schirone
06ec37edd2 core/graph: use multiletter shortcuts to jumps between functions
TODO: shortcuts relative to basicblocks should make the target node the
current one.
2015-10-14 00:10:58 +02:00
jvoisin
790a42f563 Show family in p*j 2015-10-08 17:02:22 +02:00
Riccardo Schirone
0de25aacda core/graph: use pD instead of pI to display comments and fcn info
core/disasm: fix some printing things
2015-10-06 18:24:41 +02:00
pancake
47cec917b2 Add asm.family 2015-10-03 13:52:52 +02:00
pancake
06b45e0ffb Fix dm issue after performance workaround 2015-10-01 19:32:30 +02:00
Riccardo Schirone
6a389cb601 core/disasm: re-enable hints during disasm 2015-09-28 17:22:06 +02:00
pancake
3c78218da3 Fix crash in ds->hint 2015-09-28 11:21:23 +02:00
pancake
50340be871 Fix #3376 - Implement immbase anal hint 2015-09-28 01:00:06 +02:00
Riccardo Schirone
2a7c35c435 core/disasm: increment PC before parsing esil instruction 2015-09-22 00:11:33 +02:00
pancake
4e47d86de0 Honor wheelspeed, fix oob in vmenus and more boolification 2015-09-14 16:22:57 +02:00
pancake
b515a34676 More stdboolification 2015-09-14 12:35:38 +02:00
pancake
1bf2d47f00 Fix last COVs 2015-09-12 19:12:57 +02:00
pancake
3fed8b71c6 Rename asm.esil.anal into asm.emu 2015-09-11 23:46:09 +02:00
pancake
245bd77a40 Fix #3264 - Colorize floating point numbers in disasm 2015-09-10 22:49:05 +02:00
pancake
7a2fbeaf0a Ignore null pointers in asm.esil.anal 2015-09-10 22:28:04 +02:00
pancake
c1335f6834 Support flags in asm.esil.anal comments 2015-09-10 05:14:47 +02:00
pancake
f62313c24b Missing space for 'likely' 2015-09-10 04:28:05 +02:00
pancake
783d31bf5a Find strings in esil and support thumb aap 2015-09-10 04:20:09 +02:00
pancake
4506a98cff Add arena.peek/poke, and fix emulation for asm.esil.anal 2015-09-10 01:42:56 +02:00
pancake
c025b5bd81 fix regression 2015-09-10 00:41:19 +02:00
pancake
9f95d5c1aa Initial implementation of asm.esil.anal. WIP 2015-09-10 00:34:21 +02:00
jvoisin
d4893718da Fix a bunch of dead assignements 2015-09-09 21:12:36 +02:00
pancake
9e11c5ce63 Make reflines 5x faster 2015-09-09 17:57:55 +02:00
pancake
6e4fd3e5a3 Enhace reflines a bit more 2015-09-09 01:24:27 +02:00
pancake
d1139711ff Honor utf8 in reflines 2015-09-09 00:42:30 +02:00
pancake
4c99bb6845 Refactor reflines and support asm.linesup for longer disasm 2015-09-08 23:21:35 +02:00
pancake
424fe2261c Fix #3219 - LDR ref issue on thumb 2015-09-02 10:01:53 +02:00
pancake
6b254a98c7 Fix #1118 - Add asm.invhex and asm.lines.ret
- Do some cleanup in RAsm and RCore.disasm
- Accidentally reverts 74be82d30b.
2015-08-31 00:24:28 +02:00
pancake
0096c5bf1d Fix null deref issues in anal reflines 2015-08-30 23:35:02 +02:00
pancake
1d4b0d8555 Fix some covs 2015-08-28 17:21:04 +02:00
pancake
90fcbd10dc Fix #3182 - blacklist relocs in midflags 2015-08-27 13:44:57 +02:00
Álvaro Felipe Melchor
74be82d30b Fix #1118 2015-08-26 23:39:23 +02:00
pancake
1efa0f2f7e Add asm.slow eval config var to speedup disasm
- Useful for slow io backends
2015-08-26 03:27:34 +02:00
pancake
235953900c Fix glitch in disasm DATA XREFS 2015-08-26 00:29:56 +02:00
pancake
1f277f72e9 Add asm.indentspace and implement .atd and atl 2015-08-12 10:40:24 +02:00
Riccardo Schirone
ed4691b51c core/disasm: reset colors at the end of a line with only one style 2015-08-09 22:17:56 +02:00
pancake
036b07bf6b Do not show flags in disasm if the function name is the same 2015-07-27 23:01:01 +02:00
pancake
1e8714f0cf Fix cmd_pd_bugs (function names must not be section) 2015-07-25 03:31:17 +02:00
pancake
5ffe848cb2 Fix COV 1311950 2015-07-17 11:33:16 +02:00
Riccardo Schirone
99ac4461c4 core/config: rename var to enable/disable marks before disasm 2015-07-16 13:20:04 +02:00
pancake
d4eb221d38 Add asm.tabsoff variable to make Bokken happy 2015-07-15 17:30:34 +02:00
pancake
10ad1deaac Fix op.ref issue on some x86 MOVs and show flags for op.ref 2015-07-15 16:45:24 +02:00
pancake
2145a2cd05 Add asm.tabsonce to only tabulate the instruction 2015-07-15 15:14:51 +02:00
pancake
cb26b7a366 Fix asm.describe when asm.ucase is set 2015-07-15 14:55:00 +02:00
pancake
d645c3338f Honor asm.fcnlines in asm.vars 2015-07-15 00:09:24 +02:00
Riccardo Schirone
acf1a347d6 core/config: add var to enable/disable cursor before the disassembly 2015-07-14 19:24:16 +02:00
pancake
51ef7c01d1 Autocomment for memref strings in disasm (reported by @dwenstein) 2015-07-08 18:46:35 +02:00
pancake
c334632809 Add anal.noncode to avoid analyzing data by default
Fix double-free in core/anal.c
2015-07-05 01:44:45 +02:00
Jeffrey Crowell
cb2184912d fix out of bounds heap read in perform_disassebly
close #2872
2015-07-01 18:52:25 -04:00
pancake
7851b75e5c Fix color and indentation issues in some comments 2015-06-29 11:37:18 +02:00
pancake
323d54702c Fix #2842 - Fix function boundary lines in one-instruction length function 2015-06-25 22:25:26 +02:00
Riccardo Schirone
77a26237fe util/list: add some const to the API and adapt existing code 2015-06-17 11:22:10 +02:00
pancake
b3fdc01318 Fix regression in disasm with anal-meta 2015-06-15 10:55:05 +02:00
pancake
4e1f7d2f0b Honor asm.esil in pij and make mangling types as masks 2015-06-15 05:04:57 +02:00
pancake
6245e65422 Fix scr.color in pdi 2015-06-14 02:43:37 +02:00
pancake
bcb51cd4ce Fix another asm.cmtright=false color glitch in disasm 2015-06-12 03:09:58 +02:00
pancake
f8b1f8e807 Fix iorap bug, disasm glitch, and comments are red now 2015-06-12 02:11:07 +02:00
pancake
faed37ca55 Honor asm.cmtright for refptr too 2015-06-05 01:03:24 +02:00
pancake
4d900061bb Better asm.cmtright, honors asm.section 2015-06-05 00:45:42 +02:00
pancake
9c467f2ade Fix #326 - call comments honor asm.cmtright now 2015-06-05 00:19:41 +02:00
pancake
99883280e0 Restore internal temporal seek and avoid huge backward disasms 2015-06-04 16:53:04 +02:00
pancake
b6720d8529 Puke rainbows in pi pid and pdi 2015-06-04 13:05:02 +02:00
pancake
10b701640c Fix #2672 - Add 'Vz' to fold/unfold comments. Old Vz is now VZ 2015-06-02 01:04:10 +02:00
pancake
e92f958854 Short asm.section name for debug maps 2015-06-01 15:34:26 +02:00
pancake
312a57c659 Fix #2664 - Show debug map name in asm.section if no section defined 2015-06-01 15:22:03 +02:00
pancake
ca4c0d1d5f Fix save/restore analysis info in projects 2015-05-26 03:11:32 +02:00
pancake
5930eb9caf Fix utf8 disasm glitch with comments alignment 2015-05-21 03:42:00 +02:00
pancake
19f1e78c5c Fix fcn label glitch in pd and extend anal.eobjmp via CJMP 2015-05-14 01:17:35 +02:00
pancake
0697103f7d Fix #2536 - Implement ahS and fix ah in pd 2015-05-10 00:12:33 +02:00
pancake
22a2f87942 Fix some disassembly glitches by implementing e asm.midflags 2015-05-06 00:56:31 +02:00
Anton Kochkov
56f4adf034 Fix CID 1295412 2015-04-23 01:46:28 +03:00
pancake
43dfbd9820 Initial (bugfix/PoC) for the pdc decompiler command 2015-04-16 06:44:48 +02:00
Jeffrey Crowell
7a9ac6ae54 coverifix! 2015-04-13 00:43:42 -04:00
pancake
120a9c4b29 Smarter dstfcn auto comment 2015-04-12 01:28:26 +02:00
pancake
65218eec09 Only show fcnnames in comments when its != than current one 2015-04-12 01:06:10 +02:00
pancake
b4e7960dc3 Bring back the local-flags/function-labels feature 2015-04-12 00:45:39 +02:00
pancake
6ab06a15ba Various fixes for DEX and Dalvik support 2015-04-11 04:33:37 +02:00
pancake
4f70ca5097 Fix pdj offsets issue 2015-04-10 01:57:17 +02:00
pancake
648c50c444 Fix pdj 10 2015-04-09 00:15:29 +02:00
pancake
7c5fa8af06 Fix asm.nbytes 2015-04-08 22:28:21 +02:00
pancake
899e9e5b34 pD regression fixes 2015-04-08 10:41:42 +02:00
pancake
1ae4ccfa39 Fix #2310 - pdj segfault 2015-04-08 03:20:11 +02:00
pancake
fc40b6e685 Fix #2277 - Segfault with e asm.nbytes=0 and update Sdb for mingw32 2015-04-06 18:31:35 -04:00
pancake
fab078d7a3 Support main in linux64 PIE bins 2015-04-03 18:10:43 +02:00