gdbserver

How to debug an Dalvik executable on Android with GDB?

你说的曾经没有我的故事 提交于 2019-12-03 03:52:39
I want to debug an android application using GDB, I do not have the source code and I am used to GDB. Would anyone know how to do that? It seems I would need to attach to the process of the application and use gdbserver but I have not really found a good tutorial on how to do that... Thanks! There might not be step-by-step tutorials, but people have been using a gdbserver to debug JNI apps. Check the following links: http://honeypod.blogspot.com/2008/01/debug-native-application-for-android.html http://vilimpoc.org/blog/2010/09/23/hello-gdbserver-a-debuggable-jni-example-for-android/ http:/

gdb remote cross debugging fails with “Remote 'g' packet reply is too long”

吃可爱长大的小学妹 提交于 2019-12-03 01:55:30
I have a problem with remote debugging. Host: laptop intel i5 with ubuntu 10.10 x86 Target: Freescale iMX35 (iMX35 PDK) arm 11 Development environment: Qt Creator 2.1RC and Qt4.7.1 libraries. Arm compiler in path: /opt/freescale/usr/local/gcc-4.1.2-glibc-2.5-nptl-3/arm-none-linux-gnueabi/bin arm-none-linux-gnueabi-gcc-4.1.2 arm-none-linux-gnueabi-objdump arm-none-linux-gnueabi-addr2line arm-none-linux-gnueabi-gccbug arm-none-linux-gnueabi-ranlib arm-none-linux-gnueabi-ar arm-none-linux-gnueabi-gcov arm-none-linux-gnueabi-readelf arm-none-linux-gnueabi-as arm-none-linux-gnueabi-run arm-none

OpenWRT开发之——远程debug

孤街醉人 提交于 2019-12-02 18:28:59
想要用gdb对OpenWrt进行远程调试。首先得在OpenWrt目标机上安装gdbserver。 其实在trunk路径下也有gdb的ipk安装包的,不信find一下。 [trunk]$ find bin/ -name "gdb*.ipk" bin/ar71xx/packages/base/gdb_7.8-1_ar71xx.ipk bin/ar71xx/packages/base/gdbserver_7.8-1_ar71xx.ipk 查看一下它们的大小: [trunk]$ ls -lh bin/ar71xx/packages/base/gdb*.ipk -rw-r--r--. 1 hevake_lcj hevake_lcj 1.5M May 3 02:31 bin/ar71xx/packages/base/gdb_7.8-1_ar71xx.ipk -rw-r--r--. 1 hevake_lcj hevake_lcj 96K May 3 02:31 bin/ar71xx/packages/base/gdbserver_7.8-1_ar71xx.ipk OMG,gdb这个包有1.5M!对于FLASH总共才只有8M的路由器,实在有点吃紧! 还好,gdbserver只有96K。我们可以将gdbserver安装在目标机上,将其用网络或串口与开发机上的gdb进行协同使用。 1.

GDB remote debug: can't stop the thread

情到浓时终转凉″ 提交于 2019-12-02 04:19:03
问题 I have a gdbserver on a target, that I launch like gdbserver :2345 /bin/ls . Next I am connect a gdb from a host, and trying issue next commands: (gdb) target remote 192.168.1.2:2345 Remote debugging using 192.168.1.2:2345 warning: Architecture rejected target-supplied description [New Thread 686] (gdb) Remote 'g' packet reply is too long:

NDK debugging with r9 works on W7/64 but gives me issues in XP

a 夏天 提交于 2019-12-01 15:58:33
I've recently loaded the new Android dev tools, SDK 20130717 and NDK r9. Up to now I had the previous versions, working and debugging from within Eclipse just fine on both of my systems, a XP and a W7/64. Now, the W7/64 with the new tools does work and debug my apps ok after the new tools installation and the required path environment changes. It works ok when I select the "Debug As" + "Android Native Application". Yet the XP, although they have the exact configuration in terms of folders/cygwin etc, after the new tools installed and the necessary path env changed, it looks that it can't start

