add logcat info

master
Seth Archambault 7 년 전
부모
커밋
ce7433d003
1개의 변경된 파일35개의 추가작업 그리고 1개의 파일을 삭제
  1. +35
    -1
      Working-for-Android.md

+ 35
- 1
Working-for-Android.md

@ -260,4 +260,38 @@ This command may also help.
## Error: INSTALL_FAILED_DEXOPT ## Error: INSTALL_FAILED_DEXOPT
This one was easier. The Apk generated must contain classes/classes.dex. If it doesn't, check aapt package -f -M to make sure you are including the folder dex is in at the end of it.
This one was easier. The Apk generated must contain classes/classes.dex. If it doesn't, check aapt package -f -M to make sure you are including the folder dex is in at the end of it.
## Dealing with Segmentation Faults - Using adb logcat
In the event of a segfault, don't despair! You can get the entire backtrace using adb logcat.
```
adb logcat "libc:*" "DEBUG:*" "*:S"
```
This gives you everything tagged with libc or DEBUG. "*:S" is there to Silence all other stuff.
Now, you may see a message that says "Suppressing debuggerd output because prctl(PR_GET_DUMPABLE)==0"
In that case you have to set this to 1.
In your c code, dd this include statement, and the prctl command somewhere early on in your main():
```
#include <sys/prctl.h>
...
prctl(PR_SET_DUMPABLE, 1, 0, 0, 0);
```
Here's a more robust logcat command:
```
adb logcat "threaded_app:*" "raylib:*" "libc:*" "DEBUG:*" "InputDispatcher:*" "JavaBinder:*" "WindowState:*" "Eve:*" "ViewRootImpl:*" "*:S"
```
Or be brave and try to find the important tags yourself:
```
adb logcat "*:*"
```

불러오는 중...
취소
저장