Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [platform-debug-dev] A j2me debug problem

Does anyone know how to do _expression_ evaluation with J2ME?

I really need help on this problem.

 

Thanks.

 

- Raymond


From: platform-debug-dev-bounces@xxxxxxxxxxx [mailto:platform-debug-dev-bounces@xxxxxxxxxxx] On Behalf Of Zhuohui Qiu
Sent: Wednesday, October 17, 2007 10:36 AM
To: Eclipse Platform Debug component developers list.
Subject: RE: [platform-debug-dev] A j2me debug problem

 

Hey,

 

Thanks for your answers.

 

I talked to our VM architects about this issues and they said

there is nothing in JDWP that says you have to support ClassLoader.

Here, I am giving a really test case to show the error I got:

I input _expression_:

 

System.out.println("Hello World");

 

When I executed this line, I got:

 

Evaluation failed. Reason(s):

            Type does not implement selector forName and signature (Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;

 

When eclipse _expression_ evaluator is asking for com.sun.jdi.ReferenceType

of a class, it is looking for (Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;

but what we have is ()Ljava/lang/Class. The search actually occurs in

org.eclipse.jdi.internal.PrferenceTypeImpl#methoByName(String, String);

 

I think eclipse can also be used to develop J2ME programs, have any one

tried _expression_ evaluation function in any J2ME program?

 

Thanks.

 

- Raymond

 

-----Original Message-----
From: platform-debug-dev-bounces@xxxxxxxxxxx [mailto:platform-debug-dev-bounces@xxxxxxxxxxx] On Behalf Of Craig Setera
Sent: Wednesday, October 17, 2007 9:08 AM
To: Eclipse Platform Debug component developers list.
Subject: Re: [platform-debug-dev] A j2me debug problem

 

I don't think this is an issue with Java ME, but with the JDWP bridging

that most of the toolkits provide.  Those bridges do not provide full

specification support.  I have not seen any type of evaluation in the

remote VM work.  I guess the question is whether the Netbeans tools are

able to coax more information out of the ME VM's.

 

Darin Wright wrote:

> The Java debugger's evaluation support is performed by interpretting an

> _expression_ and sending JDI commands over the socket to the target VM. We

> basically parse the _expression_ in to an AST, and then visit the AST to

> interpret the _expression_. At various times we need to resolve class

> objects - for example when referencing a static field, sending a static

> message, etc. To do this, we look up the class by name. We use the method:

> 

>         public static Class forName(String name, boolean initialize,

> ClassLoader loader)

> 

> If this method is not in the J2ME libraries, the evaluation will fail

> (currently). Is there an equivalent method we could use for J2ME?

> 

> Darin Wright

> 

> 

> 

> 

> "Zhuohui Qiu" <zqiu@xxxxxxx>

> Sent by: platform-debug-dev-bounces@xxxxxxxxxxx

> 10/16/2007 05:33 PM

> Please respond to

> "Eclipse Platform Debug component developers list."

> <platform-debug-dev@xxxxxxxxxxx>

> 

> 

> To

> <platform-debug-dev@xxxxxxxxxxx>

> cc

> 

> Subject

> [platform-debug-dev] A j2me debug problem

> 

> 

> 

> 

> 

> 

> Hey,

> Our plug-in is supposed to work with our simulator which is running in

> j2me. For some reason, Eclipse can not execute _expression_ evaluation

> properly

> on the project running on our simulator (we have a debugger running on the

> 

> simulator and it talks to the eclipse debugger). It seems the reason is

> eclipse is

> running in J2SDK environment and our simulator is running in J2ME

> environment,

> there is some problem in the communication.

> I did some debug to find out the reason and have found that eclipse

> debugger

> has some problem when it tries to get the IJAvaType of an object, e.g.

> java.lang.Class.

> In the Eclipse's implementation of com.sun.jdi.ReferenceType class,

> eclipse tries

> to use the methodsByName() method to find the object type; the passed in

> selector

> is “forName”, and the signature is

> “(Ljava/lang/String;ZLjava/lang/ClassLoader;)Ljava/lang/Class;”.

> The problem is that the signature of “forName” item in the visible methods

> list of

> ReferenceTypeImpl of eclipse is “()Ljava/lang/Class;”, thus, eclipse

> throws an

> exception that it can not find the class type.

> It seems that J2ME does not support reflection but exlipse _expression_

> evaluator is

> asking for that information. So, the question could be how does eclipse do

> _expression_

> evaluation with J2ME?

> 

> I tried to install the DSF-SDK and mtj-sdk, but the problem is still

> there. Can anyone tell me what I should do?

> Thanks.

> 

> Raymond

> ---------------------------------------------------------------------

> This transmission (including any attachments) may contain confidential

> information, privileged material (including material protected by the

> solicitor-client or other applicable privileges), or constitute non-public

> information. Any use of this information by anyone other than the intended

> recipient is prohibited. If you have received this transmission in error,

> please immediately reply to the sender and delete this information from

> your system. Use, dissemination, distribution, or reproduction of this

> transmission by unintended recipients is not authorized and may be

> unlawful. _______________________________________________

> platform-debug-dev mailing list

> platform-debug-dev@xxxxxxxxxxx

> https://dev.eclipse.org/mailman/listinfo/platform-debug-dev

> 

> 

>  

> ------------------------------------------------------------------------

> 

> _______________________________________________

> platform-debug-dev mailing list

> platform-debug-dev@xxxxxxxxxxx

> https://dev.eclipse.org/mailman/listinfo/platform-debug-dev

>  

_______________________________________________

platform-debug-dev mailing list

platform-debug-dev@xxxxxxxxxxx

https://dev.eclipse.org/mailman/listinfo/platform-debug-dev

---------------------------------------------------------------------
This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.

---------------------------------------------------------------------
This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.

Back to the top