Changes between Version 2 and Version 3 of doc/usage/nscp/debugSymbols
- Timestamp:
- 11/26/09 21:54:24 (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
doc/usage/nscp/debugSymbols
v2 v3 3 3 = Using the Debug Symbols = 4 4 5 == About this guide == 6 This guide is not for the faint of heart. It is to introduce the windows debbugung kit and help you get started with debugging NSCloient++. Now why would you want to do that? 7 The reason, and the only reason, is that you have a NSClient++ crash. Though rare they happen and this guide is to help you get the information I need to fix the issue. 8 9 You have to understand that the tools used here (windbg) are not something you casually install in your production enviornment. It is neither something you play with for fun. SO if you don't have a crashing NSClient++ stop reading here! :P 10 11 Now what this guide can help you with is not resolve the issues it is mainly to help you collect information so I can resolve the issue. This means that you dont need to know "programming" to follow this but I think it will help you a lot if you do. 12 Another note is that this guide is more of a "getting started" then a complete walkthrough so expect to do this "again" after I analyze the first batch of the results. 13 14 '''WARNING I cannot stress this enough: This is not something you want to do inproduction''' 15 5 16 == Getting the tools == 6 === 1. Getting the Windows Debug Kit === 17 There are some tools you need to do this. The first and most obvious one is windbg which comes (for free) with the Windows Debugging Kit (WDK). The second thing you need is the debug symbols for NSClient++ and finally you also need the NSClient++ sources. 18 19 === 1. Getting the Windows Debugging Kit === 20 The Windows Debugging Kit is provided by Microsoft and can be downloaded from their page here [http://www.microsoft.com/whdc/DevTools/Debugging/default.mspx]. And you need the one for the specific platform you have (Win32/x64). 21 22 After you download it launch the installer and... 23 [[Image(wiki:doc/usage/nscp/debugSymbols:install-msdbg-001.png)]] 24 ... click next... 25 [[Image(wiki:doc/usage/nscp/debugSymbols:install-msdbg-002.png)]] 26 Presumably the only thing you need is the debuggers but I tend to install everything since you never know. 27 [[Image(wiki:doc/usage/nscp/debugSymbols:install-msdbg-003.png)]] 28 Then once it is done click finish and you are done. 7 29 8 30 === 2. Getting the "debug version" of NSClient++ === 31 The debug version is actually just exactly the same version as the regular version with one addition along the the exe/dll/* files comes a set of pdb files which contain the debug symbols. To get the debug version download the "zipped" version of NSClient++ from the download page. You can either copy the pdb files to your installation from the zip or you use the binaries from the same zip. The benefit of using the binaries from the zip is that you know they are the exact same version. If you copy you have to copy from the accompaning zip from the version you have installed (it has to be the exact same version). 32 33 So I would use the zip distribution as is. It wont matter where you unzip the files but you need to remember where and as long as you don't run NSClient++ /install it wont "add" anything else so it is safe to delete the files afterward. 34 35 Once you have the files unzipped to a directory of your choice you need to copy the configuration file (nsc.ini) from your old distribution to this folder to get your specific settings. 9 36 10 37 === 3. Getting the sources === 11 38 39 The sources are even easier just grab the sources zip and unzip to a directory of your choice. I tend to use \sources relative the debug symbols build installation since it is simpler to have it all in once place. 40 12 41 == Using the tools == 42 43 Now we have everything installed and setup and we are getting ready to start using the tools. And the general idea is to just launch NSClient++ in "test" mode (or possibly as a service but that requires you to "install" the debug symbol build). Now this guide wont do it like that since it is "harder" and we will instead launch everything from windbg in a step by step fashion. We will also not actually do much useful things except try to illustrate how this will work in a real word scenario. 13 44 14 45 === 4. Starting windbg === 15 46 47 Start windbg like all other programs... 48 49 [[Image(wiki:doc/usage/nscp/debugSymbols:launch-windbg.png)]] 50 51 * Start button 52 * All Programs 53 * Debugging Tools for Windows (x86) 54 * WinDbg 55 56 [[Image(wiki:doc/usage/nscp/debugSymbols:windbg-001-started.png)]] 57 16 58 === 5. Loading NSClient++ === 59 The next step is to load NSClient++ and set a command line option to start it in test mode. 17 60 18 === 6. Debugging NSClient++ ===19 20 [[Image(wiki:doc/usage/nscp/debugSymbols:install-msdbg-001.png)]]21 [[Image(wiki:doc/usage/nscp/debugSymbols:install-msdbg-002.png)]]22 [[Image(wiki:doc/usage/nscp/debugSymbols:install-msdbg-003.png)]]23 [[Image(wiki:doc/usage/nscp/debugSymbols:launch-windbg.png)]]24 [[Image(wiki:doc/usage/nscp/debugSymbols:windbg-001-started.png)]]25 61 [[Image(wiki:doc/usage/nscp/debugSymbols:windbg-002-open-exe.png)]] 26 62 [[Image(wiki:doc/usage/nscp/debugSymbols:windbg-003-open-exe.png)]] 63 64 === 6. Starting NSClient++ === 65 27 66 [[Image(wiki:doc/usage/nscp/debugSymbols:windbg-004-app-open.png)]] 28 67 [[Image(wiki:doc/usage/nscp/debugSymbols:windbg-005-nscp-started.png)]] 29 68 [[Image(wiki:doc/usage/nscp/debugSymbols:windbg-005-start-nscp.png)]] 69 70 === 7. Crashing NSClient++ === 71 30 72 [[Image(wiki:doc/usage/nscp/debugSymbols:windbg-006-assert-01.png)]] 31 73 [[Image(wiki:doc/usage/nscp/debugSymbols:windbg-006-assert-02.png)]] … … 36 78 [[Image(wiki:doc/usage/nscp/debugSymbols:windbg-006-assert-07-source.png)]] 37 79 38 39 40








