7 ms·
GDB 7.11 released
- jjawssd 11y agoHow do I use this on OS X 10.11?
- dman 11y agoI dont develop much on osx anymore, but I suspect this will be available in homebrew at some point.
- fjarlq 11y agoYou 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
- sysrpl 11y agoMore on code signing gdb here: http://www.getlazarus.org/setup/macintosh/ http://www.getlazarus.org/setup/macintosh/
- rurban 11y ago`tar xfJ gdb-7.11.tar.xz` for .xz files
- fjarlq 11y agoGood 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.
- microtherion 11y agoA related question is: does it make sense to use this on OS X? lldb is certainly better integrated with the system, does gdb really have benefits that make up for that?
- fancy_pantser 11y agobrew install gdb
- TerryADavis 11y agoAt 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.
- blt 11y agoOK, 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...
- EliRivers 11y agoGod God, yes. Five minutes is enough to learn how to get it going, add breakpoints, see the stack and interrogate variables. On a good day, you can fix a segFault faster than it would actually take you to spin up a visual debugger in an IDE or whatever. Sure, it's not the right tool for every job, but as a simple, easy to use, ubiquitous and quick debugger, you'd do yourself a favour spending the five minutes learning how to start using it.
- cheez 11y agoLearn cgdb instead.
- pjmlp 11y agoUse DDD instead. https://www.gnu.org/software/ddd/ https://www.gnu.org/software/ddd/
- Arkanosis 11y agoIf 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.
- throwaway27_35 11y agosomewhat 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))