Re: [Jamvm-general] Jamvm seg faults on Mips ( Big endian )
Brought to you by:
rlougher
From: Robert L. <rob...@gm...> - 2011-08-02 11:02:39
|
Hi, On 2 August 2011 09:50, JediKnight <ver...@ya...> wrote: > > Hi Rob, > > Any pointers how to debug this ? > Debugging a JVM is not easy. First thing to always do is disable the (code-copying) JIT. This is for two reasons. If it now works the problem is likely to be invalid code from the JIT. You now have a really tough debugging task! If it still doesn't work the problem is in the rest of the VM. Turning off the JIT makes debugging far easier, as the PC now points to compiled C code rather than generated code, which confuses the debugger. On MIPS, the JIT is off by default in 1.5.4. It is on in 1.6.0. ./configure --disable-int-inlining Now run the executable in gdb. Before you run anything you want to do: handle SIGUSR1 nostop pass noprint Otherwise gdb will stop whenever a thread is suspended by the VM (e.g. for garbage collection). Now run your program. It should stop when the segv occurs, and you should be able to get a backtrace. This should be enough for getting on with. You'll probably want to poke about a bit, and print the values of various variables. By default JamVM is built with -O2 -g. The -O2 can make debugging harder, as some values will be optimised out by the compiler. So at this stage you might like to try disabling optimisation, e.g.: ./configure --disable-int-inlining CFLAGS=-g Of course, everything will run much slower. Rob. > /JediKnight > > -- > View this message in context: http://old.nabble.com/Jamvm-seg-faults-on-Mips-%28-Big-endian-%29-tp32089143p32176070.html > Sent from the JamVM mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA > The must-attend event for mobile developers. Connect with experts. > Get tools for creating Super Apps. See the latest technologies. > Sessions, hands-on labs, demos & much more. Register early & save! > http://p.sf.net/sfu/rim-blackberry-1 > _______________________________________________ > Jamvm-general mailing list > Jam...@li... > https://lists.sourceforge.net/lists/listinfo/jamvm-general > |