Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » How to debug C++ library called by JNI wrapper
How to debug C++ library called by JNI wrapper [message #1061436] Fri, 31 May 2013 15:38
Jorge Arévalo is currently offline Jorge ArévaloFriend
Messages: 1
Registered: May 2013
Junior Member
Hello,

I'm executing a Java desktop application. At some point, the code calls a C++ library, via JNI wrapper. This call causes an error that kills the jvm. The error message is: double free or corruption. I want to be able to debug the C code, to look what's happening.

I've read the CDT FAQs about debugging C++ code. I've also tried these steps. I'm stuck in the "launch the cdt debugger" part. I've tried it, creating a new "C++ attach to application" debug configuration, selecting as application the .so library that contains the C++ code.

I add a breakpoint just before the JNI call. And I add a breakpoint in the C++ code to be called to. When the JNI call is reached, I launch the new debug configuration, and I attach it to the existent java process. The debugger starts, but I get the error:

No source file named /path/to/my/source_file.c


Being source_file.c the C++ file where I put the breakpoint. But the fact is the file does exist. Eclipse/GDB can't find it. So, the debugger starts running, and I can even hit 'next' or 'step' buttons. But every time I hit one of them, I get a message like this:

No source available for <hexadecimal_number>

And I must kill the debug session.

I've added the path to the folder where my C++ sources are to the debug configuration, but still, the debugger is not able to find them. Am I missing some needed configuration option?

Many thanks in advance, and best regards
Previous Topic:Problem configuring Eclipse CDT Version: 3.3.2
Next Topic:can't debug program with scanf
Goto Forum:
  


Current Time: Thu Apr 25 15:51:24 GMT 2024

Powered by FUDForum. Page generated in 0.02602 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top