|Need Help Running Eclipse to debug C/C++ when running JNI [message #1783778]
||Fri, 16 March 2018 19:56
| Jim Anderson
Registered: October 2014
I'm developing software largely in Java, but I have some old code written in C that I would like to call from Java. Currently, I'm bringing myself up-to-speed on using JNI. I have written java code to call the C code and can run the program from the command line. The JNI calls run, but there are obvious errors in the results. I would like to step through the code in Eclipse.|
I have installed the CDT plugin into Oxygen (Eclipse 4.7) and I can run the code in Eclipse. I can set breakpoints in java and step through code, but I cannot stop in the C code.
I found a bit of guidance at [url=https://stackoverflow.com/questions/2762916/how-to-use-eclipse-to-debug-jni-code-java-c-c#11636347[/url], but that thread addresses running in an android environment, which I am not doing. I was encouraged to see this in the thread:
I'm resurrecting this comment to note that Java code can be debugged at the same time as Native JNI code. To do so, start by Debugging as an Android Native Application. Next attach to the Android process in the ADT Devices tab (select process, and click the green bug icon). Breakpoints in both Java and C++ code will now be hit. Not quite seamless, but close enough. Piklor Aug 22 '14
My problem at this point is that when I run my java project, I see only, "Run As A Java Application", but I have no option to run as a native application. I'm not sure where to look next, but I am still searching. Can anyone point me to documentation that will help or suggest how to get Eclipse to stop in the C/C++ when debugging?
Powered by FUDForum
. Page generated in 0.03489 seconds