243 Commits

Author SHA1 Message Date
Liumeo
a79bf446fa
Use pj in debug ##refactor (#18270) 2021-01-24 16:07:30 +01:00
eagleoflqj
cd3ac9e2f2 Use pj in cmd_anal.c ##refactor 2021-01-06 00:03:44 +01:00
pancake
ce48120056 Remove all uses of R_ANAL_CC_ 2020-12-16 00:48:54 +01:00
GustavoLCR
489538e02b
Add DbgEng based debug backend for Windows ##debug (#17491)
* Rename `windbg` plugin to `winkd` ##debug
* Add DbgEng based debug backend for Windows ##debug
2020-08-24 19:01:10 +08:00
Zi Fan
3c88900134
Implement save and load functions for debug session ##debug (#17430)
* Add `dtst` and `dtsf` commands
* Change `RDebugSession` to store its data in their own sdb namespace
* Add `r_debug_session_serialize()` and `r_debug_session_deserialize()` API
* Add unit tests for `RDebugSession `save and load functions
2020-08-20 12:25:47 +08:00
Zi Fan
2dfa75cc47
Update record & replay features to trace reg/mem changes ##debug (#17127)
* Update record & replay features to trace reg/mem changes ##debug
* Support tracing in r_debug_continue_kill ##debug
* Fix error writing registers when stepping back and refactor ##debug
* Implement checkpoints for reverse debugging and make tests green ##debug
* Add `dbg.trace_continue` option to enable/disable tracing every instruction when continue
* Fix continue when tracing to allow skipping and continuing ##debug
2020-07-27 12:54:33 +08:00
meowmeowxw
4b02987666
Fix tcache parsing on glibc version < 2.30 (#17206) 2020-07-08 20:16:27 +08:00
Zi Fan
5124bef434
Fix non-working drt all command and add tests for drt ##debug (#16974) 2020-06-22 14:56:05 +08:00
meowmeowxw
1faed017c7
Heap glibc resolve main_arena using symbol (#17018) 2020-06-18 12:14:21 +02:00
Paul I
9508a6ba56
Use HtPP for accessing dbg trace entries (#16921)
* Use HtPP for accessing dbg trace entries
* Remove #if R_DEBUG_HT_TRACES
2020-05-20 21:02:42 +08:00
Paul I
7451b67448
Add r_debug_trace_op() API to avoid analyzing the same op twice (#16816) ##anal 2020-05-13 20:51:26 +02:00
Zi Fan
fec0aea039
Decouple shlr/gdb registers profile from code (#16312) ##debug
* Sync r2 debugger registers profile with shlr/gdb
* Add new set_reg_profile function to r_debug plugin
* Add set_reg_profile to r_debug_plugin_gdb
* Change "drp" to sync r_debug plugin register profile
* Fix incorrect pointer arithmetic and code style
2020-03-27 02:00:27 +01:00
Florian Märkl
14215350af Refactor RAnal Basic Blocks and Functions (#15169) ##anal
Basic Blocks are now global instead of owned by a single function.
2020-01-15 15:23:34 +01:00
yossizap
f0027aa263 Fix windows breakpoint rebasing ##debug
Calculate the diff ourselves since bp->delta is calculated with the
dbg->bp->baddr at the time of breakpoint creation, which may not
reflect the correct baddr and break the rebase.
2019-12-27 02:46:59 -06:00
yossizap
28cac248a6 Added an event to signal the end of the debug session ##debug 2019-12-15 10:46:48 +01:00
yossizap
9fca7b1f58 Fixed an issue with detached child breakpoint inheretence ##debug (#15561)
Previously, forked children would instantly die if the fork was stepped
over using a breakpoint which is accessible to the child process.
2019-12-09 09:52:53 +01:00
fcasal
c2f01218f2 Rebase Breakpoints for PIEs ##debug (#12801) 2019-12-06 10:52:26 +01:00
yossizap
a99c8026bd Improve linux native debug dp output ##debug
Previously, the command didn't show the pid's path, replaced the path
field with current/ppid, and showed the ppid instead of only showing the
requested process and the children of the requested process.
2019-11-30 00:50:18 +01:00
yossizap
a9478c0bb0 Added "dptj" and "dptj " (#15259) ##debug 2019-10-12 23:14:24 +02:00
00rsiere
fe9a03416f Notify user on hardware breakpoint hit ##debug 2019-08-19 19:29:43 +02:00
David CARLIER
0626013ac7 Linux debug plugin, page promotion feature ##debug
* Linux debug plugin, page promotion feature proposal.

Providing new 'dmL' debugger sub command.
This is the only system having THP feature, others are more into
 direct huge tlb equivalent ...
The system ought to be set in madvise mode and disabled on Android,
would not do any good in this environment if this is ever supported.
Once the syscall succeed, the address range ought to get the
 little 'hg' VmFlags.

* interface changes
2019-08-03 06:09:07 -07:00
Anton Kochkov
9677804b8e
Windows native debugger refactoring ##debug ##windows
* Windows native debugger refactoring

Massive win32 native debugging code refactoring
and corresponding fixes.

* Fix hang after killing process
2019-07-29 11:19:26 +08:00
Anton Kochkov
20e19d6023 More spelling fixes in the code 2019-06-20 13:36:02 +08:00
dodococo
6896064553 Fix #13880: Add dt= ##print 2019-04-28 19:30:15 +02:00
Anton Kochkov
bb67b54f74
Remove CYGWIN & MINGW remnants (#13377) 2019-03-15 12:55:08 +08:00
Florian Märkl
7c0687b8fb Fix #12022 - Slow backtrace fixed by speeding up ptrace_wrap_func() ##debug 2018-11-20 01:13:30 +01:00
Paweł Łukasik
22ff13e069 Add dbg.verbose variable to show more info when debugging ##debug 2018-11-13 02:10:21 +01:00
David CARLIER
ec77b63c6f Fix FreeBSD build warning. (#11904) 2018-10-22 17:52:22 +02:00
Florian Märkl
0c0fee7b48 ptrace-wrap (#11723)
* Add ptrace-wrap
* Add r_io_ptrace* and r_debug_ptrace()
* Use wrappers instead of calling ptrace and fork directly
* Sleep while waiting in linux_debug
* Add ptrace-wrap Makefile
* Link io against ptrace-wrap with acr
* Define ptrace usages in r_userconf.h
* Conditional ptrace-wrap in acr
* Fix HAVE_PTRACE
* Some fixes for Solaris
* Fixes for FreeBSD
* More fixes for Solaris
* Style Fix
2018-10-12 12:20:18 +02:00
Andrea Sindoni
238cbbfc11 Add stop address info to the "di" command (#10445) 2018-06-22 13:17:40 +02:00
vdf-git
b643095d1f Fixed breakpoint infinete loop error (#10410) 2018-06-19 15:34:10 +02:00
Aaron
0d7774a657 Make dm. output like dm and add dmq. (#10354)
* Changed dm. to output rows like dm
* Made dm. output like dm and added dmq.
2018-06-15 11:10:43 +02:00
Khairul Azhar Kasmiran
019ac17bae dbg.btalgo=trace: trace calls for backtrace (#9980) 2018-04-29 11:42:55 +02:00
Oscar Salvador
de366b1d29 Enhancement of ar= command (#9748) 2018-03-22 17:32:57 +01:00
pancake
6f0de4913e Implement io.cache.auto to cache all reads for slow io backends 2017-12-18 01:44:22 +01:00
pancake
9197da06d0 Fixes for step back 2017-11-12 12:52:06 +09:00
josediazfer
855757a3ad W32 debug issues (#8707)
* W32 debug issues:

Fill debug info (executable path and username)
Debug event STATUS_X86_SINGLE_STEP instead of EVENT_SINGLE_STEP when debug a x86 binary using radare 64 bits

* Fix cast types
2017-10-18 15:39:13 +02:00
pancake
106fedeef4 Add the 'null' debugger plugin 2017-09-23 02:34:37 +02:00
pancake
94b2fc64d2 Implement RIODescData and adjust RIOMach to work with it
- Handles a magic to ensure the destination struct is the expected one
- Based on r_str_hash, but it must be cached
- Use more r_io_desc_get_pid ()
2017-09-11 01:24:13 +02:00
Ren Kimura
d0cceb49ef Add dir.dbgsnap for the backstep debugger snapshots 2017-08-11 17:06:03 +02:00
Ren Kimura
7ce197eb44 Add initial support for hw watchpoint (#8132)
* Add initial support of hw watchpoint

* Fixed parse bug

* Fixed rwx str
2017-08-06 05:27:01 +02:00
xarkes
3d681b0fe5 Renamed windbg plugin (#8117) 2017-08-03 14:58:39 +02:00
javierptd
edfd37e7e4 first PR heap jemalloc analysis 2017-08-03 13:08:21 +02:00
leberus
f3d11405e7 Fix debug for Linux 2017-08-02 14:49:56 +02:00
Ren Kimura
3ffc7e1831 Fixed type confusion of free functions (#8072) 2017-07-31 18:30:05 +02:00
Ren Kimura
b294c3e0d7 Add dcb (debug continue back) command (#7979)
* Add dcb (debug continue back) command
* Add braces
2017-07-23 14:47:11 +08:00
Ren Kimura
432dcb0a5b Add dts- and dtsC commands (#7939) 2017-07-17 14:13:43 +02:00
pancake
f36cd87cb1 Partial fix for #7545 2017-07-09 13:15:13 +02:00
Ren Kimura
bd3247c03b Add dtst and dtsf commands for save and restore sessions. (#7880)
* Add memory diff dump function
* Add base snapshot dump
* Add resotring function
* Fixed some bugs
* Fixed code format
* Removed packed attribute
2017-07-09 12:36:00 +02:00
Xiao Di Guan
6ae9d891db Fix xnu_wait stopping prematurely (#7744) (#7745)
* Fix xnu_wait stopping prematurely (#7744)
* Use task_swap_exception_ports (instead of *get* then *set*)
* Add new debugger stop reason for user-initiated breaks
* Stop the inferior when `dw` is interrupted (#7744)
* Stop the inferior after attaching
2017-06-24 17:57:11 -05:00