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]
Other format: [Raw text]

Re: [GCCWiki] Page change How+to+BC+compile+with+GCJ


How do I opt-out of getting these emails?

Also, I seem to have misplaced both my username and my password
for the wiki, and the wiki doesn't seem to offer any way to find
out either! Anybody know how to get this info out of the wiki?

Thanks.


--- anonymous@sourceware.org wrote:

> Page change How+to+BC+compile+with+GCJ
> Edited by: RobinGreen
> http://gcc.gnu.org/wiki/How%20to%20BC%20compile%20with%20GCJ?action=diff
> 
> How to BC compile with GCJ 11 2005-04-13T05:18:41+00:00
> How to BC compile with GCJ 12 2005-07-24T13:55:27+00:00
> @@ -59,6 +59,30 @@
>   
>   !!Examples
>   
>   Interested in some real life examples?
> - Head over to the [GNU Classpath
> Showcase|http://developer.classpath.org/mediation/ClasspathShowcase] page.
> + Head over to the [GNU Classpath Showcase|] page.
>   There you can see how easy it is to build native Eclipse.
> + 
> + !!Troubleshooting
> + 
> + !1. How can I tell whether code is running in interpreted mode or native
> mode?
> + 
> + Run the app under gdb and set a breakpoint in your code. Breakpoints set on
> interpreted code will not work at all (however, some breakpoints may fail to
> work anyway due to other gdb bugs, so don't rely on that as an indication),
> and interpreted code will appear in gdb backtraces as
> <code>~_Jv_InterpMethod::run</code> or similar.
> + 
> + Alternatively, there is a quirk in gij 4.0 that you can take advantage of.
> Stack traces from gij will show "(Unknown Source)" for lines that are being
> interpreted, and line numbers for native libraries that have been compiled
> with -g (at *both* the source->bytecode compiling stage and the
> bytecode->native compiling stage). *NOTE:* This "(Unknown Source)" quirk will
> go away in 4.1.
> + 
> + !2. My code is running in interpreted mode, even though I followed the
> instructions above. Why?
> + 
> + In gcc 4.0, no errors are reported for <code>.jar.so</code> files that fail
> to load for some reason - they are just silently ignored. This policy may be
> changed in future.
> + 
> + There are two likely reasons for code to be incorrectly running in
> interpreted mode:
> + 
> + a) You forgot to compile code that uses JNI (Java Native Interface) with
> the <code>-fjni</code> compiler option. In this case the VM will repeatedly
> try, and fail, to load and link the library, each time it tries to load a
> class corresponding to that library. (The library fails to link because it
> tries to link in CNI style, which fails.)
> + 
> + or
> + 
> + b) Your mapping file (e.g. <code>classmap.db</code>) is out of date, or not
> on the <code>gnu.gcj.compiled.db.path</code>
> + 
> + !3. When I run my application under gdb, gdb is loading my library many
> times, over and over again
> + 
> + You probably forgot to specify <code>-fjni</code> when you compiled. See
> 2.a. above.
> 
> 



		
____________________________________________________
Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 


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