Qualnet 调试记录

在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 located
4) Set the breakpoints as desired and debug using the commands listed in the Debugmenu.
5) start Debug

Qualnet 调试记录,布布扣,bubuko.com

Qualnet 调试记录

上一篇:c# ExecuteScalar和ExecuteNonQuery


下一篇:Windows Server 2012操作系统实用技巧