can someone suggest me best IDE to use in linux environment for kernel & user level development for c/c++ ?
Also how can we debug & test our code in Linux user & kernel application ?
Don't use any IDE; use a separate editor (like
geany). The use a compiler
g++ (don't forget the
-g -Wall options to it). Use
gdb to debug your code. See this answer for much more details (e.g. use
Don't start kernel level development before mastering application level development and Linux syscalls. See http://advancedlinuxprogramming.com/
QT Creator is very good IDE for user-land development. I think it can be used with User-Mode Linux, note that I have not tried it with this setup...
For the debug process, you can use gdb, wich is just perfect when you know exactly how it works.
For IDE, I personally use vim + a terminal with a shell, but you can use for instance anjuta or kdevelop.
For Kernel development, I use
cscope - cscope is a very useful tool for finding your way around source code, and the linux source is big enough that most people don't know every bit of it. I would also recommend LXR, the Linux Cross Reference site. It has all the soruce code, and you can search for a word, and quickly find all the references to it. Make finding "where is this done" much easier - and you can look back several generations of source to see how/if it has changed.
Obviously, along with that, you'll need the
gcc compiler and related tools.
I've never used KGDB, but it's a kernel debugger for Linux.
For application development on Linux, you can use
cscope (that's what I do), but I know a lot of people use Eclips. CodeBlocks isn't bad either.
It really comes down to taste and preference.
Eclipse with CDT and RSE plugins is the usual answer. See http://www.eclipse.org/cdt/