NDK debugging with r9 works on W7/64 but gives me issues in XP

你说的曾经没有我的故事 提交于 2019-12-01 14:41:10
问题 I've recently loaded the new Android dev tools, SDK 20130717 and NDK r9. Up to now I had the previous versions, working and debugging from within Eclipse just fine on both of my systems, a XP and a W7/64. Now, the W7/64 with the new tools does work and debug my apps ok after the new tools installation and the required path environment changes. It works ok when I select the "Debug As" + "Android Native Application". Yet the XP, although they have the exact configuration in terms of folders

Android GDB is not loading c++ shared library

為{幸葍}努か 提交于 2019-12-01 12:19:18
I've been trying to debug a shared library that I wrote in c/c++ but I can not debug it using eclipse. When I set a breakpoint is never hit and after execute info sharedlibrary in gdb, I got he following, confirming that the library is not there (called libtest-java.so) From To Syms Read Shared Object Library No /system/bin/linker 0x40093070 0x400c36f8 Yes /Users/jpuig/Development/test/git/test_lib-protoype/java/test_Android/obj/local/armeabi/libc.so No libstdc++.so No libm.so No liblog.so No libcutils.so No libgccdemangle.so No libcorkscrew.so No libutils.so No libbinder.so No libhardware.so

Android native debug: 手动使用gdbserver远程调试C代码

吃可爱长大的小学妹 提交于 2019-12-01 09:57:11
一般用java做一个Android app,里面夹杂着jni/*.c 所编译出来的lib,是可以通过gdb来调试的,也许大多数人都在按照网上各种帮助在使用,原理是比较古怪的:app里被塞进去一个gdbserver程序!安装后,会在该app的data目录下出现gdbserver,然后eclipse活着什么别的工具偷偷的启动gdbserver,让他调试改app进程,哦,是通过侦听一个socket,以便让PC端远程发送命令。关于这个网上有不少原理叙述。 但是有时候,就是开发一个和java无关的C程序放在android里运行,要想调试,这么简单的需求,就不想被那些乱七八糟的束缚了 ,方法基本参照gdbserver标准方法,例如 这个 。 只是稍微结合一下Android和NDK。 大致如下: 在ndk里找到gdbserver, 例如 find /Applications/android-ndk -type f -name '*gdbserver*' |grep arm 结果 /Applications/android-ndk/prebuilt/android-arm/gdbserver/gdbserver /Applications/android-ndk/prebuilt/android-arm64/gdbserver/gdbserver Android 5.0之前是第1行,之后是第2行。

Android GDB is not loading c++ shared library

杀马特。学长 韩版系。学妹 提交于 2019-12-01 08:17:47
问题 I've been trying to debug a shared library that I wrote in c/c++ but I can not debug it using eclipse. When I set a breakpoint is never hit and after execute info sharedlibrary in gdb, I got he following, confirming that the library is not there (called libtest-java.so) From To Syms Read Shared Object Library No /system/bin/linker 0x40093070 0x400c36f8 Yes /Users/jpuig/Development/test/git/test_lib-protoype/java/test_Android/obj/local/armeabi/libc.so No libstdc++.so No libm.so No liblog.so No

Only question marks in backtrace reported by gdb on ARM

六月ゝ 毕业季﹏ 提交于 2019-11-30 09:37:24
I'm trying to debug a software with gdbserver on ARM to get a backtrace of a crash. Unfortunately I get only question marks. Everywhere, I read this problem is simply related to the lack of symbols, but symbols are not stripped from my libraries. If I try to use the file command to load the symbols in the client I get: reading symbols from <path>/libQtWebKit.so.4.7.2...(no debugging symbols found)...done. and then, when the crash occurs: Program received signal SIGSEGV, Segmentation fault. 0x00000000 in ?? () (gdb) bt #0 0x00000000 in ?? () #1 0x4bf38b88 in ?? () Backtrace stopped: previous