Proper CM

August 26th, 2009

We’ve talked about the first step of Windows post-mortem debugging, which uses map files and assembly outputs for analysis. However, this is based on the assumption that proper CM (Configuration Management) is done, which is typically NOT the case 🙂

CM means environment control: we not only want to track the changes of our source code, but also the compiled binaries, debugging-related files (i.e. map files, assembly outputs, PDB’s). CM also means build support: we should be able to reproduce the exact binary at any given time, which implies the versioning of build environment (i.e. the whole machine image), and labeling of source file revisions for each build. Most modern source control systems and server virtualization can do these tasks very well, for example, Perforce and SVN for source control, VMWare ESX for snapshot management.

Visual Studio introduces project property sheets in VS 2005, which gives us more control for CM among projects. We shall have common set of property sheets shared by all our projects, so that we don’t need to set details like map file generation project by project. In the HelloCrash example, we use property sheets to control various common properties among projects, such as compiler warning level, map file generation, and so on. You can take a look at the property sheets from CodePlex.

The very first question of Joel Test for better code is “Do you have source control?” This indeed shall be “Do you have proper CM?” We’ll unleash more power by well-designed and enforced CM in future Windows debugging series.

C++/C#, Technical | Comments Jump to the top of this page

Comments are closed.

Chef Peon's Melange



Social Links