2014-12-15 3 views
1

나는 내가 https://sites.google.com/site/ortegaalfredo/android here디버그 안드로이드 네이티브 바이너리

에서 다운로드 GDB가, 안드로이드 네이티브 바이너리를 디버깅 할하지만 난이 출력이 모든 이진 파일의

[email protected]:/data/local/tmp # ./gdb /system/bin/ls        


dlopen failed on 'libthread_db.so.1' - libthread_db.so.1: cannot open shared object file: No such file or directory 
GDB will not be able to debug pthreads. 

GNU gdb 6.8 
Copyright (C) 2008 Free Software Foundation, Inc. 
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> 
This is free software: you are free to change and redistribute it. 
There is NO WARRANTY, to the extent permitted by law. Type "show copying" 
and "show warranty" for details. 
This GDB was configured as "arm-none-linux-gnueabi"... 
(no debugging symbols found) 
(gdb) r 
Starting program: /system/bin/ls 
(no debugging symbols found) 

Program received signal SIGILL, Illegal instruction. 
0x40005a52 in rtld_db_dlactivity() from /system/bin/linker 

과 같은 오류가

나는 당신이 가진 것을 알고있는 것처럼 당신의 도움이

답변

1

에 대한 감사에 :

  1. 장치에 gdb-server 업로드 (간단한 방법은 디버그 가능 true로 설정 됨). 당신이 안드로이드 stiudio를 사용하는 경우 또한 사실 jniDebuggable을 설정 :

    android{ buildTypes { debug { jniDebuggable true debuggable true } } }

  2. 는 이와 같은 디버그 기호를 사용하여 기본 libs와 구축 : 응용 프로그램

    ndk-build NDK_DEBUG=1 APP_OPTIM=debug

  3. 실행을 장치 또는 에뮬레이터에 > 프로젝트 폴더에서 호출 < : ndk-gdb --verbose

+0

소스 코드가 없습니다. 그물에있는 바이너리 파일 일뿐입니다. – Bloodaxe

+0

디버그 정보가 없으면 바이너리를 디버그 할 수 없습니다. – Tpec1k

관련 문제