make a certain file type hidden
AFAIK there isn't a direct way to do this. There are several alternatives though:


Folder Actions: Create a folder action (which gets triggered upon each change in a folder) to run the chflags command if needed. As Folder Actions only apply to to one folder this needs an Action for every folder you create .dSYM files in
launchd: Use WatchPaths to run a script whenever one of the listed paths is modified
Hazel: Hazel is kind of like Folder Actions on steroids and allows you to create actions based on various rules


PS: cgdb isn't affected, chflags only makes files invisible on Finder level (and in Open/Save dialogs).