Debugging JNI shared libraries
From: Dave Neary (real.addressinthesig_at_thisoneis.invalid)
Date: 10/07/03
- Next message: Floris van den Berg: "Re: Dumb Windows linking question."
- Previous message: goose: "Re: Simply Linux Invoice Program"
- Next in thread: Alf P. Steinbach: "Re: Debugging JNI shared libraries"
- Reply: Alf P. Steinbach: "Re: Debugging JNI shared libraries"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 07 Oct 2003 09:49:44 GMT
Hi all,
I have been trying to get some JNI code working on Win32 (the code is
libxmlj from the classpathx project). Compiles fine on Linux, and
compiles OK on Win32 when I have teh requisite stuff installed and I'm
using mingw, and I make a few changes (I really should learn how to use
Visual Studio).
I load my DLL/so via System.loadLibrary, and on Linux things go off
without a hitch. On Win32, I get an access violation, attempt to
reference object at address 0x00000... - looks like a null pointer
dereference to me. So I compiled the Linux .so with efence (hoping to
provoke a core dump in an environment that I know pretty well, and
diagnose the problem), but I have not been able to replicate the problem
at all.
Which brings me to my question. How can I debug this kind of thing on
Win32? Is there a way to load a DLL in a debugger, and (say) when
DllMain gets called, attach to the dll? How can I go about localising
the problem? The best option available to me at the moment seems to be a
bunch of printfs, which will perhaps help localise things. It would be
nice to get a core dump/stack trace though.
So - any Win32 people with good debugging tips for debugging shared
objects?
Thanks for your help,
Cheers,
Dave.
--
David Neary,
E-Mail: bolsh at gimp dot org
Work e-mail: d dot neary at phenix dot fr
CV: http://www.redbrick.dcu.ie/~bolsh/CV/CV.html
- Next message: Floris van den Berg: "Re: Dumb Windows linking question."
- Previous message: goose: "Re: Simply Linux Invoice Program"
- Next in thread: Alf P. Steinbach: "Re: Debugging JNI shared libraries"
- Reply: Alf P. Steinbach: "Re: Debugging JNI shared libraries"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|