c - 使用 GDB : Program dies after SIGILL, 非法指令进行远程调试

标签 c gdb

我正在尝试在兼容 ARMv6 的处理器版本 4 上调试代码。

我使用 --host=arm-openwrt-linux-gnueabi 标志编译了 GDBserver。 gdb本身是用

编译的
   --host=x86_64-unknon-linux-gnu --target=arm-openwrt-linux-gnueabi --with-expat

如果我现在连接到 gdbserver 中,我的程序正在运行,我得到以下错误信息:

(gdb) target remote 192.168.x.x:2345
Remote debugging using 192.168.x.x:2345
Cannot access memory at address 0x0
0xb6fdaec0 in ?? ()
(gdb) set sysroot /home/xxxxxx/Dokumente/lgn-sdk-v0.2/staging_dir/toolchain-arm_v6k_gcc-4.6-linaro_eglibc-2.15_eabi/
Reading symbols from /home/xxxxxx/Dokumente/lgn-sdk-v0.2/staging_dir/toolchain-arm_v6k_gcc-4.6-linaro_eglibc-2.15_eabi/lib/ld-linux.so.3...done.
Loaded symbols for /home/xxxxxxx/Dokumente/lgn-sdk-v0.2/staging_dir/toolchain-arm_v6k_gcc-4.6-linaro_eglibc-2.15_eabi/lib/ld-linux.so.3
(gdb) n
Single stepping until exit from function _start,
which has no line number information.

Program received signal SIGILL, Illegal instruction.
0xb6fe8d20 in _dl_debug_initialize () from /home/xxxxx/Dokumente/lgn-sdk-v0.2/staging_dir/toolchain-arm_v6k_gcc-4.6-linaro_eglibc-2.15_eabi/lib/ld-linux.so.3
(gdb)  
Single stepping until exit from function _dl_debug_initialize,
which has no line number information.

Program terminated with signal SIGILL, Illegal instruction.

最佳答案

我没有完整的答案,但我有一个类似的问题并通过以下方式解决:

  • 通过目标远程连接
  • 打破主要
  • 继续
  • 然后,设置系统根

这让我摆脱了崩溃。不过,我当然会对更好的解决方案感兴趣。

关于c - 使用 GDB : Program dies after SIGILL, 非法指令进行远程调试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25443689/

相关文章:

c - 矩阵相乘没有给出正确答案

c++ - 为什么 RemoveDirectory 函数不删除最顶层的文件夹?

c++ - gdb:tstart 错误 "You can' 的含义 t 当你的目标是 `exec' 时执行此操作“

python - arm 的 GDB 交叉编译

c - 使用 GDB 在 Eclipse 中调试 C 程序时的奇怪行为

gdb - mingw gdb 64 位构建

c - 在 C/C++ 中使用 malloc 和 free 并收到错误 HEAP CORRUPTION DETECTED

令人困惑的字符串交互

c++ - 链接时大量 std::functions 的多重定义

xcode - 在基于 Lion 的 Snow Leopard 上调试 OS X 程序