Commit Graph

117 Commits

Author SHA1 Message Date
martin
b5bf7de6f9 FpDebug, Windows: Forward OutputDebugString to IDE.
git-svn-id: trunk@65475 -
2021-07-19 18:17:06 +00:00
martin
0244c95a33 FpDebug: Dynamically load DebugBreakProcess
git-svn-id: trunk@65291 -
2021-06-22 15:14:38 +00:00
martin
6661f86edd Debugger: allow to force lazloggerbase via define
git-svn-id: trunk@65227 -
2021-06-14 07:30:45 +00:00
martin
ce0d1a0bc8 LazDebuggerFp, FpDebug: Beta, Allow function calls in watches
git-svn-id: trunk@65151 -
2021-05-29 22:51:09 +00:00
martin
82c6e8b284 FpDebug: Change debugging flags on process creation. Allow debugged 32bit processes to launch 64bit sub-processes without the debugger interfering. Sub-processes are anyway currently not debugged. Issue #0038546
git-svn-id: trunk@64779 -
2021-03-10 18:38:39 +00:00
martin
fa5199045e LazDebuggerFp, FpDebug: Show an error message, if the debugger cannot run the application. Issue #0038167
git-svn-id: trunk@64243 -
2020-12-19 22:39:00 +00:00
martin
9ff4b0dc00 FpDebug: Win, add debugln for ContinueDbgEvent / WaitForDebugEvent
git-svn-id: trunk@63777 -
2020-08-18 11:37:54 +00:00
martin
f2959d4c98 FpDebug: Win, Only read ThreadState once per thread.
git-svn-id: trunk@63775 -
2020-08-18 00:04:04 +00:00
martin
2bba45a96c FpDebug: SetRegisterValue for Windows
git-svn-id: trunk@63764 -
2020-08-16 20:23:35 +00:00
martin
1f229f6246 FpDebug: Fix compile on Windows
git-svn-id: trunk@63753 -
2020-08-16 12:40:36 +00:00
martin
1b2bf99ec1 FpDebug: refactor showing exception details
git-svn-id: trunk@63380 -
2020-06-17 16:52:12 +00:00
martin
a43e155cdb FpDebug, Debuggers, IDE: Make MemManager easier to access. (via Controller and Instance)
git-svn-id: trunk@63358 -
2020-06-16 13:42:42 +00:00
martin
62facbb44d Renamed TDbgDisassembler class and all related classes to avoid name clashes with FpDebugDebugger classes.
Patch/Contributed by ccrause

git-svn-id: trunk@62757 -
2020-03-12 14:21:17 +00:00
martin
2ee9c0fe84 FpDebug: New TTargetDescriptor type used to store target specific information. All target specific classes are automatically registered in the respective initialization sections. TDbgController.Run modified to call CheckExecutableAndLoadClasses which loads target info from specified file, loads global disassembler instance and DbgProcess class. Patch/Contributed by ccrause
git-svn-id: trunk@62748 -
2020-03-12 14:20:33 +00:00
martin
2e1bd02f2d FpDebug: Refactor OsDbgClasses => move as field to DbgController and DbgProcess / Prepare for target specific classes
git-svn-id: trunk@62747 -
2020-03-12 14:09:16 +00:00
martin
676c17f1cf FpDebug: Refactor disassembler into class
git-svn-id: trunk@62746 -
2020-03-12 14:09:14 +00:00
martin
6739277749 Revert "FpDebug: Windows, remove unused code" / WinProcess.Interrupt is used by app/fpd
git-svn-id: trunk@62489 -
2020-01-04 15:00:40 +00:00
martin
98aa637a42 FpDebug: debugln
git-svn-id: trunk@62406 -
2019-12-16 23:22:53 +00:00
martin
42eb28852f FpDebug: Win, Fix dropping last char of dll names.
git-svn-id: trunk@62341 -
2019-12-08 00:18:12 +00:00
martin
b34bc4a730 FpDebug, LazDebuggerFp: Implemented OnLibrary(Un)LoadedEvent / Show in event log
git-svn-id: trunk@62340 -
2019-12-08 00:18:10 +00:00
martin
cc3e23afb0 FpDebug: Win, Parse DLL-Entry points
git-svn-id: trunk@62338 -
2019-12-08 00:18:07 +00:00
martin
17dda63638 FpDebug: Refactor freeing thread objects for exited threads
git-svn-id: trunk@62175 -
2019-11-03 17:05:40 +00:00
martin
1739434138 FpDebug: fix range check error in FindProcSymbol. (int64 vs qword).
git-svn-id: trunk@62138 -
2019-10-28 17:07:04 +00:00
martin
ec3e5b6a07 FpDebug: fix crash on nil-deref.
- On Windows FCurrentThread is nil during the ExitProcess event.
- On all platforms CreateThread can (in theory) return nil.

git-svn-id: trunk@62034 -
2019-10-11 12:07:19 +00:00
martin
ec207608a5 FpDebug: Windows, when terminating the process (stop debugger) collect all pending events.
git-svn-id: trunk@62033 -
2019-10-11 12:07:17 +00:00
martin
5ff6c5c0c1 FpDebug: Partial implement WatchPoints.
- No local watches yet. Always global scope.
- Break on Write is the same Read/Write
- Info pop up has no old/new value
- No feedback (in some cases) if watch failed to set

