tags:

views:

65

answers:

1

Can GDB be used to debug programs in languages other than C or C++, like Java?

+3  A: 

GDB can debug a variety of file formats, but it doesn't support scripted languages (Perl, PHP, Python, etc) nor languages that run over a VM (Java, C#, etc). It was made to debug native binaries like ELF, Mach-O, etc.

You can read the complete list of supported file formats on the official GDB documentation. Scroll down to topic 8.4 here.

jweyrich
Can you list a few languages that can generate native binaries? I can only think of c/c++ ...
wamp
Pascal, ObjC, Ada, Fortran, Assembly, etc.
jweyrich