zoukankan      html  css  js  c++  java
  • Debugging Native Code for android

    from:http://the-b.org/Android 

    Debugging Native Code

    If you're working on the framework, you're in luck. Debugging native code is pretty easy. Here is how to do it for the emulator. For actual devices, you can forgo the port forwarding and substitute something else in for generic.

    I'm assuming you're debugging a Java application which calls out to a native library here. You can also replace app_process with system_server or any other binary.

    1. cd ~/mydroid
    2. lunch (select your target here: generic-eng)
    3. telnet localhost 5554
      1. In telnet, type: redir add tcp:10000:10000
      2. Press CTRL-] and, at the telnet> prompt, type: quit
    4. In another window: adb shell gdbserver 10.0.2.15:10000 --attach <PID of program>
    5. arm-eabi-gdb out/target/product/generic/symbols/system/bin/app_process
    6. In gdb, type: set solib-search-path out/target/product/generic/symbols/system/lib:out/target/product/generic/symbols/system/bin
    7. In gdb, type: target remote localhost:10000
    loop's blog
  • 相关阅读:
    隔行扫描 和 逐行扫描
    CSS3--关于z-index不生效问题
    vue与其他框架对比
    跨域(转)
    vue 事件修饰符(阻止默认行为和事件冒泡)
    vue 3.0新特性
    bash leetcode
    数据库
    css排版
    盒模型
  • 原文地址:https://www.cnblogs.com/goodloop/p/1738819.html
Copyright © 2011-2022 走看看