<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">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.<br>
<br>
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.<br>
<br>
Michael<br>
<br>
Am 19.03.13 03:14, schrieb Justin Smyth:<br>
</div>
<blockquote
cite="mid:78D13B5330B84535BB513A03A60A5D9C@Justinslaptop"
type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<div dir="ltr">
<div style="FONT-SIZE: 12pt; FONT-FAMILY: 'Calibri'; COLOR:
#000000">
<div>how close are we to adding openocd to the debugging in
lazarus ?</div>
<div> </div>
<div>is there a simple configuration file to change or patch
to use ?</div>
<div> </div>
<div>i want to be try openocd for debugging.</div>
<div> </div>
<div> </div>
<div>King Regards</div>
<div> </div>
<div> </div>
<div>Justin Smyth</div>
<div style="FONT-SIZE: small; FONT-FAMILY: 'Calibri';
FONT-WEIGHT: normal; COLOR: #000000; FONT-STYLE: normal;
TEXT-DECORATION: none; DISPLAY: inline">
<div style="FONT: 10pt tahoma">
<div> </div>
<div style="BACKGROUND: #f5f5f5">
<div style="font-color: black"><b>From:</b> <a
moz-do-not-send="true" title="lazarus@mfriebe.de"
href="mailto:lazarus@mfriebe.de">Martin</a> </div>
<div><b>Sent:</b> Friday, February 8, 2013 11:09 AM</div>
<div><b>To:</b> <a moz-do-not-send="true"
title="fpc-devel@lists.freepascal.org"
href="mailto:fpc-devel@lists.freepascal.org">FPC
developers' list</a> </div>
<div><b>Subject:</b> Re: [fpc-devel] I have created a
openocd debugger-interface forlazarus, now some
questions</div>
</div>
</div>
<div> </div>
</div>
<div style="FONT-SIZE: small; FONT-FAMILY: 'Calibri';
FONT-WEIGHT: normal; COLOR: #000000; FONT-STYLE: normal;
TEXT-DECORATION: none; DISPLAY: inline">
<div class="moz-cite-prefix">On 07/02/2013 23:51, Michael
Ring wrote:<br>
</div>
<blockquote cite="mid:51143DF5.3060306@michael-ring.org"
type="cite">
<div class="moz-cite-prefix"> </div>
Index: debugger/debugger.pp<br>
===================================================================<br>
--- debugger/debugger.pp (revision 40204)<br>
+++ debugger/debugger.pp (working copy)<br>
@@ -3304,6 +3304,7 @@<br>
const<br>
OLD_GDB_DBG_NAME = 'GNU debugger (gdb)';<br>
OLD_SSH_DBG_NAME = 'GNU debugger through SSH (gdb)';<br>
+ OLD_REMOTE_DBG_NAME = 'GNU debugger through OpenOCD
(gdb)';<br>
</blockquote>
<br>
You should not need this.<br>
<br>
Older versions of the IDE used those strings in the XML. But
now the IDE uses the classname.<br>
<br>
The 2 existing old names are kept so old config can be read.<br>
<br>
There is no old config for your class.<br>
<br>
<blockquote cite="mid:51143DF5.3060306@michael-ring.org"
type="cite">var<br>
s: String;<br>
begin<br>
@@ -3314,6 +3315,7 @@<br>
s := ConfigStore.GetValue('Type', '');<br>
if s = OLD_GDB_DBG_NAME then
FDebuggerClass:='TGDBMIDEBUGGER';<br>
if s = OLD_SSH_DBG_NAME then
FDebuggerClass:='TSSHGDBMIDEBUGGER';<br>
+ if s = OLD_REMOTE_DBG_NAME then
FDebuggerClass:='TOPENOCDGDBMIDEBUGGER';<br>
</blockquote>
see above<br>
<br>
<blockquote cite="mid:51143DF5.3060306@michael-ring.org"
type="cite">Index: debugger/gdbmidebugger.pp<br>
===================================================================<br>
--- debugger/gdbmidebugger.pp (revision 40204)<br>
+++ debugger/gdbmidebugger.pp (working copy)<br>
@@ -4502,8 +4502,12 @@<br>
s := GetPart(['Thread '], [' '], R.Values, True);<br>
Result := StrToIntDef(s, 0);<br>
if Result <> 0 then exit;<br>
+<br>
+ // returned by openocd server<br>
+ s := GetPart(['* '], ['Remote target'], R.Values,
True);<br>
+ Result := StrToIntDef(trim(s), 0);<br>
+ if Result <> 0 then exit;<br>
end;<br>
</blockquote>
<br>
I'd rather factor all of the "get PID" code into a virtual
method. (on the class TGDBMIDebuggerCommandStartDebugging)<br>
Actually that might be the entire "RunToMain"<br>
<br>
Then you can override it, and add there.<br>
<br>
That means you have to subclass
TGDBMIDebuggerCommandStartDebugging. See the
GDBMIServerDebugger haw to do that<br>
<br>
<br>
<p>
</p>
<hr>
_______________________________________________<br>
fpc-devel maillist - <a class="moz-txt-link-abbreviated" href="mailto:fpc-devel@lists.freepascal.org">fpc-devel@lists.freepascal.org</a><br>
<a class="moz-txt-link-freetext" href="http://lists.freepascal.org/mailman/listinfo/fpc-devel">http://lists.freepascal.org/mailman/listinfo/fpc-devel</a><br>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
fpc-devel maillist - <a class="moz-txt-link-abbreviated" href="mailto:fpc-devel@lists.freepascal.org">fpc-devel@lists.freepascal.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freepascal.org/mailman/listinfo/fpc-devel">http://lists.freepascal.org/mailman/listinfo/fpc-devel</a>
</pre>
</blockquote>
<br>
</body>
</html>