विकास पर्यावरण में सक्षम नहीं आवेदन जिसमें धागे मूल में लॉन्च किया जाएगा। मैंने धागे में एक ब्रेक प्वाइंट पकड़ा। (जब मैंने गैलेक्सी एस 2 पर कोशिश की तो मुझे एक त्रुटि मिल रही थी, "इस प्लेटफॉर्म में थ्रेड डीबगिंग समर्थित नहीं है"। इसलिए मैंने एवीडी 2.3.3 लेवल 10 बनाया)।एंड्रॉयड में NDK-gdb में तोड़ बिंदु हिट करने के लिए
इस के बाद मैं इस
#0 0xafd0c51c in epoll_wait() from /Volumes/SecureCode/webos/rta/android/obj/local/armeabi/libc.so
#1 0xa81216a6 in ??()
की तरह एक त्रुटि हो रही थी मैं googled और इस Solution (Link Here).
पाया मैं वहाँ
$ adb pull /system/lib lib
$ ndk-gdb
...
(gdb) set solib-search-path lib
संबंधी दिशा-निर्देश का पालन किया लेकिन इस के बाद भी मैं नहीं कर रहा हूँ ब्रेक पॉइंट हिट करने में सक्षम। मैं अभी भी इस poll_wait() पर अटक गया हूं और आगे नहीं बढ़ रहा हूं।
D:\EclipseTestWorkspace\CallbackJava>sh
sh-4.1$ ndk-gdb --force --start --verbose
Android NDK installation path: /cygdrive/c/Android/android-ndk
Using default adb command: /cygdrive/c/Android/android-sdk-windows/platform-tools/adb
ADB version found: Android Debug Bridge version 1.0.29
Using final ADB command: '/cygdrive/c/Android/android-sdk-windows/platform-tools/adb'
Using auto-detected project path: .
Found package name: com.callback
ABIs targetted by application: armeabi
Device API Level: 10
Device CPU ABI: armeabi
Compatible device ABI: armeabi
Found debuggable flag: true
Found device gdbserver: /data/data/com.callback/lib/gdbserver
Using gdb setup init: ./libs/armeabi/gdb.setup
Using toolchain prefix: /cygdrive/c/Android/android-ndk/toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows/bin/arm-linux-androideabi-
Using app out directory: ./obj/local/armeabi
Found data directory: '/data/data/com.callback'
Found first launchable activity: .CallbackJavaActivity
Launching activity: com.callback/.CallbackJavaActivity
## COMMAND: /cygdrive/c/Android/android-sdk-windows/platform-tools/adb shell am start -n com.callback/.CallbackJavaActivity
Starting: Intent { cmp=com.callback/.CallbackJavaActivity }
## COMMAND: /cygdrive/c/Android/android-sdk-windows/platform-tools/adb shell sleep 2
Found running PID: 352
Launched gdbserver succesfully.
## COMMAND: /cygdrive/c/Android/android-sdk-windows/platform-tools/adb shell run-as com.callback lib/gdbserver +debug-socket --attach 352
Setup network redirection
## COMMAND: /cygdrive/c/Android/android-sdk-windows/platform-tools/adb forward tcp:5039 localfilesystem:/data/data/com.callback/debug-socket
## COMMAND: /cygdrive/c/Android/android-sdk-windows/platform-tools/adb pull /system/bin/app_process obj/local/armeabi/app_process
Attached; pid = 352
Listening on sockaddr socket debug-socket
19 KB/s (5660 bytes in 0.281s)
Pulled app_process from device/emulator.
## COMMAND: /cygdrive/c/Android/android-sdk-windows/platform-tools/adb pull /system/lib/libc.so obj/local/armeabi/libc.so
80 KB/s (273868 bytes in 3.325s)
Pulled libc.so from device/emulator.
GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "--host=i586-mingw32msvc --target=arm-elf-linux".
(no debugging symbols found)
Error while mapping shared library sections:
/system/bin/linker: No such file or directory.
----- So many similar errors -----
Error while mapping shared library sections:
gralloc.default.so: No such file or directory.
(no debugging symbols found)
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.
warning: shared library handler failed to enable breakpoint
0xafd0c51c in epoll_wait() from D:/EclipseTestWorkspace/CallbackJava/obj/local/armeabi/libc.so
(gdb) set solib-search-path lib
Error while mapping shared library sections:
/system/bin/linker: No such file or directory.
Error while mapping shared library sections:
gralloc.default.so: No such file or directory.
Symbol file not found for /system/bin/linker
Reading symbols from D:\EclipseTestWorkspace\CallbackJava/lib/libc.so...(no debugging symbols found)...done.
Loaded symbols for D:\EclipseTestWorkspace\CallbackJava/lib/libc.so
----- So many similar errors -----
Loaded symbols for D:\EclipseTestWorkspace\CallbackJava/lib/libwebcore.so
Symbol file not found for gralloc.default.so
(gdb) file ./libs/armeabi/libcallbacks.so
A program is being debugged already.
Are you sure you want to change the file? (y or n) y
Reading symbols from D:\EclipseTestWorkspace\CallbackJava/./libs/armeabi/libcallbacks.so...(no debugging symbols found)...done.
(gdb) file ./obj/local/armeabi/libcallbacks.so
A program is being debugged already.
Are you sure you want to change the file? (y or n) y
Reading symbols from D:\EclipseTestWorkspace\CallbackJava/./obj/local/armeabi/libcallbacks.so...done.
(gdb) break callbacks_java.cpp:appcallback_register
Breakpoint 1 at 0x1a64: file D:/EclipseTestWorkspace/CallbackJava/jni/callbacks_java.cpp, line 419.
(gdb) info breakpoints
Num Type Disp Enb Address What
1 breakpoint keep y 0x00001a64 in appcallback_register at D:/EclipseTestWorkspace/CallbackJava/jni/callbacks_java.cpp:419
(gdb) where
#0 0xafd0c51c in epoll_wait() from D:\EclipseTestWorkspace\CallbackJava/lib/libc.so
#1 0xa81211b4 in android::Looper::pollInner() from D:\EclipseTestWorkspace\CallbackJava/lib/libutils.so
#2 0x00000000 in ??()
(gdb) where
#0 0xafd0c51c in epoll_wait() from D:\EclipseTestWorkspace\CallbackJava/lib/libc.so
#1 0xa81211b4 in android::Looper::pollInner() from D:\EclipseTestWorkspace\CallbackJava/lib/libutils.so
#2 0x00000000 in ??()
(gdb) c
Continuing.
Warning:
Cannot insert breakpoint 1.
Error accessing memory address 0x1a64: Input/output error.
(gdb)
कौन सा मैं तो पिछले त्रुटि से क्या मैं समझता हूँ अपनी पूर्ण पते 0x1a64 विचार कर रहा है के रूप में
(gdb) file ./libs/armeabi/libcallbacks.so
A program is being debugged already.
Are you sure you want to change the file? (y or n) y
Reading symbols from D:\EclipseTestWorkspace\CallbackJava/./libs/armeabi/libcallbacks.so...(no debugging symbols found)...done.
(gdb) file ./obj/local/armeabi/libcallbacks.so
A program is being debugged already.
Are you sure you want to change the file? (y or n) y
Reading symbols from D:\EclipseTestWorkspace\CallbackJava/./obj/local/armeabi/libcallbacks.so...done.
(gdb) break callbacks_java.cpp:appcallback_register
Breakpoint 1 at 0x1a64: file D:/EclipseTestWorkspace/CallbackJava/jni/callbacks_java.cpp, line 419.
(gdb) info breakpoints
Num Type Disp Enb Address What
1 breakpoint keep y 0x00001a64 in appcallback_register at D:/EclipseTestWorkspace/CallbackJava/jni/callbacks_java.cpp:419
(gdb) where
#0 0xafd0c51c in epoll_wait() from D:\EclipseTestWorkspace\CallbackJava/lib/libc.so
#1 0xa81211b4 in android::Looper::pollInner() from D:\EclipseTestWorkspace\CallbackJava/lib/libutils.so
#2 0x00000000 in ??()
(gdb) where
#0 0xafd0c51c in epoll_wait() from D:\EclipseTestWorkspace\CallbackJava/lib/libc.so
#1 0xa81211b4 in android::Looper::pollInner() from D:\EclipseTestWorkspace\CallbackJava/lib/libutils.so
#2 0x00000000 in ??()
(gdb) c
Continuing.
Warning:
Cannot insert breakpoint 1.
Error accessing memory address 0x1a64: Input/output error.
(gdb)
मुख्य भाग पर ध्यान केंद्रित करना चाहते हैं। यह सापेक्ष पता (रनटाइम पता) पर विचार नहीं कर रहा है, इसलिए ब्रेक पॉइंट को हिट करने में सक्षम नहीं है। और यह epoll_wait() पर अटक गया, आगे नहीं बढ़ रहा है।
क्या कोई मेरी मदद करेगा कृपया आगे कैसे आगे बढ़ सकता है?
धन्यवाद & सादर,
SSuman185