Commit Graph

1908 Commits

Author SHA1 Message Date
pancake
efd8e07112
Do not rebuild everything when running make in the root directory ##build (#18025) 2020-12-13 02:45:42 +01:00
pancake
6693e33fb4
Bring back tcc support ##build (#17295)
* Fix TinyCC build ##build
* Jemalloc - fix TinyCC build ##build

Co-authored-by: pancake <pancake@nopcode.org>
Co-authored-by: Anton Kochkov <xvilka@gmail.com>
2020-12-11 09:42:12 +01:00
pancake
7df28e1fb2
Implement the comma command to manage user-defined tables ##util (#17702)
* Import export in CSV and R2 formats
* Export in JSON, ascii-art, columns, r2, ..
* For example: aaa;aflt>$a;,.$a,/size/sum
2020-12-09 03:39:49 +01:00
Anton Kochkov
e0109897f9 Fix GRUB compilation with TinyCC 2020-12-04 16:30:23 +08:00
Liumeo
f18e431287
Fix s390x db/cmd/cmd_fs (#17950) 2020-11-25 17:49:29 +08:00
Paul I
66aa8ee645 Fix clang-cl build 2020-11-18 18:06:13 +08:00
Paul I
b17a7e6eb0 Update sdb to 2faeca6dfe516b3ab5f1fcd3655d878fdcbdad0f 2020-11-12 15:14:42 +08:00
Liumeo
38a13c94bb
Fix MSVC warning LNK4006 (#17885) 2020-11-02 12:27:02 +08:00
yossizap
ac229c3216
Attach to target pid/tid on remote lldb connect ##debug (#17847) 2020-11-01 01:42:31 +01:00
Anton Kochkov
486b7bee72 Regenerate parser files 2020-10-30 16:47:04 +08:00
Anton Kochkov
aaa02245b5 Update tree-sitter to 0.17.2 2020-10-30 16:47:04 +08:00
Liumeo
db450794bc
Clean grub/kern/mm.c ##refactor (#17826) 2020-10-26 13:58:34 +08:00
Liumeo
e9a697f2a9
shlr/grub - fix MSVC warning pointer truncation (#17820) 2020-10-23 13:20:25 +08:00
Anton Kochkov
d5e1247757
Remove some of MSVC warnings (#17811) 2020-10-21 15:00:10 +08:00
Anton Kochkov
4bcce838df
Update shlr/lz4 to 1.9.3 293713a4fa085d73f396200d2387631b045c118e (#17738) 2020-09-30 16:06:03 +08:00
pancake
aa7de006e6 Fix TinyCC build ##build 2020-09-27 13:33:26 +08:00
Riccardo Schirone
13ca72df81
Make sure $( is always considered as cmd substitution ##newshell (#17699)
Sometimes argument could be "value$", but this commits ensures that if
the argument is "value$(...)", then `$(...)` is considered as a
cmd_substitution_arg.
2020-09-23 21:43:36 +02:00
Riccardo Schirone
ac6bdc1e7e
Add support for additional cmd_identifiers ##newshell (#17696) 2020-09-23 14:01:24 +02:00
Florian Märkl
ed00e85e65
Use sdb == for generating dbs in meson (#17676) 2020-09-21 15:11:46 +02:00
Riccardo Schirone
eab6061228
Allow spaces for some commands like <cmd> @ <arg-with-spaces> (#17668) 2020-09-21 12:48:47 +08:00
Riccardo Schirone
87495e591d
Fix #17351: Let external scanner parse #! cmd identifier as well ##newshell (#17629) 2020-09-15 16:06:08 +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
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
Zi Fan
0ba897f5c9
Add network support for WinDbg/KD (KDNET) ##debug (#17340)
* Add network support for WinDbg/KD (KDNET) ##debug
* Add iob_net io_backend plugin for shlr/winkd
* Add Windows 10 (May 2019 Update) build 18362 profile
* Add r_hash_do_hmac_sha256 function to r_hash
* Change r_socket_connect to bind source port for UDP connection
2020-08-26 10:24:20 +08:00
GustavoLCR
489538e02b
Add DbgEng based debug backend for Windows ##debug (#17491)
* Rename `windbg` plugin to `winkd` ##debug
* Add DbgEng based debug backend for Windows ##debug
2020-08-24 19:01:10 +08:00
Zi Fan
3c88900134
Implement save and load functions for debug session ##debug (#17430)
* Add `dtst` and `dtsf` commands
* Change `RDebugSession` to store its data in their own sdb namespace
* Add `r_debug_session_serialize()` and `r_debug_session_deserialize()` API
* Add unit tests for `RDebugSession `save and load functions
2020-08-20 12:25:47 +08:00
pancake
e22b3e9bcc
Fix race condition and remove unnecessary SDB build targets ##build (#17476)
* Simplify sdb build
* This was wrong
* updadte sdb
Co-authored-by: pancake <pancake@nopcode.org>
2020-08-19 10:31:20 +02:00
abcSup
fef7638a1e Fix Linux native debugger freezes after interrupted by user in attach sessions and refactor ##debug 2020-08-18 12:23:30 +08:00
abcSup
ab70092664 Improve support for debugging multihreaded processes on Linux ##debug 2020-08-18 12:23:30 +08:00
pancake
8efd721dba
Fix Cydia/iOS packaging and compilation issues ##build (#17342) 2020-08-14 13:17:32 +08:00
pancake
8b33d764a7
Fix #3929 - Enable LTO in sys/static.sh ##build (#17141)
* Fix #3929 - Enable LTO in sys/static.sh
* Update Ubuntu to 20.04 for static build
* Use `gcc-ar` when needed
* Do not use "c" option for ${AR}
* Use `$$AR` instead of `$AR`
* Aim to fix  `-dynamiclib` issue outside darwin
* Run tests for static LTO build

Co-authored-by: pancake <pancake@nopcode.org>
Co-authored-by: Anton Kochkov <xvilka@gmail.com>
2020-08-13 13:55:39 +08:00
Riccardo Schirone
31573479e0
Directly pass multi-lines command to newshell (#17348) ##newshell
Fixes #16684
2020-07-28 18:11:14 +02:00
Zi Fan
2dfa75cc47
Update record & replay features to trace reg/mem changes ##debug (#17127)
* Update record & replay features to trace reg/mem changes ##debug
* Support tracing in r_debug_continue_kill ##debug
* Fix error writing registers when stepping back and refactor ##debug
* Implement checkpoints for reverse debugging and make tests green ##debug
* Add `dbg.trace_continue` option to enable/disable tracing every instruction when continue
* Fix continue when tracing to allow skipping and continuing ##debug
2020-07-27 12:54:33 +08:00
Riccardo Schirone
48c30dfd99
Support compilation with meson on old systems like CentOS6/DebianWheezy ##build (#17345)
* Compile tree-sitter and newshell parser with gnu99 if possible ##meson
* Make sure to use `-lrt` when needed to use clock_gettime ##meson
2020-07-27 12:25:06 +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
f8cafe4f2f
Update spp to 1.2.0 (#17243)
* Update spp to 1.2.0
* Make sure to use USE_R2=1 when compiling spp
2020-07-09 17:20:06 +08:00
Riccardo Schirone
04074845e4
Update tree-sitter to 86a5dabbcbdac650c53a889183bf56d7e721e09e (#17244) 2020-07-09 12:03:32 +08:00
pancake
f91f2ac1d8
Update capstone git commits for v4 and next branches (#17215)
Co-authored-by: pancake <pancake@nopcode.org>
2020-07-06 12:12:00 +08:00
Riccardo Schirone
d6c9bd4542
Add support for binr/blob and fix android build ##meson ##build (#17150)
* Make sure meson can build with `system` = `android`.

* Add support for binr/blob in meson build

* Add also r_util as dependency

* Create sdb_version.py to get the SDBVER value from config.mk

* Set unknown sdb version if something fails
2020-07-05 10:53:37 +08:00
Khairul Azhar Kasmiran
80202e6ad5
Use type instead of Get-Content to prevent BOM insertion on sdb generation in Windows (#17203) 2020-07-04 19:46:36 +08:00
pancake
13e1636d97
Implement RLang.spp for templated scripting ##lang (#17067)
Co-authored-by: pancake <pancake@nopcode.org>
2020-07-01 14:14:18 +02:00
GustavoLCR
043b0183bd
Fixes for windows debugger ##debug (#17151)
* Fixes memleaks
* Fix compiler warnings
* Fix warning when reopening file as debugger
* Improve exception logging
* Fix inconsistencies killing/restarting a process
* Fix detaching without killing debuggee
* Fix warning when continuing after receiving CONTROL-C
* Expose exception reason for 'di'
* Fix listing opened files with 'dd'
2020-06-30 10:48:08 +08:00
David CARLIER
4d22e92d6d
Haiku build fix proposal (#17117) ##sys 2020-06-27 17:20:43 +02:00
Anton Kochkov
d6cf4f0898
Add Debian OLD (Debian 8 Jessie) (#17098) ##build
Add Debian 8 (Jessie) Docker build to ensure radare2 works
on the older Debian-based systems too.
2020-06-20 12:17:00 +08:00
Riccardo Schirone
2ffa790e0a
Generate help automatically ##newshell (#16782)
* Add additional RCmdStatuses
* ?? should be a cmd_identifier, not help_command
2020-06-17 21:29:23 +02:00
Riccardo Schirone
b18f7e4a2a
Handle # in quoted strings in newshell (#17095) 2020-06-17 15:19:02 +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
Riccardo Schirone
70e3d3bc56
Fix compiler warnings (#17046) 2020-06-12 10:26:55 +02:00
pancake
75ee57bfb0
Update SDB with boolified SdbForeachCallback (#17040) 2020-06-11 11:25:23 +02:00
GustavoLCR
04edfa82c1
Fix command injection on PDB download (#16966)
* Fix r_sys_mkdirp with absolute path on Windows
* Fix build with --with-openssl
* Use RBuffer in r_socket_http_answer()
* r_socket_http_answer: Fix read for big responses
* Implement r_str_escape_sh()
* Cleanup r_socket_connect() on Windows
* Fix socket being created without a protocol
* Fix socket connect with SSL ##socket
* Use select() in r_socket_ready()
* Fix read failing if received only protocol answer
* Fix double-free
* r_socket_http_get: Fail if req. SSL with no support
* Follow redirects in r_socket_http_answer()
* Fix r_socket_http_get result length with R2_CURL=1
* Also follow redirects
* Avoid using curl for downloading PDBs
* Use r_socket_http_get() on UNIXs
* Use WinINet API on Windows for r_socket_http_get()
* Fix command injection
* Fix r_sys_cmd_str_full output for binary data
* Validate GUID on PDB download
* Pass depth to socket_http_get_recursive()
* Remove 'r_' and '__' from static function names
* Fix is_valid_guid
* Fix for comments
2020-06-10 18:00:00 +02:00