10 | | Whether you're creating a new application or adapting an existing application to BOINC, we recommend that you start by building the BOINC sample application '''upper_case''' on all the platforms you want to support. When this is done, you can use the sample application and its associated project files as a basis for your own application. |
| 10 | Whether you're creating a new application or adapting an existing application to BOINC, |
| 11 | we recommend that you start by building the BOINC sample application |
| 12 | '''example_app''' on all the platforms you want to support. |
| 13 | When this is done, you can use the example application |
| 14 | and its associated project files as a basis for your own application. |
20 | | There is a free version, [http://msdn2.microsoft.com/en-us/express/aa975050.aspx Visual C++ 2008 Express Edition], which works with the BOINC project file (after it is converted). You'll also need the [http://www.microsoft.com/downloads/details.aspx?FamilyId=A55B6B43-E24F-4EA3-A93E-40C0EC4F68E5&displaylang=en Microsoft Platform SDK] and some [http://msdn2.microsoft.com/en-us/express/aa700755.aspx changes to your Visual Studio Express] installation to include the SDK. Warning: you cannot use more recent versions of the SDK (which do not include glaux). |
| 29 | There is a free version, [http://msdn2.microsoft.com/en-us/express/aa975050.aspx Visual C++ 2008 Express Edition], |
| 30 | which works with the BOINC project file (after it is converted). |
| 31 | You'll also need the [http://www.microsoft.com/downloads/details.aspx?FamilyId=A55B6B43-E24F-4EA3-A93E-40C0EC4F68E5&displaylang=en Microsoft Platform SDK] |
| 32 | and some [http://msdn2.microsoft.com/en-us/express/aa700755.aspx changes to your Visual Studio Express] |
| 33 | installation to include the SDK. |
| 34 | Warning: you cannot use more recent versions of the SDK (which do not include glaux). |
| 78 | |
| 79 | == Symbol Stores == |
| 80 | |
| 81 | === Introduction === |
| 82 | |
| 83 | In order to obtain useful diagnostic information in the event of an application crash, it is necessary to dump a callstack and any other relevant information about what was going on at the time of the crash. Symbols are only needed during a crash event, therefore they are stripped from most applications to cut down on the binary size and bandwidth requirements to deploy a new release. |
| 84 | |
| 85 | Without symbols, callstacks tend to be nothing more than a list of function pointers in memory. A developer has to load the un-stripped executable in memory using the same operating system and similar processor to jump to that memory address in order to determine the function name and parameters. This is very labor intensive and generally not a very fun job. |
| 86 | |
| 87 | Microsoft created a technology called a 'Symbol Store' to use with their debugger technology which allows Windows debuggers to locate and download compressed symbol files to diagnose problems and convert function pointers into human readable text. This greatly speeds up the process of diagnosing and fixing bugs. |
| 88 | |
| 89 | With the BOINC Runtime Debugger for Windows framework a project can publish their symbol files and only have to distribute the application to each of the BOINC clients. When a crash event occurs the runtime framework will download the symbol file from the symbol store and then proceed to dump as much diagnostic information as possible to help projects diagnose the failure. |
| 90 | |
| 91 | === Requirements === |
| 92 | You'll need the latest stable release of the [http://www.microsoft.com/whdc/devtools/debugging/default.mspx Debugging Tools for Windows. ] |
| 93 | |
| 94 | Verify that your executable is setup to generate PDB debugging symbols for a release build. |
| 95 | |
| 96 | Verify that the advance linker option to generate a checksum is enabled for a release build. |
| 97 | |
| 98 | You'll need to explicitly name both your EXE and PDB before compilation since the debugger bases the name of the PDB file off of information that is stored in the executable header. |
| 99 | |
| 100 | === Project Symbol Store === |
| 101 | |
| 102 | Specifying a project wide symbol store is as easy as adding the symstore element to your config.xml file for the project. |
| 103 | |
| 104 | Below is an XML shred with an example symstore element. |
| 105 | |
| 106 | {{{ |
| 107 | <boinc> |
| 108 | <config> |
| 109 | <symstore>http://sample.example.com/symstore</symstore> |
| 110 | </config> |
| 111 | </boinc> |
| 112 | }}} |
| 113 | |
| 114 | === Adding symbols to the symbol store === |
| 115 | [http://msdn.microsoft.com/en-us/library/cc266480.aspx Symstore] is a utility to manage symbol stores. You'll want to create a local symbol store on your Windows build machine in which you'll initially add new symbol files with each revision of your application. |
| 116 | |
| 117 | Symstore will compress the symbol file and then copy it into your local symbol store. |
| 118 | |
| 119 | Below is an example command which you can run from the Windows command line or cygwin command line. |
| 120 | |
| 121 | {{{ |
| 122 | symstore.exe add /l /f c:\SampleSrc\*.pdb /s c:\symstore /compress /t "Sample" /v "5.02" /o /c "Application Release" |
| 123 | }}} |
| 124 | |
| 125 | === Uploading symbols to the symbol store === |
| 126 | |
| 127 | Most projects tend to use scp to copy files between Windows machines and their project server. |
| 128 | |
| 129 | The example below copies the entire symstore to the target location. After the copy operation you can delete all the subdirectories except '000Admin' to save time uploading for future application symbols. |
| 130 | |
| 131 | {{{ |
| 132 | pscp.exe -r -C -batch c:\symstore sample@project.example.com:projects/sample/html/user/symstore |
| 133 | }}} |
| 134 | |
| 135 | |