Qualnet 調試記錄

來源:互聯網
上載者:User

標籤:des   style   c   code   tar   a   

在Qualnet裡添加了一個應用程式層協議,編譯完全通過,但在運行時總是在63s記憶體讀取錯誤。可以肯定是路由表更新處指標調用錯誤了.為了定位錯誤,最可靠的辦法就是使用VS進行調試。但按照官方手冊設定調試時,卻出現了如下錯誤資訊:‘qualnet.exe‘: Loaded ‘C:\snt\qualnet\5.0\bin\qualnet.exe‘, Symbols loaded.‘qualnet.exe‘: Loaded ‘C:\WINDOWS\system32\ntdll.dll‘‘qualnet.exe‘: Loaded ‘C:\WINDOWS\system32\kernel32.dll‘‘qualnet.exe‘: Loaded ‘C:\WINDOWS\system32\ws2_32.dll‘‘qualnet.exe‘: Loaded ‘C:\WINDOWS\system32\advapi32.dll‘‘qualnet.exe‘: Loaded ‘C:\WINDOWS\system32\rpcrt4.dll‘‘qualnet.exe‘: Loaded ‘C:\WINDOWS\system32\secur32.dll‘‘qualnet.exe‘: Loaded ‘C:\WINDOWS\system32\msvcrt.dll‘‘qualnet.exe‘: Loaded ‘C:\WINDOWS\system32\ws2help.dll‘‘qualnet.exe‘: Loaded ‘C:\snt\qualnet\5.0\bin\libexpat.dll‘, Binary was not built with debug information.‘qualnet.exe‘: Loaded ‘C:\WINDOWS\system32\user32.dll‘‘qualnet.exe‘: Loaded ‘C:\WINDOWS\system32\gdi32.dll‘‘qualnet.exe‘: Loaded ‘C:\WINDOWS\system32\netapi32.dll‘‘qualnet.exe‘: Loaded ‘C:\WINDOWS\system32\comdlg32.dll‘‘qualnet.exe‘: Loaded ‘C:\WINDOWS\system32\comctl32.dll‘‘qualnet.exe‘: Loaded ‘C:\WINDOWS\system32\shell32.dll‘‘qualnet.exe‘: Loaded ‘C:\WINDOWS\system32\shlwapi.dll‘‘qualnet.exe‘: Loaded ‘C:\WINDOWS\system32\imm32.dll‘‘qualnet.exe‘: Loaded ‘C:\WINDOWS\system32\lpk.dll‘‘qualnet.exe‘: Loaded ‘C:\WINDOWS\system32\usp10.dll‘‘qualnet.exe‘: Loaded ‘C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.6028_x-ww_61e65202\comctl32.dll‘The program ‘[6780] qualnet.exe: Native‘ has exited with code 10 (0xa).
問題分析與解決:(1)“Binary was not built with debug information.”為編譯是沒加上調試選項。這和後面斷點調試出現的“The breakpoint will not currently be hit. No symbols have been loaded for this document”的原因一樣。這是因為選擇VS編譯器中的編譯按鈕,調用的是QUALNET_HOME\Makefile編譯檔案,根據官方手冊指導,Makefile調用的是QUALNET_HOME\main\Makefile-windows-vc9,而手冊只是說要在QUALNET_HOME\main\Makefile裡開啟DEBUG = /Zi調試選項,並沒有說明要在QUALNET_HOME\main\Makefile-windows-vc9裡開啟,因此按照手冊操作發生此錯誤。解決辦法兩種:1)按照手冊,在QUALNET_HOME\main\Makefile裡開啟DEBUG = /Zi調試選項,然後開啟QualNet Developer xxx Command-Line,進入QUALNET_HOME\main目錄,在裡面用命令nmake clean/nmake進行編譯。2)修改QUALNET_HOME\Makefile編譯檔案,使其調用指向為QUALNET_HOME\main\Makefile,然後在QUALNET_HOME\main\Makefile裡開啟DEBUG = /Zi調試選項。使用VS編譯器中的編譯按鈕進行編譯。
(2)“The program ‘[6780] qualnet.exe: Native‘ has exited with code 10 (0xa).”為調試時沒有指定情境設定檔,解決辦法可如下:1) Start Visual C++ 2008.2) Select File > Open > Project/Solutionand select the qualnet project.(而不是手冊說的qualnet.exe)3)  Select Project > Properties > Configuration Properties > Debugging.       Set Command Argumentsto the name of the scenario configuration (.config) file to be debugged.       Set Working Directoryto the directory where the scenario configuration file is located4) Set the breakpoints as desired and debug using the commands listed in the Debugmenu.5) start Debug

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.