Friday, July 29, 2005

CruiseControl.NET, CVS and SSH password

I tried to setup up a build server using CruiseControl.NET (CCNET for short) and am not happy about CCNET's documentation. My CVS server is only accessible via SSH and it's password protected. I need to give CCNET a password so that it can login itself (btw, using public/private key provides few security improvement here, you better have a limited account for read only CVS access so that a tool like CCNET can use). I started to read the documentation, but soon lost on this page(Using CruiseControl.NET with CVS). It simply mentiones:
"An example file is 'plinkwithpw.bat' in the tools sub-directory."

But guess where is the tools sub-directory? I searched my installation dir and found nothing. And it's turned out to be in their CVS! Since The script is so short, why not just put it in the documentation?

The documentation page does no allow me to edit (not even to add a comment), so I just post the script here:

0. I use Tortoise CVS in this example, so cvs.exe and plink.exe (renamed as TortoisePlink.exe) are already on my computer(C:\Program Files\TortoiseCVS). If you do not have one you need to download them.

1. Create plinkwithpw.bat like this:
@"C:\Program Files\TortoiseCVS\TortoisePlink.exe" -pw yourpassword %*

2. Create cvswithplinkrsh.bat like this:
@echo off
set CVS_RSH="C:\Program Files\TortoiseCVS\plinkwithpw.bat"
"c:\Program Files\TortoiseCVS\cvs.exe" %*

3. Edit ccnet.config to have something like this:

<sourcecontrol type="cvs">
<executable>C:\Program Files\TortoiseCVS\cvswithplinkrsh.bat</executable>
<workingDirectory>C:\projects\YourProject</workingDirectory>
</sourcecontrol>

Wednesday, July 20, 2005

Force windbg to load symbols

I needed to analyze a crash dump yesterday but could not find the associated .pdb symbol file. Usually I check in all the binaries and symbols for public releases, but unfortunately there is a typo in my build script so that the symbol I am looking for is missing.

I do have the source code on my version control system, so it is quite easy for me to rebuild the symbol file. It should match the binary, but winbdg refused to load it since the timestamp differs:

*** WARNING: Unable to verify checksum for Your.dll
*** ERROR: Symbol file could not be found. Defaulted to export symbols for Your.dll

Modifying the timestamp does not look easy, so I decided to force windbg to load the symbol. while impossible in VS.net, it is quiet easy with windbg, all you need is type in:

.symopt+0x40

This command indead enables SYMOPT_LOAD_ANYTHING option.

Now a complete stack trace showed up, nice...