git-svn-id: trunk@61990 -
2019-10-05 11:09:49 +00:00
martin
3e1d403bae LazDebuggerFp, FpDebug: Attach and Detach (Windows/Linux)
Attach on Linux does not work for apps started with "run without debugging". (Maybe/Probably because the IDE does a separate waitpid on those, and interferes with the waitpid of the debugger?)

git-svn-id: trunk@61967 -
2019-10-03 18:38:10 +00:00
martin
804b5a7be4 FpDebug: Windows, fix closing handles for sub-processes (not currently debugged). Also correctly detach.
git-svn-id: trunk@61892 -
2019-09-16 21:49:27 +00:00
martin
4137324e48 FpDebug: Check result of ReadThreadState. Do not use invalid data (on windows this lead to nil deref crash)
git-svn-id: trunk@61891 -
2019-09-16 21:49:25 +00:00
martin
cc1055fbed FpDebug: Windows, fix stepping over (temp-removed) breakpoint.
- If another thread received a signal before the "step-finished signal" (e.g. thread created / pending sigs) then the temp-break was back in place and kept in place -> the break was hit again instead of stepping over it.
- If another thread exited (and the exit signal was received before the "step-finished signal" then no handling was done at all (no threads suspended / no temp remove breaks)

git-svn-id: trunk@61877 -
2019-09-14 14:27:47 +00:00
martin
3fce95a1c2 FpDebug: Windows, debugln/dbgs include WOW64 names
git-svn-id: trunk@61867 -
2019-09-12 15:33:14 +00:00
martin
c9beb9dffe FpDebug: Windows, fixed Process.Continue with single step request
git-svn-id: trunk@61866 -
2019-09-12 15:33:12 +00:00
martin
1958b8edea FpDebug: Windows, Added WoW64
git-svn-id: trunk@61848 -
2019-09-10 01:40:49 +00:00
martin
a2978c370e FpDebug: Windows, remove unused code
git-svn-id: trunk@61847 -
2019-09-10 01:40:48 +00:00
martin
a3fb24b828 FpDebug: load some kernel functions dynamically, to avoid stopping the IDE from starting on pre-vista systems.
git-svn-id: trunk@61846 -
2019-09-09 21:13:57 +00:00
martin
304f6e7be9 FpDebug: Fix requesting process to pause, broken in r61840 #ece9967721
git-svn-id: trunk@61845 -
2019-09-08 23:33:01 +00:00
martin
876682fc9d FpDebug: Handle hitting breakpoints, that have been removed while the event was waiting. Still need to re-execute the asm instruction that was hidden by int3
git-svn-id: trunk@61839 -
2019-09-08 19:03:09 +00:00
martin
2f812db331 FpDebug: Windows, suspend other threads while single stepping over a (temp-removed) breakpoints.
- Other threads could cause an event, before the thread does single-step. Then the breakpoint gets restored to early
- Other threads could run through the code, while the breakpoint is removed. They would not stop as they should.

git-svn-id: trunk@61838 -
2019-09-08 19:03:08 +00:00
martin
966ecb9382 FpDebug: debugln for windows API events
git-svn-id: trunk@61834 -
2019-09-08 18:52:42 +00:00
martin
c86c8d65e6 FpDebug: reduce logged errors for messages that are expected (cannot write to terminated process)
git-svn-id: trunk@61816 -
2019-09-05 20:05:54 +00:00
martin
8874afbe6a FpDebug/LazDebuggerFp: Refactor logging, use LazLogger for all logging.
git-svn-id: trunk@61427 -
2019-06-19 15:26:22 +00:00
martin
f534ee214b FpDebug: Fix crash on Win, in case of multiple processes (e.g. console process for win gui app). Accessing wrong threads (thread-state) during events would crash the target
git-svn-id: trunk@60345 -
2019-02-06 00:47:08 +00:00
martin
88aca89865 FpDebug: More refactor internal breakpoints. More control to OS classes. Improve stopping other threads on Linux
git-svn-id: trunk@60160 -
2019-01-23 21:28:44 +00:00
martin
a48c9c1b69 FpDebug: More refactor internal breakpoints. Move detection for ResetInstructionPointerAfterBreakpoint into OS classes.
git-svn-id: trunk@60142 -
2019-01-22 02:11:44 +00:00
martin
ba83c710cd FpDebug: Start refactor internal breakpoints. Prepare to allow several breakpoints set at the same address.
git-svn-id: trunk@60123 -
2019-01-20 19:09:46 +00:00
martin
8175bdfee6 FpDebug: Windows, fixed intercepting system exceptions (access violations, stack overflow, div zero,...)
git-svn-id: trunk@60044 -
2019-01-09 14:29:56 +00:00
martin
a33608de2e FpDebug: Windows, fix leaking filehandles (again), see r59552 #122dfbd2ce / needed until forked processes are handled.
git-svn-id: trunk@59741 -
2018-12-06 18:03:18 +00:00
martin
0506cd7fb5 FpDebug: Windows, Check dwDebugEventCode before accessing case dependent data
git-svn-id: trunk@59740 -
2018-12-06 18:01:02 +00:00
martin
2cace808be LazDebuggerFp, FpDebug: (windows only) implemented switching threads while paused. (On Linux only one thread is currently paused, so switching is not possible)
git-svn-id: trunk@59571 -
2018-11-17 14:16:09 +00:00
martin
3f70eb5a9d FpDebug: Windows, replace global context (thread context/registers) with context per thread
git-svn-id: trunk@59569 -
2018-11-17 13:55:54 +00:00