Joshua J. Drake
fb820f9c8e
Fixes #4875 : Refactor process listing ( #5144 )
...
* Fixes #4875 : Refactor process listing
* Move procfs-based process listing into linux_debug.c, guarded by __linux__
* Provide a warning and eprintf a TODO on the remaining platforms.
* Break reusable parts into linux_get_proc_pid and call it as needed.
* Add/remove comments for clarity
* Address feedback and re-enable non-Linux
2016-06-16 22:39:11 +02:00
Joshua J. Drake
285cd3b32f
Minor tweaks to breakpoint handling
...
* Fix "dbm" help string
* Save <module>+<offset> as the name when using dbm
* Fix allocation patterns for "module"
* Remove commented out code
* White space fixes
2016-06-16 12:36:17 +02:00
pancake
e032a48cbe
Fix latest 26 COVs
2016-06-14 23:47:58 +02:00
pancake
21a01d08fe
Fix warnings in debug.linux.coredump
2016-06-10 04:20:28 +02:00
pancake
8d9e4a7836
Fix double close in thread-list and non-null terminated string in debug.linux.core
2016-06-14 03:10:47 +02:00
Jeffrey Crowell
3e8a0cc693
replace usage of killed r_str_trim
2016-06-10 01:12:07 +00:00
Jeffrey Crowell
ed47ce4fb3
add missing ; in debug_native.c
2016-06-09 21:16:02 +00:00
leberus
6b1a46be23
Add: Generate Coredump - added support for threads and x86 ( #5104 )
...
* Add: Generate Coredump - added support for threads and x86
* Fix: debug_native.c allow coredump for i386 too
2016-06-09 22:23:39 +02:00
Joshua J. Drake
a4b21680d8
Re-work r_debug_native_map_get to fix issues ( #5108 )
...
* Fixes #4972
* Check more return values
* Improve error reporting
* Minor formatting fixes
2016-06-09 22:12:16 +02:00
pancake
608b79d2b4
Finally fix the build on osx-ppc
2016-06-06 17:30:07 +02:00
pancake
4f51606b6d
More osx-ppc build fixes..
2016-06-06 16:55:15 +02:00
pancake
bd5e22c17e
Some more osx-ppc fixes
2016-06-06 16:20:03 +02:00
oblique
f06e11b6f4
Fix warnings ( #5078 )
...
* Fix gcc warnings
* Fix strtoull return
2016-06-06 00:33:11 +02:00
Anton Kochkov
24c0dfc961
Do not include coredump.h for non x86
2016-06-02 08:07:12 +03:00
Anton Kochkov
c7f1f7a87b
Add missing header for linux coredump
2016-06-02 07:55:31 +03:00
pancake
d3394d5a7a
Fix latest 28 COVs
2016-06-02 03:19:31 +02:00
pancake
95b2e511f5
Fix some warnings
2016-06-01 12:23:10 +02:00
pancake
2d3a69b7a0
Fix linux-arm build
2016-05-26 12:29:24 +02:00
pancake
ba2011bdb9
Fix linux build on kernels < 3.2
2016-05-25 01:13:35 +02:00
Sven Steinbauer
547f8bbc5c
Infer fixes Round 2 ( #4993 )
2016-05-24 22:22:15 +02:00
pancake
c36b299073
Fix some null deref and rarun2 chroot escape vuln
2016-05-24 12:32:45 +02:00
pancake
b28d5e0a9c
Fix android build
2016-05-23 21:54:42 +02:00
Anton Kochkov
ab2db9544b
Fix android build - never include <bits/uio.h>
2016-05-23 21:58:57 +03:00
pancake
6c35a016cf
More fixes fore core-linux
2016-05-14 17:32:04 +02:00
Oscar Salvador Vilardaga
89218c49af
Fix useless pnote pointer and small fix in linux-core-dump
2016-05-23 11:24:14 +02:00
pancake
2f908ce238
Fix 22 covs in linux-core-dump
2016-05-23 11:19:29 +02:00
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
Jeffrey Crowell
1c69a920b6
rm free of iterator, fix leak
2016-05-17 23:44:14 -04:00
Álvaro Felipe Melchor
6b827c1563
Fix #4796 - Add dbm aka module relative breakpoints
2016-05-16 01:00:11 +02:00
pancake
80ea7427bb
Indentation fixes around the previous commit and beyond
2016-05-15 10:40:57 +02:00
Joshua J. Drake
29c2670039
Fix #4560 : Handle recoils well with swstep=true
...
When resuming after (during) recoil from a breakpoint, the swstep
implementation would fail to advance. In short, the debugger would immediately
interrupt again because r_bp_restore was re-setting the original breakpoint
just before continue. The following changes fix this issue:
1. Modify r_bp_get_in to stop including the byte after a breakpoint. This was
causing r_bp_recoil to fail because it thought there was already a breakpoint
on the next instruction.
2. Pass the real breakpoint address (pc - dbg->bpsize) to r_bp_recoil so
that r_bp_get_in can work properly. Stop adding the b->size there to keep it
going too.
3. Add a state flag to core->dbg to track that we are in the midst of a recoil.
4. When continuing from recoil (in r_debug_continue_kill), restore all
breakpoints except the one we just hit (with the new r_bp_restore_except) to
avoid hitting it again. Once we move past this instruction, that breakpoint
will be set again.
2016-05-15 10:19:24 +02:00
Riccardo Schirone
d9e3a290c1
libr: fix compilation warnings
...
libr/util/graph: add some comments to the API
2016-05-13 09:57:55 +02:00
pancake
8b61811a75
Do not set asm.bits depending on CPSR to give more freedom to the user
2016-05-11 15:38:26 +02:00
SkUaTeR
75ea9cea3c
Fix w32 debugger
2016-05-11 13:09: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
Damien Zammit
1a593a6318
GDB debug for lm32 architecture ( #4696 )
...
Signed-off-by: Damien Zammit <damien@zamaudio.com>
* Missing a couple of things in previous commit
Signed-off-by: Damien Zammit <damien@zamaudio.com>
2016-04-24 23:13:00 +02:00
Jeffrey Crowell
e0951cf874
fix Infinite looping of r_debug_reg_sync function
...
closes #4655
issue kill -0 to the debuggee to see if the pid is alive
2016-04-22 21:00:10 -04:00
pancake
3225a168ef
Fix syscall resolution after 0a4a2615c9
2016-04-22 19:33:23 +02:00
oddcoder
0a4a2615c9
Adding extra pass for find function argument
2016-04-22 16:25:37 +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
9ebd8b9da2
Fix OSX build for the QNX debugger support
2016-04-22 13:55:08 +02:00
Sergey Anufrienko
d7635e085e
Introduce debug plugin for QNX pdebug interface
2016-04-22 11:45:51 +02:00
pancake
280abd4f77
ARM can't hwstep by default
2016-04-22 10:15:22 +02:00
pancake
9f7f9f0ce8
Fix #4673 - dpt sync with help msg
2016-04-21 15:21:56 +02:00
Jeffrey Crowell
6115d68736
libr/debug/p/debug_native.c: fix possible overflow
2016-04-19 09:08:15 -04:00
Jeffrey Crowell
96686841de
handle spaces in shared library paths
...
fixes #4623
2016-04-18 14:04:38 -04:00
Jeffrey Crowell
6b17cfc55a
fix double free on register
...
closes #4634
can we please review/revert/something
4c04b98b47 (diff-fa45250699a39a7bffd1e27da12ec5beR40)
i'm fearful this has broken a lot more stuff
2016-04-13 21:30:48 -04:00
NaveenBoggarapu
4c04b98b47
few memory leaks fixed
2016-04-13 21:55:48 +02:00
pancake
34a7837079
Include r_lib from r_bp
2016-04-13 14:48:17 +02:00
pancake
3b2d06d65e
Fix iOS build
2016-04-12 17:32:14 +02:00
Jeffrey Crowell
74b5edd984
fix register get in dbg on BSD s/pc/PC
2016-04-11 12:34:42 -04: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
5ef2b3cc0f
Fix many warnings
2016-04-11 12:22:15 +02:00
pancake
fe02539afb
Fix some warnings for debug.mach0
2016-04-08 01:09:56 +02:00
pancake
b54614d292
Use anal reg profiles from debug.esil
2016-04-08 00:54:15 +02:00
Daniel Domínguez
71beec242e
Coredump generation for Mach0 binaries
2016-04-05 12:03:59 +02:00
NaveenBoggarapu
7d61361361
fix some memory leaks
2016-04-01 19:25:32 +02:00
pancake
c2b151f8c8
Fix a lot more covs
2016-03-31 13:21:51 +02:00
pancake
259816b7e6
Fix more covs for bochs
2016-03-31 13:08:39 +02:00
skuater
01fce3fe8e
Initital implementation bochs for linux.
2016-03-30 12:57:15 +02:00
pancake
d092be54e2
API fixes for bochs and honor sandbox
2016-03-27 13:43:51 +02:00
pancake
434b8251e9
Many syntax, language, indent, naming fixes for bochs
2016-03-25 00:21:56 +01:00
skuater
c45fe4e1e7
Initial support for BOCHS (windows only for now)
2016-03-25 00:21:49 +01:00
Mizari
d6daa9d591
Fixed function calls for r_reg_set_bytes(reg,-1...)
2016-03-24 12:47:00 +01:00
pancake
846263a51b
Implement ios9 pangu's tfp0 in the debugger
2016-03-14 23:24:49 +01:00
Matthieu Tardy
bb84bbc276
Fix memory leaks in rabin2 and libr
2016-03-06 23:17:44 +01:00
pancake
4677f5baf5
Use XNU debugger by default as long as PTRACE backend had some flaws
2016-02-29 22:50:36 +01:00
pancake
517f7fa23e
Handle Vi in Vppc - aka change reg values with cursor
2016-02-25 11:35:59 +01:00
pancake
0973759a8c
Fix build
2016-02-25 10:57:15 +01:00
Anton Kochkov
4a146f8158
Fix CID 1351764
2016-02-25 12:48:49 +03:00
pancake
a7f137f215
Support cursor in dr=
2016-02-25 02:58:26 +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
pancake
f7fbbc419e
Add dh in anal.x86-64.reg and fix some arm/x86 esil bugs
2016-02-22 01:14:06 +01:00
pancake
852385efe1
Add sys/ios-env.sh and enable XNU debug without ptrace by default
2016-02-20 23:30:11 +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
pancake
74b23f10b9
Merge branch 'xnu' of https://github.com/alvarofe/radare2
2016-02-06 22:37:52 +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
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
Jeffrey Crowell
f713c67794
restyle the function decl in r_debug
2016-01-29 18:52:53 -05:00
pancake
44a86928cc
Fix some of the warnings in #4013
2016-01-27 03:14:19 +01:00