[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[cdt-dev] extending gdbjtag for custom devices
|
i'm looking at adding a new JTagDevice to gdbjtag, but it doesnt seem
to want to find my extensions unless the class code is inside of the
org.eclipse.cdt.debug.gdbjtag.core.jtagdevice package.
for example, in my plugin i add dependencies on the gdbjtag plugins.
then under the Extensions tab, i add a new
"org.eclipse.cdt.debug.gdbjtag.core.JTagDevice". under this i add a
new "device". the id is unique (shouldnt matter), the name is
"gdbproxy" (and it shows up in the drop down list), and when i click
on the class link, the eclipse interface locates my gdbproxy.java just
fine (stuck it in the toplevel just to make things simple). but when
i select the device in the drop down, the default hostname/port does
not get updated (and the custom functions ive defined in my class dont
get called).
if i relocate gdbproxy.java to
org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.gdbproxy and update the
class field accordingly, then it works just peachy
i tried stepping through the indirect class loading code but couldnt
really fathom where it was going wrong
for reference, here is the xml snippet that fails:
<extension
point="org.eclipse.cdt.debug.gdbjtag.core.JTagDevice">
<device
class="gdbproxy"
id="gdbproxy"
name="bfingdbproxy">
</device>
</extension>
and here is the xml snippet that works:
<extension
point="org.eclipse.cdt.debug.gdbjtag.core.JTagDevice">
<device
class="org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.gdbproxy"
id="gdbproxy"
name="gdbproxy">
</device>
</extension>
and here is the pretty simple gdbproxy.java:
import org.eclipse.cdt.debug.gdbjtag.core.jtagdevice.DefaultGDBJtagDeviceImpl;
public class gdbproxy extends DefaultGDBJtagDeviceImpl {
public String getDefaultIpAddress() {
return "192.168.0.15";
}
public String getDefaultPortNumber() {
return "2000";
}
}
-mike