To get the main file read in gdb, you need to add the Java virtual machine to it. it
gdb /usr/local/jdk1.8.0_66/bin/java core
he will most likely tell you that tons of characters were not found (which is normal, these are JVM characters). However, a JNI call that crashes may appear on your stack if you type "bt". For example, in my situation, when I encountered an error in my own library, I wrote:
(gdb) bt
The first 6 frames are related to the failure process itself. The signal was caught and sent. And although we do not know the exact functions, it does not matter. Starting from frame 7, we are in the JNI library that we wrote. And if the symbols were still attached, you will see them.
#7 0x00007fd5ff43bf7e in FftResampler::resample(Complex const*, int) () from /I/home/werner/BpmDj/NextGen/Beta/Desktop/test/libzathras-46703-64.so
And starting at frame 14, we return to the java land.
#14 0x00007fd6097a29e1 in ?? ()
So, you see that it is impossible to get full information from the main files through gdb. Just remember to add jvm as your first argument.
It is possible that gdb cannot find its own library. In this case, you can load the characters manually as follows:
gdb> symbol file libzathras-46703-64.so
If you need more information, you might want to compile your c / C ++ code with debugging information enabled. Typically, with the mingw and gcc compiler, you add -g to the command line options. This will provide you with the following information, which includes line numbers, etc.