Joost van der Sluis
e9f1ffb855
FpDebug: Load libraries on Linux, and skip incompatible binaries. Also on Windows, for consistency and stability
2021-12-08 22:18:04 +01:00
Joost van der Sluis
b9b35b4252
FpDebug: Set the TDbgImageReader.LoadedTargetImageAddr at creation, or else parts might already been read when it is set.
2021-12-08 00:43:17 +01:00
Joost van der Sluis
de0974f29e
FpDebug: Removed TDbgInstance.AddrOffset and other old attempts to relocate libraries properly
2021-12-08 00:43:17 +01:00
Joost van der Sluis
f073c52428
FpDebug: Search for line-information not only within the executable, but also in the loaded libraries
2021-12-07 23:31:41 +01:00
Martin
9877946d86
FpDebug: reduced debugln
2021-12-07 23:21:42 +01:00
Martin
499026c519
FpDebug: Win64 SEH finally sub-routines, find the symbol for the procedure actually owning the finally block
2021-12-07 22:56:11 +01:00
Martin
df98551a5f
FpDebug: Implement finding "address for line" before/after the requested line, if there is no entry for the request.
2021-12-07 20:35:49 +01:00
Martin
7534833eb6
FpDebug: Fixed passing dangling pointer. (Currently not used by LazDebuggerFp when doing deExitProcess)
2021-12-07 15:41:58 +01:00
Martin
07e3817870
FpDebug: fix mem leak. Libraries were not freed on Unload.
2021-12-06 00:40:25 +01:00
Martin
7e06003d9d
FpDebug: Fix race condition. After FQueue.RemoveThread(Self) the Queue (if waiting in TerminateAllThreads) can destroy itself. So it must no longer be accessed.
2021-12-05 22:44:04 +01:00
Martin
b3e07ba2b5
FpDebug: fix for logging
2021-12-05 22:44:04 +01:00
Joost van der Sluis
957f76456c
FpDebug: Detect Dwarf-5 debug headers and skip unsupported sections
2021-12-05 18:26:09 +01:00
Joost van der Sluis
bc4718efae
FpDebug: Ability to pass multiple libraries to OnLibrary(Un)LoadedEvent and detection of loading of libraries on Linux
2021-12-05 01:46:45 +01:00
Martin
d8188bb780
FpDebug: Show "class var" if in current context (no class/instance-name prefix).
2021-12-01 19:55:39 +01:00
Martin
a365f46170
FpDebug/FPD: Add FpDbgDwarfFreePascal - This activates the FPC specific dwarf interpretation.
2021-11-28 10:53:43 +01:00
Martin
b03c9ccbb7
Merge branch 'fpd1' into 'main'
...
Fix compilation of fpdebug\app\fpd
See merge request freepascal.org/lazarus/lazarus!49
2021-11-28 10:49:11 +01:00
Maxim Ganetsky
738e48c6b7
Translations: French translation update by Gilles Vasseur, issue #39487
2021-11-26 03:47:29 +03:00
Martin
ad58ebedf8
FpDebug, CmdLineDebuggerBase: Remove "design time".... / Add missing changes in packagefile
2021-11-25 21:01:06 +01:00
Martin
fcd147a0bf
FpDebug, CmdLineDebuggerBase, LazDebugTestBase: Remove "design time", those are run-time packages (they are for use in the IDE, be serving as base classes to other design time packages. But they should not be listed for installation into the IDE on their own.
2021-11-25 12:54:25 +01:00
ccrause
1e0b55da03
Move management of GController instance to TFDLoop.Inititialize and Destroy.
2021-11-21 10:26:10 +02:00
ccrause
7ae19d4eac
Add cthreads if compiled for unix by Fredvs
2021-11-21 10:25:55 +02:00
Martin
9213ca32e8
FpDebug: Fixed MemLeak on Windows: TProcessUtf8 was not freed / introduced in e104c4c418
- merge-request !41
2021-11-20 13:02:22 +01:00
Martin
f49b54bae5
FpDebug: add a few missing "const" for params
2021-11-14 15:36:41 +01:00
Martin
eac49ae44f
FpDebug: Fix DW_OP_reg0..31 should return the register-location, not the value in the register (except for DW_AT_frame_base). See note_732607024 in merge-request !28
2021-11-14 11:31:56 +01:00
Martin
0a7f1b1da9
FpDebug: Dwarf location-parser, allow to deref a register-location. See merge-request !28
2021-11-14 09:13:55 +01:00
Martin
9c5208b665
FpDebug: compilation fixes for Mac
2021-11-09 16:34:59 +01:00
Martin
95b4cf9043
FpDebug: compilation fixes for Mac
2021-11-08 15:09:01 +01:00
Martin
89cc21355f
FpDebug: fixed visibility warning for InitLoaders
2021-11-08 14:59:14 +01:00
Martin
32aaa9b127
FpDebug: Fix default value / fix test
2021-11-07 15:32:43 +01:00
ccrause
c219bac7dc
Fix initialization of TDbgLinuxProcess.AttachToInstance.
2021-11-07 15:20:23 +02:00
ccrause
7e5b510a4e
Update StartInstance and AttachInstance method signatures of TDbgWinProcess.
2021-11-06 16:17:58 +02:00
ccrause
dc38deaaa5
Fix signature of inherited call in TAvrProcess.Create.
2021-11-06 14:23:32 +01:00
ccrause
4055d9420b
Consolidated parameters for TDbgProcess.Create, StartInstance and AttachToInstance.
2021-11-06 14:23:31 +01:00
ccrause
923fce0cb0
Change StartInstance and AttachInstance to normal methods. TDbgController now calls OSDbgClasses.DbgProcessClass to create a process class instance with a TDbgProcessConfig parameter which can be subclassed and passed around for configuration. The remote configuration is now passed via this parameter as a subclass.
2021-11-06 14:23:28 +01:00
Martin
3b2e56528b
Merge branch 'fpdebug-AVR-2021-11-05' into 'main'
...
Fpdebug: Update AVR support (continuing from !36 )
See merge request freepascal.org/lazarus/lazarus!40
2021-11-06 09:01:24 +00:00
ccrause
9f02cfbf72
Remove write access to LoaderList property.
2021-11-05 21:43:44 +02:00
Martin
3b9f8954ba
fpDebug: Set Sect.VirtualAddress on Linux / See merge request !36 by ccrause
2021-11-05 17:44:25 +01:00
ccrause
9de2a8dfbc
Add a monitor command list to be called after uploading is finished.
2021-11-01 12:20:17 +02:00
ccrause
29cf0ce9d6
TRspConnection.ReadReply to consume all "O" packets until a valid other packet is received. Fixes issue when status query after monitor command resulted in a qemu gdbserver state error as a result of incorrect acknowledge packets.
2021-11-01 12:15:32 +02:00
ccrause
11682281de
Fix up naming convention of methods.
2021-11-01 12:15:13 +02:00
ccrause
7bd0e9ab2a
Remove commented code, fix comment
2021-11-01 12:15:13 +02:00
ccrause
45351f354b
Properly handle console output from gdbserver over RSP. Qemu monitor commands can reply with O packets.
2021-11-01 12:15:12 +02:00
ccrause
211a02deb9
Todo reminders for later improvements
2021-11-01 12:15:12 +02:00
ccrause
052a1245a7
Fix AVR watchpoint issue when watchpoint is already declared when program starts, which leads to an invalid watchpoint. AVR usually starts from address 0, so not calling FindSymbolScope when address is 0 causes this problem.
2021-11-01 12:15:06 +02:00
ccrause
afc60cf708
Fix data watchpoints.
2021-11-01 12:14:57 +02:00
ccrause
d19a267b19
Ensure convertHexWithLittleEndianSwap works for any length of text, provided it fits the range of QWord.
2021-11-01 12:14:57 +02:00
ccrause
5b824b677c
If PauseRequested is true, then both SIGINT and SIGTRAP should be treated as deBreakpoint.
2021-11-01 12:14:57 +02:00
ccrause
1529b34ca7
Change behaviour of WaitForSignal to time out after a short while so that other communication such as Ctrl+C can be transmitted while the target is running. Also distinguish between timeout and socket error.
2021-11-01 12:14:57 +02:00
ccrause
f56b453b29
Remove unused variables.
2021-11-01 12:14:56 +02:00
ccrause
77f10b113f
Copy CPU registers in refreshRegisterCache.
2021-11-01 12:14:48 +02:00
ccrause
42fa9a820a
Add code to extract "thread" stop reason as sent by qemu.
2021-11-01 12:14:48 +02:00
ccrause
a239cd8952
qemu doesnt support the "p" command to read an individual register. Change logic to update all registers with the "g" command when a single register is invalid.
2021-11-01 12:14:47 +02:00
ccrause
68d50adedf
Remove redundant check of FStatus
2021-11-01 12:14:47 +02:00
ccrause
c0f05c8dc6
MAX_CODE_BIN should be at least as big as MaxPrologueSize.
2021-11-01 12:14:47 +02:00
ccrause
50e7383718
Wrap socket Read + Write calls in try except to convert exceptions into a SockErr booleanproperty.
2021-11-01 12:14:47 +02:00
ccrause
e0dea1ca30
Workaround to not automatically create socket connection in constructor. The existing try except block did not catch socket expections in the constructor.
2021-11-01 12:14:46 +02:00
ccrause
4c493303a0
Handle simple interrupt frames.
2021-11-01 12:14:46 +02:00
ccrause
3b36f05e27
Remove FP from register list, since the information is already present in registers r28 and r29
2021-11-01 12:14:46 +02:00
ccrause
c6e6de1294
Fixed checking if AAddress is bracketed by StartPC and EndPC.
2021-11-01 12:14:33 +02:00
ccrause
23065e004c
Add functionality to get proc start/end addresses from debug info. Used to scan prologue and epilogue for frame information on AVR target.
2021-11-01 12:13:28 +02:00
ccrause
542c98a369
Use the same register names and dwarf indexes in all register lists.
2021-11-01 12:13:18 +02:00
ccrause
7f341cbe68
Tweak PrepareCallStackEntryList to cater for avr-gcc ABI. Added TAvrAsmDecoder.GetFunctionFrameReturnAddress to scan prologue and epilogue for frame information.
2021-11-01 12:13:17 +02:00
ccrause
02c76188e3
Fix indenting and missing bracket.
2021-11-01 12:13:17 +02:00
ccrause
762081ec6f
Fix offset of return PC on stack. Trivial (no locals or parameters) stack trace now works.
2021-11-01 12:13:17 +02:00
ccrause
165c4dae9a
Start with AVR call stack analysis
2021-11-01 12:13:17 +02:00
ccrause
c6df32a82c
Fix to make debugger stop at breakpoint at address 0. Only single step in TDbgAvrProcess.Continue if SingleStep parameter is true.
2021-11-01 12:13:16 +02:00
ccrause
b27172ff12
Check if reply to monitor command is a plain response, else hex decode the response.
2021-11-01 12:13:16 +02:00
ccrause
9c6de4853a
Add properties AfterUploadBreakZero and AfterUploadMonitorReset to test with atbackend.exe.
2021-11-01 12:13:09 +02:00
ccrause
f78d3dd6b8
Use loadable section information to automatically upload sections to target.
2021-11-01 12:12:43 +02:00
ccrause
00d5dd4589
Remove duplicate LoaderList property.
2021-11-01 12:12:21 +02:00
ccrause
5d14d15403
Added functionality to mark sections as loadable based on section information.
2021-11-01 12:11:48 +02:00
ccrause
e524997317
Trying to fix Pause behaviour over RSP: Disable FIsPaused assert in ThreadReadState method. Call WaitForSignal after sending Break request. Call Sleep after waiting for WaitForSignal so that a queued request has time to get processed.
2021-11-01 12:10:45 +02:00
ccrause
160c57451a
Fix redundant unit in uses clause.
2021-11-01 12:10:32 +02:00
ccrause
800ee2ac02
Add RSP host, port and upload options. Add property AfterConnectMonitorCmds to execute monitor commands after a connection with target is established.
2021-11-01 12:07:15 +02:00
ccrause
cbff56be77
Moved TXmlConfStringList from gdbmidebugger to DebuggerPropertiesBase to share this property class between gdbmidebugger and fpdebugdebugger.
2021-11-01 12:06:00 +02:00
Martin
57d356a2a2
Merge branch 'fpdebug-breakpoint-removeaddress-fix' into 'main'
...
FpDebug: Fixed incorrect new length of FLocation array in TFpInternalBreakpoint.RemoveAddress
See merge request freepascal.org/lazarus/lazarus!26
2021-10-21 13:43:43 +00:00
mattias
0354b47bc4
updated makefiles
2021-10-18 14:32:30 +02:00
Sergey Larin
20fc451aa1
FpDebug takes into account that FPC 3.3.1 changed offset of the CodePage field in TAnsiRec.
...
When reading strings, FpDebug sets the required CodePage to the received AnsiString, the value of which is read from the memory of the process being debugged.
2021-08-27 21:24:07 +03:00
Martin
ad741a8d7a
Revert "Disable PEEPHOLE opt in fpc 3.2.0 to fpc 3.2.3 => there is a bug that can cause crashed in fpdebug/lazutils"
...
This reverts commit 78bb88de35
.
2021-10-16 13:41:59 +02:00
Martin
78bb88de35
Disable PEEPHOLE opt in fpc 3.2.0 to fpc 3.2.3 => there is a bug that can cause crashed in fpdebug/lazutils
...
(cherry picked from commit 6d1185d76b
)
2021-10-16 11:45:10 +02:00
Martin
6fc5c2fcdd
FpDebug: more asserts for correct thread usage
2021-10-13 21:48:32 +02:00
Martin
0a2bc87781
FpDebug: Fixed mem leak.
2021-09-26 16:02:26 +02:00
Martin
f47220cc47
FpDebug: Add asserts
2021-09-26 02:09:18 +02:00
Maxim Ganetsky
91f499b984
FPDebug: fixed compilation on Windows with FPC trunk, patch by Rika, closes issue #39349
2021-09-02 01:24:53 +03:00
Martin
1c87dc96eb
FpDebug: refactor external debug info / Enable for Linux and Windows
2021-08-14 15:23:17 +02:00
martin
e61ab5d73d
FpDebug: remove double line break from formatted watches.
...
git-svn-id: trunk@65488 -
2021-07-22 00:29:26 +00:00
martin
b5bf7de6f9
FpDebug, Windows: Forward OutputDebugString to IDE.
...
git-svn-id: trunk@65475 -
2021-07-19 18:17:06 +00:00
martin
686e81d6e3
FpDebug: Start external dbg file support for Win
...
git-svn-id: trunk@65390 -
2021-07-06 21:39:38 +00:00
maxim
0711ae584c
Translations: Brazilian Portuguese translation update by Marcelo B Paula, bug #39152
...
git-svn-id: trunk@65372 -
2021-07-04 21:55:24 +00:00
martin
0244c95a33
FpDebug: Dynamically load DebugBreakProcess
...
git-svn-id: trunk@65291 -
2021-06-22 15:14:38 +00:00
mattias
91763f2247
set trunk version to 2.3.0
...
git-svn-id: trunk@65242 -
2021-06-15 14:00:39 +00:00
martin
a9bdfda626
FpDebug: version 1.0
...
git-svn-id: trunk@65231 -
2021-06-14 17:00:52 +00:00
martin
caa6a14163
FpDebug: "waitable section" / Protect some code from being entered twice
...
git-svn-id: trunk@65229 -
2021-06-14 08:12:49 +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
3deb9a41fe
FpDebug: Improve target-mem read/write on Linux / Allow bigger writes
...
git-svn-id: trunk@65225 -
2021-06-14 07:30:37 +00:00
martin
699930263c
DwarfViewer: fix compile
...
git-svn-id: trunk@65224 -
2021-06-14 07:30:35 +00:00
martin
e94b71c589
FpDebug: Allow multiple threads to call TFpThreadWorkerItem.WaitForFinish
...
git-svn-id: trunk@65187 -
2021-06-08 20:58:38 +00:00
martin
a3a0dd7e08
FpDebug: fix WITH_REFCOUNT_DEBUG for unitname.var
...
git-svn-id: trunk@65185 -
2021-06-08 19:32:26 +00:00
martin
48701f5d93
FpDebug: Improve encapsulation
...
git-svn-id: trunk@65183 -
2021-06-08 19:32:22 +00:00
martin
3644f4a2e2
FpDebug: Fix race condition. FScope accesses FScopeList which is changed by thread (dyn array re-alloc by SetLength)
...
git-svn-id: trunk@65172 -
2021-06-04 01:11:22 +00:00