This page is no longer maintained — Please continue to the home page at www.scala-lang.org

eclipse plugin -Xprint and java disassembly

5 replies
Nicholas Tung
Joined: 2009-05-19,
User offline. Last seen 42 years 45 weeks ago.
Hi all,

    Is there a way to view the output of scalac's -Xprint (particularly the lowest, -Xprint:jvm) and java disassembly (e.g. through javap or Dava) using the eclipse plugin? It would be convenient to use the settings / classpath of the project (versus invoking the tools on the command line).

Thanks very much,
Nicholas
milessabin
Joined: 2008-08-11,
User offline. Last seen 33 weeks 3 days ago.
Re: eclipse plugin -Xprint and java disassembly

On Thu, Jun 4, 2009 at 12:07 AM, Nicholas Tung wrote:
>     Is there a way to view the output of scalac's -Xprint (particularly the
> lowest, -Xprint:jvm)

Not at the moment, no.

> and java disassembly (e.g. through javap or Dava) using
> the eclipse plugin?

Doesn't Eclipse's built in classfile viewer do this job for you?
Failing that, I'm pretty sure there are several very capable bytecode
disassembler plugins around.

Cheers,

Miles

Nicholas Tung
Joined: 2009-05-19,
User offline. Last seen 42 years 45 weeks ago.
Re: eclipse plugin -Xprint and java disassembly
On Wed, Jun 3, 2009 at 16:35, Miles Sabin <miles@milessabin.com> wrote:
On Thu, Jun 4, 2009 at 12:07 AM, Nicholas Tung <ntung@ntung.com> wrote:
>     Is there a way to view the output of scalac's -Xprint (particularly the
> lowest, -Xprint:jvm)

Not at the moment, no.

Sure. It might be a nice feature in the future.
 

> and java disassembly (e.g. through javap or Dava) using
> the eclipse plugin?

Doesn't Eclipse's built in classfile viewer do this job for you?
Failing that, I'm pretty sure there are several very capable bytecode
disassembler plugins around.

That's great, thanks! I'm pretty new to Eclipse, sorry.

Nicholas
dr2chase
Joined: 2009-03-07,
User offline. Last seen 3 years 34 weeks ago.
Re: eclipse plugin -Xprint and java disassembly

I can confirm that the combination of:

Eclipse 3.4.2
Scala 2.7.4
ASM Framework 2.2.1 http://download.forge.objectweb.org/eclipse-update/
Bytecode Outline 2.2.8 http://andrei.gmxhome.de/eclipse/

works for this purpose. I haven't tried 2.7.5 yet, I just noticed
that it's out there.

On 2009-06-03, at 7:39 PM, Nicholas Tung wrote:

> On Wed, Jun 3, 2009 at 16:35, Miles Sabin
> wrote:
> On Thu, Jun 4, 2009 at 12:07 AM, Nicholas Tung
> wrote:
> > Is there a way to view the output of scalac's -Xprint
> (particularly the
> > lowest, -Xprint:jvm)
>
> Not at the moment, no.
>
> Sure. It might be a nice feature in the future.
>
>
> > and java disassembly (e.g. through javap or Dava) using
> > the eclipse plugin?
>
> Doesn't Eclipse's built in classfile viewer do this job for you?
> Failing that, I'm pretty sure there are several very capable bytecode
> disassembler plugins around.
>
> That's great, thanks! I'm pretty new to Eclipse, sorry.
>
> Nicholas

Naftoli Gugenheim
Joined: 2008-12-17,
User offline. Last seen 42 years 45 weeks ago.
eclipse plugin -Xprint and java disassembly
Sure, double-click on the class file in the output folder from the Navigator view.
In general, it would be nice if eclipse could tell me the scala command line it generates so I could paste it in a command line and modify it, e.g. for the OP's use case, or to get around the fact that I don't seem to have enough memory to run the interpreter inside eclipse, etc.



From: Nicholas Tung <ntung@ntung.com>
Sent: Wednesday, June 03, 2009 7:39 PM
To: Miles Sabin <miles@milessabin.com>
Cc: scala-tools@listes.epfl.ch
Subject: Re: [scala-tools] eclipse plugin -Xprint and java disassembly

On Wed, Jun 3, 2009 at 16:35, Miles Sabin <miles@milessabin.com> wrote:
On Thu, Jun 4, 2009 at 12:07 AM, Nicholas Tung <ntung@ntung.com> wrote:
>     Is there a way to view the output of scalac's -Xprint (particularly the
> lowest, -Xprint:jvm)

Not at the moment, no.

Sure. It might be a nice feature in the future.
 

> and java disassembly (e.g. through javap or Dava) using
> the eclipse plugin?

Doesn't Eclipse's built in classfile viewer do this job for you?
Failing that, I'm pretty sure there are several very capable bytecode
disassembler plugins around.

That's great, thanks! I'm pretty new to Eclipse, sorry.

Nicholas
Nicholas Tung
Joined: 2009-05-19,
User offline. Last seen 42 years 45 weeks ago.
Re: eclipse plugin -Xprint and java disassembly
On Wed, Jun 3, 2009 at 17:20, Naftoli Gugenheim <naftoligug@gmail.com> wrote:
Sure, double-click on the class file in the output folder from the Navigator view.
In general, it would be nice if eclipse could tell me the scala command line it generates so I could paste it in a command line and modify it, e.g. for the OP's use case, or to get around the fact that I don't seem to have enough memory to run the interpreter inside eclipse, etc.

Yeah, I figured that out :) Thanks.
Try modifying eclipse.ini's -Xmx1024m (or, maybe, -Xmx8192m, depending on how bad your jvm is).

regards,
Nicholas

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland