无法中断gdb-mingw中的函数名



我的程序有多个文件,我用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

WinMain()是一个__stdcall函数;(该知识由WINAPI限定符通过典型的Microsoft模糊处理来传达)。因此,其公开可见的名称被限定为WinMain@16();您应该在此限定名称上设置gdb断点。