GDK8上面也可以运行安卓系统,给喜欢调试安卓的同学提供了便利的研究条件。

安装gdb-multiarch

sudo apt install gdb-multiarch

设置环境变量

右键此电脑,点击属性,再点击高级系统设置

进入系统属性后,点击环境变量->选中PATH->点击编辑->点击新建->添加adb->点击确定

输入adb version,查看环境变量是否设置正确(能输出版本信息即可)。

启用开发者模式及调试模式

设置->关于设备->连续点击版本号->进入开发者模式
设置->更多设置->开发者选项->调试->网络ADB调试

建立ADB调试连接

查看GDK8的IP地址:设置->关于设备->IP地址
输入adb connect IP地址,端口号默认是5555

输入adb shell,即可进入GDK8内;输入su提升至管理员权限

GDK8的安卓上面自带了GDBServer。在命令行内输入gdbserver,就可以看到帮助信息

开始远程调试

新开一个命令行作为主机端;刚才的命令行作为目标端
主机端内输入 adb forward tcp:6000 tcp:6000
目的是将主机上的6000号端口的通信数据重定向到目标端的6000号端口上

目标端内输入gdbserver :6000 –attach 3438

主机端内输入gdb,再输入target remote :6000

警告

产生下方警告的原因有两个:

  1. 需要GDB-MulitArch
    原本的GDB输入set architecture 找不到arm架构->应该使用GDB-MulitArch
  2. 主机端的GDB要和目标端的GDBServer版本相互匹配

安装完GDB-MultiArch后重新尝试

