[Lazarus] How to exec some gdb command on start in lazarus

martin lazarus at mfriebe.de
Mon Jun 24 17:59:53 CEST 2013


On 24/06/13 16:31, martin wrote:
> On 24/06/13 16:11, Petr Kristan wrote:
>> Hallo
>>
>> I want to send this command to gdb:
>>
>> handle SIGPIPE nostop noprint pass
>>
>> to ignore SIGPIPE.
>> I set it in my ~/.gdbinit, but Lazarus ignores it.
>>
>> I tried write it to Debugger_Startup_Options, but without success.
>>
>
> the  Debugger_Startup_Options, would be like
>
> --eval-command="handle SIGPIPE nostop noprint pass"
>
> if you are on windows IIRC gdb does not take this option.

that is even if you send it later ....


you can try by changing debugger/gdbmidebugger.pp

function TGDBMIDebuggerCommandStartDebugging.DoExecute: Boolean;

line 4634 after
     ExecuteCommand('-gdb-set language pascal', [cfCheckError]);

insert
     ExecuteCommand('handle SIGPIPE nostop noprint pass', [], 
[cfNoMiCommand, cfIgnoreState, cfExternal]);




see 
http://wiki.lazarus.freepascal.org/GDB_Debugger_Tips#Log_info_for_debug_session
for a log that contains all commands send to gdb




More information about the Lazarus mailing list