# Can GDB debug itself?

Can GDB be run on itself? How or why not? I see something about it http://www.math.utah.edu/docs/info/gdbint_3.html But GDB might not be written in a language that it can debug?

-
Are you looking for a paradox? Note that GDB does not prove correctness. – Karolis Juodelė Jan 30 '13 at 14:54
Thank you for the comment. I mainly wonder how to debug a debugger and I can understand that "self-verifying code" does not seem to exist(?) and (2) what language GDB is written in, if it's C or need to be some other language. – Programmer 400 Jan 30 '13 at 15:03
On a related note, you might be interested in this question on SO – Khaur Jan 30 '13 at 15:30
How is this a computer science question? – Raphael Jan 30 '13 at 17:11
GDB is written in C, and so GDB should be able to debug another instance of GDB running. Sounds strange, really isn't so much. – vonbrand Jan 30 '13 at 18:09

2. Compile with the -g flag on.
3. Run gdb gdb.