2141 Commits

Author SHA1 Message Date
GustavoLCR
951f46c91f
Fix ARM MTE addg/subg and big endian decoding ##anal (#17995)
* ARM: Fix addg/subg instruction decoding
* ARM: Fix MTE intruction decoding in big endian mode
2020-12-06 18:40:13 +01:00
Jeroen Domburg
b782a02ae3
Fix buffer read callback on all gnu disassembler plugins (#17992) ##disasm 2020-11-29 19:41:57 +01:00
alimansfield2016
4955ef1bc6
Fix wdm instruction decoded as 16bit instead of 8bit (#17922) ##disasm
WDM is a two byte instruction incorrectly being decoded as a single byte.
Modified the table to correct this and updated the format string appropriately.
2020-11-29 01:24:27 +01:00
pancake
b8f37cb0c3 Add few tests for v850.gnu and fix instruction bounds ##disasm 2020-11-28 19:39:23 +01:00
pancake
fee00c7b88 Implement v850.gnu disassembler plugin ##disasm 2020-11-28 19:39:23 +01:00
Aswin C
af745780ef
Add instruction descriptions for tricore ##disasm (#17942)
* Add instruction descriptions for tricore ##disasm

Add instructino descriptions which appear when `e asm.describe` is turned on for tricore architecture

* Add tricore in meson.build

Updated meson.build to add tricore in the sdb_files being built

* Make the test more representative
2020-11-23 12:34:44 +08:00
Liumeo
c611bc89c9
Fix s390x db/asm/x86_64 (#17951) 2020-11-23 12:33:22 +08:00
Liumeo
25c7389e84
fix msvc warning LNK4217 (#17955) 2020-11-22 21:10:49 +01:00
Liumeo
c83d0e0c5f
Implement ppc assembler plugin ##port ##refactor (#17923)
* implement ppc assembler plugin
* reuse code
* update .travis.yml & Dockerfile
* support arm.as big endian
2020-11-20 19:20:14 +08:00
Liumeo
da50d751b7
Fix System Z ELF asm.arch & bits (#17936) 2020-11-19 11:43:14 +08:00
Anton Kochkov
5da1b3b076 Fix some warnings 2020-11-16 18:56:21 +08:00
Liumeo
d4519ef324
Fix msvc warning c4090 in z80 (#17883) 2020-11-01 01:15:13 +01:00
eagleoflqj
6279aa6301 fix travis arm64 db/asm/dalvik 2020-10-25 01:32:02 +02:00
eagleoflqj
9fb7fc3bcd fix travis arm64 db/tools/rasm2 2020-10-19 11:55:37 +02:00
Riccardo Schirone
81e487429f
Use -Wno-cpp to avoid errors on #warning (#17785) 2020-10-14 16:57:07 +08:00
Riccardo Schirone
1e58692071
Fix incorrect uses of printf-like functions ##refactor (#17648) 2020-10-13 16:26:15 +02:00
Riccardo Schirone
741d22ed61
Use -Werror when building in CI (#17781) 2020-10-13 12:42:57 +02:00
pancake
b42fe2c807
Complete v850 instruction descriptions ##asm (#17764)
Co-authored-by: pancake <pancake@nopcode.org>
2020-10-10 12:14:49 +08:00
pancake
c521a6290c
Move spc700 asm,bin plugins to radare2-extras ##asm (#17762)
Co-authored-by: pancake <pancake@nopcode.org>
2020-10-10 12:11:29 +08:00
plaets
452b3ce902
Fix #17746 (buffer overflow in brainfuck disassembler) ##asm (#17747) 2020-10-04 14:17:02 +02:00
Aswin C
fd99114bca
Rename asm.filter to asm.sub.names ##cons (#17737)
* Rename `asm.filter` to `asm.sub.names`
* Rename tests for `asm.filter`
2020-10-01 10:13:58 +08:00
Azox
1287f7443f
FIX ARM IT block ##anal (#17509)
* Fix asm/anal IT block for ARM
* Fix indent + missing spaces
* Fix ARM asm patch breaking test
* Remove forgotten debug printf
* Moved anal patch to separate function anal_ITblock()
* Changed to RIOBind + fix code based on comments
* Fix issue with io/rasm
* Switched to HT, still need to invalidate HT
* Add routine to track and clean ITblock

Co-authored-by: Riccardo Schirone <ret2libc@users.noreply.github.com>
2020-09-30 13:45:01 +08:00
junchao-loongson
ca9b6ac1a0
Set asm.cpu for mips.gnu derived from the ISA defined in the ELF ##bin (#17555) 2020-09-21 16:58:07 +02:00
Khairul Azhar Kasmiran
d9057505dc
Set RPATH/RUNPATH on r2 libs too if local (#17639) 2020-09-15 09:16:14 +02:00
Riccardo Schirone
3e3efcc005 Test compilation with various capstone versions ##build
Do not use #include <capstone/..>

This ensures compatibility with both capstone v3 and capstone as
installed on most distributions, where the pkg-config file of capstone
already adds -I/usr/include/capstone (with that dir directly containing
the headers).
2020-09-09 15:39:33 +02:00
pancake
410db8175b
x86.as is only suposed to work on x86, add env var for custom use ##asm (#17610)
Co-authored-by: pancake <pancake@nopcode.org>
Co-authored-by: Riccardo Schirone <ret2libc@users.noreply.github.com>
2020-09-09 16:41:28 +08:00
pancake
74c4a36656
Fix 'call start' register confusion warning ##asm (#17573)
Co-authored-by: pancake <pancake@nopcode.org>
2020-09-03 14:45:09 +08:00
Aswin C
f656ccc0ea
Added instruction descriptions for RISC-V ##asm (#17526) 2020-08-27 12:12:52 +08:00
b7f4c7545e
Append missing loongson 2e/2f entries in mips-dis.c and mybfd.h (#17400) 2020-08-14 13:18:05 +08:00
Dennis Goodlett
18c052c266
Fix #17414 heap overflow hackyArmAnal (#17425)
* Fix #17414 heap overflow hackyArmAnal

Co-authored-by: Dennis Goodlett <dennis@hurricanelabs.com>
2020-08-10 10:23:09 +02:00
Anton Kochkov
a94718304c
Do not use 0b... integer constants (#17421)
The form of 0b01101 appeared only in GCC 4.3.
It wasn't defined in the C standard and was only
an extension.
2020-08-08 18:10:11 +08:00
phakeobj
4c207712bd
Add hack for ARMv8 BTI instruction disassembly ##anal (#17371)
Co-authored-by: phakeobj <phakeobj@users.noreply.github.com>
2020-07-31 18:08:59 +08:00
phakeobj
1dbe43d83d
Fix #17135 - Support Memory Tagging Extension instructions ##anal (#17279)
Co-authored-by: phakeobj <phakeobj@users.noreply.github.com>
2020-07-23 16:15:12 +08:00
pancake
d441baad62
Fix latest COVs, remove dead code and unnecessary global variables (#17231)
Co-authored-by: pancake <pancake@nopcode.org>
2020-07-22 19:37:31 +08:00
Riccardo Schirone
2d160f2509
Avoid sdb double headers (#17249) ##build
* Avoid duplication of SDB headers in libr/include

SDB is an external project and as such it should live in shlr. However,
for simplicity in dealing with the include flags, the SDB headers were
copied in libr/include as well. This patch just keeps the SDB files
confined in shlr/sdb and make sure various r_* libs use the headers from
there.

* Fix pkgconfig file generation
2020-07-21 10:28:43 +02:00
Riccardo Schirone
a933ba8beb
Check length before disassembling cr16 instructions ##asm (#17290) 2020-07-16 20:48:20 +08:00
Riccardo Schirone
594b940b7c
Fixes some of the issues in Travis (#17267)
* Do not check with r_return_ if the convention is present

Let's just assume the NULL default in such a case, so that architectures
for which we don't have a defined calling convention can still be
processed somehow by the analysis code. It won't be precise, but it's
better than nothing.

Also add a warning message so users are aware when the calling
convention is not defined.

* Fix oob-read when # is at the end of the cmd string

* Do not set TMPDIR when the new value is the empty string

When TMPDIR is set to empty value, clang+ld behaves in weird ways and
you cannot compile files from within the r2 shell (e.g. when using #!c
or #!cpipe)

* Use meson and add -lasan to pkgconfig files when sanitizer are used
2020-07-16 20:47:30 +08:00
karliss
35e824bc55
Fix OOB access in z80 disasm for "OP [ixy+nn]" instructions. (#17268) 2020-07-14 11:58:16 +03:00
pancake
f061b49c14
Fix all the covs (memleaks) reported the 15th of this month (#17163) 2020-06-29 09:40:35 +02:00
Sylvain Pelissier
521db221f4
Improve analysis of compressed instructions and update instruction format (#17115) 2020-06-22 10:12:50 +02:00
Jerome-PS
aeca50166d
Adding support for BA2 ELF binaries ##bin (#17063)
* Adding support for BA2 CPU

* Code clean up

* Moving support for BA2 CPU to radare2-extras

Co-authored-by: Jerome-PS <Jerome-PS>
2020-06-16 10:10:01 +02:00
pancake
bd9a604a87
Check for return values in about ~50 method calls (#17025) 2020-06-15 11:24:43 +02:00
pancake
cea53c7112
Fix ~300 warnings in the pyc disasembler (#17071)
Co-authored-by: pancake <pancake@nopcode.org>
2020-06-15 17:16:04 +08:00
Aswin
b24f4f02d0
Update arm.sdb.txt: Added instruction descriptions for ARM (#17070) 2020-06-14 21:11:40 +02:00
pancake
160fc95e66
Use (void) instead of () in function signatures (#17026) ##refactoring
* Use (void) instead of () in function signatures
* Add test to avoid further contributions to commit the same mistake
2020-06-14 16:08:32 +02:00
pancake
84ecf9fff2
Fix all the coverities detected last month (#17060)
* Fix all the coverities detected last month

* Fix one more cov

* Fix build

* refix build

Co-authored-by: pancake <pancake@nopcode.org>
2020-06-14 13:21:57 +02:00
Riccardo Schirone
70e3d3bc56
Fix compiler warnings (#17046) 2020-06-12 10:26:55 +02:00
Anton Kochkov
ffe743ef39
Fix #4056 - rename DEPS to R2DEPS ##build (#17020)
* Rename DEPS to R2DEPS
* Cleanup of sys/build.sh
2020-06-12 10:49:28 +08:00
pancake
9978bbd7c5
Implement assembler endbr32 and endbr64 instructions for x86-32/64 (#17035) ##asm
Co-authored-by: pancake <pancake@nopcode.org>
2020-06-10 19:15:46 +08:00
condret
ae883f0cd3 Cleaning up again 2020-06-10 02:24:03 +02:00