GDB: don't know how to run
来源:互联网 发布:thinking in java 4th 编辑:程序博客网 时间:2024/05/21 06:13
(未经许可不得转载)(Noreproductionorrepublicationwithoutwrittenpermission)
Issue:
GDB: don't know how to run
Solution:
$ gdb --version
checking gdb configuration "This GDB was configured as xxx"
-----------------------------------information----------------------------------
Syntax:
gdb file-to-be-debugged
Rule:
gdb should recognize/parse the file to be debugged.
Steps:
1. Use a tool to analyze the file format(ARM/Intel etc)
In ubuntu, we can use tool "file"
$ file file-to-be-debugged
- if we see (case 1)
ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, not stripped,
it means "gdb" should be configured as the following option(from gdb --version)
This GDB was configured as "i686-pc-linux-gnu"
- if we see (case 2)
ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.27, not stripped,
it means "gdb" should be configured as the following option(from arm-linux-gdb --version)
This GDB was configured as "--host=i686-pc-linux-gnu--target=arm-linux"
2. Create your own gdb
a. for debugging in x86 only
$ tar zxf gdb-x.x.x.tar.gz
$ ./configure
$ make
$ ls -l gdb/gdb /* case 1 */
b. for remote debugging of arm platform(including gdbserver)
$ tar zxf gdb-x.x.x.tar.gz
$ ./configure --target=arm-linux
$ make
$ file gdb/gdb
gdb/gdb: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, not stripped$ cp gdb/gdb gdb/arm-linux-gdb /* case 2 */
$ cd gdb/gdbserver
$ CC=/opt/armtoolchain/bin/arm-linux-gnueabi-gcc ./configure --target=arm-linux --host=arm-linux
$ make
$ file gdbserver
gdbserver: ELF 32-bit LSB executable, ARM, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.27, not stripped/* running on ARM board */
- GDB: don't know how to run
- don’t know how to make ‘TargetCompilePass’
- don't know how to make错位原因
- Don't know how to make "cardserv.lib" 的解决办法
- NMAKE : U1073: don't know how to make 'TargetCompilePass'
- 部分 U1073: don't know how to make ****的原因
- Freebsd8.1:make:don't know how to make
- wince6.0 don't know how to make**错误
- 部分 U1073: don't know how to make ****错误
- I don't know how to get a real life
- don't know how to make 'D:/WINDDK/2600/lib/wxp/i386/ntstrsafe.lib' 解决办法
- 重装PB后第一次编译BSP出错的解决办法(don't know how to make)
- make 'FORCE' does not exist - don't know how to make it 解决
- CE R3 : 关于don't know how to make atlsd.lib 错误
- 编译WINCE时出再“don’t know how to make “/””错误 的解决
- don't know how to make 'D:/WINCE500/public/directx/oak/lib/x86/debug/l3aud32s.lib'
- Don't know how to iterate over supplied "items" in <forEach>
- Wince 6.0 U1073: don't know how to make ****的原因
- 工厂模式之抽象工厂模式
- UIAutomation使用测试入门
- 黑马程序员--java技术blog---第五篇:IO流(4)
- 代码流程分析二:Settings-蓝牙分析-搜索设备原理
- python下载视频
- GDB: don't know how to run
- [LeetCode] Populating Next Right Pointers in Each Node
- JS学习---(一)
- 工厂模式之工厂方法模式
- java中native方法的使用
- phaser入门教程
- jQuery_统计图插件-XML/SWF Charts
- 质数因子
- Android嵌套滑动组件相关的文章资料