120 Commits

Author SHA1 Message Date
pancake
46aff1ec53
Implement ab./ablj/abl,/ablq - list all the basic blocks ##anal (#17680) 2020-09-24 17:23:23 +02:00
pancake
7c76d85031 Add tests for RTable using r2 commands 2020-09-24 17:19:25 +02:00
pancake
f71ec729ba
Always register the derived CC from the reg profile ##anal (#17685) 2020-09-24 17:17:15 +02:00
Florian Maerkl
8842de91e5 Kill RAnal.sdb_fcns because it is unused now ##refactor 2020-09-24 12:12:42 +02:00
Florian Maerkl
e6cefa903a Directly apply Callee Args in Type Matching ##anal 2020-09-24 12:12:42 +02:00
Khairul Azhar Kasmiran
2293d29308
x86 cmp/sub: Properly generate esil for bitsize of 64 ##anal (#17665)
* x86 cmp/sub esil: Support bitsize of 64
* Fix pij tests
* Don't shift if bitsize is 0
* Don't esilprint anything if bitsize is invalid
* Use %u instead of %d
* Check whether bitsize is 0
2020-09-24 12:14:43 +08:00
Florian Märkl
022324029d
Add Global Import API (#17692)
* Add Tests and Make it strict
2020-09-24 02:15:22 +02:00
pancake
c9e98e4645
Implement tcc-* commmand to unload all calling conventions ##anal (#17688) 2020-09-22 10:03:37 +02: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
Aswin C
61a1e15af5
Fix rj and add tests (#17682) 2020-09-21 16:17:33 +02:00
Riccardo Schirone
eab6061228
Allow spaces for some commands like <cmd> @ <arg-with-spaces> (#17668) 2020-09-21 12:48:47 +08:00
Dennis Goodlett
61d9be3ff1
Fix zig add type ##signatures (#17653)
Co-authored-by: Dennis Goodlett <dennis@hurricanelabs.com>
2020-09-21 00:04:05 +02:00
GustavoLCR
b5eb956ba2 Don't pollute debug trace after aft 2020-09-18 00:21:59 +02:00
karliss
0222bfe238
Use sdb_set instead of sdb_querys (aaaa is now 7x faster) (#17640) ##performance 2020-09-17 14:15:41 +02:00
pancake
d8dd7c1ffc Add tests for ELF relocs on ARM64 ##bin 2020-09-17 12:38:25 +02:00
pancake
f15f1af521
Fix spacing bugs when parsing the calling convention signatures (#17651) ##types 2020-09-16 19:17:54 +02:00
pancake
413437e2b6
Move arp gdb into arpg, improve error and parsing + tests ##debug (#17658) 2020-09-16 19:16:24 +02:00
Florian Märkl
178f69b643
Refactor Labels out of SDB ##anal (#17621) 2020-09-16 09:54:33 +02:00
Riccardo Schirone
75a80741ee
Make root a argv RCmdDesc ##newshell (#17326) 2020-09-15 15:27:10 +02:00
Florian Märkl
456b0fdf09
Add API for getting Atomic and Typedef Types and remove broken !size (#17599) 2020-09-15 13:31:38 +02:00
pancake
797b937175
Implement touch command ##shell (#17645) 2020-09-15 11:11:41 +02:00
pancake
2ad2744796
Implement arcc command using the new r_reg_profile_to_cc API ##types (#17618) 2020-09-15 00:59:56 +02:00
pancake
18af675e05
Show ESIL execution cost information in ao and aoj ##anal (#17585) 2020-09-14 10:44:19 +02:00
pancake
4249c71e82
Parse ansi->html properly in pdJ ##disasm (#17628) 2020-09-14 10:21:31 +02:00
Anisse Astier
50eac99601
Add minimal armv7 and aarch32 VFP and NEON support ##esil (#17462) 2020-09-14 09:57:05 +02:00
Francesco Tamagni
523683f6f5 Add tests for ObjC changes 2020-09-13 22:36:38 +02:00
Khairul Azhar Kasmiran
fe5b80d615
Fix asan r2pipe test by updating libasan and using LD_PRELOAD (#17594)
* Set LD_PRELOAD for unit tests
* Declare failed debug tests as broken if no assertion or Sanitizer in output
* Check for ASAN=1 in cmd_pipe test
* Set asan: true in the GitHubCI matrix
* Fix ttyname-related runtime error
* Upgrade asan build to Ubuntu 20.04
* Quick fix for reg/arena.c runtime error
2020-09-11 18:47:27 +08:00
pancake
f21ebbf85a
Fix #17558 - Honor hex.offset in prc, pxAv and p=e ##print (#17615) 2020-09-09 15:50:37 +02:00
Anisse Astier
a4c76ff641
Bring merge sort and insertion sort cmp function semantics together (#17473) ##util
Merge sort uses cmp (a, b) < 0 for its first test branch, and insertion
sort cmp (a, b) > 0 ; which means the 0 boundary goes in one case in one
branch, and in the other sort function in the other branch.

It makes it possible to support compare function that return true/false
instead of -1/0/1; although this isn't an acceptable use of
RListComparator, this prevents future bugs from appearing, because this
works with insertion sort, but not merge sort.

The main advantage of this patch is that both sort functions should sort
equal elements the same way. This stability is important for zignatures
for example.
2020-09-09 15:45:34 +02:00
Riccardo Schirone
272265a4c3
Fix ELF R_X86_64_PLT32 relocation entries patching (#17587) ##bin
* Correctly get the address of the PLT entry for a symbol. If the symbol
was not yet added to the .got.r2 section, then take the first available
address (vaddr), otherwise retrieve it from the hashtable.

* Avoid showing wrong relocations when relocations are already replaced
2020-09-08 09:52:35 +02:00
pancake
737eacdc13
Implement aof comment to filter esil expression using the DFG API ##esil (#17600) 2020-09-06 12:36:17 +02:00
Riccardo Schirone
f8d6db74b5
Split cmd_write function to make it easier transition to argv style (#17370) 2020-09-04 14:36:39 +02:00
GustavoLCR
f46b1749b3
Fix #17581 - Fix append to file on Windows (#17584)
* Fix append to file on Windows

* Test from @ret2libc
2020-09-03 19:13:42 -03:00
Dennis Goodlett
749b2e7095
Add zb score threshold variable ##signatures (#17545) 2020-09-03 10:52:21 +08:00
junchao-loongson
31c525b14a
Fix GP calculation when there are multiple entries ##anal (#17538) 2020-09-03 07:43:24 +08:00
GustavoLCR
62eb8e62da
Fix afvd using wrong var offsets (#17572) 2020-09-02 13:49:14 +02:00
HoundThe
eca62ba4db
Fix big endian DWARF parsing ##bin (#17503) 2020-09-02 11:01:16 +08:00
aemmitt-ns
ec173d40d6
ESIL signedness and other extensions ##esil (#17436)
* fix typo in anal_arm esil (does not affect esil execution)
* add af flag setting and sof op for sub overflow, change borrow
* remove the break that was 'breaking' everything, fix warning
* add new sign extension operator and use it to handle signedness in imul
* work on expressions for idiv, div, imul, mul, remove  and just modify sub/cmp
* add clz and reorder the sign extension arguments to be in line with all other ops
* add support for many arm64 instructions
* add sign extension to all ldr*s instructions
* make numerous changes to fix REV*, SXT*, LSL, LSR, ASR, SDIV, MOVN and others, to be detailed in PR
* add sxt* to shifted_register_append, use it to fix opcall and ldr / str
* remove unnecessary commented code
* add some comments
* add clz and reorder the sign extension arguments to be in line with all other ops
* add sign extension to all ldr*s instructions
* make numerous changes to fix REV*, SXT*, LSL, LSR, ASR, SDIV, MOVN and others, to be detailed in PR
* add sxt* to shifted_register_append, use it to fix opcall and ldr / str
* fix wrong type check in esil_signext
* change borrow flag back to the way it was
* add example comment to esil_signext
* unbreak movk
* format mask in sub, cmp, and movk as hex
* add test for esil signext operator
* use ULL instead of (ut64) cast in shifts
2020-09-02 00:03:24 +02:00
abcSup
d967a68bce Bring back aets+ and aets- commands 2020-09-02 06:00:38 +08:00
abcSup
16c5017898 Fix ESIL tracing to be consistent with debug tracing ##anal 2020-09-02 06:00:38 +08:00
junchao-loongson
087e5652b3
Improve iA command for MIPS/ELF ##bin (#17516) 2020-08-28 11:11:34 +02:00
junchao-loongson
ac1f0d13b5
Fix #9821 - Add JALR JR shortcat support when the target address can be calculated ##anal (#17498) 2020-08-28 13:30:17 +08:00
Florian Märkl
a1ce176371
Fix oob read in getFunctionName() (#17527) 2020-08-27 11:08:47 +02:00
HoundThe
605f48fb20
Add DWARF tests for Ada and Freepascal ##anal (#17504) 2020-08-25 12:05:38 +08:00
Khairul Azhar Kasmiran
52668c02d2
r2r: Check whether test has EXPECT or EXPECT_ERR (#17508) 2020-08-24 18:29:37 +08:00
HoundThe
5845ec39ca
Add function information from DWARF ##anal ##bin (#17434) 2020-08-19 18:21:20 +08:00
RHL120
e58b2f6f33
Reload file when opening a project ##projects (#17296) 2020-08-19 11:15:53 +08:00
Anton Kochkov
2e24aa6b9f Fix #17458 - fix wrongly written tests 2020-08-19 11:13:50 +08:00
Dennis Goodlett
99df8f8293
Add best match reverse search ##signatures (#17467)
Co-authored-by: Dennis Goodlett <dennis@hurricanelabs.com>
2020-08-17 12:37:27 +08:00
GustavoLCR
bb3e80c040
Implement pde to disassemble following code execution ##disasm (#17410)
* Implement `pde` to disassemble following code execution
* Fix `asm.filter=1` with `scr.color=0`
* Fix cache not being used
* Share read and write file permissions on Windows
* Use CreateFileW in r_sandbox_open on Windows and fix file permissions
* Fix opening nul and O_RDWR
* File creation flags cannot be combined on Windows
* Share write in r_file_mmap_windows
2020-08-13 10:05:38 +08:00