Commit Graph

282 Commits

Author SHA1 Message Date
Martin
b0a5ee38f8 FpDebug: refactor new TFpBreakPointTargetHandler / adjust visibility of fields / move creation to factory method 2024-02-19 12:23:45 +01:00
ccrause
dcd15396b9 Further refactoring of TFpBreakPointMap and TGenericBreakPointTargetHandler for x86 and AVR 2024-02-19 12:23:45 +01:00
Martin
ef78dcf1ba FpDebug: move some breakpoint checks to TFpBreakPointTargetHandler 2024-02-15 21:32:31 +01:00
Martin
c6d52ae4b7 FpDebug: split TBreakLocationMap. Make TFpBreakPointTargetHandler a separate class. 2024-02-15 20:33:34 +01:00
Martin
7d5c98dd45 FpDebug: workaround for https://gitlab.com/freepascal.org/fpc/source/-/issues/40641 2024-02-14 21:49:04 +01:00
Martin
4b6fadabca FpDebug: make TBreakLocationMap a generic with variable storage for the data replaced by a breakpoint 2024-02-14 20:01:56 +01:00
Martin
08b1ca8b65 FpDebug: refactor TBreakLocationMap, split out parts handling Address <> TFpInternalBreakpoint mapping 2024-02-14 20:01:55 +01:00
Martin
e2e2f26c91 FpDebug: change HasBreakpointInfoForAddress, replace IP-1 by GetInstructionPointerForHasBreakpointInfoForAddress 2024-02-13 22:31:28 +01:00
Martin
2b3310eb90 FpDebug: refactor HasBreakpointInfoForAddress 2024-02-13 22:31:28 +01:00
Martin
efcbc7a685 FpDebug,IDE: Windows, Implement Position and Size for console and default-pos Forms - via Run-Params 2024-01-27 21:19:25 +01:00
Martin
fd26073763 FpDebug: Improve StepOut, if at entry of function 2024-01-20 16:14:58 +01:00
Martin
5e62cd71d1 Debugger: Improve Thread-Name display. Add support for thread name from GDB (only recent gdb versions) 2024-01-20 16:14:57 +01:00
Martin
5d6489a45a FpDebug: Fix mem leak, if breakpoint is set to "auto destroy" 2024-01-19 15:47:15 +01:00
Martin
ec98b15709 FpDebug: Fix dangling pointer, if debug-backend sets breakpoint too late. 2024-01-19 15:47:14 +01:00
Martin
8ed6d90eb1 Ide,FpDebug: In FpDebug add a thread number (order of first occurrence). In the IDE, prefix the ID with the number. 2024-01-18 22:21:39 +01:00
ccrause
3ecbb52069 Updated MemModel structure. 2024-01-14 19:29:12 +01:00
Martin
2acd136518 FpDebug: Implement location-lists (Dwarf 2/3) 2023-12-04 02:19:05 +01:00
Martin
5efaac3f2f FpDebug: find symbol for fpc_raiseexception (and similar) independent of case. 2023-12-04 02:19:00 +01:00
Martin
0922a747d7 FpDebug: fix MaskBreakpointsInReadData. Don't remove non-set breakpoints 2023-11-28 14:01:43 +01:00
Martin
476cfd4484 FpDebug: refactor stack unwinding. Introduce TDbgStackUnwinder and new classes for X86 2023-11-28 01:40:48 +01:00
Martin
a6999c26a6 FpDebug: prevent crash, if library is added twice (incorrect handling for Linux in SynchronizeProcMapsWithLibraryList) 2023-10-14 13:45:26 +02:00
Martin
8da9f2d084 FpDebug: fix for some missing stackframes 2023-10-05 19:22:31 +02:00
Martin
044ee4f0bc LazDebuggerFp: load line info (blue dots) for libraries 2023-05-27 13:19:33 +02:00
Martin
0b441dd73b FpDebug: disable peephole opt when using fpc 3.2.2 => otherwise fpc generates wrong code 2023-05-01 17:43:22 +02:00
Martin
0c94422e48 FpDebug: fix unrolling stack / complete fix for 33556f939f
- TDbgCallstackEntry handles the "addr - 1" by itself.
- But FindCallFrameInfo also needs it. It must search for the address of (or inside of) the asm "call ..." statement.
2023-04-27 16:44:43 +02:00
Martin
ee4e48864e LazDebuggerFp, FpDebug: Disassembler now annotates lines with call,jmp,je,... with info on the target address. 2023-03-15 00:19:40 +01:00
Martin
cac376d0f9 LazDebuggerFp, FpDebug: Fix watch-function-call when debuggee has crashed. Prevent the function call 2023-03-13 12:32:30 +01:00
Martin
db27ef882d FpDebug: clean up compile hints 2023-03-12 22:34:28 +01:00
Martin
8970a4768b FpDebug: Improve partial mem-read. Check early if the address is readable at all. 2023-03-02 20:11:47 +01:00
Martin
04b384b34d FpDebug: Set breakpoints in libraries (dll/so). Update existing breakpoints when library is loaded. Add state (ok, fail, pending) to breakpoints. 2023-02-16 16:39:03 +01:00
Martin
5d091f5d5b FpDebug: Refactor breakpoints, move unit+line (or proc-name) to DpDebug. Change default scope to search all already loaded libraries. 2023-02-16 16:39:02 +01:00
Martin
b752e5b684 FpDebug: refactor GetLineAddresses and FindProcSymbol - Always go through TDbgProcess 2023-02-16 14:49:29 +01:00
Martin
448bb20ba6 FpDebug: Refactor TBreakLocationMap, so that "OrigValue" is no longer exposed. Move some functionality from TProcess to TBreakLocationMap. 2023-01-25 20:54:59 +01:00
Martin
c59f34e9ba FpDebug: fixed spelling / thanks to ccrause 2023-01-08 19:33:20 +01:00
Martin
8ef10902f3 FpDebug: Stack, CFI - For older FPC (broken CFI) always continue non-CFI eval. 2022-10-27 15:42:59 +02:00
Martin
ffaa538517 Debugger: increase safety net for max stack frames 2022-09-14 16:38:04 +02:00
Martin
45b69e8d9d Debugger: Allow to suspend/resume individual threads / only with FpDebug, only while paused - for the next run/step. 2022-09-11 03:28:53 +02:00
Martin
db69b34e2a FpDebug: Fixes for watch-function-eval: allow function to recursively enter itself. 2022-09-10 18:01:36 +02:00
Martin
126dd815cd FpDebug: fix range check error in stack 2022-09-09 22:54:06 +02:00
Martin
f58a7bde79 LazDebuggerFp: add %register syntax for watches 2022-09-07 04:36:34 +02:00
Martin
ae209a52a4 FpDebug: fix callstack eval, after CFI ended. 2022-09-06 13:59:01 +02:00
Martin
f3bf79fa35 Debugger: fix calling abstract method "BelongsToInstance" on watchpoint. Introduced 4e4c402b62 2022-08-05 17:33:28 +02:00
Martin
2f4e270270 FpDebug: Windows, rewrite of "step after hitting breakpoint". Fix issues with incorrect steps (Instr-Ptr not reset) in multi thread scenario, when the int3 had been remove in the meantime. 2022-08-02 15:20:50 +02:00
Martin
9e67808d84 LazDebuggerFp: improve errors for function calling 2022-07-01 01:06:08 +02:00
Joost van der Sluis
62145cd833 FpDebug: Use Dwarf Call Frame Information (CFI) for stack-tracing when available. Refactored some stuff to be able to place it in a separate unit. 2022-06-28 23:09:34 +02:00
Pascal Riekenberg
2bc0a9b371 Debugger: added support for TThread.NameThreadForDebugging 2022-06-28 07:35:40 +02:00
Martin
b014798858 LazDebuggerFp, FpDebug: Enable watch-eval calling function with strings as param/result (only DWARF 3 / up) 2022-06-21 00:29:07 +02:00
Martin
63a6ce4f32 FpDebug: added IFDEF $INLINE OFF 2022-06-21 00:06:04 +02:00
Martin
315bb059d8 FpDebug: fix overflow in stack eval 2022-05-09 23:48:30 +02:00
martin
5a01f79d1c FpDebug: Find line info when dwarf subprogram-tag is missing. Use line info with linker info. This fixes stepping into old-style "TFoo = object ... end" 2022-05-05 02:46:33 +02:00