Mountain Lion no working gdb debugger - c++

I got a new Macbook Air and installed XCode 5 on it. To my surprise Apple does no longer ship gdb with the command line tools. As I am doing lots of c++ coding I am dependent on a good debugger.
What I tried so far:
Install gdb 7.6 via macports and signed the binary.
Debugging from QT-Creator is possible. It stops at the breakpoints but I see no information at all about the stack. Using lldb not possible, I get a weird python error.
Debugging from Netbeans is not possible at all. The Debugger is not stopping at any breakpoint. Apart from that Netbeans is not working with lldb.
Working with XCode is no problem. Everything works as expected.
Problem is I need an IDE that can do remote debugging as I have several Raspberry Pi projects. Developing software directly on the pi with vim is fun but not suitable for bigger projects.
So the question is, has anyone a working debugger on Mountain Lion with XCode 5 installed? IDE in question needs to support remote debugging (eg QT-Creator, Netbeans, Eclipse)
Thank you!

Install Xcode 4.6.3. If you have a developer's account it's available for download at http://developer.apple.com

Encountered the same problem. Finally installed command line tools from xcode 4.6.1 on ML. This package is available on Apple site. It installed GCC-LLVM 4.2.1 and GDB 6.5. Qt Creator was able to build application and start debugging. Debugging is not stable too much; but i can to see call stacks, values and stop on breakpoints. I use it for 32bits build - maybe it matters.

You could also switch from GDB to using the LLDB debugger (although the Qt support is early for this).
See http://stanford.edu/~rawatson/lair/mac.html

Related

Debugger with Eclipse on a macOS Catalina

I've macOS Catalina and Eclipse IDE for C/C++ Developer, Version: 2021-03 (4.19.0) and I need to use EclipseCDT debugger. Following the steps at macOS 10.15 Catalina gdb problem for C++ Debugging in Eclipse I still have problems. Namely, the Debug window doesn't show up.
The only difference between my steps and the ones from the tutorial is the gdb version: mine is 10.1, while the other is 8.3.
I've found this FAQ link: https://wiki.eclipse.org/CDT/User/FAQ, where seems to be possible to use LLDB debugger, but I can't find the detailed instructions. Any approach is fine to me, I just need a working debugger

MacOS Catalina 10.15.5 - OMNeT++ 5.6.2 stucks at "Configuring GDB"

I have a problem in debugging OMNeT++ in my Macbook Pro.
I installed OMNeT++ 5.6.2 on my MBP having macOS Catalina 10.15.5 and tried to run tictoc tutorial. It runs fine, however there is a problem with debugging.
I know that masOS no longer supports gdb and we have to install gdb through Homebrew or Macports and then configure it. I already have set up gdb.
In order to test gdb, I installed eclipse CDT, set up and configure GDB, then started debugging.
It was debugging fine in eclipse. However, when I debug in OMNeT++, it stucks at "Configuring GDB".
I also tried with OMNeT++ 5.5.1 but having the same problem.
I also asked it before at stack overflow, but couldn't find appropriate solution.
MyPreviousQuestion
Does anyone know how to fix OMNeT++ debugging issue on macOS?
Just like in the other SO question: I would also advise to try to use OMNeT++ 6.0 preview 8 on macOS. I have successfully built it on macOS 10.15 and as suggested in the other SO thread, it does use lldb instead of gdb.
An alternate workaround could be to use VS Code with an appropriate extension. I have just published a blog entry related to debugging OMNeT++ models:
https://omnetpp.org/blog/2020/07/05/omnetpp-debugging-tips.html

How to install Eclipse for C++ for OS X Yosemite?

I have a macbook and i'm studying C++ myself. I cant practice it because i don't know how to get eclipse working. Can someone show me exact steps to install eclipse on mac(preferred pictures with notes). Thanks
Download Eclipse CDT, unzip it, then "double click" on the "Eclipse" icon in the unzipped folder. This should do it. If you want the debugger to work, that's a different story, you have to use g++ with gdb (Eclipse doesn't work with lldb), so you need to install g++ and gdb and code-sign the latter. Easiest way to install them is via macports.
PS: to get Eclipse working you need a Java virtual machine, see here how to install it for Yosemite.
BTW: check out the CLion IDE from JetBrains, I find it quite nice. Or, if you want to stick to clang++ use XCode. The only downside in that case is the IDE (I'm not super excited about XCode) and clang++'s lack of OpenMP (which for me was extremely important). You can make OpenMP work with clang++, but it is a pain.

Netbeans not able to debug

I use Netbeans 8.0 on Ubuntu 14.04 and I have run into a problem with debugging c++ files. In the past this has worked. According to what I see on Google, if I go to the project properties I should see
General
Build....
Run
Debug
Related Projects
In my case there is no debug entry, which explains why I can't debug. I went to the repository and removed and reinstalled gdb. Then I removed Netbeans and reinstalled it as well. In case there was something wrong with my project, I made a new c++ project and it too was missing the debug capability.
Anybody have any idea what else I can do? This has to be something fairly basic but I can't guess what else I can do.
Thanks,
Ilan
I got a similar results with NetBeans 8.02 on Ubuntu 12.04.
Some projects are unable to be run with debugger. Some can be debugged.
The same project, complied on Ubuntu 12.04 but with NetBeans 8.0 (without updates) runs with debugger with no problems.
So it seems to be a version issue of NetBeans.

Making Eclipse for C++ developers compile

I've downloaded Eclipse for C/C++ for Mac OSX. I'm running Snow Leopard. Now, when trying to run the Hello World application on Eclipse, it is complaining that
What might be the issue? Maybe I don't have (or Eclipse can't find) where my C++ compiler is? If that is the issue, what should I install and how should I proceed so that Eclipse recognizes it?
It looks like gcc is not in your path. Try adding the path to gcc (should be in /usr/bin by default) to your PATH environment variable and relaunch Eclipse.
You can also try adding it to Eclipse's preferences. I believe you'll find an item in the eclipse preferences which will allow you to point eclipse at the location of gcc. This would come in handier then benw's answer in my opinion because you're not changing anything with the system itself. Developing often involves setting things up specific to your development environment. Although it seems like gcc would be on your PATH already if it were installed. Have you installed Apple's developer tools by any chance?
Thanks.
Since I cannot comment on that comment you just put above. Install the Apple Developer tools. You can go here to download them. I just used gcc on my work mac today, and I never installed gcc specifically so it had to have been installed when I installed the developer tools.