debugging of drivers

can any one knows how to degug a driver(it may be char driver, block , usb driver).
can i use gdb for driver debugging or kdb for that?
which one is best for which driver?
for using these gdb and kdb what are prerequirments of the kernel(means what are the options to set )