android studio debug android run

2020-01-02  本文已影响0人  火把_033f

目标

debug android runtime native code

环境

已经编译好aosp 源码 版本10

步骤

  1. 新建native project


    image.png
  2. debug

  3. pause project in native debug window


    image.png
  4. add-dsym your_path_to_libart.so
    其中路径大概是
    aosp/out/target/product/generic_x86_64/symbols/apex/com.android.runtime/lib64/libart.so

  5. settings set target.source-map art your_art_path_in_project

your_art_path_in_project 是预先把art源码拷贝到as中的位置

然后用鼠标下个断点,触发它


image.png

nice!

参考

https://github.com/tiann/android-native-debug

上一篇 下一篇

猜你喜欢

热点阅读