Question

I've got jamvm version 1.5.4 (java version 1.5.0) and I don't have any choice about upgrading or changing it (actually, I think that is the latest version anyway).

I would dearly love to attach a remote debugger to some ropey old code I wrote so my first thought was this incantation:

jamvm -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=4000,suspend=n ...

Sadly no dice there (neither -Xdebug or -Xrunjdwp were recognised).

So I did a swift jamvm -help and then jamvm -X and had a little read. Nothing suggested a possibility of attaching a remote debugger.

Finally I turned to our old friend Mr Googler and found this question on SourceForge with no answer.

So I guess I am scuppered, unless anyone knows otherwise, hence this...

Is there any way I can do remote debugging with JamVM?

Était-ce utile?

La solution

Simple answer is "No".

I've actually wanted to do profiling on the target hardware (ARM) running jamvm because it performed significantly slower than on my desktop running the Oracle HotSpot VM.

I've checked the JamVM sources but there is no hidden magic. JamVM was build to be very compact and thus adding support for remote debugging, profiling, JMX and whatnot would have bloated the VM.

What you can do is using -verbose to get a little insight on what's happening. Using :class e.g. I was at least able to spot a huge performance bottleneck by monitoring the class loading.

jamvm -verbose[:class|gc|jni]
   :class print out information about class loading, etc.
   :gc print out results of garbage collection
   :jni print out native method dynamic resolution

Nevertheless, since our application has some kind of thin HAL, I am able to run it on desktop using the full power of IDEs, profilers, debuggers which is what I would suggest.

If it is not possible due to some hardware specific code that won't run on desktop, unfortunately I don't know any other way than doing the ugly "printf debugging".

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top