Commit graph

199 commits

Author SHA1 Message Date
pancake
4de93b2703 Fix coredump file generation 2016-05-21 15:11:16 +02:00
pancake
7ad752f038 Remove the sandbox and fix more bugs in linux-core 2016-05-21 14:40:09 +02:00
pancake
64201e9c34 Fix format string for the linux-core 2016-05-21 14:35:43 +02:00
pancake
987020ece3 Fix build and more cleanup for linux-coredump 2016-05-21 14:13:33 +02:00
pancake
98246ac212 Fix memleaks, syntax, author and other bugs in linux-coredump 2016-05-21 13:36:33 +02:00
Oscar Salvador Vilardaga
876f3fd547 Initial coredump support for Linux-x86-64 (no threads yet)
* http://man7.org/linux/man-pages/man5/core.5.html
* Able to dump the header and the program headers
* Checks /proc/[pid]/coredump_filter to know which maps should be dumped
* Check for bit 6 to 0 (priv/share anon mappings, priv/share file-backed, elf hdr, priv/share huge pages)
* Missing: priv/share DAX pages
2016-05-21 12:27:13 +02:00
pancake
48d5e668eb No more linux-ppc blindfixing. This one is for real 2016-05-19 16:21:57 +02:00
pancake
7f80a159c3 More powerpc blindfixing 2016-05-19 12:27:58 +02:00
pancake
b3093c516c Blind fix the powerpc debugger build 2016-05-16 08:37:40 +02:00
pancake
1f82c105fb Fix doublefree and regprofile for FreeBSD 2016-05-04 13:28:53 +02:00
pancake
b9eca47b02 Add regprofile for linux-powerpc (via @crowell) 2016-04-28 14:37:29 +02:00
pancake
af78b8e37f More osx-ppc build fixes. Almost there 2016-04-28 14:33:51 +02:00
Riccardo Schirone
26fc8f92ef libr: remove some unused variables and functions 2016-04-27 12:59:45 +02:00
pancake
6dfb95e9c5 Drop some unsupported debug features for osx-ppc 2016-04-27 11:40:42 +02:00
pancake
d24bc909ec Update sdb for osx-ppc and other 0.10.2 updates 2016-04-27 00:25:28 +02:00
andrey.torsunov
169f3885c3 Fix checking /proc/%d/task for existence.
Since `/proc/%d/task` is directory, it make sense to use appropriate
check function. Therefore,`r_file_exists` function is not suitable
here, because it checks for existence of regular file.
2016-04-22 13:55:19 +02:00
pancake
3b2d06d65e Fix iOS build 2016-04-12 17:32:14 +02:00
Jeffrey Crowell
9a77bdc7d5 fix r_debug_reg_get to use PC instead of pc in dbg 2016-04-11 12:26:33 -04:00
pancake
fe02539afb Fix some warnings for debug.mach0 2016-04-08 01:09:56 +02:00
Daniel Domínguez
71beec242e Coredump generation for Mach0 binaries 2016-04-05 12:03:59 +02:00
pancake
846263a51b Implement ios9 pangu's tfp0 in the debugger 2016-03-14 23:24:49 +01:00
pancake
3e53c64553 Fix #4165 - Reduce warning messages in debugger mode 2016-02-25 01:55:16 +01:00
Álvaro Felipe Melchor
af8743e0b7 xnu: fix issue when disable trace bit on arm 2016-02-22 21:22:01 +01:00
Álvaro Felipe Melchor
20fddc1e55 xnu: fix issue when writing in memory 2016-02-22 21:21:57 +01:00
Álvaro Felipe Melchor
98490aa881 xnu: chained step thumb32 seems to work 2016-02-17 13:37:50 +01:00
Álvaro Felipe Melchor
10a586b48d stepping works on ios though thumb32 chaining still doesn't work 2016-02-16 17:33:41 +01:00
Álvaro Felipe Melchor
ec3ac37bb5 Fix ios build and more rework 2016-02-16 17:33:41 +01:00
Álvaro Felipe Melchor
c24dbc3054 Fix warnings 2016-02-13 22:17:21 +01:00
Álvaro Felipe Melchor
5a63887ff5 xnu: added XNU_USE_PTRACE to xnu_wait 2016-02-06 20:23:15 +01:00
Álvaro Felipe Melchor
efa2a8ecdf xnu: step, breakpoint working with mach exception 2016-02-06 19:53:29 +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
Á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
Á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
Maijin
628ee9716e Complete remaining regprofile and Fix #3947 2016-01-17 14:23:15 +01:00
Maijin
59d5b8b73f Complete more reg profile #3947 2016-01-17 14:13:04 +01:00
Maijin
02041f3193 Add -d,-w,-b subregisters in darwin-x64.h 2016-01-12 17:35:18 +01:00
Maijin
515f6e8753 Add -d,-w,-b subregisters in linux-x64.h 2016-01-12 15:56:23 +01:00
pancake
399a1b82c9 Human-friendly registers sort in linux-x86-64 reg profile 2016-01-11 23:47:49 +01:00
pancake
9bd4e213b2 Enhance cpsr in ARM and handle new bitsize syntax in reg profile 2016-01-11 02:35:57 +01:00
skuater
e31cb0fe4b fix dr7 mask value 2016-01-10 17:58:29 +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
42acaa7596 Softly kill boolt type 2016-01-03 02:05:26 +01:00
pancake
4e6be05f62 ARM's SP is r13 and add LR in r14 2015-12-31 14:10:11 +01:00
pancake
1d8b761ca1 Various static and iOS related build issues are now fixed 2015-12-28 02:01:45 +01:00
Joshua Wang
415263a0d5 info_array is freed on xnu_debug.c:737 and again on xnu_debug.c:744 resulting in double free 2015-12-16 22:10:23 +01:00
pancake
8eabe785fe Boolify RDebug API 2015-12-04 02:57:56 +01:00
pancake
cc402a76c5 More refactorings towards a ptrace-free iOS/OSX debugger 2015-12-04 02:44:36 +01:00
pancake
2b51bf1acd Fix #3759 - ood on OSX 2015-11-25 11:52:29 +01:00
Álvaro Felipe Melchor
434e9a0986 More cleanup for XNU debug 2015-11-24 21:52:28 +01:00
Álvaro Felipe Melchor
a028adae6f Cleanup for the XNU debugger
clean up in xnu_thread_get_gpr
clean up xnu_thread_set_gpr
updated reg profile
2015-11-23 22:00:25 +01:00