C++ Program with JNI invoking failed to run in gdb -


this question has answer here:

i wrote c++ program. invokes functions provided libhdfs(hdfs api c++, implemented jni) , runs ok when executed. when use gdb launch program , input run command. program fails run , got following error message in gdb context:

[thread debugging using libthread_db enabled] [new thread 0x40100940 (lwp 18482)] [new thread 0x40201940 (lwp 18483)] ... [new thread 0x41514940 (lwp 18502)]  program received signal sigsegv, segmentation fault. 0x00002aaaac26c862 in ?? () 

i use command shell echo $classpath in gdb context. shows correct hdfs related environment.

i searched google , stackoverflow. did not idea.

any tip?

why java app crash in gdb runs in real life? provided solution:

handle sigsegv nostop noprint pass

while, not elegant.


Comments

Popular posts from this blog

java - Unable to make sub reports with Jasper -

sql - The object name contains more than the maximum number of prefixes. The maximum is 2 -

Java Web Service Soap fault exception client -