[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools.jdt] Re: 3.1M7 - JDWP - Error when methodID == zero

Lars,
I'd suggest that you file it as a bug (JDT-Debug component).

I looked quickly at org.eclipse.jdi.internal.MethodImpl. The isObsolete() method is implemented as:
public boolean isObsolete() {
if (virtualMachineImpl().isJdwpVersionGreaterOrEqual(1, 4)) {
return fMethodID.value() == 0;
}
return false;
}


We may be making an incorrect assumption that any method with id of 0 is obsolete. This should be investigated.

Kevin



Lars Even wrote:

Hello,

I am debugging a simple application on a remote VM using Eclipse 3.1.0 M7. My VM is a modified version of Sun's KVM. I have also made some adjustments to the debug protocal (KDWP/JDWP).

My problem is the JDWP/KDWP specified "methodID" (see definition at the end of this message). Eclipse does not seem to agree that zero is a valid methodID.

Consider the following example

1. class Foo{
2. 3. public Foo(){ 4. // Do something
5. }
6. 7. public Method_1(){}
8. public Method_2(){}
9. 10. public static void main(){ 11. new Foo();
12. }
13. } I have set Eclipse to communicate with the VM through a KDWP-proxy-server. The KDWP-proxy-server loads the Foo-class and generates the following methodsIDs:


method name: Foo.<init>    methodID: 0
method name: Method_1      methodID: 1
method name: Method_2      methodID: 2
method name: main          methodID: 3

When I set a breakpoint at line 4, Eclipse sends an EventRequest JDWP-command containing the methodID "0". After having pressed resume, I get to the breakpoint, and the VM sends an Event JDWP-command. The methodID is also this time "0", but this causes an internal error in Eclipse.

Unfortunately no details on this internal error is presented.

Is this a bug?


Thanks, Lars E.




*) JDWP-Specification MethodID:

Uniquely identifies a method in some class in the target VM. The methodID must uniquely identify the method within its class/interface or any of its subclasses/subinterfaces/implementors. A methodID is not necessarily unique on its own; it is always paired with a referenceTypeID to uniquely identify one method. The referenceTypeID can identify either the declaring type of the method or a subtype.
(http://codenewbie.com/documentation/j2sdk-1_5_0/guide/jpda/jdwp-spec.html)