Commit graph

18 commits

Author SHA1 Message Date
yossizap
9a6bcce392 Fix windows dp showing the parent's path for all processes (#15741) 2020-01-01 20:39:45 -06:00
Anton Kochkov
4e8e330475 Fix some MSVC warnings 2019-12-16 12:26:05 -06:00
yossizap
f1de1becfa Add ppid to dp and fix dp= for windows (#15649)
* Add ppid to win32 debug and 'dp''s display/json ##debug
* Add process selection to w32 debug ##debug

Previously, `dp=` wouldn't fully switch to the given process since it
was treated like `dpt` thread switching, leaving the debugger in
an undefined state.
2019-12-16 09:24:17 -06:00
GustavoLCR
e43c9e7caf Fix some warnings (#15549) 2019-12-08 12:49:58 +01:00
GustavoLCR
ebaf8b603e Fix some warnings on Windows (#15532) 2019-11-30 00:49:16 +01:00
GustavoLCR
88c848cc37 Fixes for Windows debugging (#15418)
* Fix error when continuing after attaching to process
* Get threads correct EIP
* Fix some memory corruptions and small refactor
2019-11-06 00:01:36 -06:00
GustavoLCR
36114b35f3 Fix attaching to a pid on Windows (#15406) ##debug 2019-11-04 11:05:55 +01:00
yossizap
05b000bb13 Modified debug_native to handle break's thread switching behavior
The user was interrupted during continue and switched to a different
thread since DebugBreakProcess creates a thread that triggers a breakpoint.
With these changes the DebugBreak thread is recorded to skip the breakpoint
event afterwards.
2019-11-02 00:30:25 +01:00
yossizap
45782c7705 Fixed w32dbg breaking issues (#15386) ##debug
* Fixed w32dbg breaking issues and moved break_push to w32_dbg_wait to support stepping as well

Previously, breaking would only work during 'dc' because it was pushed
in debug.c specifically for continue. This change moves the
responsibility of pushing/popping w32_break_process_wrapper to
windows_debug.c instead to support calls to w32_dbg_wait from anywhere.
2019-10-30 18:58:34 +01:00
GustavoLCR
293b244caa Fix hang when running dc in a task ##windows (#15380) 2019-10-29 11:31:03 +01:00
yossizap
29e2ffe476 Fix issues in windows thread switching (#15366)
* Fixed issues in windows thread switching by implementing thread attach for w32dbg =!pid

Previously the function attempted to OpenProcess even though the main
pid is already opened by __open and the fact that re-opening the main
pid wouldn't do anything. This way it attaches to new threads when
called by r_debug_select.

* Modified w32_continue to update rio->pi.dwThreadId after switching to the requested thread

Manually changing iop->pi.dwThreadId in io_w32dbg's =!pid created a
problematic scenario when w32_continue is called with the last event's
tid from dbg_wait. This solution makes sure iop->pi.dwThreadId keeps
being updated after events on other threads arrive and that w32_continue
actually uses the given tid.

* Modified w32_continue return values
2019-10-28 11:06:57 +01:00
GustavoLCR
47a440cae5 Implement w32dbg_wrap 2019-10-28 05:56:10 +01:00
GustavoLCR
317c0ee811 Fix reading registers after thread exited 2019-10-28 05:56:10 +01:00
GustavoLCR
50392fd525 Fix register writing on Windows (#14805)
* Fix register writing on Windows
* Drop unecessary use of heap
2019-08-15 13:42:32 +08:00
sanguinawer
4cbf27a11a Fix win32 compilation (#14722) 2019-07-31 21:57:50 +02:00
GustavoLCR
d5e3926b5d Only suspend threads if dbg.threads=true on Windows (#14689) 2019-07-30 01:49:47 +02: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
Álvaro Felipe Melchor
c959d92c9d WIP refactor debug 2015-08-11 08:53:05 +02:00