【发布时间】:2015-07-01 04:38:00
【问题描述】:
我的程序有多个文件,我用 g++ -g 编译。
当我尝试在 WinMain 上中断时,它说 Function not defined,但是当我显示列表时它就出现在那里。
(gdb) list Winmain.cpp:237
237 // WinMain
238 int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance
pCmdLine, int nCmdShow) {
239
240 //Debuging mode
(gdb)
241
242 // IO thread ;;;; in charge of writing stuff to files
reak the mem thread
243 // /var/log/simulator.log
244 freopen ("debug.txt", "w", stdout);
245
246 // Strings
247 static TCHAR szWindowClass[] = TEXT("myWnd"); // std::s
indowClass = "myWnd";
248 static TCHAR szTitle[] = _T("Virtual Map"); // std::s
itle = "Virtual map";
249
250 // Windows Structure
(gdb) b Winmain.cpp:WinMain
Function "WinMain" not defined in "Winmain.cpp".
Make breakpoint pending on future shared library load? (y or [n]) n
我可以用 b Winmain.cpp:238 中断,但为什么它不能按名称工作?
windows7上的mingw32
GNU gdb (GDB) 7.6.1
【问题讨论】:
标签: c++ gdb g++ mingw breakpoints