Commit graph

142 commits

Author SHA1 Message Date
dequis
5d6c3ac947 libr/util/sys.c: Wrap the other backtrace() call with an #ifdef
I accidentally broke musl builds with that workaround.
2016-05-16 21:52:05 +02:00
Anton Kochkov
49912c0226 Do not use backtrace if it's not available 2016-05-16 12:42:49 +03:00
dx
cbac4c38e1 libr/util/sys.c: Avoid malloc() calls in the signal handler (#4896)
Using functions like malloc() in async signal handlers is unsafe, and
may result in deadlocks.

Turns out that backtrace() is not safe either because its initialization
code uses dlopen() and malloc() and others, but this can be workarounded
by calling it once outside of a signal handler.
2016-05-16 04:06:59 +02:00
Joshua J. Drake
83a76b7158 Propagate location information in perror
The "r_sys_perror" function previously would use "perror" on UNIX resulting in
location information of the "perror" callsite being shown. Renaming
"r_sys_perror" to "r_sys_perror_str" and replacing the original identifier with
a macro ensures that the displayed information is useful.

Further, this addreses a TODO that makes this functionality work on both
Windows and UNIX by moving these macros outside of the UNIX #if. The (now)
"r_sys_perror_str" is already implemented for both platforms. Let's use it!
2016-05-14 08:42:56 +03:00
pancake
032969927d More powerpc build fixes 2016-04-27 01:08:12 +02:00
Damien Zammit
1a593a6318 GDB debug for lm32 architecture (#4696)
Signed-off-by: Damien Zammit <damien@zamaudio.com>

* Missing a couple of things in previous commit

Signed-off-by: Damien Zammit <damien@zamaudio.com>
2016-04-24 23:13:00 +02:00
Lukas Dresel
cb60759219 Removed unnecessary r_lib.h dependency in r_util.h 2016-04-04 21:26:20 +02:00
pancake
de22aa46f2 Fix COV with boolified r_io_creat 2016-01-19 13:16:24 +01:00
Anton Kochkov
60e1151ed9 Fix Cygwin mkdir 2015-11-10 18:41:32 +03:00
pancake
3de77ad6e6 Initial support of dbg.libs/unlibs for Linux/OSX 2015-10-22 04:48:56 +02:00
pancake
45c7c923af Better dtc, demangling support. Handle RABIN2_LANG, and more c++ autodetect
* r_name_filter(len:-1) strlens the string
* Show symbol names in `dtc` (calltracer)
2015-10-19 13:21:12 +02:00
pancake
6ed80ae39b Update sdb and rename rmkdir->mkdirp 2015-10-19 00:25:39 +02:00
jvoisin
420a5c41e0 Fix some minor compilation warnings 2015-10-15 12:36:34 +02:00
pancake
0d3c5583ba Fix #3202 - Use / and \ as separators for rmkdir 2015-09-07 03:05:56 +02:00
Kevin Grandemange
71c4245df7 add clearenv in rarun2 and update documentation
fix unsetenv wrong description
add some example for environment variable
fix r2 use of rarun2 example

Signed-off-by: Riccardo Schirone <sirmy15@gmail.com>
2015-08-29 19:22:15 +02:00
XVilka
e09682141e Run fork() on Cygwin 2015-08-04 21:14:11 +03:00
Jeffrey Crowell
c5a03b3fea fix string searching on cygwin 2015-07-22 13:51:42 -04:00
jvoisin
aa695bc808 Fix misc compilation warnings on Windows 2015-07-14 13:55:58 +02:00
pancake
8d0b8c6b78 Add CS command to manage meta-spaces 2015-06-15 04:19:29 +02:00
pancake
5954f6e046 Fix #2716 - sdb, rmkdir and console issues on w32 2015-06-11 12:12:22 +02:00
pancake
75caca7ebe Fix w32 build 2015-04-11 20:54:31 +02:00
pancake
882a0ee164 Add --without-fork and r_sys_fork() 2015-04-11 05:00:05 +02:00
Anton Kochkov
0c9d3a9a29 Various Cygwin/MinGW fixes 2015-04-05 00:56:56 +03:00
Clément Vuchener
5466d221db Fixing r_sys_pid_to_path on recent versions of Windows 2015-02-22 17:07:10 +01:00
Kamil Rytarowski
ac9af5531b Enable backtrace(3) in NetBSD >=7.0
This patch was prepared with the assistance of the upstream.
2014-12-12 00:41:19 +01:00
pancake
4c49708cf3 Fix #1820 - Avoid SIGPIPE in r_sys_cmd_str_full 2014-12-11 13:39:53 +01:00
pancake
5e236429c7 Implement ^Z in RCons for prompt and visual modes (unix only) 2014-11-19 22:25:17 +01:00
pancake
619e443e7e Update for iOS 8.1 SDK 2014-11-06 11:57:51 +01:00
d0p
5bdbfd240a Fix compilation error on OS X 10.7.5 (undef symbol)
Shared libraries and bundles don't have direct access to environ. Use
the _NSGetEnviron() routine to retrieve the address of environ at
runtime. See "PROGRAMMING" section of ENVIRON(7).
2014-11-05 16:16:27 +01:00
pancake
dcfb90ae94 Wip Fix r2 -d oo (workaround, because it's a race condition in fork+pid2path) 2014-11-03 11:47:51 +01:00
pancake
718e175892 Add $p for getpid(), hide UNKNOWN refs, 'cat' works with bigger chunk if unknown size 2014-10-18 00:25:55 +02:00
pancake
90dad36646 Fix w32 build (oops dislexia) 2014-09-17 15:37:30 +02:00
defragger
51b6112925 fixes the w32 native debugging and error messages 2014-09-17 15:26:00 +02:00
pancake
8f6ecaa659 Fix preload on Linux and OSX 2014-09-09 12:11:23 +02:00
pancake
d809200fa2 Fix more memleaks 2014-08-29 16:42:00 +02:00
pancake
c6bc6f099d Rename l to T, add cfg.user and 'TT' chat prompt
* Add cfg.user variable
* Implement TT chat prompt
* Invoked from 'VT'
* Rename 'l' to 'T' command (log -> textlog)
* Add r_sys_whoami () -> set default username
* Add $$ trap instruction in ESIL
* Implement POP and STACK esil commands
2014-08-28 03:11:13 +02:00
Anton Kochkov
a606139ac0 More fixes for cygwin builds 2014-06-25 20:06:14 +04:00
Anton Kochkov
bf088d43bd Fix libr_util building for Cygwin 32bit (gcc 4.7.3) 2014-06-25 18:17:34 +04:00
jvoisin
995134d2a8 Fix a picky gcc warning 2014-05-03 02:21:14 +02:00
Anton Kochkov
9864220150 Fix CID #1135101 2014-04-25 04:42:05 +04:00
pancake
5091fa0887 Fix segfaults and minor changes in m68k disasm + anal, webversion is not 2014-04-06 03:29:29 +02:00
pancake
fb98bc1335 More sdbization for comments and hints (-250LOC) 2014-03-12 02:44:49 +01:00
Fedor Sakharov
61193c6527 Fix coverity issues in r_util 2014-03-08 11:56:15 +01:00
pancake
2590e997b1 Fix r_sys_now() and implement scr.fps 2014-02-24 16:10:12 +01:00
pancake
070bc97286 Fix #582 - Escape binary strings in output error message 2014-02-23 01:56:26 +01:00
Ilya V. Matveychikov
969ea9b7c2 TMS320: move c55plus under the TMS320 namespace
Sorry for the huge patch, but there is nothing special. We just move
asm/arch/c55plus into the asm/arch/tms320 and add some wrappers to use
existing code base under the new namespace.

Also, we've implement TMS320 anal module that supports now c55+ only. To
be continued...
2014-02-06 01:19:23 +04:00
pancake
4672c2d866 Fix short jmp assemble in x86.nz, add rasm2 -O <outputfile> 2014-01-26 01:58:25 +01:00
pancake
802e808072 Merge libr/lib into libr/util and add r_sys_environ API 2014-01-18 02:42:23 +01:00
pancake
3a9b6c686f Fix asm/avr license and some coverity issues 2013-12-15 00:58:05 +01:00
pancake
a03dd04c42 Fix r_sys_pid_to_path for FreeBSD (thanks vsp) 2013-12-11 12:32:15 +01:00