geduer@gdk:~$ gdb-multiarch
GNU gdb (Ubuntu 8.1.1-0ubuntu1) 8.1.1
Copyright (C) 2018 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 "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word".
(gdb) target multiarch :6000
Undefined target command: "multiarch :6000".  Try "help target".
(gdb) target remote :6000
Remote debugging using :6000
Reading /system/bin/mediaserver from remote target...
warning: File transfers from remote targets can be slow. Use "set sysroot" to access files locally instead.
Reading /system/bin/mediaserver from remote target...
Reading symbols from target:/system/bin/mediaserver...Reading symbols from target:/system/bin/mediaserver...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading /system/bin/linker from remote target...
Reading /system/lib/libresourcemanagerservice.so from remote target...
Reading /system/lib/liblog.so from remote target...
Reading /system/lib/libmediaplayerservice.so from remote target...
Reading /system/lib/libutils.so from remote target...
Reading /system/lib/libbinder.so from remote target...
Reading /system/lib/libicuuc.so from remote target...
Reading /system/lib/android.hardware.media.omx@1.0.so from remote target...
Reading /system/lib/libc++.so from remote target...
Reading /system/lib/libc.so from remote target...
Reading /system/lib/libm.so from remote target...
Reading /system/lib/libdl.so from remote target...
Reading /system/lib/libmedia.so from remote target...
Reading /system/lib/libmediautils.so from remote target...
Reading /system/lib/libaudioclient.so from remote target...
Reading /system/lib/libcamera_client.so from remote target...
Reading /system/lib/libcrypto.so from remote target...
Reading /system/lib/libcutils.so from remote target...
Reading /system/lib/libgui.so from remote target...
Reading /system/lib/libhidlbase.so from remote target...
Reading /system/lib/libhidlmemory.so from remote target...
Reading /system/lib/libmedia_omx.so from remote target...
Reading /system/lib/libmediaextractor.so from remote target...
Reading /system/lib/libmediadrm.so from remote target...
Reading /system/lib/libmediametrics.so from remote target...
Reading /system/lib/libmemunreachable.so from remote target...
Reading /system/lib/libpowermanager.so from remote target...
Reading /system/lib/libstagefright.so from remote target...
Reading /system/lib/libstagefright_foundation.so from remote target...
Reading /system/lib/libstagefright_httplive.so from remote target...
Reading /system/lib/libvndksupport.so from remote target...
Reading /system/lib/libbase.so from remote target...
Reading /system/lib/libutilscallstack.so from remote target...
Reading /system/lib/android.hardware.graphics.bufferqueue@1.0.so from remote target...
Reading /system/lib/android.hardware.graphics.common@1.0.so from remote target...
Reading /system/lib/android.hardware.media@1.0.so from remote target...
Reading /system/lib/libhidltransport.so from remote target...
Reading /system/lib/libhwbinder.so from remote target...
Reading /system/lib/android.hidl.token@1.0-utils.so from remote target...
Reading /system/lib/libsonivox.so from remote target...
Reading /system/lib/libicui18n.so from remote target...
Reading /system/lib/libexpat.so from remote target...
Reading /system/lib/libaudioutils.so from remote target...
Reading /system/lib/libaudiomanager.so from remote target...
Reading /system/lib/libmedia_helper.so from remote target...
Reading /system/lib/libcamera_metadata.so from remote target...
Reading /system/lib/libnativewindow.so from remote target...
Reading /system/lib/android.hardware.graphics.common@1.1.so from remote target...
Reading /system/lib/libsync.so from remote target...
Reading /system/lib/libbufferhubqueue.so from remote target...
Reading /system/lib/libpdx_default_transport.so from remote target...
Reading /system/lib/libEGL.so from remote target...
Reading /system/lib/libGLESv2.so from remote target...
Reading /system/lib/libui.so from remote target...
Reading /system/lib/android.hardware.configstore@1.0.so from remote target...
Reading /system/lib/android.hardware.configstore-utils.so from remote target...
Reading /system/lib/android.hidl.memory@1.0.so from remote target...
Reading /system/lib/android.hidl.memory.token@1.0.so from remote target...
Reading /system/lib/libmediadrmmetrics_lite.so from remote target...
Reading /system/lib/libprotobuf-cpp-lite.so from remote target...
Reading /system/lib/android.hardware.drm@1.0.so from remote target...
Reading /system/lib/android.hardware.drm@1.1.so from remote target...
Reading /system/lib/libhidlallocatorutils.so from remote target...
Reading /system/lib/libdrmframework.so from remote target...
Reading /system/lib/libion.so from remote target...
Reading /system/lib/libnetd_client.so from remote target...
Reading /system/lib/libstagefright_codecbase.so from remote target...
Reading /system/lib/libstagefright_omx_utils.so from remote target...
Reading /system/lib/libstagefright_xmlparser.so from remote target...
Reading /system/lib/libRScpp.so from remote target...
Reading /system/lib/libziparchive.so from remote target...
Reading /system/lib/android.hidl.allocator@1.0.so from remote target...
Reading /system/lib/android.hardware.cas.native@1.0.so from remote target...
Reading /system/lib/android.hardware.graphics.allocator@2.0.so from remote target...
Reading /system/lib/android.hardware.graphics.mapper@2.0.so from remote target...
Reading /system/lib/android.hardware.cas@1.0.so from remote target...
Reading /system/lib/libbacktrace.so from remote target...
Reading /system/lib/android.hidl.token@1.0.so from remote target...
Reading /system/lib/libstdc++.so from remote target...
Reading /system/lib/libspeexresampler.so from remote target...
Reading /system/lib/libhardware.so from remote target...
Reading /system/lib/libgraphicsenv.so from remote target...
Reading /system/lib/android.hardware.graphics.mapper@2.1.so from remote target...
Reading /system/lib/android.hardware.configstore@1.1.so from remote target...
Reading /system/lib/libz.so from remote target...
Reading /system/lib/libunwind.so from remote target...
Reading /system/lib/libunwindstack.so from remote target...
Reading /system/lib/libdexfile.so from remote target...
Reading /system/lib/liblzma.so from remote target...
Reading /system/lib/extractors/libffmpegextractor.so from remote target...
Reading /system/lib/libffmpeg.so from remote target...
Reading /system/lib/libssl.so from remote target...
Reading /system/lib/libopus.so from remote target...
Reading /system/lib/vndk-sp-28/hw/android.hidl.memory@1.0-impl.so from remote target...
Reading /system/lib/vndk-sp-28/libcutils.so from remote target...
Reading /system/lib/vndk-sp-28/libhwbinder.so from remote target...
Reading /system/lib/vndk-sp-28/libbase.so from remote target...
Reading /system/lib/vndk-sp-28/libutils.so from remote target...
Reading /system/lib/vndk-sp-28/libhidlbase.so from remote target...
Reading /system/lib/vndk-sp-28/libhidltransport.so from remote target...
Reading /system/lib/vndk-sp-28/android.hidl.memory@1.0.so from remote target...
Reading /system/lib/vndk-sp-28/libc++.so from remote target...
Reading symbols from target:/system/bin/linker...Reading /system/bin/.debug/linker from remote target...
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libresourcemanagerservice.so...Reading symbols from target:/system/lib/libresourcemanagerservice.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/liblog.so...Reading symbols from target:/system/lib/liblog.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libmediaplayerservice.so...Reading symbols from target:/system/lib/libmediaplayerservice.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libutils.so...Reading symbols from target:/system/lib/libutils.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libbinder.so...Reading symbols from target:/system/lib/libbinder.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libicuuc.so...Reading symbols from target:/system/lib/libicuuc.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/android.hardware.media.omx@1.0.so...Reading symbols from target:/system/lib/android.hardware.media.omx@1.0.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libc++.so...Reading symbols from target:/system/lib/libc++.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libc.so...Reading /system/lib/.debug/libc.so from remote target...
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libm.so...Reading symbols from target:/system/lib/libm.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libdl.so...Reading symbols from target:/system/lib/libdl.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libmedia.so...Reading symbols from target:/system/lib/libmedia.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libmediautils.so...Reading symbols from target:/system/lib/libmediautils.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libaudioclient.so...Reading symbols from target:/system/lib/libaudioclient.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libcamera_client.so...Reading symbols from target:/system/lib/libcamera_client.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libcrypto.so...Reading symbols from target:/system/lib/libcrypto.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libcutils.so...Reading symbols from target:/system/lib/libcutils.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libgui.so...Reading symbols from target:/system/lib/libgui.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libhidlbase.so...Reading symbols from target:/system/lib/libhidlbase.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libhidlmemory.so...Reading symbols from target:/system/lib/libhidlmemory.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libmedia_omx.so...Reading symbols from target:/system/lib/libmedia_omx.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libmediaextractor.so...Reading symbols from target:/system/lib/libmediaextractor.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libmediadrm.so...Reading symbols from target:/system/lib/libmediadrm.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libmediametrics.so...Reading symbols from target:/system/lib/libmediametrics.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libmemunreachable.so...Reading symbols from target:/system/lib/libmemunreachable.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libpowermanager.so...Reading symbols from target:/system/lib/libpowermanager.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libstagefright.so...Reading symbols from target:/system/lib/libstagefright.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libstagefright_foundation.so...Reading symbols from target:/system/lib/libstagefright_foundation.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libstagefright_httplive.so...Reading symbols from target:/system/lib/libstagefright_httplive.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libvndksupport.so...Reading symbols from target:/system/lib/libvndksupport.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libbase.so...Reading symbols from target:/system/lib/libbase.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libutilscallstack.so...Reading symbols from target:/system/lib/libutilscallstack.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/android.hardware.graphics.bufferqueue@1.0.so...Reading symbols from target:/system/lib/android.hardware.graphics.bufferqueue@1.0.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/android.hardware.graphics.common@1.0.so...Reading symbols from target:/system/lib/android.hardware.graphics.common@1.0.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/android.hardware.media@1.0.so...Reading symbols from target:/system/lib/android.hardware.media@1.0.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libhidltransport.so...Reading symbols from target:/system/lib/libhidltransport.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libhwbinder.so...Reading symbols from target:/system/lib/libhwbinder.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/android.hidl.token@1.0-utils.so...Reading symbols from target:/system/lib/android.hidl.token@1.0-utils.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libsonivox.so...Reading symbols from target:/system/lib/libsonivox.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libicui18n.so...Reading symbols from target:/system/lib/libicui18n.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libexpat.so...Reading symbols from target:/system/lib/libexpat.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libaudioutils.so...Reading symbols from target:/system/lib/libaudioutils.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libaudiomanager.so...Reading symbols from target:/system/lib/libaudiomanager.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libmedia_helper.so...Reading symbols from target:/system/lib/libmedia_helper.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libcamera_metadata.so...Reading symbols from target:/system/lib/libcamera_metadata.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libnativewindow.so...Reading symbols from target:/system/lib/libnativewindow.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/android.hardware.graphics.common@1.1.so...Reading symbols from target:/system/lib/android.hardware.graphics.common@1.1.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libsync.so...Reading symbols from target:/system/lib/libsync.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libbufferhubqueue.so...Reading symbols from target:/system/lib/libbufferhubqueue.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libpdx_default_transport.so...Reading symbols from target:/system/lib/libpdx_default_transport.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libEGL.so...Reading symbols from target:/system/lib/libEGL.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libGLESv2.so...Reading symbols from target:/system/lib/libGLESv2.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libui.so...Reading symbols from target:/system/lib/libui.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/android.hardware.configstore@1.0.so...Reading symbols from target:/system/lib/android.hardware.configstore@1.0.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/android.hardware.configstore-utils.so...Reading symbols from target:/system/lib/android.hardware.configstore-utils.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/android.hidl.memory@1.0.so...Reading symbols from target:/system/lib/android.hidl.memory@1.0.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/android.hidl.memory.token@1.0.so...Reading symbols from target:/system/lib/android.hidl.memory.token@1.0.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libmediadrmmetrics_lite.so...Reading symbols from target:/system/lib/libmediadrmmetrics_lite.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libprotobuf-cpp-lite.so...Reading symbols from target:/system/lib/libprotobuf-cpp-lite.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/android.hardware.drm@1.0.so...Reading symbols from target:/system/lib/android.hardware.drm@1.0.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/android.hardware.drm@1.1.so...Reading symbols from target:/system/lib/android.hardware.drm@1.1.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libhidlallocatorutils.so...Reading symbols from target:/system/lib/libhidlallocatorutils.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libdrmframework.so...Reading symbols from target:/system/lib/libdrmframework.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libion.so...Reading symbols from target:/system/lib/libion.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libnetd_client.so...Reading symbols from target:/system/lib/libnetd_client.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libstagefright_codecbase.so...Reading symbols from target:/system/lib/libstagefright_codecbase.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libstagefright_omx_utils.so...Reading symbols from target:/system/lib/libstagefright_omx_utils.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libstagefright_xmlparser.so...Reading symbols from target:/system/lib/libstagefright_xmlparser.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libRScpp.so...Reading symbols from target:/system/lib/libRScpp.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libziparchive.so...Reading symbols from target:/system/lib/libziparchive.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/android.hidl.allocator@1.0.so...Reading symbols from target:/system/lib/android.hidl.allocator@1.0.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/android.hardware.cas.native@1.0.so...Reading symbols from target:/system/lib/android.hardware.cas.native@1.0.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/android.hardware.graphics.allocator@2.0.so...Reading symbols from target:/system/lib/android.hardware.graphics.allocator@2.0.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/android.hardware.graphics.mapper@2.0.so...Reading symbols from target:/system/lib/android.hardware.graphics.mapper@2.0.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/android.hardware.cas@1.0.so...Reading symbols from target:/system/lib/android.hardware.cas@1.0.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libbacktrace.so...Reading symbols from target:/system/lib/libbacktrace.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/android.hidl.token@1.0.so...Reading symbols from target:/system/lib/android.hidl.token@1.0.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libstdc++.so...Reading symbols from target:/system/lib/libstdc++.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libhardware.so...Reading symbols from target:/system/lib/libhardware.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libgraphicsenv.so...Reading symbols from target:/system/lib/libgraphicsenv.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/android.hardware.graphics.mapper@2.1.so...Reading symbols from target:/system/lib/android.hardware.graphics.mapper@2.1.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/android.hardware.configstore@1.1.so...Reading symbols from target:/system/lib/android.hardware.configstore@1.1.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libz.so...Reading symbols from target:/system/lib/libz.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libunwind.so...Reading symbols from target:/system/lib/libunwind.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libunwindstack.so...Reading symbols from target:/system/lib/libunwindstack.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libdexfile.so...Reading /system/lib/.debug/libdexfile.so from remote target...
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/liblzma.so...Reading symbols from target:/system/lib/liblzma.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/extractors/libffmpegextractor.so...Reading symbols from target:/system/lib/extractors/libffmpegextractor.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libffmpeg.so...(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libssl.so...Reading symbols from target:/system/lib/libssl.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/libopus.so...Reading symbols from target:/system/lib/libopus.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/vndk-sp-28/hw/android.hidl.memory@1.0-impl.so...Reading symbols from target:/system/lib/vndk-sp-28/hw/android.hidl.memory@1.0-impl.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/vndk-sp-28/libcutils.so...Reading symbols from target:/system/lib/vndk-sp-28/libcutils.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/vndk-sp-28/libhwbinder.so...Reading symbols from target:/system/lib/vndk-sp-28/libhwbinder.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/vndk-sp-28/libbase.so...Reading symbols from target:/system/lib/vndk-sp-28/libbase.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/vndk-sp-28/libutils.so...Reading symbols from target:/system/lib/vndk-sp-28/libutils.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/vndk-sp-28/libhidlbase.so...Reading symbols from target:/system/lib/vndk-sp-28/libhidlbase.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/vndk-sp-28/libhidltransport.so...Reading symbols from target:/system/lib/vndk-sp-28/libhidltransport.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/vndk-sp-28/android.hidl.memory@1.0.so...Reading symbols from target:/system/lib/vndk-sp-28/android.hidl.memory@1.0.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading symbols from target:/system/lib/vndk-sp-28/libc++.so...Reading symbols from target:/system/lib/vndk-sp-28/libc++.so...(no debugging symbols found)...done.
(no debugging symbols found)...done.
Reading /system/bin/linker from remote target...
0xf439a86c in __ioctl () from target:/system/lib/libc.so
[1]+  已停止               gdb-multiarch

这个时候再去调试GDK8就没有任何问题了;可以开启超爽的调试体验了。

(gdb) info threads
  Id   Target Id         Frame 
* 1    Thread 356.356 "mediaserver" 0xf439a86c in __ioctl () from target:/system/lib/libc.so
  2    Thread 356.419 "Binder:356_1" 0xf439a86c in __ioctl () from target:/system/lib/libc.so
  3    Thread 356.606 "HwBinder:356_1" 0xf439a86c in __ioctl () from target:/system/lib/libc.so
  4    Thread 356.738 "Binder:356_2" 0xf439a86c in __ioctl () from target:/system/lib/libc.so
  5    Thread 356.739 "Binder:356_3" 0xf439a86c in __ioctl () from target:/system/lib/libc.so
  6    Thread 356.1007 "MediaClock" 0xf4360d3c in syscall () from target:/system/lib/libc.so
  7    Thread 356.1008 "NuPlayerDriver " 0xf4360d3c in syscall () from target:/system/lib/libc.so
  8    Thread 356.1009 "generic" 0xf4360d3c in syscall () from target:/system/lib/libc.so
  9    Thread 356.1033 "FFmpegExtractor" 0xf4360d3c in syscall () from target:/system/lib/libc.so
  10   Thread 356.1054 "NuPlayerRendere" 0xf4360d3c in syscall () from target:/system/lib/libc.so
  11   Thread 356.1055 "NPDecoder" 0xf4360d3c in syscall () from target:/system/lib/libc.so
  12   Thread 356.1056 "NPDecoder-CL" 0xf4360d3c in syscall () from target:/system/lib/libc.so
(gdb) bt
#0  0xf439a86c in __ioctl () from target:/system/lib/libc.so
#1  0xf4368a06 in ioctl () from target:/system/lib/libc.so
#2  0xf47fc3f8 in android::IPCThreadState::talkWithDriver(bool) () from target:/system/lib/libbinder.so
#3  0xf47fc542 in android::IPCThreadState::getAndExecuteCommand() () from target:/system/lib/libbinder.so
#4  0xf47fcac2 in android::IPCThreadState::joinThreadPool(bool) () from target:/system/lib/libbinder.so
#5  0xb11b2c26 in main ()
(gdb) info sharedlibrary 
Remote connection closed
(gdb) 
作者:Taylor  创建时间:2022-01-06 18:22
最后编辑:Taylor  更新时间:2024-05-14 17:50