Commit Graph

776 Commits

Author SHA1 Message Date
pancake
74b23f10b9 Merge branch 'xnu' of https://github.com/alvarofe/radare2 2016-02-06 22:37:52 +01:00
Álvaro Felipe Melchor
efa2a8ecdf xnu: step, breakpoint working with mach exception 2016-02-06 19:53:29 +01:00
pancake
805e3f26e8 Fixes for lldb/debugserver on x86-64 2016-02-03 12:09:58 +01:00
Álvaro Felipe Melchor
feea7f4d17 xnu: change logic handle exception
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
2016-02-02 20:27:57 +01:00
pancake
90e2fc3031 Fix reg-write in gdb-thumb and tiny io cache optimization 2016-01-27 00:26:49 +01:00
pancake
32dbac517f Several bug fixes for gdb-arm and thumb remote debugger 2016-01-26 23:36:02 +01:00
NighterMan
497225d05c Temporary workaround for the buffer size limit when analyzing large files 2016-01-25 16:11:21 +01:00
Álvaro Felipe Melchor
c372743315 xnu: get rid of ptrace even for attach and detach
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
2016-01-23 22:50:28 +01:00
condret
5a300e09e8 fix r_io_section_rm 2016-01-22 15:38:12 +00:00
pancake
de22aa46f2 Fix COV with boolified r_io_creat 2016-01-19 13:16:24 +01:00
Álvaro Felipe Melchor
d9e77ca0d1 xnu: first series of patches to use mach exceptions
* 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
2016-01-18 22:24:16 +01:00
pancake
d2a192cffc Fix #3760 - Honor iOS/OSX pre-map memory reads in io.mach 2016-01-07 01:23:14 +01:00
DZ_ruyk
0e8b42787a Boring typo fixes
Can't -> Cannot (since most of error messages use second form)
2016-01-07 00:13:54 +01:00
pancake
6f47901a06 Clarify r_io_section_mget->_in api and use the heap for section->name 2016-01-03 03:08:58 +01:00
pancake
42acaa7596 Softly kill boolt type 2016-01-03 02:05:26 +01:00
pancake
4c4bfd11c2 Enforce size in section.findMatching 2016-01-03 01:40:09 +01:00
pancake
a93ecf2b69 Fix #3898 - Persistent section name in project files 2016-01-03 01:36:16 +01:00
pancake
6f346b6d6d Fix #3901 - Cannot debug directories and follow symlinks 2016-01-03 01:28:02 +01:00
Ricardo Quesada
2c3fdba551 Fix for bug 3788
- `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: 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 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
2015-12-09 22:20:54 +01:00
pancake
92c1631a06 More indent fixes 2015-12-09 00:41:44 +01:00
pancake
cfb03d3772 More indentation fixes 2015-12-09 00:27:31 +01:00
pancake
a4fc08b401 More auto-indentation enhancements 2015-12-08 23:55:23 +01:00
pancake
b5e093fc45 Indent io/io.c and fix an issue in the .sh 2015-12-08 22:35:39 +01:00
pancake
75ea729679 Fix regression in t.anal/x86/emu 2015-12-08 16:49:15 +01:00
pancake
0880d7d4f5 Some refactor/cleanup for agf and io cache (wip) 2015-12-08 14:59:30 +01:00
pancake
aac116bc8f Fix r_io_map_get 2015-12-08 01:54:05 +01:00
pancake
61fba1e663 Fix #3807 - write on maps issue 2015-12-07 22:35:34 +01:00
pancake
cc402a76c5 More refactorings towards a ptrace-free iOS/OSX debugger 2015-12-04 02:44:36 +01:00
pancake
fb8345276a Kill child if no perms to debug after spawn in OSX 2015-12-04 00:21:06 +01:00
pancake
40e08dbd89 Get rid of _Bool 2015-12-01 12:39:12 +01:00
skuater
513200a7fa Fixes for the w32 debugger 2015-11-24 23:28:50 +01:00
pancake
07c6a1e41d Fix rabin2 -k crash 2015-11-24 10:17:24 +01:00
pancake
50f8ecaba4 Fix 2015-11-22 02:07:28 +01:00
pancake
f188ef836e Fix java build 2015-11-20 16:08:24 +01:00
pancake
e0de679118 Fix #3691 - Fix unitialized memory in 32bit esil write op 2015-11-16 10:29:03 +01:00
pancake
2b519dee07 Fix #3599 - save/restore file map address 2015-11-12 10:33:20 +01:00
Álvaro Felipe Melchor
b1583d5b24 Fix more issues reported by clang-analyzer 2015-11-03 22:14:00 +01:00
pancake
afb5c93e49 Fix iOS debugger attach 2015-10-31 00:48:08 +01:00
Álvaro Felipe Melchor
8aa6086ed3 Fix #3474 2015-10-29 18:51:44 +01:00
Riccardo Schirone
7323e0ef05 socket/run: split r_run_start to make debugging easier
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.
2015-10-29 08:21:24 +01:00
pancake
6c4bfb94b1 Fix windist, r2pipe and plugins paths 2015-10-23 02:58:48 +02:00
Claude Hemberger
3929091bf5 Incompatible pointer type warning during make
wind_va_to_pa wants a different struct for 64 bit int. Since the value
is never used, I just replaced it
2015-10-16 13:16:49 +02:00
Álvaro Felipe Melchor
11ce2c5031 fix aligned issue with S= 2015-10-15 21:57:08 +02:00
pancake
9f522a4a9b Fix seek for ptrace and mach IO 2015-10-14 13:42:15 +02:00
Álvaro Felipe Melchor
82e02d15b0 Fix S= issues with paddr and vaddr 2015-10-14 00:11:35 +02:00
Álvaro Felipe Melchor
feb11b7861 Fix #3440 2015-10-14 00:11:35 +02:00
Álvaro Felipe Melchor
a7022f01a5 coding style and fix paddr in S= 2015-10-14 00:11:35 +02:00
pancake
f9b661f839 Hardcode pagesize for arm64 in native iOS debugger 2015-10-12 19:18:00 +02:00
pancake
747c7bbacb More fixes for io.mach.write 2015-10-11 03:07:53 +02:00
pancake
f6b19c6762 Fix many bugs in io.mach.write, add =!perm for mach debugger 2015-10-11 01:07:36 +02:00