Jimmy,Jing Lv wrote:
Hi,

2008/2/22, Oliver Deakin <[EMAIL PROTECTED]>:
Hi Jimmy,

 This is a great idea, but I have a feeling there may still need to be
 some work done on the current version. I have noticed the following:

 1) You cannot launch Harmony with
 java -agentlib:jdwp=transport=dt_socket,server=n,address=8888


I notice this and it seems a bug of Launcher and let's add some lines
on Launcher?

Agreed - I think the launcher simply detects that there has not been a class specified and short cuts to the help text. Seems like we need to detect that the agentlib option has been passed and ignore the fact that there is no class name.

Interestingly, you can also launch the RI in server mode without specifying a class. For the following command line you get:

>java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8888
Listening for transport dt_socket at address: 8888
<prints RI command line help>

Whereas on Harmony we get:
>java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8888
<prints Harmony command line help>

It appears that the RI launcher is actually creating the VM and passing it no class name, at which point the VM initialises the jdwp module before discovering that no class has been specified and printing it's help text. In Harmony the command line help is printed by the launcher directly and we never create the VM if the class is not specified. There seems to be a fundamental difference between the way the RI and Harmony deal with outputting help text.

I have created HARMONY-5544 for this.

without specifying a class at the end of the command line. This is not a
 major issue, just a difference to the RI. If you run the above command
 line, the launcher short circuits to the launcher command line help and
 exits.*
 *
 2) If I try to launch two Harmony VMs using the following command lines:
 java -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8888
 HelloWorld
 java -agentlib:jdwp=transport=dt_socket,server=n,address=8888 HelloWorld

 I get lots of error output.
 Server side:
  INFO: [TransportManager.cpp:204] transport is listening on 8888
 ERROR: [CommandDispatcher.cpp:482] command not implemented
 EVENT/COMPOSITE[64/100]
 ERROR: [CommandDispatcher.cpp:482] command not implemented
 EVENT/***UNKNOWN COMMAND***[64/99]
 ERROR: [CommandDispatcher.cpp:482] command not implemented
 EVENT/***UNKNOWN COMMAND***[64/99]
 ERROR: [CommandDispatcher.cpp:482] command not implemented
 EVENT/***UNKNOWN COMMAND***[64/99]
 ERROR: [CommandDispatcher.cpp:482] command not implemented
 EVENT/***UNKNOWN COMMAND***[64/99]
 ERROR: [CommandDispatcher.cpp:482] command not implemented
 EVENT/***UNKNOWN COMMAND***[64/99]
 ERROR: [CommandDispatcher.cpp:482] command not implemented
 EVENT/***UNKNOWN COMMAND***[64/99]
 (repeats until I kill the process)

 Client side:
 ERROR: [CommandDispatcher.cpp:482] command not implemented
 EVENT/COMPOSITE[64/100]
 ERROR: [CommandDispatcher.cpp:482] command not implemented
 EVENT/***UNKNOWN COMMAND***[64/99]
 ERROR: [CommandDispatcher.cpp:482] command not implemented
 EVENT/***UNKNOWN COMMAND***[64/99]
 ERROR: [CommandDispatcher.cpp:482] command not implemented
 EVENT/***UNKNOWN COMMAND***[64/99]
 (repeats until I kill the process)


Hmm, sorry I focus on unit testcases on the repository and it seems
work quite well on them. Yes just now I have tried the command lines
you offered, and it does appear on my desktop.
>From the error message it seems passing some unknown commands to the
dispatcher(Event Command 99, no such command at all ). I'd like to
take a closer look into it :)

Great, thanks Jimmy! I have noticed similar error output when we try to connect to the RI. For example, here the RI is the server and Harmony is connecting client:

(RI as server)
>java -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=8888 HelloWorld
Listening for transport dt_socket at address: 8888
ERROR: transport error 202: recv error: winsock error 0 ["transport.c",L70]
Listening for transport dt_socket at address: 8888
Hello World!

(Harmony as client)
>java -agentlib:jdwp=transport=dt_socket,server=n,address=8888 HelloWorld
ERROR: [CommandDispatcher.cpp:482] command not implemented EVENT/COMPOSITE[64/100] ERROR: [CommandDispatcher.cpp:482] command not implemented EVENT/***UNKNOWN COMMAND***[64/99]
ERROR: [PacketDispatcher.cpp:171] socket error (error code: 10053) [510]
Hello World!


However,  as the updating is focus on protocol updating, it is nothing
much related to this bug IMHO,  at least the new protocol commands are
not. And I suggest writing more unit/standalone testcases on them so
that to ensure the quality. And of course I'll take effect on this
bug.
As a result, I believe we can still go on with updating to java6,
what's your opinion? :)

Yes, I believe you're right, although I think it's important to also fix the issues listed above or we may not be able to use the new JDWP code ;)

Id like to help you resolve this and get our socket transport working. I've opened HARMONY-5543 for this issue.

Regards,
Oliver

 Has anyone else seen this?

 Regards,
 Oliver


 Jimmy,Jing Lv wrote:
 > Hi All,
 >
 >      As discussed before, we can start JDWP updating and improving.
 > IMHO, let's start from the easiest way, updating to java 6.
 >      My proposal is:
 > 1. Setup a branch of JDKTools for java6 in harmony repository
 > 2. add/improve JDWP functions into java6 level. As the main updating
 > for java6 JDWP is about JDWP-protocol, it seems no much effect on VM
 > and debugger.
 >
 >      As M5 freeze will be done at the end of this week,  may start
 > from next week on.  Any comments/suggestions/Volunteers? Thanks!
 >
 >

 --

Oliver Deakin
 Unless stated otherwise above:
 IBM United Kingdom Limited - Registered in England and Wales with number 
741598.
 Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU





--
Oliver Deakin
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number 741598. Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6 3AU

Reply via email to