Date: Thu, 26 Feb 2009 15:15:57 -0600 From: Swamy Venkataramanappa <Swamy.Venkataramanappa@Sun.COM> To: Brian Gardner <brian@experts-exchange.com> Cc: bsd-port-dev@openjdk.java.net, freebsd-java@freebsd.org Subject: Re: gdb and java Message-ID: <49A7068D.7050001@sun.com> In-Reply-To: <49A7017C.3020302@experts-exchange.com> References: <49A6F84E.1080504@experts-exchange.com> <49A6FD5C.3070107@sun.com> <49A7017C.3020302@experts-exchange.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Probably library path is not set correctly. So try this trick. public class PrintLibraryPath { public static void main(String[] args) { System.out.println(System.getProperty("java.library.path")); } } env LD_LIBRARY_PATH=`java PrintLibraryPath` gdb java .. -swamy Brian Gardner wrote: > Thanks Swamy, > Same thing happens using java directly. > > Swamy Venkataramanappa wrote: > >> jmap is actually a java program. jmap executable is simple launcher >> just like a java launcher. >> It launches java program and runs JMap.class from sa-jdi.jar or runs >> attach on demand >> code and attaches to the running jvm. SA based jmap can be run like this >> >> java -classpath <jdkhome>/sa-jdi.jar sun.jvm.hotspot.tools.JMap >> -finalizerinfo <pid> >> >> -Swamy >> >> Brian Gardner wrote: >> >>> I've had success in debugging java using jdb, however this doesn't >>> seem to support native debugging. I'd like to use gdb but this >>> doesn't work with (the error is bellow). Currently I'm printing to >>> stderr from native code but this is less than ideal and time >>> consuming, any ideas? >>> >>> # gdb jmap >>> (gdb) run -finalizerinfo 118 >>> Starting program: >>> /usr/home/brian/openjdk6/freshv2.2/bsd-port6.modified/build/bsd-amd64/j2sdk-image/bin/jmap >>> -finalizerinfo 118 >>> (no debugging symbols found)...(no debugging symbols found)...[New >>> LWP 104363] >>> (no debugging symbols found)...(no debugging symbols found)...[New >>> Thread 0x800b01120 (LWP 104363)] >>> [New LWP 104363] >>> >>> Program received signal SIGTRAP, Trace/breakpoint trap. >>> [Switching to LWP 104363] >>> Cannot remove breakpoints because program is no longer writable. >>> It might be running in another process. >>> Further execution is probably impossible. >>> 0x000000080050d360 in ?? () from /libexec/ld-elf.so.1 >>> (gdb) >>> >>> >>> >>> >>> >> > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?49A7068D.7050001>