开发者

Linux: Most powerful Debuggers

Hi 开发者_高级运维I wanted to know which are the best debuggers out there for C/C++ on a Linux operating system. I have heard sth about gdb and valgrind being pretty good but I wanted to hear opinions/ comparisons on these.

Thank you


GDB is probably the best there is in my opinion.

  • GDB: The GNU Debugger
  • DDD: The Data Display Debugger, a graphical debugger frontend
  • Nemiver: Standalone graphical debugger for GNOME

Memory Debuggers:

  • Valgrind: A memory debugger and profiler
  • Electric Fence: A malloc debugger
  • D.U.M.A: Detect Unintended Memory Access - A Red-Zone memory allocator

Source


There's also EDB, which is included in BackTrack 5. It's more geared towards reversing though.


Eclipse has a good integrated debugging environment. It is a graphical wrapper over GDB - so you get the power of GDB, with an interface more like Xcode or Visual Studio.

As "GDB" is the only "real debugger" - (and thinks like "DDD" are wrappers over it) - Eclipse this is probably the debugger and IDE you're looking for.


I think I'm right in saying that all C++ source-level debuggers commonly used on Linux are either gdb or wrappers around gdb. At least unless you're using a non-gnu toolchain.

Valgrind is not a debugger. It is a dynamic behaviour analysis tool which can be used to detect certain types of misbehaviour which are usually bugs, but certainly NOT for the things that you'd normally use a debugger for; you can't step through code or inspect variables, etc. You cannot use Valgrind to detect most types of logical error.

I don't think Valgrind ever claimed to be a debugger.


See also UndoDB http://undo-software.com/

It sits beneath gdb and significantly enhances gdb's reversible debugging capabilities (e.g. memory corruption? Set a watchpoint on the bad memory location and then do reverse-continue to go straight to the last piece of code to update that memory).


You are right about valgrind. It is a useful tool for detecting memory leaks caused by dynamic allocation of memory.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