
GDB 7.11 released - lelf
http://lists.gnu.org/archive/html/info-gnu/2016-02/msg00010.html
======
blt
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...

~~~
samuell
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](https://www.youtube.com/watch?v=OKLR6rrsBmI)

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

~~~
tbirdz
There is also gdb's built in tui mode. You can activate it with gdb -tui or
keyboard shortcut C-x C-a.

------
throwaway27_35
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))

------
TerryADavis
At Ticketmaster, I learned the first thing you write when you start on bare
metal is a debugger. I worked on VAX, 68000 and 8051 bare metal.

The difference between an amateur operating system project and a professional
one is writing a compiler.

~~~
vmorgulis
Forth and HolyC have both.

~~~
benaiah
You're replying to the guy that _wrote_ HolyC.

~~~
vmorgulis
Yes, I know :-)

------
jjawssd
How do I use this on OS X 10.11?

~~~
fjarlq
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. Instructions:
[http://sourceware.org/gdb/wiki/BuildingOnDarwin](http://sourceware.org/gdb/wiki/BuildingOnDarwin)

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

~~~
fjarlq
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.

~~~
fs111
nonsense, gnu tar unpacks anything with tar xf <file> just fine.

~~~
fjarlq
Oh, good point, I wasn't aware that GNU tar also supported automatic
compression recognition. I should have tested it. Thanks!

