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 a31d359bf1c79b92f518fa8237c7f9d4cf146577
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date: Wed Dec 9 11:40:54 2015 -0800
fetches sections starting from the back
commit 0b687439ea6225c8db9f387cc93bc53300e297a7
Merge: 8485676 92c1631
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 8485676cf5c042d8c4e10c798b4fadb1a43df50c
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 2e4b8de397a4ef23c02c3e08113cf6b984479275
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date: Tue Dec 8 22:46:29 2015 -0800
not good... reverting
commit 324afba7e2853ddb72750f7f8b38bf59af310873
Author: Ricardo Quesada <ricardoquesada@gmail.com>
Date: Tue Dec 8 22:09:25 2015 -0800
workaround for bug 3788
commit 6e6283eaa18edcca1987a8f4227f163a6926c430
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.