[Lazarus] GDB problems (--exec-run)

FreeMan freeman35 at delphiturkiye.com
Wed Dec 18 14:54:49 CET 2013


Hello Martin,
On Kubuntu 13.10 x64,

/opt/lazarus/startlazarus --LANG=C --pcp=~/.lazarus %f 
--debug-log=~/.lazarus/0_Lazarus_LOG_FILE.log 
--debug-enable=DBG_CMD_ECHO,DBG_STATE,DBG_DATA_MONITORS,DBGMI_QUEUE_DEBUG,DBGMI_TYPE_INFO

"--debug-log=~/.lazarus/0_Lazarus_LOG_FILE.log"  log file not creating. 
'~' symbol not using,
"--debug-log=/home/yourname/.lazarus/0_Lazarus_LOG_FILE.log"  this 
parameter is work


18-12-2013 15:34 tarihinde, Martin Frb yazdı:
> On 18/12/2013 10:41, Torsten Bonde Christiansen wrote:
>> Hi List.
>>
>> For some time now I am having problems getting GDB to work correctly 
>> with Lazarus.
>>
>> Sometime, but not always, i run into the following message after I 
>> terminate a program
>> that I have debugged from within Lazarus:
>>
>> The GDB command:
>> "-exec-run"
>> returned the error:
>> ",msg="During startup program exited normally.""
>>
>> The program runs fine but all debugging seems not to function 
>> (breakpoints, etc.) when this
>> happens.
>
> This error can happen for various reasons. I have in the past heart of 
> it in 2 cases:
> 1- certain position independent exe (PIE) : GDB fails to relocate 
> certain breakpoints that Lazarus uses to start the exe (this is before 
> any user breakpoints are set)
> 2- certain dll/so libraries, that define the same symbols as the main exe.
>
> There may be more. The 2nd only happens on repeated runs of the debugger.
>
> The IDE tries to work around those, but it does not always succeed. It 
> is likely that in cases where it currently fails, this must be worked 
> around by user set config (see below).
>
> But it would be good if you could still send a logfile:
> http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips#Log_info_for_debug_session
>
> Ways to work around: (all on the options / debugger page)
>
> * In case 2 only:
> http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips#gdb.exe_has_stopped_working
>> go to the debugger options 
>> <http://wiki.lazarus.freepascal.org/IDE_Window:_Debugger_Options> and 
>> in the field "debugger_startup_options" enter:
>>
>>         --eval-command="set auto-solib-add off" 
>>
> This can only be used, if you do not debug within libraries (if you 
> have not written your own lib)
>
> * In Case 2 only: Check "reset debugger after each run"
> It will add a very slight increase to the time it takes to start the 
> debugger, as gdb must be reloaded each time.
>
> * In all cases:
> Try any of the values available for "InternalStartBreak" (in the 
> property grid of the options)
>
>
>
>
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20131218/663eb800/attachment-0003.html>


More information about the Lazarus mailing list