Hacker News new | ask | show | jobs
by bndr 4342 days ago
Linux standard debugger is gdb.
2 comments

You can use GDB on Windows too - MinGW have Windows versions of the usual set of tools(gcc, gdb, objdump, grep, etc.).

I highly recommend MinGW if you do any serious work on a Windows machine.

Perhaps worth noting that there is a difference between MinGW [1] and MinGW-w64 [2] - namely, the latter supports building 64-bit applications. In combination with msys2 [3], its pacman port [4], and mingw-builds [5] the toolchain has become very easy to install, and quite pleasant to use.

I had previously commented [6] on stability issues using mingw-w64. After some snooping using vmmap, Dependency Walker, and PE Explorer, I found that disabling the Windows Superfetch service dropped memory usage significantly. It turns out that this has been observed by cygwin devs [7]. I also disabled the Program Compatibility assistant, and my system now stays stable even after rebuilding LLVM and OpenBLAS multiple times.

[1] http://www.mingw.org/ [2] http://mingw-w64.sourceforge.net/ [3] http://msys2.github.io/ [4] http://sourceforge.net/p/msys2/wiki/MSYS2%20installation/ [5] http://sourceforge.net/projects/mingwbuilds/ [6] https://news.ycombinator.com/item?id=7740930 [7] https://cygwin.com/ml/cygwin/2011-12/msg00058.html

why not visual studio?
Two reasons:

1. Visual Studio is not free. Yes there is Visual C++ express but for a while it didn't have C99 support because in general it was only a C++ compiler. I believe C99 support was added with VS2013.

2. It's just really nice to use the same compiler on Linux, BSD and Windows. This is possible with GCC and LLVM but not Visual C++.

Microsoft tools are not bad (in fact I like SQL server over MySQL or Postgres) but because they aren't cross platform it's very difficult to adopt. them.

Unless they've recently and very quietly changed their policy, the Express versions also don't support plugins.
Since this is an article about an open source debugger, it's probably because Visual Studio is not free (except express), Free, or Open Source.
Can you recommend a good way to get GUI for gdb on Linux? I played a bit with xgdb, but it was very primitive in my experience. Thank you.