---
title: "JNI debug"
author: "dikar"
date: "2011-12-07T17:37:44Z"
tags: []
categories: ["开源软件"]
slug: "jni-debug"
draft: false
lastmod: "2011-12-07T17:37:44Z"
id: 1296456
url: "https://dikar.iteye.com/blog/1296456"
---

需要调用一个jni，有java和C++的源码，但是对于运行过程中出现的问题还是不好排查，故这时需要进行debug了。这个debug涉及java到C/C++的，所以不是那么直接，故找了些资料学习下。

 

 

1：调试集成 Java 和 C/C++ 的代码（对着例子跑通基本就可以了）

http://www.ibm.com/developerworks/cn/java/j-jnidebug/

 

 

 

2：Linux\_Macintosh 平台下 Eclipse 环境中的 JNI 混合语言调试

http://www.ibm.com/developerworks/cn/opensource/os-cn-ecl-jnidb/

 

3：Integrated Debugger for Java\*/JNI Environments

http://software.intel.com/en-us/articles/integrated-debugger-for-javajni-environments/

 

 

4：Support seamless debugging between JDT and CDT

http://wiki.eclipse.org/index.php/Support\_seamless\_debugging\_between\_JDT\_and\_CDT

 

 

5：A step-by-step guide for debugging native code

http://www.eclipse.org/sequoyah/documentation/native\_debug.php

 

 

6：How to Use Eclipse to Debug JNI code (Java & C/C++)

http://stackoverflow.com/questions/2762916/how-to-use-eclipse-to-debug-jni-code-java-c-c

 

 

附：GDB文档：

 

陈皓  用GDB调试程序 系列

http://blog.csdn.net/haoel/article/details/2879

 

Debugging with gdb

[http://sourceware.org/gdb/onlinedocs/gdb/](http://sourceware.org/gdb/onlinedocs/gdb/)