instead of a thread waiting for incoming messages, i've implemented
wait functionality above mach_msg, now i have to make it work
with r2 and avoid while (1) in the code, understand better the
references and start thinking about edge cases
some rework in order to handle mach message as mach_exc_server and alike does
api change in plugin debug, now the function detach receive a pointer to RDebug
trying to deallocate port when are not needed any more
* use set_trace_bit and clear_trace_bit macros
* use PT_ATTACHEXC since PT_ATTACH will be deprecated in the future
and we are interested in receiving mach exceptions
* first attempt to handle mach exceptions
* api change: added a parameter to r_core_setup_debugger
at least in OS X this function was producing double attachment.
I've added a boolean value to indicate when use dpa.
* added pipe to communicate between main process and traced process
by far this is not a good implementation. We should develop a better
approach/design to save all the exceptions and handle them accordingly.
This is the initial implementation
* bring back ptrace for stability and in order to merge this into master
- `r_io_read` calls `r_io_read_at` with vaddrs, and not with maddr
- `r_io_section_maddr_to_vaddr` uses a reverse iterator to check the
sections
- adds `r_io_section_mget_prev`: this function can be removed if the
behavior of `r_io_section_mget` is changed to use a reverse iterator
Squashed commit of the following:
commit a31d359bf1
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date: Wed Dec 9 11:40:54 2015 -0800
fetches sections starting from the back
commit 0b687439ea
Merge: 848567692c1631
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date: Tue Dec 8 23:40:35 2015 -0800
Merge branch 'master' of https://github.com/radare/radare2 into revert_3788
commit 8485676cf5
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date: Tue Dec 8 23:09:05 2015 -0800
This seems to be the "correct" patch...
...but it breaks some tests... apprently searches a few bytes
out of the section creating some false-positives hits
I'm just commiting this PR to give an idea of where the bug is
commit 2e4b8de397
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date: Tue Dec 8 22:46:29 2015 -0800
not good... reverting
commit 324afba7e2
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date: Tue Dec 8 22:09:25 2015 -0800
workaround for bug 3788
commit 6e6283eaa1
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date: Tue Dec 8 15:14:12 2015 -0800
Reverts fix for bug #3788
please, reopen bug #3788
During the environment configuration we may fork and spawn other
processes that we don't really care about. Splitting r_run_start, allows
to call ptrace only after this initial work is done.