Commit Graph

278 Commits

Author SHA1 Message Date
pancake
2cf9c91518
Implement tms320.pseudo to fix another arm64 test ##asm (#17613)
Co-authored-by: Riccardo Schirone <ret2libc@users.noreply.github.com>
2020-09-21 11:51:04 +08:00
pancake
45994dcc1f
ARM: Fix asm.pseudo for MOVN ##disasm (#17446)
Co-authored-by: pancake <pancake@nopcode.org>
2020-08-14 18:03:08 +08:00
Riccardo Schirone
154416c8fd
Add unit tests for binheap (#17367) 2020-07-31 18:09:50 +08:00
GustavoLCR
5b101b6521
Improve ARM and PPC analysis ##anal (#17356)
* Fix stepping with ESIL into thumb code
* Fix seek changed after `aaef`
* Run `aaef` instead of `aae` in `aaa`
* Fill IMM info for arm op
* Add op info for arm32 UXT opcodes
* Fill op src/dst info for cast ops on arm
* Fix false positives for reg args detection on arm/riscv
* Change `r_core_recover_vars()` to recurse on bbs
* Fix reg arena stack being corrupted on `aaef`
* Fix detection of var address references on `aaef`
* Fix arm pseudo syntax output
* Correctly substitute pc relative offsets
* Substitute address references to variables
* Fill op->cond for arm64
* Fix wrong jump table size for arm
* Fill bb->cond
* Implement r_anal_block_recurse_depth_first
* Use r_anal_block_recurse_depth_first on r_core_recover_vars
* Handle MRS/MSR on arm64
* Log if arm op not handled
* Complete arm op_fillval
* Convert 32bit arm64 reg names to 64bit
* Fix stackop analysis on PPC
* Fix tests
2020-07-29 10:41:26 +08:00
GustavoLCR
64f5ca4590
Detect stack vars accesses with misc regs with 'aaef' ##anal (#17255)
* Detect stack vars accesses with misc regs with `aaef` ##anal
* Follow bbs in r_core_anal_esil for functions
* Fix ARM PUSH/POP stackop analysis
* Fix arm varsub with `asm.ucase` and `asm.sub.varonly`
2020-07-17 08:01:03 +08:00
Aswin
5454239cae
Rename *sub* variables to asm.sub.* (#17176)
* Rename asm.sub.jmp, asm.sub.reg, asm.sub.rel, asm.sub.tail, asm.sub.varonly, asm.sub.section, asm.sub.varmin
2020-07-06 11:04:50 +02:00
zawwwu
9de7c2e8dd
x86 pseudo for LEA is wrong (#16980)
* Better solution + tests

* Adding pseudo for movabs
2020-06-04 13:02:45 +02:00
GustavoLCR
146c788fa0
Improve BP vars/args detection ##anal (#16935)
* Take into account initial BP position in stackframe
* Add reg name to RAnalVarAccess
* Add `anal.vars.stackname` config variable
* Fix riscv op/src imm info filling
* Fix getting BP vars if it is set with LEA
* Fix arg detection for functions that call __chkstk
* Fix tests

Signed-off-by: GustavoLCR <gugulcr@gmail.com>
2020-05-25 12:55:31 +08:00
Florian Märkl
4560120be2
Refactor Variable Accesses out of SDB (#16632)
Fix #15944
2020-04-19 17:56:27 +02:00
Florian Märkl
35290dd51d
Refactor Variables out of SDB ##anal (#16547) 2020-04-17 22:10:49 +02:00
Florian Märkl
18b1647267
Remove some useless members from RAnalVar (#16548) 2020-04-14 11:05:59 +02:00
pancake
79c5da3b1e Code cleanup in parse.x86_pseudo 2020-03-21 16:52:43 +01:00
radare
9ddfafcd65
Show flag realname when finding a function and realname is enabled ##disasm (#15827) 2020-01-16 21:15:42 +01:00
GustavoLCR
7d19556001 Improve SP based variable analysis ##anal
* Make SP based variable analysis aware of changes to SP
* Use delta inside stack to identify the variable used instead of offset to SP
* Keep track of offsets to SP used to access the variable
* Fix argument printing order for reg args
* Add test
2019-12-18 16:32:46 +01:00
xarkes
e5f7fd947f Removed uppercase sub variables (#15209)
There's no particular reason to make the sub variables
uppercase when asm.ucase is enabled. Plus the color parser
does not recognize uppercase subvariables, so now everything
is properly colorized.
2019-10-06 21:22:53 +02:00
radare
a0c6997cc5
Fix #14655 - Improve asm.pseudo for Dalvik ##disasm (#14694)
class, method and field names are now shorter and easier to read
2019-07-30 04:22:19 +02:00
pancake
9778da3b7b Fix arm64 parse for BL instructions ##disasm 2019-06-20 20:14:27 +02:00
Anton Kochkov
20e19d6023 More spelling fixes in the code 2019-06-20 13:36:02 +08:00
Martin Brunner
af95ca437d fix, improve and add some sh pseudo ##disasm
* I recommend reading SH operands right-to-left
* tst is checking for zero (!)
2019-06-19 17:26:17 +02:00
radare
4dbe1453f5
Initial cleanup in RParse, delete mreplace plugin ##disasm
* Also voidify and boolify anal, parse, cons, bin, ..
2019-06-17 02:23:58 +02:00
radare
b282620b7a
Fix #14303 - oob crash in RParse api usage, needs API redesign (#14307) 2019-06-15 13:24:00 +02:00
radare
571a080ca7
s/CORELIB/R2_PLUGIN_INCORE/g (#14295) 2019-06-13 19:12:51 +02:00
radare
1ab587c971
Improvements in dalvik analysis ##anal 2019-05-25 23:31:06 +02:00
radare
d73483ae0d
Improve anal and parse plugins for Thumb ##anal (#14120) 2019-05-21 09:52:11 +02:00
pancake
90fd81ca81 Fix warnings here and there 2019-05-14 10:44:19 +02:00
David CARLIER
44f9806763 Couple of mem leak fixes proposals. (#14038) 2019-05-12 10:24:15 +02:00
pancake
04af34ca8b Initial work on refactoring RParse 2019-04-25 17:01:20 +02:00
pancake
9f574c758f Add some more x86 instructions for pseudo ##disasm 2019-04-21 12:09:44 +02:00
Maijin
f24ced4aa5 Fix mulss pseudo (#13470) 2019-03-23 03:50:27 +01:00
Vasilij Schneidermann
9856bfab28 Chip8 pseudo fixes (#13453) 2019-03-22 00:40:53 +01:00
Vasilij Schneidermann
c5d09f32e8 Add chip8 pseudo support ##disasm 2019-03-16 20:48:27 +01:00
sivaramaaa
c55d8e4b9c Fix MIPS asm parser to display vars in disasm ##disasm 2019-02-17 05:21:08 +01:00
pancake
709ffb60b6 Fixes for the android build and related warnings 2019-01-21 12:10:33 +01:00
Pepe Vila
015e7734a7 Fix Wasm function rename to ignore memory and other non-function symbols (#12832) 2019-01-18 16:30:09 +01:00
Giovanni
5f931603de WebAssembly improvements in branch lines and namings ##wasm 2019-01-18 11:29:51 +01:00
Jessica Creighton
d7571566a2 Have arm pseudo's replace() use the same replacement style as x86's ##disasm
* Fix `movt r0, 0x1234` from incorrectly showing up as `r0 = 0x1234 << r0`
2019-01-09 22:15:20 +01:00
pancake
b29f5bb54a Fix some issues reported by clang-analyzer 2018-12-31 05:36:14 +01:00
radare
d05292e485
Fix 80 warnings coming from gcc8.2 (#12280) 2018-11-22 22:11:43 +01:00
lzutao
b790439e28 Cast arguments to ut8 when feeding ctype.h functions ##refactor
The behavior of the `<ctype.h>` functions is undefined for negative
arguments (other than `EOF`). In such a situation, the argument should
be cast to `unsiged char` for safety.

References:
 - C Programming: A Modern Approach, 2nd Edition: page 612, chapter 23.5
2018-11-06 13:40:00 +01:00
sivaramaaa
bc4b5933d2 Improve array indexing in disassembly ##anal 2018-11-02 18:27:45 +01: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
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
radare
47297f6d0a
Initial implementatil of asm.tailsub (#11696) 2018-09-30 11:41:19 -04:00
dogtopus
d3b5b59b05 Parse add instruction in mips.pseudo (#11689) 2018-09-28 18:24:34 -07:00
Paul I
bf29250ddd Fix #11487 (#11534) 2018-09-15 22:52:12 +02:00
fcasal
0ad81b1a7f Detect golang by looking at golang sections. (#11520) 2018-09-14 14:54:00 +02:00
Neven Sajko
4a722e80d8 Add braces to if, else, for, while ... (#11504) 2018-09-13 10:17:26 +02:00
Giovanni
7858546004 ppc fix for rl/rw* masks (#11315) 2018-08-30 22:46:25 +02:00
pancake
991e81df37 Improve ARM pseudo for LDRH 2018-08-13 16:31:42 +02:00
radare
68eb5173ba
Better asm.pseudo for arm64 (#11030) 2018-08-11 18:08:21 +02:00