This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: compiler debugging...have to look at *.s?



Dachuan Yu writes:

> This is probably out of the question. But is there a way to add
> debug information into a tree so that it evaluates the tree and
> print out the result at runtime?

I don't think there is anything that supports that type of debug. When
executing jc1 on a source, one can use a debugger and call `debug_tree
()' on an expression to print the tree and such a statement could be
inserted in jc1's source where appropriate, but as I read the rest of
your email, this isn't what you're looking for.

> Can I somehow let it output the result of evaluating
> t1 when executing a.out? Or do I have to look at the
> *.s file to figure out whether things are compiled
> correctly?

You'll have to look at the output file. Gcc supports several
`-d<letter>' options to dump the results of compilation phases/passes
into specific files for inspection. `man gcc' will give you some
details.

./A


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]