[fpc-devel] I have created a openocd debugger-interface forlazarus, now some questions
Michael Ring
mail at michael-ring.org
Tue Mar 19 11:42:38 CET 2013
In the last weeks I spent most of the time to actually use lazarus + the
debugger-interface, I have identified some rough edges that I need to
work arround but basically the code works when you do the steps in the
right order.
How comfortable are you to rebuild lazarus-trunk? If you are fine with
this I can send you my patches via mail & some instructions on how
debugging works best.
Michael
Am 19.03.13 03:14, schrieb Justin Smyth:
> how close are we to adding openocd to the debugging in lazarus ?
> is there a simple configuration file to change or patch to use ?
> i want to be try openocd for debugging.
> King Regards
> Justin Smyth
> *From:* Martin <mailto:lazarus at mfriebe.de>
> *Sent:* Friday, February 8, 2013 11:09 AM
> *To:* FPC developers' list <mailto:fpc-devel at lists.freepascal.org>
> *Subject:* Re: [fpc-devel] I have created a openocd debugger-interface
> forlazarus, now some questions
> On 07/02/2013 23:51, Michael Ring wrote:
>> Index: debugger/debugger.pp
>> ===================================================================
>> --- debugger/debugger.pp (revision 40204)
>> +++ debugger/debugger.pp (working copy)
>> @@ -3304,6 +3304,7 @@
>> const
>> OLD_GDB_DBG_NAME = 'GNU debugger (gdb)';
>> OLD_SSH_DBG_NAME = 'GNU debugger through SSH (gdb)';
>> + OLD_REMOTE_DBG_NAME = 'GNU debugger through OpenOCD (gdb)';
>
> You should not need this.
>
> Older versions of the IDE used those strings in the XML. But now the
> IDE uses the classname.
>
> The 2 existing old names are kept so old config can be read.
>
> There is no old config for your class.
>
>> var
>> s: String;
>> begin
>> @@ -3314,6 +3315,7 @@
>> s := ConfigStore.GetValue('Type', '');
>> if s = OLD_GDB_DBG_NAME then FDebuggerClass:='TGDBMIDEBUGGER';
>> if s = OLD_SSH_DBG_NAME then FDebuggerClass:='TSSHGDBMIDEBUGGER';
>> + if s = OLD_REMOTE_DBG_NAME then
>> FDebuggerClass:='TOPENOCDGDBMIDEBUGGER';
> see above
>
>> Index: debugger/gdbmidebugger.pp
>> ===================================================================
>> --- debugger/gdbmidebugger.pp (revision 40204)
>> +++ debugger/gdbmidebugger.pp (working copy)
>> @@ -4502,8 +4502,12 @@
>> s := GetPart(['Thread '], [' '], R.Values, True);
>> Result := StrToIntDef(s, 0);
>> if Result <> 0 then exit;
>> +
>> + // returned by openocd server
>> + s := GetPart(['* '], ['Remote target'], R.Values, True);
>> + Result := StrToIntDef(trim(s), 0);
>> + if Result <> 0 then exit;
>> end;
>
> I'd rather factor all of the "get PID" code into a virtual method. (on
> the class TGDBMIDebuggerCommandStartDebugging)
> Actually that might be the entire "RunToMain"
>
> Then you can override it, and add there.
>
> That means you have to subclass TGDBMIDebuggerCommandStartDebugging.
> See the GDBMIServerDebugger haw to do that
>
>
> ------------------------------------------------------------------------
> _______________________________________________
> fpc-devel maillist - fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel
>
>
> _______________________________________________
> fpc-devel maillist - fpc-devel at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20130319/3230b065/attachment.html>
More information about the fpc-devel
mailing list