Live data from Hacker News

GDB 7.11 released

lists.gnu.org

11–20 of 39 posts

Re: GDB 7.11 released

#11
post #9

OK, for someone who's written a lot of C++ in Visual Studio but is now developing on Linux: is it worth learning GDB? It seems like it'll always have some mental overhead compared to a visual debugger, but on the other hand I was never crazy about using an IDE...

Use DDD instead.

https://www.gnu.org/software/ddd/

Re: GDB 7.11 released

#12
post #9

OK, for someone who's written a lot of C++ in Visual Studio but is now developing on Linux: is it worth learning GDB? It seems like it'll always have some mental overhead compared to a visual debugger, but on the other hand I was never crazy about using an IDE...

If you have a visual debugger, maybe not.

But if you have complex bugs to track, the integration of Python in GDB alone is worth the hassle, I think.

Re: GDB 7.11 released

#13
post #5
post #2

How do I use this on OS X 10.11?

You can build the gdb executable manually on OS X 10.11. First, run this if you haven't already installed the Command Line Tools for Xcode: xcode-select --install Then run these commands: curl -o gdb-7.11.tar.xz https://ftp.gnu.org/gnu/gdb/gdb-7.11.tar.xz tar zxf gdb-7.11.tar.xz cd gdb-7.11 ./configure make make install This should place the executable at /usr/local/bin/gdb. The final step is to codesign it. Instruct…

More on code signing gdb here: http://www.getlazarus.org/setup/macintosh/

Re: GDB 7.11 released

#14
post #5
post #2

How do I use this on OS X 10.11?

You can build the gdb executable manually on OS X 10.11. First, run this if you haven't already installed the Command Line Tools for Xcode: xcode-select --install Then run these commands: curl -o gdb-7.11.tar.xz https://ftp.gnu.org/gnu/gdb/gdb-7.11.tar.xz tar zxf gdb-7.11.tar.xz cd gdb-7.11 ./configure make make install This should place the executable at /usr/local/bin/gdb. The final step is to codesign it. Instruct…

`tar xfJ gdb-7.11.tar.xz` for .xz files

Re: GDB 7.11 released

#15
post #9

OK, for someone who's written a lot of C++ in Visual Studio but is now developing on Linux: is it worth learning GDB? It seems like it'll always have some mental overhead compared to a visual debugger, but on the other hand I was never crazy about using an IDE...

[deleted]

Re: GDB 7.11 released

#16
post #9

OK, for someone who's written a lot of C++ in Visual Studio but is now developing on Linux: is it worth learning GDB? It seems like it'll always have some mental overhead compared to a visual debugger, but on the other hand I was never crazy about using an IDE...

In my experience, the cgdb [1] wrapper makes gdb a viable option, by providing what I think is the sorely missing piece in vanilla gdb: a window continuously showing the code context.

It also uses vim-like bindings for going into "insert" mode ("i"), versus escaping out into code context navigation mode ("ESC").

I made a short 4 minute tutorial on how to use gdb/cgdb for debugging Golang, here:

https://www.youtube.com/watch?v=OKLR6rrsBmI

[1] https://cgdb.github.io/

Re: GDB 7.11 released

#17
post #9

OK, for someone who's written a lot of C++ in Visual Studio but is now developing on Linux: is it worth learning GDB? It seems like it'll always have some mental overhead compared to a visual debugger, but on the other hand I was never crazy about using an IDE...

Yes! Assuming you run it with --tui, otherwise you'll hate yourself forever.

It may seem to have some mental overhead at first because you have to type commands, but it becomes second nature after a while. IMHO, it has far less overhead than debuggers where you have to click everywhere. There's a reason why people don't really bother writing pretty frontends for it.

If you use an IDE for Linux development, its debugger actually talks to GDB behind the scene. You can ditch the middle man without trouble.

The only thing that DDD really excels at (when it doesn't crash because, uh, long story short, Motif) and you can't get straight from GDB is visual representation of linked structures.

Re: GDB 7.11 released

#18
post #14
post #5

Earlier quoted context omitted.

You can build the gdb executable manually on OS X 10.11. First, run this if you haven't already installed the Command Line Tools for Xcode: xcode-select --install Then run these commands: curl -o gdb-7.11.tar.xz https://ftp.gnu.org/gnu/gdb/gdb-7.11.tar.xz tar zxf gdb-7.11.tar.xz cd gdb-7.11 ./configure make make install This should place the executable at /usr/local/bin/gdb. The final step is to codesign it. Instruct…

`tar xfJ gdb-7.11.tar.xz` for .xz files

Good point. GNU tar requires using the correct option, -J, when extracting an xz-compressed tarball.

But OS X tar is bsdtar, which ignores -z and -J when extracting because it automatically recognizes compression and does the right thing. So it turns out both our suggestions happen to work on OS X.

Re: GDB 7.11 released

#20
somewhat offtopic, but has anyone used lldb lately, when I last used it I found it much worse than gdb but I expect it will at somepoint surpass gdb (like the rest of LLVM has done to GNU (if you're on x86_64))
Post reply on HN