新手问题 win 下的 gdb 的设置断点问题

lzm110 · 2013年03月18日 · 最后由 lzm110 回复于 2013年03月21日 · 3210 次阅读

C:\Documents and Settings\All Users\Documents\12>gdb VDESimulator.exe GNU gdb (GDB) 7.3.50.20111026-cvs (cygwin-special) Copyright (C) 2011 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 "i686-cygwin". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /cygdrive/c/Documents and Settings/All Users/Documents/12/V DESimulator.exe...(no debugging symbols found)...done. (gdb) set args realtime.dat 8129 0 1024 100 (gdb) b VDESimulator.cpp:47 No symbol table is loaded. Use the "file" command. Make breakpoint pending on future shared library load? (y or [n]) n (gdb) b VDESimulator.cpp:47 No symbol table is loaded. Use the "file" command. Make breakpoint pending on future shared library load? (y or [n]) y

Breakpoint 1 (VDESimulator.cpp:47) pending. (gdb)

windows 下调试的 gdb 设置的断点一直不生效的是什么原因啊?怎么处理啊?

是用 gcc -g 编译的么?必须加 -g 才有符号表的

不是 GCC 编译的程序啊 是 VS2008 编译的程序

#2 楼 @lzm110 那符号表格式应该不一样的... 用 VS2008 debug 吧

嗯 只有可执行文件 没源程序

#4 楼 @lzm110 没源码就只能从机器码级别 debug 了,VS2008 也能 debug 不带源码的程序的。另外可以试试 IDA pro 或者 Ollydbg

需要 登录 后方可回复, 如果你还没有账号请 注册新账号