Commit graph

340 commits

Author SHA1 Message Date
leberus
c5149f97b7 Fix: Fixed regression pointed by #6650 (#6672) 2017-02-03 18:20:07 +01:00
Lars Haukli
71cc67e390 Windows debugger: Added dce command. Fixed dmm commands. (#6628)
* Use double quotes to make .dmm* work on Windows
* Fix r2pipe.cmdj('dmmj') command on Windows. Report correct path when listing modules ('dmm')
* Removed unused local variable
* Added 'dce' command for windows
* Escape backslashes for JSON output only
* Do not include r_debug_native_continue() for __CYGWIN__ builds. Removed unnecessary memset.
* Added exception for CYGWIN to not escape backslashes in path
* Escape backslashes in both file paths and map names. Use map name for 'f mod.%s' instead of file path
* Added more exceptions for CYGWIN
* Validate escaped strings
2017-02-02 13:27:39 +01:00
pancake
bd25a763d8 Fix null deref and infinite loop when building with no plugins 2017-02-02 13:25:21 +01:00
leberus
4fd1e990d9 Add: coredump refactoring + RDebugMap offset field (#6633) 2017-02-01 22:17:59 +01:00
zonkzonk
56366df728 Removing path in shell redirections 2017-01-31 22:13:32 +01:00
Sevan Janiyan
0e4b401635 Upstream patches from pkgsrc/devel/radare2 (#6491)
* Upstream patches from pkgsrc/devel/radare2
Switch to using egrep instead of non-portable "grep -e".
Add support for SunOS.

* Add support for SunOS.

* FIONREAD is defined in sys/filio.h on SunOS.

* Ask find(1) to look for files with desired extension rather than searching for
all files & fishing out the desired extension in the pipeline, with grep.
2017-01-18 00:47:46 +01:00
leberus
286ca4d0ed Add: support for dbg.follow.child option (#6525) 2017-01-18 00:40:30 +01:00
leberus
f4b8fbbc77 Fix: remove linux specific and add braces 2017-01-16 12:22:24 +01:00
pancake
2a83f21a3e Make gcc6 warnings happy 2017-01-15 22:02:57 +01:00
leberus
8f3a276cf9 Fix: *BSD build (#6494) 2017-01-12 11:19:46 +01:00
leberus
dc5be7a767 Improving debug on linux (#6435) 2017-01-11 17:39:09 +01:00
nevun
1e5a4f05ff Silence warning on OpenBSD by casting to caddr_t. (#6453)
Gets rid of this:

p/debug_native.c: In function 'bsd_reg_read':
p/debug_native.c:674: warning: passing argument 3 of 'ptrace' from incompatible pointer type
2017-01-09 13:47:24 +01:00
Sebastian Reichel
2f9447550e Small fixes (#6398)
* debug_native: include linux_coredump.h for linux-arm

* run: login_tty needs utmp.h on linux
2016-12-29 20:30:05 +01:00
Moritz Eckert
fdc7edde68 Fix interactive debugging issue introduced with 8b0afcbc3 (#6397) 2016-12-29 17:56:33 +01:00
leberus
8b0afcbc39 Fix: #4856 #4857 (#6365) 2016-12-28 16:02:05 +01:00
SkUaTeR
8e6be1b54b Thread list and some fixes for the w32 debugger (#6355) 2016-12-21 09:07:58 +01:00
skuater
0c464aeb28 Fixed break on dll load 2016-12-19 16:48:46 +01:00
pancake
6296f4b794 Add option to stop syscall tracing -before- the syscall is executed 2016-12-09 22:19:47 +01:00
pancake
d26917a0a2 Fix #6141 - implement pkill 2016-12-09 18:12:38 +01:00
pancake
441220dd04 hwstep is possible on all linux-x86-64.. dunno why this canstep 2016-12-09 15:12:18 +01:00
pancake
8e3278b5a6 Fix seg@gpr for OSX-32/64 Debugger. Remove debug printf 2016-11-22 00:20:36 +01:00
Álvaro Felipe Melchor
87724384d1 added r_cons_break_{push/pop} to handle ^C better
Besides an UAF has been fixed afecting only ELF
2016-11-21 16:56:12 +01:00
SkUaTeR
20a9bbd14a Rreg fpu changes (#6191)
* test with rreg for values greater than 64
* check for redirected regs in debug reg sync
2016-11-14 23:58:29 +01:00
Álvaro Felipe Melchor
3222447eab Fix warnings when compiling in linux 2016-11-08 01:58:07 +01:00
SkUaTeR
83b07099e0 Implemented basic FPU regs for the winx64 debugger 2016-11-07 02:58:34 +01:00
pancake
ab28917568 Honor --without-debugger for linux-coredump 2016-11-06 22:04:45 +01:00
pancake
7269a29be6 Fix #6135 - arm64 can hwstep 2016-11-06 21:52:47 +01:00
dromero
ac644878a8 Send KILL to child on ^C in dc when dbg.consbreak is set 2016-11-06 00:46:10 +01:00
pancake
0080399021 Fix build on FreeBSD 2016-10-03 15:08:59 +02:00
Sebastian Reichel
b98880ff26 Debian patches (#5866)
* Fix esil manpage

Each manual page should start with a "NAME" section, which lists the
name and a brief description of the page separated by "\-". The "NAME"
section is parsed by lexgrog and used to generate a database that's
queried by commands like apropos and whatis. Without this change
lexgrog fails to parse the NAME section of this manual page.

This was found by Debian's lintian tool (manpage-has-bad-whatis-entry).

* Fix empty input line in manpages

Found-By: lintian as manpage-has-errors-from-man

* Fix rahash2 manpage

.El (end list) is only valid after .Bl (begin list),
but no list was started in this section.

Found-By: lintian

* Avoid build break if no static bin plugins are defined

If one disables all static bin plugins, build currently fails,
since R_BIN_STATIC_PLUGINS/R_BIN_XTR_STATIC_PLUGINS are not
defined. This fixes the build for these kind of setups.

(In Debian does not built the mach code, since the
Apple Public Source License is not compatible with
the Debian Free Software Guidelines. Without the
mach code there is not a single binxtr plugin)

* Fix implicit declaration of function 'linux_generate_corefile' on i386

Noticed by Debian build farm.

* Add support for SOURCE_DATE_EPOCH

SOURCE_DATE_EPOCH can be used to make builds
reproducible [0].

Note: radare suffers from a second problem making the
build unreproducible: It captures the full build path.
This is *not* covered by this change.

[0] https://reproducible-builds.org/specs/source-date-epoch/
2016-09-28 19:17:43 +02:00
Sven Steinbauer
2996538700 Fix #5633 - Change x == NULL to correct syntax 2016-09-19 14:44:47 +02:00
pancake
6cbae900c5 Include some patches frmo termux 2016-09-19 12:21:54 +02:00
pancake
a458a36814 Fix android build 2016-09-07 00:10:25 +02:00
SkUaTeR
8b17834eb5 Fix command do in windows, fix dr command to get segments registers, … 2016-08-26 23:51:56 +02:00
leberus
74e6fda450 Coredump support for ARM and fix-ups (#5549)
* Fixes: 5540 (now i386 will not complain in case they're missing GETREGSET)
 * Fixup: Owner set to Linux for NT_PRXFPREG
 * Fixup: Now extra section hdr is being written with the right offset
 * Fixup: Bug with multithread cfg fixed
 * Add: Now r2 is able to generate coredumps on ARM platforms
2016-08-18 10:43:08 +02:00
pancake
123d1f1964 Fix android-x86 build 2016-08-16 19:27:55 +02:00
Kamil Rytarowski
6ad9abb0b1 Fix NetBSD build in r_debug_native_pids() 2016-07-21 23:00:18 +02:00
skuater
39c4a0c35f some fix in windows debugger 2016-07-06 12:44:52 +03:00
nevun
d8d6d1a073 kvm_openfiles can fail so make sure we print the error message. (#5285)
* kvm_openfiles can fail so make sure we print the error message.

On OpenBSD you can use the kvm interface without /dev/kmem access but on FreeBSD
you need root or kmem access which one do not want to give a user.

Look at ps(1) on FreeBSD and see how they do it.
2016-07-05 04:13:10 +02:00
nevun
f41b706437 Fix OpenBSD build. Cannot do sizeof on a macro argument, compiler does not know what it is yet. (#5284) 2016-07-04 15:06:51 +02:00
nevun
5803182cbe Fixes issue #5279: kvm interface differs a bit between Open and FreeBSD. (#5282) 2016-07-04 14:32:11 +02:00
nevun
20801a3ee4 Make dm work on OpenBSD by adding a native r_debug_native_map_alloc() (#5267)
Note that OpenBSD can have mappings with zero size so relax the assert.

Also note that the protection bits are flipped. Different bit order. Will fix that later.
2016-07-02 13:22:28 +02:00
nevun
b5ec7a7145 Add support for dp and dp* on OpenBSD. (#5266)
* Add support for dp and dp* on OpenBSD.

kvm_getprocs exists on Net and Free as well so it might work there as well

* Cosmetic changes after feedback. Thanks.
2016-07-02 12:35:24 +02:00
Joshua J. Drake
09435c7317 Don't print SIGTRAP signals or stops
A TRAP signal signifes expected stops for breakpoints and so on. There's no
need to display these as signals or stops since they will be communicated
inside r_debug_bp_hit.
2016-07-01 21:32:02 -05:00
Pavel Borzenkov
fe9c419fa5 libr/debug: fix native debugger on Linux (#5259)
Linux kernel checks for unknown flags passed via the last argument to
waitpid() and fails waitpid() with EINVAL if it encounters one:

From kernel/exit.c:sys_wait4()

	if (options & ~(WNOHANG|WUNTRACED|WCONTINUED|
			__WNOTHREAD|__WCLONE|__WALL))
		return -EINVAL;

This makes it impossible to use debugger on Linux.

WAIT_ANY macro is actually supposed to be used as PID argument to wait
for all children without specifying particular PID.

Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>
2016-07-01 11:13:57 +02:00
Anton Kochkov
22e4a1d74c Fix Android build - 2nd try 2016-06-30 21:26:36 +03:00
Anton Kochkov
35f8178632 Fix Android build 2016-06-30 21:17:31 +03:00
pancake
4f785d398f Fix --disable-debugger on OSX 2016-06-25 04:26:07 +02:00
pancake
baca25dc73 Fix #5200 - __WALL is a linuxism, better use WAIT_ANY 2016-06-25 03:36:58 +02:00
pancake
feff5b59e4 Do not use %p for ut64 values 2016-06-22 19:20:59 +02:00