Qt Creator 用gdb远程调试问题

meiky 2013-04-03 04:31:28
问题:Qt Creator 用gdb远程调试不了,提示
not in executable format: File format is ambiguous.
Matching formats: elf32-littlearm-symbian elf32-littlearm.
Use "set gnutarget format-name" to specify the format.


原来Qt Creator编译正常,X86上Qt Creator自带的gdb 本地调试没问题。
现在我是想做交叉编译后,在ubuntu上远程调试ARM板上Qt程序。
1.我用命令行:ARM板上用 ./arm-linux-gdb 192.168.10.156:1234 test -qws

ubuntu上用
gdb test
(gdb) target remote 192.168.10.153:1234
Remote debugging using 192.168.10.156:1234
warning: Target-supplied registers are not supported by the current architecture
Remote 'g' packet reply is too long: 0000000044feffbe50feffbe0000000000000000000000000000000000000000000000000000000000000000000000000000000040fdffbe00000000d05efdb6100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

这样似乎是连上板子上gdb
板子打印出:
Remote debugging from host 192.168.10.153
readchar: Got EOF
Remote side has terminated connection. GDBserver will reopen the connection.
Listening on port 1234

看样子用命令行调试是正常的吧????


2.用Qt Creator

如上图,设置后按开始调试,就是
not in executable format: File format is ambiguous.
Matching formats: elf32-littlearm-symbian elf32-littlearm.
Use "set gnutarget format-name" to specify the format.
不管我GNU目标怎和体系结构怎么选都是不行的,问题何在????????工程有在调试版本模式下编译。

...全文
963 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
wenwu1225 2013-08-30
  • 打赏
  • 举报
回复
要先在gdb的源码下弄出gdbserver来的,然后在ARM板上运行: gdbserver 192.168.10.156:1234 app -qws &; Qt creator中,调试器应该设置为你的arm-linux-gdb; 主机和端口号为你的板子的IP和端口号; 体系结构是arm; GNU目标是arm-none-linux-gnueabi
图图-兔兔 2013-08-28
  • 打赏
  • 举报
回复
引用 8 楼 meiky 的回复:
难道真那么少人搞这个
楼主能调试了吗
TonyJiang08 2013-07-17
  • 打赏
  • 举报
回复
我现在在Linux 9131-TestMAC-Compile 2.6.32-33-generic-pae #70-Ubuntu SMP Thu Jul 7 22:51:12 UTC 2011 i686 GNU/Linux上面编译gdb,mount到目标机上, ./gdb testmac9131 GNU gdb (GDB) 7.2 Copyright (C) 2010 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 "powerpc-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /mnt/testmac/testmac9131...I'm sorry, Dave, I can't do that. Symbol format `elf32-powerpc' unknown.
meiky 2013-04-08
  • 打赏
  • 举报
回复
难道真那么少人搞这个
meiky 2013-04-07
  • 打赏
  • 举报
回复
引用 1 楼 haltwang 的回复:
楼主在板子上装了Qt Creator?
没有,不是,是PC机ubuntu上,所以才需要远程调试嘛。
meiky 2013-04-07
  • 打赏
  • 举报
回复
有没有同学用Qt Creator 调试过 Arm啊。。。。。。。
meiky 2013-04-07
  • 打赏
  • 举报
回复
引用 5 楼 haltwang 的回复:
引用 4 楼 meiky 的回复:引用 3 楼 haltwang 的回复:引用 2 楼 meiky 的回复:引用 1 楼 haltwang 的回复:楼主在板子上装了Qt Creator? 没有,不是,是PC机ubuntu上,所以才需要远程调试嘛。 我每次都是用调试的串口,发到minicom上看的 你没用gdb吧,没用调试工具我也是用串口打印字符串来调试。……
是啊,我现在就在学习搞这东东,
haltwang 2013-04-07
  • 打赏
  • 举报
回复
引用 4 楼 meiky 的回复:
引用 3 楼 haltwang 的回复:引用 2 楼 meiky 的回复:引用 1 楼 haltwang 的回复:楼主在板子上装了Qt Creator? 没有,不是,是PC机ubuntu上,所以才需要远程调试嘛。 我每次都是用调试的串口,发到minicom上看的 你没用gdb吧,没用调试工具我也是用串口打印字符串来调试。现在想用gdb远程调试板子。 ……
还能这样弄呢, 学习了。 是不是就可以设断点什么的了
meiky 2013-04-07
  • 打赏
  • 举报
回复
引用 3 楼 haltwang 的回复:
引用 2 楼 meiky 的回复:引用 1 楼 haltwang 的回复:楼主在板子上装了Qt Creator? 没有,不是,是PC机ubuntu上,所以才需要远程调试嘛。 我每次都是用调试的串口,发到minicom上看的
你没用gdb吧,没用调试工具我也是用串口打印字符串来调试。现在想用gdb远程调试板子。
haltwang 2013-04-07
  • 打赏
  • 举报
回复
引用 2 楼 meiky 的回复:
引用 1 楼 haltwang 的回复:楼主在板子上装了Qt Creator? 没有,不是,是PC机ubuntu上,所以才需要远程调试嘛。
我每次都是用调试的串口,发到minicom上看的
haltwang 2013-04-04
  • 打赏
  • 举报
回复
楼主在板子上装了Qt Creator?

16,212

社区成员

发帖
与我相关
我的任务
社区描述
Qt 是一个跨平台应用程序框架。通过使用 Qt,您可以一次性开发应用程序和用户界面,然后将其部署到多个桌面和嵌入式操作系统,而无需重复编写源代码。
社区管理员
  • Qt
  • 亭台六七座
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