Commit Graph

21505 Commits

Author SHA1 Message Date
pancake
8a7229c28e
Honor coding style in panels.c and loss 370LOC (#17975) 2020-12-07 18:08:26 +01:00
pancake
aa816fdc79
Cleanup cmd_hash.c a little bit (#18000) 2020-12-07 15:20:51 +01:00
Aswin C
ad1850f28e
Add help for aij and arj ##anal (#17973)
* Add internal help for `aij` and `arj`

Add internal help for `aij` and `arj` under `ai?` and `ar?` respectively. Also updated test/db/json.

* Add help for `pda?` and `pds?`

Added help for `pdaj` under `pda` and `psdf`, `pdsb` under `pds`. Also added `pi` and `pI` under `p?`

* Add help for `@v`

Add help for `@v` under `@v?`
2020-12-07 14:40:08 +08:00
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
pancake
e356715589
drr show all flags and pxrj is now structured ##print (#17758)
* dxrj changed the field `ref` to `refstr`
2020-12-06 18:31:43 +01:00
GustavoLCR
1abd72f8af
PDB: Fix NULL deref with unsupported leaf type (#17996) ##bin 2020-12-06 18:12:29 +01:00
pancake
2ca1ec63e1
Fix UB in cannotated_code (#17833) 2020-12-06 18:09:29 +01:00
GustavoLCR
e2f4461d18
Add asm.hint.call.indirect to make indirect calls follow the target address (#17968) ##visual 2020-12-06 17:53:44 +01:00
GustavoLCR
32cb22b9a6
Fixes for MSVC demangling (#17994)
* MSVC demangling: Add a space between cc and func ptr
* MSVC demangling: Fix extremely long types demangling
* MSVC demangling: Fix member function pointer demangling
* Add test
2020-12-04 15:20:46 +08:00
GustavoLCR
6c37b12d63
Fix #17979 - Fix ASAN timeout for PE (#17993)
r_buf_read() is extremely slow
2020-12-04 15:20:09 +08:00
pancake
b2f210a0cc
Fix asserts in r2 -a snes foo.sfc ##bin (#17990)
Co-authored-by: pancake <pancake@nopcode.org>
2020-12-04 12:16:09 +08:00
yossizap
0cf6ce0bdd Add a warning when a breakpoint is placed in an invalid map ##debug 2020-12-03 00:15:12 -06:00
yossizap
fd0dcd5370 Fixed failure in bp placement when no architecture plugin is available ##debug
The r_bp_get_bytes check in r_bp_add made it impossible to set a
breakpoint for an architecture without a bp plugin even though the debug
backend might support setting a breakpoint.
2020-12-03 00:15:12 -06:00
pancake
c6f4af979a
Add ep, sp, gp lp register aliases for v850 ##disasm (#17989) 2020-12-02 10:09:51 +01:00
Jeroen Domburg
b782a02ae3
Fix buffer read callback on all gnu disassembler plugins (#17992) ##disasm 2020-11-29 19:41:57 +01:00
pancake
35c6432e62
Add missing $seek and $fcn autocompletion handlers ##shell (#17829)
Co-authored-by: pancake <pancake@nopcode.org>
2020-11-29 13:56:10 +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
Filipe Laíns
163312bff3 fortunes: remove nsfw and creepy fortunes
These fortunes make a lot of people unconfortable and can be trigering
for some. Even if they are not active by default, they should have no
place here if you are trying to be a welcoming project.

There are a lot of other ways to be quirky and fun, I see no logical
reason to have these fortunes knowing they will negatively impact
people.

Signed-off-by: Filipe Laíns <lains@riseup.net>
2020-11-29 01:14:28 +01:00
pancake
b8f37cb0c3 Add few tests for v850.gnu and fix instruction bounds ##disasm 2020-11-28 19:39:23 +01:00
pancake
c45c5180cf Add v850.anal.archinfo and improve invalid instruction detection ##anal 2020-11-28 19:39:23 +01:00
pancake
307075dc39 Fallback to anal.arch=v850 when using asm.arch=v850.gnu ##anal 2020-11-28 19:39:23 +01:00
pancake
fee00c7b88 Implement v850.gnu disassembler plugin ##disasm 2020-11-28 19:39:23 +01:00
pancake
a335247dac
Fix calling convention argument register usage for v850 ##anal (#17974)
Co-authored-by: pancake <pancake@nopcode.org>
2020-11-27 14:35:48 +01:00
eagleoflqj
facdda17e3 cp-demangle - fix tcc build ##build 2020-11-27 12:36:59 +08:00
GustavoLCR
0dcac185dc
Fix another UAF in skyline ##Refactor (#17972)
* Fix another UAF in skyline
* Simplify

* r_vector_insert() accepts assign at last index
* No need to check for parts that fit/overlap with new_part if new_part itself fitted inside a prev_part
2020-11-27 12:23:44 +08:00
GustavoLCR
ee46646df8
Set realname for PDB flags (#17967) 2020-11-27 12:22:58 +08:00
Liumeo
63249d6a84
Fix s390x mdmp symbols count ##refactor (#17977) 2020-11-27 12:22:03 +08:00
Liumeo
1c443d056a
Minor optimizations to cmd_print.c ##refactor (#17896) 2020-11-26 16:33:01 +08:00
Aswin C
046a1fe324
Use PJ in oij ##json (#17642)
* Use PJ in `oj`
* Replace `r_cons_printf()` and other minor fixes
* Fix output and add a basic test for `oij`
* Use `pj_kb` in writable and raised
* Move `pj_new()` and `pj_a()` outside the loop
* Fix \`oij\` by creating a new PJ array before the case begins, add the objects, and print and free it at the end of the function.

Co-authored-by: Liumeo <liumeo@pku.edu.cn>
2020-11-25 10:16:00 +08:00
pancake
b81cf6665f
Remove useless README file in libr/cons (#17966)
Co-authored-by: pancake <pancake@nopcode.org>
2020-11-24 12:33:30 +08:00
GustavoLCR
d47616fc1b
Fix UAF in r_skyline_add() (#17965) 2020-11-24 03:41:41 +01:00
Liumeo
536e420f58
Fix s390x Warning: File is not PE (#17938)
* fix s390x Warning: File is not PE

* use r_buf_read

* Fix a typo

Co-authored-by: Anton Kochkov <xvilka@gmail.com>
2020-11-23 18:24:19 +01:00
Aswin C
bcd707f5ee
Use PJ in bj and add tests ##json (#17916)
* Use PJ in `bj` and add tests ##json
* Add `bj` to test/db/json
2020-11-23 16:52:03 +08:00
pancake
122948b466
Fix UB in core.java plugin (#17831)
* Fix UB in core.java plugin

libr/core/p/core_java.c: In function 'r_cmd_java_handle_help':
libr/core/p/core_java.c:390:34: warning: iteration 20 invokes undefined behavior [-Waggressive-loop-optimizations]
   help_msg[3 + (i * 3) + 0] = cmd->name;
                               ~~~^~~~~~
libr/..//libr/core/p/core_java.c:388:2: note: within this loop
  for (i = 0; i < END_CMDS; i++) {

* Cleanup and remove last LIST_CODE_REFS refs for core.java
* lcr command was removed in 3ead80cca8
2020-11-23 16:45:56 +08:00
GustavoLCR
40df2b1713
Fix not needed sdb reloading (#17963) 2020-11-23 12:41:23 +08:00
GustavoLCR
bdbb6d068d
Fix taking over variable use on the last instruction of block ##anal (#17957)
* Fix taking over variable use on the last instruction of block
* Add test
2020-11-23 12:37:33 +08:00
GustavoLCR
203878e60e
Optimize io.cache ##io (#17952)
* Add RSkyline ##util
* Add `r_vector_len()`
* Optimize io.cache ##io
* Use RSkyline instead of RList
* Add cache skyline for faster reads
* Use PJ API in `wcj`
* Add test and fix
2020-11-23 12:36:32 +08: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
5616a41f99
Add calling convention for SystemZ ##port (#17956) 2020-11-23 12:33:07 +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
GustavoLCR
14d3728e62
Remove static RRegItem from anal_arm_cs.c (#17945)
* Fix ASAN crash when analyzing arm64
2020-11-20 12:40:18 +08:00
Paul I
3ae296254b
Fix memleak in fcn_recurse(), r_bin_info_free(), r_core_anal_cc_init(), update_asmbits_options() (#17876) 2020-11-19 15:55:31 +08:00
Liumeo
9efc80fed5
Fix Travis CI ARMv8 (ARM64) tests (#17939)
* Fix the remaining failures
* Enforce ARMv8 Travis build

Co-authored-by: Anton Kochkov <xvilka@gmail.com>
2020-11-19 15:06:46 +08:00
Paul I
890b19a1f6
Use offset info in r_type_get_struct_memb() (#17930) 2020-11-19 11:52:01 +08:00
Liumeo
1295f7748e
Fix fletcher calculation on SystemZ (S390) ##port (#17937) 2020-11-19 11:51:21 +08:00
Liumeo
9015f12b8f
Fix SystemZ (S390) rax2 (#17934) 2020-11-19 11:48:53 +08:00
Liumeo
da50d751b7
Fix System Z ELF asm.arch & bits (#17936) 2020-11-19 11:43:14 +08:00
Paul I
66aa8ee645 Fix clang-cl build 2020-11-18 18:06:13 +08:00