Commit Graph

1378 Commits

Author SHA1 Message Date
David CARLIER
fd93e26d0e Fixes #12531 proposals (#12536) 2018-12-22 10:01:03 +01:00
David CARLIER
2f8891caaf Few code cleanups. (#12526) 2018-12-21 00:35:41 +01:00
radare
84edbe8064
Some code cleanup and start to introduce r_return in r_io (#12523) 2018-12-20 15:31:18 +01:00
Francesco Tamagni
e3620985a5 Improve io map lookup performance in presence of many maps ##performance
- add the “skyline shadow” concept
- add `r_io_map_is_mapped` which binary-searches the skyline shadow to tell if a pointer belongs to any map
2018-12-20 15:30:06 +01:00
dav1901
303a57bb85 Minor code cleanups/fixes (#12519) 2018-12-20 11:50:29 +01:00
dav1901
ede39f120c Fix few build compiler warnings (#12490) 2018-12-16 14:54:40 +01:00
David Carlier
9c158c9e41 Fixing few leaks 2018-12-11 15:55:38 +01:00
Iain Lane
5549ad6160 Move #endif (HAVE_PTRACE) after functions which use it
When built with --disable-debugger, HAVE_PTRACE is not defined. The
function r_io_ptrace_func() is outside of an "#if HAVE_PTRACE" block and
uses ptrace_* functions. This causes a build failure because the
functions are only defined under HAVE_PTRACE.

Move the adjacent "#endif" for a HAVE_PTRACE guard to include this
function too.
2018-12-11 12:29:12 +01:00
dav1901
024d65e288 Fix few more clang warnings (#12429) 2018-12-11 10:28:01 +01:00
dav1901
3b03e923f5 Fix few clang-analyzer warnings (#12415) 2018-12-06 15:12:27 +01:00
dav1901
2f0f89693f Minor fixes/cleanups (#12388) 2018-12-03 23:32:08 +01:00
David CARLIER
cb42aef929 Support NetBSD explicit_memset ##port 2018-12-03 00:32:39 +01:00
David CARLIER
2eb9413c2b DragonFlyBSD linkage fix ##build 2018-12-02 21:57:56 +01:00
David CARLIER
ef8e2c86fb Simplification self plugin for BSD. (#12341) 2018-11-28 09:30:52 +01:00
Riccardo Schirone
752f37db4c Fixes for the --without-debugger compilations ##build
* io_ptrace: do not include io_ptrace if DEBUGGER is not defined
* meson: add `debugger` option to not use any debugger
2018-11-27 15:46:35 +01:00
dav1901
a6b44e03fe Fix warnings (#12309) 2018-11-25 01:46:57 +01:00
pancake
11fcc3badc Fix macOS debugger slowdown regression introduced in 3b81610 2018-11-22 23:49:10 +01:00
dav1901
9413169623 Minor cleanups/fixes (#12247) 2018-11-20 17:50:26 +01:00
Florian Märkl
7c0687b8fb Fix #12022 - Slow backtrace fixed by speeding up ptrace_wrap_func() ##debug 2018-11-20 01:13:30 +01:00
dav1901
c7fc809bd7 Minor dead code cleanups (#12203) 2018-11-19 13:00:53 +01:00
dav1901
558a79cae7 Fix few minor leaks and remove dead code (#12201) 2018-11-17 18:19:04 +01:00
dav1901
c1f30de193 Minor code cleanups free/R_FREE (#12157) 2018-11-14 21:23:20 +01:00
pancake
4050d29eb1 Fix build of r2k-linux 2018-10-29 23:06:14 +01:00
pancake
19c2fb6443 Fix a shitton of warnings 2018-11-14 12:50:30 +01:00
Artem Zinenko
4a2bc97a35 Fix #11918 - Moved r_print.h into r_util/r_print.h 2018-11-14 10:54:22 +01:00
dav1901
8b83d03c99 Minor code cleanups free/R_FREE (#12145) 2018-11-13 23:41:28 +01:00
dav1901
9b0fbf1ee4 Minor code cleanups - free/R_FREE/etc 2018-11-13 00:23:49 +01:00
pancake
6c7bfd846a Add help in wtf!? and add bitcode magic signature ##magic 2018-11-10 02:44:24 +01:00
David CARLIER
29ef8a53b0 self plugin is now working in DragonFlyBSD ##port 2018-11-09 17:38:09 +01:00
David CARLIER
327fcfa9ed Little code simplification for ptrace/debug code. (#12077) 2018-11-07 11:32:18 +01:00
David CARLIER
11127f0c76 Minor code cleanup for BSD 2018-11-07 00:34:16 +01:00
David CARLIER
9b3075b137 Support DragonflyBSD build and backtrace ##port
including backtrace support. the manpage mentions FreeBSD 10 release
and DragonflyBSD has different versioning, and radare not into
their port tree yet anyway, it might safe enough.
2018-11-07 00:31:00 +01:00
lzutao
b790439e28 Cast arguments to ut8 when feeding ctype.h functions ##refactor
The behavior of the `<ctype.h>` functions is undefined for negative
arguments (other than `EOF`). In such a situation, the argument should
be cast to `unsiged char` for safety.

References:
 - C Programming: A Modern Approach, 2nd Edition: page 612, chapter 23.5
2018-11-06 13:40:00 +01:00
pancake
3b8161039e Improve pid_to_task and handle =!pid ##debug 2018-11-05 11:30:56 +01:00
Bet4
28fcfeb389 Fix some spawn args escape bugs ##debug
This reverts e973deadca commit dd4ad11379
2018-11-03 19:57:05 +01:00
David CARLIER
b4e2ebd031 NetBSD - self:// protocol support. (#12038)
Final nail on the coffin, here now the NetBSD much closer to
FreeBSD workflow.
2018-11-02 13:15:22 +08:00
David CARLIER
cce39b7ec9 Following up on porting self:// to BSD. (#12031)
* Following up on porting self:// to BSD.

Here the OpenBSD support, unfortunately not storing the path
but the proc mapping lookup is simpler.

* refactoring
2018-11-01 19:13:15 +08:00
David CARLIER
0e1bfe275e Adding self proc support for FreeBSD ##port
At least for now only supporting FreeBSD, going through proc maps differ between BSD flavors.
2018-10-30 23:50:36 +01:00
Maijin
13bfc1e56f Remove unused functions in iosections ##refactor 2018-10-30 23:14:00 +01:00
Maijin
34abfd6d64
Remove all S commands ##refactoring 2018-10-30 13:23:18 +01:00
Maijin
2519780a6a Remove SR commands ##refactoring 2018-10-26 22:32:30 +02:00
radare
c50357fbe6
Fix the build of the iOS SDK ##build (#11884) 2018-10-21 14:56:56 +02:00
Riccardo Schirone
64d16fc506 Some code cleanup and asserts in RBin ##refactor
* libr/bin: no need to allocate RBinOptions on the heap
* bin: start using r_return_* around, that's just the beginning
* bin: remove io_owned since it's not used anywhere
* io: make r_io_bind return nothing
* bin: remove unused functions and simplify r_bin_load_io
r_bin_load_io was calling r_bin_load_io2 with UT64_MAX as sz parameter,
but r_bin_load_io2 just returns false if (st64)sz is less than 0, so
that call is actually useless and can be removed.
* bin/bin: fix some preconditions
* bin/open: fix precondition to check for bin and filename too
2018-10-21 01:27:15 +02:00
radare
2ba07cfebd
API cleanup and support RCorebind in RSocket.R2Pipe ##refactor (#11875) 2018-10-20 11:57:54 +02:00
pancake
018de032ce Fix static build problem with ptrace-wrap 2018-09-09 05:59:24 +02:00
pancake
e2dbd79f02 Fix warnings about unimplemented functions in io_debug 2018-10-15 15:29:31 +02:00
Riccardo Schirone
8153422add gcc8 warnings (fixes #10338) (#11798)
* bin/format/pe: fix gcc8 warnings
* bin/p: fix gcc8 warnings
* io/io_r2pipe: fix gcc8 warnings and style
* clang-format: do not sort includes, it may break stuff
* use sizeof instead of macros
2018-10-13 01:32:20 +02:00
Florian Märkl
0c0fee7b48 ptrace-wrap (#11723)
* Add ptrace-wrap
* Add r_io_ptrace* and r_debug_ptrace()
* Use wrappers instead of calling ptrace and fork directly
* Sleep while waiting in linux_debug
* Add ptrace-wrap Makefile
* Link io against ptrace-wrap with acr
* Define ptrace usages in r_userconf.h
* Conditional ptrace-wrap in acr
* Fix HAVE_PTRACE
* Some fixes for Solaris
* Fixes for FreeBSD
* More fixes for Solaris
* Style Fix
2018-10-12 12:20:18 +02:00
pancake
41ec949204 Fix #11112 - Rename {srwx,flags,perms} to perm. (-21 LOC)
Unify R_IO, R_BIN, R_BP, .. into R_PERM_* using 1 letter syntax
2018-09-22 11:31:45 +02:00
radare
01bd0d38d8
Fix #11509 - XNU debugger (#11557)
* Use PT_ATTACHEXC and PT_SIGEXC on mac to get BSD signals as XNU exceptions
2018-09-18 11:35:10 +02:00