This is the mail archive of the gdb-prs@sources.redhat.com mailing list for the GDB project.


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

gdb/204: JNI debugging, "error while loading shared libraries"



>Number:         204
>Category:       gdb
>Synopsis:       JNI debugging, "error while loading shared libraries"
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Aug 27 10:48:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     croft@mitem.com
>Release:        insight+dejagnu-20010703
>Organization:
>Environment:
RH 7.1
>Description:
I'd like to use gdb/insight to debug our Java JNI native functions, written in C.  A very tiny test program (below), runs fine without insight ("java hi" from the shell).

public class hi {
    public static void main(String[] args) {
        System.out.println("hello world");
    }
}

But firing up java with insight (the java wrapper looks at export DEBUG_PROG=gdb), gets the following error as soon as I "run hi" from the gdb console:

/usr/share/jbuilder5/jdk1.3/bin/i386/native_threads/java: error while loading shared libraries: libhpi.so: cannot load shared object file: No such file or directory

----

Do you have any ideas or workarounds?  I put a "sh -x" on the java wrapper and it IS setting up LD_LIBRARY_PATH correctly.  Otherwise it wouldnt work in the case without insight.  I even tried manually adding the java libdirs to /etc/ld.so.conf, that didnt work either.

I'm running insight+dejagnu-20010703

BTW, I get the same failure from insight in "-nw" no windows mode.  And from gdb 5.0rh-5.  The OS here is RH7.1.

Thanks for your ideas.

--William
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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