Git Product home page Git Product logo

jnitest's Introduction

JNI调试方法:

1.debugger: Andorid Stuidio上使用debugger 打断点调试。详细使用:https://developer.android.google.cn/studio/debug

2.ndk-gdb: 命令行工具 类似gdb,与debugger功能差不多: https://developer.android.google.cn/ndk/guides/ndk-gdb

3.ndk-stack: 在代码异常退出(crash)时,调用ndk-stack 分析错误位置。 详细使用:https://developer.android.google.cn/ndk/guides/ndk-stack

4.checkjni: checkjni会在运行时进行错误检查检查。 打开checkjni开关命令: adb shell setprop debug.checkjni 1

JNI内存问题调试:(需要模拟器支持) 1.libc debug 模式:adb shell setprop libc.debug.malloc 1 (目前没发现起作用)

2.valgrind工具: 但是这个工具在android里运行太慢,Android里的bionic库提供了内存泄漏的检测方法

3.strace: 显示系统调用

JNI方法签名生成: Javap zhangzhilin@zhangzhilin:~/JniTest/app/build/intermediates/javac/debug/classes$ javap -classpath com/example/jnitest/ -p -s MainActivity

jnitest's People

Contributors

zhangzhilin1991 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.