Git Product home page Git Product logo

Comments (2)

shortybin avatar shortybin commented on August 19, 2024

问题描述

已经成功获取 crashLog.txt, 但是解析的时候遇到错误:

york@ubuntu:~/AndroidStudioProjects/Chapter01/tools/mac$ aarch64-linux-android-addr2line -f -C -e /home/york/AndroidStudioProjects/Chapter01/sample/build/intermediates/transforms/mergeJniLibs/debug/0/lib/armeabi-v7a/libcrash-lib.so 0x600
??
??:0

Google 搜索到的解决方案(未验证)

搜索许久,发现这篇博客上说:

解决出现 ??:0 , 没法展示源代码行数的问题
在Android.mk 文件中:

Java代码

LOCAL_CFLAGS := -D__STDC_CONSTANT_MACROS -Wl,-Map=test.map -g  

补充2个编译参数

-Wl,-Map=test.map -g .

增加gcc警告和调试标志

问题

sample 里用的是 CMAKE, 写法与 .mk 有所区别,能指导一下如何配置这个属性去解决这个问题吗?

我也遇到跟你同样的问题,应该是最后的发生 crash 的位置和寄存器信息地址写错了
ine -f -C -e /home/york/AndroidStudioProjects/Chapter01/sample/build/intermediates/transforms/mergeJniLibs/debug/0/lib/armeabi-v7a/libcrash-lib.so 0x600

0x600 应该修改为之前分析文件的 crash 地址 比如:

Thread 0 (crashed)//crash 发生时候的线程
0 libcrash-lib.so + 0x77e//发生 crash 的位置和寄存器信息

修改为 0x77e 我是如此解决的

from chapter01.

YummyLau avatar YummyLau commented on August 19, 2024

@aixiaozi 是因为你使用错so的问题,你跑的是64位及机器,所以应该用 arm64-v8a/libcrash-lib.so 而非 armeabi-v7a/libcrash-lib.so

from chapter01.

Related Issues (20)

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.