Commit Graph

1583 Commits

Author SHA1 Message Date
Liumeo
7a222e68dc
Fix some arm32 warnings (#18104) 2020-12-26 16:18:49 +01:00
Paul I
2c796ae5fd
Fix type check in w32_desc_list() (#18095) 2020-12-23 00:42:25 +01:00
Lazula
f2976d3c7e
Use r_str_get_fail() throughout codebase ##refactor (#18079) 2020-12-21 08:51:44 +01:00
pancake
d3157e2ed3
Fix 32 critical COVs (UAF, UB and OOB) (#18077) 2020-12-21 01:10:22 +01:00
pancake
89f6c6e1f1
Fix many ASAN issues, from uaf to memory leaks and some boolification (#18048) 2020-12-20 23:37:45 +01:00
Paul I
c8c508c5bd Revert "Fix clang-cl build"
This reverts commit 66aa8ee645.
2020-12-19 23:22:37 +01:00
pancake
ce48120056 Remove all uses of R_ANAL_CC_ 2020-12-16 00:48:54 +01:00
pancake
bd856af635 Add anal.cc & anal.syscc and remove the hardcoded conventions in debug ##anal 2020-12-16 00:48:54 +01:00
pancake
bf3188306e Fix a crash in dts+ command with empty register arenas ##debug #172
* Inspired by https://github.com/rizinorg/rizin/pull/172/files
2020-12-13 10:25:30 +01:00
Lazula
243bc871c3 Multiple refactors in io and util ##io ##util ##refactor
* Add r_io_map macros throughout code base
* Update string NULL-checking with renamed functions r_str_get() and r_str_getf()
* Change string NULL-checks throughout code base to use functions
* Add r_str_get_fail() to specify a custom string to return if NULL-check fails
* Mark JSON to be updated with PJ with "TODO PJ"
* Incidental style updates such as missing spaces
2020-12-13 05:09:13 +01: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
66aa8ee645 Fix clang-cl build 2020-11-18 18:06:13 +08:00
Paul I
c317865d1f Fix copy-paste bug in windbg_reg_read() 2020-11-18 10:23:32 +08:00
Anton Kochkov
5da1b3b076 Fix some warnings 2020-11-16 18:56:21 +08:00
Anton Kochkov
14f82ee301 Fix formatting warnings for sdb_fmt() ##refactor 2020-11-12 15:14:42 +08:00
Anton Kochkov
aaccc09828 Variadic argument fixes 2020-11-10 11:11:45 +08:00
Liumeo
898a29713a
Remove some of the ARM64 warnings (#17875) 2020-10-30 12:18:56 +08:00
pancake
752787fdbc
Fix uninitialized pj instance in dreg.c (#17828)
dreg.c:294:3: warning: 'pj' may be used uninitialized in this function [-Wmaybe-uninitialized]

Co-authored-by: pancake <pancake@nopcode.org>
2020-10-26 14:06:18 +08:00
GustavoLCR
623c4819d6
Fix some warnings in WinDBG plugin (#17784) 2020-10-14 14:51:11 +08:00
yossizap
8872019a23 Show child processes in *bsd dp ##debug 2020-10-09 12:32:18 +08:00
yossizap
7522b2c9cc Fix dp 0 not showing other processes on freebsd ##debug 2020-10-09 12:32:18 +08:00
yossizap
e32ad7091c Fix FreeBSD dp permission denied failure ##debug
kvm_openfiles failed to open /dev/mem without root on fbsd, the special value
"/dev/null" should be used as non root since we don't directly access kernel memory.
2020-10-09 12:32:18 +08:00
Florian Märkl
16a91fbe5a Fix eprinf -> eprintf 2020-10-05 21:22:58 +08:00
yossizap
9bced66d7b
Fix FreeBSD step error ##debug (#17749) 2020-10-05 10:01:47 +08:00
pancake
b4a6b3ab20
Add remaining =A0 in regprofiles for calling convention ##anal (#17735) 2020-10-01 13:56:47 +02:00
pancake
aa7de006e6 Fix TinyCC build ##build 2020-09-27 13:33:26 +08:00
Khairul Azhar Kasmiran
73317d4955
r_reg_get_bytes: Return NULL if there are no bytes in the arena for the given regset type (#17657) 2020-09-16 18:14:43 +08:00
Khairul Azhar Kasmiran
d9057505dc
Set RPATH/RUNPATH on r2 libs too if local (#17639) 2020-09-15 09:16:14 +02:00
GustavoLCR
52d5b867aa
Fix step over for windbg plugin (#17586) 2020-09-04 15:56:11 -03:00
Anton Kochkov
43feee7a51
Fixes for old glibc (Debian Etch) (#17564) 2020-09-01 17:05:50 -05:00
abcSup
16c5017898 Fix ESIL tracing to be consistent with debug tracing ##anal 2020-09-02 06:00:38 +08:00
GustavoLCR
7e28739835
Expose TEB address as a flag on Windows ##debug (#17551)
* Also log the TEB address on thread start
2020-08-31 14:52:03 +08: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
abcSup
1407627c1a Define PTRACE_EVENT_* 2020-08-18 12:23:30 +08:00
abcSup
66f57c708c Fix broken linux_dbg_wait_break when running in background and undo more changes 2020-08-18 12:23:30 +08:00
abcSup
528e79818f Undo changes that modify signals in threads 2020-08-18 12:23:30 +08:00
abcSup
c4289abc73 Fix hanging threads when continuing after switching to another thread ##debug 2020-08-18 12:23:30 +08: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
02b4086970 Improve support for single-stepping in a multithreaded process #debug
* Remove debug print in the previous commit
* Fix logic errors and add documentation
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
Anton Kochkov
8a1b1e9410
Older GCC/Glibc warning fixes (#17468) 2020-08-17 17:48:15 +08:00
Anton Kochkov
3af28896f9
Define PTRACE_O_* flags for old glibc ##debug (#17459) 2020-08-13 17:57:49 +08:00
Florian Märkl
68a1db448d
Merge everything time-related in r_time.h (#17445) 2020-08-12 18:54:49 +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
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
Zi Fan
af485c0770
Fix non-working drt flg command and refactor (#17254) ##debug
* Refactor r_reg_get_list to support R_REG_TYPE_ALL
* Fix registers type in linux_x64 regprofile
* Add test for drt flg
2020-07-13 12:09:58 +02:00
Riccardo Schirone
e3b67f124c
Release pipeline with GitHub Actions (#17192)
* Make sure meson can build with `system` = `android`.
* Add support for binr/blob in meson build
* Create release GitHub Actions workflow
* Add publish-docker-image job
* Also create Ubuntu packages and ship static windows zip
2020-07-09 12:07:45 +08:00
meowmeowxw
4b02987666
Fix tcache parsing on glibc version < 2.30 (#17206) 2020-07-08 20:16:27 +08:00