Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How is gdb used to debug Java programs?

When gdb is used for debugging purposes in Java:

  • What's its practical use?
  • What are its limitations?
  • How is it compared to other debuggers?
like image 555
Javier Avatar asked Feb 23 '11 20:02

Javier


2 Answers

I would say gdb is used for debugging Java when the programmer is coming from a different language and is already familiar with gdb. Otherwise, it seems like a strange choice given that there are more popular alternatives for Java: jdb, JSwat, eclipse, netbeans, etc.

Here is a tutorial for debugging Java with gdb.

like image 179
dbyrne Avatar answered Sep 21 '22 06:09

dbyrne


GDB is 99% of the time is not useful for debugging Java, but it can help you find native memory leaks which the java debuggers can't.

like image 25
Tom Larkworthy Avatar answered Sep 19 '22 06:09

Tom Larkworthy