My MacBook...started freezing after I tried to install xCode
tools.
I had the same problem... which cleared only after un-installing xCode tools, and re-installing. I may have created the problem by interrupting a long indexing process (20 min - 1 hour) which I saw announced only briefly during the second install. Except for that brief announcement, the progress bar indicates that the process should be complete within minutes, but it really takes around an hour. After re-installing the tools, things seem fine.
I had previously used the Disk Utility to repair disk permissions, which did perform some fixes, but I am not convinced they were related to my problem, since the problem didn't clear with only that remedy.
2.1 GHz PPC G5 Mac OS X (10.4.7)