Debugger hangs on startup if host is not a a fpc program
Original Reporter info from Mantis: accSone
-
Reporter name:
Original Reporter info from Mantis: accSone
- Reporter name:
Description:
Problem: To debug a library one have to assign a host program in Run parameters Host application. If this program is not compiled with lazarus/fpc the debugger hangs on startup
Analysis: In GDBMIDebugger.pp , TGDBMIDebuggerCommandStartDebugging.DoExecute has no timeout set. During initialization the calls
FTheDebugger.FExceptionBreak.SetByAddr(Self);
FTheDebugger.FBreakErrorBreak.SetByAddr(Self);
FTheDebugger.FRunErrorBreak.SetByAddr(Self);
will hang because they are executed in the command context of the TGDBMIDebuggerCommandStartDebugging command that has DefaultTimeOut not set.
Solution: Setting DefaultTimeOut := DebuggerProperties.TimeoutForEval; before calling the functions above solves the problem and host application will be launched.
Steps to reproduce:
Run parameters -> Choose host that is not a fpc compiled program.
Start debugger -> hang
Additional information:
Debug Output:
(gdb)
&LtPos;info address FPC_RAISEEXCEPTION>
&"info address FPC_RAISEEXCEPTION\n"
01.11.13 18:24:48 [0x0-0x7f07f].lazarus.freepascal.ide[10068] >> TCmdLineDebugger.SendCmdLn "info address FPC_RAISEEXCEPTION"
01.11.13 18:24:48 [0x0-0x7f07f].lazarus.freepascal.ide[10068] << TCmdLineDebugger.ReadLn "&"info address FPC_RAISEEXCEPTION\n""
Mantis conversion info:
- Mantis ID: 25277
- OS: OSX
- OS Build: 10.6.8
- Platform: darwin x86_64
- Version: 1.3 (SVN)
- Fixed in version: 1.2.0
- Fixed in revision: 43362 (#79f500ab)
- Target version: 1.2