Changes between Version 2 and Version 3 of doc/usage/nscp/debugSymbols


Ignore:
Timestamp:
11/26/09 21:54:24 (3 years ago)
Author:
mickem
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • doc/usage/nscp/debugSymbols

    v2 v3  
    33= Using the Debug Symbols = 
    44 
     5== About this guide == 
     6This 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? 
     7The 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 
     9You 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 
     11Now 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. 
     12Another 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 
    516== Getting the tools == 
    6 === 1. Getting the Windows Debug Kit === 
     17There 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 === 
     20The 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 
     22After 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)]] 
     26Presumably 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)]] 
     28Then once it is done click finish and you are done. 
    729 
    830=== 2. Getting the "debug version" of NSClient++ === 
     31The 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 
     33So 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 
     35Once 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. 
    936 
    1037=== 3. Getting the sources === 
    1138 
     39The 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 
    1241== Using the tools == 
     42 
     43Now 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. 
    1344 
    1445=== 4. Starting windbg === 
    1546 
     47Start 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 
    1658=== 5. Loading NSClient++ === 
     59The next step is to load NSClient++ and set a command line option to start it in test mode. 
    1760 
    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)]] 
    2561[[Image(wiki:doc/usage/nscp/debugSymbols:windbg-002-open-exe.png)]] 
    2662[[Image(wiki:doc/usage/nscp/debugSymbols:windbg-003-open-exe.png)]] 
     63 
     64=== 6. Starting NSClient++ === 
     65 
    2766[[Image(wiki:doc/usage/nscp/debugSymbols:windbg-004-app-open.png)]] 
    2867[[Image(wiki:doc/usage/nscp/debugSymbols:windbg-005-nscp-started.png)]] 
    2968[[Image(wiki:doc/usage/nscp/debugSymbols:windbg-005-start-nscp.png)]] 
     69 
     70=== 7. Crashing NSClient++ === 
     71 
    3072[[Image(wiki:doc/usage/nscp/debugSymbols:windbg-006-assert-01.png)]] 
    3173[[Image(wiki:doc/usage/nscp/debugSymbols:windbg-006-assert-02.png)]] 
     
    3678[[Image(wiki:doc/usage/nscp/debugSymbols:windbg-006-assert-07-source.png)]] 
    3779 
    38  
    39  
    40