<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<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">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<div class="moz-cite-prefix"><br>
</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>
</body>
</html>