Replies: 4 comments 3 replies
-
At the moment there is no real support for host debugging on macOS for the reasons you have identified. Debugging remote targets on macOS works well and it a main supported flow. The maintainer of the Eclipse Embedded CDT project uses macOS. Please let us know if there is something in the cross compiling + debugging that doesn't work. |
Beta Was this translation helpful? Give feedback.
-
I'm back again. I really dislike CLion and VSCode. I would really like to use CDT for plain old macOS development - no embedded - no remote debugging. This issue hasn't changed in 15 months. CDT already supports clang via the gcc->clang link on Apple silicon, so the only missing part is gdb. It appears that the folks at GNU will not redesign gdb to use the macOS W^X switcher API - so gdb is dead for macOS as the Intel architecture and Rosetta evaporate into macOS history. |
Beta Was this translation helpful? Give feedback.
-
Thank you Jonah. One of the people who you put me in contact with helped me figure out how it can be made to work. Essentially you have to install the Experimental LLDB debugger from the main Eclipse download site. Then install the XCode command line tools to get lldb. Then install VSCode to get the lldb-mi executable file (hidden away in the directory structure). Make both lldb and lldb-mi available for execution (set path, chmod). Change the Default Launch configuration in Eclipse to use LLDB instead of GDB. Launch your C program with debug and IT WORKS! Suggestion: These software parts should be packaged together in the standard macOS Eclipse distribution for C/C++ so plain old C programmers (who are just Eclipse users) can debug their plain old C programs on macOS on current hardware. |
Beta Was this translation helpful? Give feedback.
-
@DonWills, I also observed a problem with breakpoints when experimenting with LLDB 17.0.6 on a Windows host. If you are compiling using a recent version of GCC, try forcing DWARF v4 debug info by adding Does that help? |
Beta Was this translation helpful? Give feedback.
-
macOS Venture 13.2.1, Mac Mini M2 Pro, Eclipse 2022-12 (4.26.0), CDT 11.0.0.202211062329
I can compile and run a plain old C program, but I can't debug it. It appears that GDB has not been ported to Apple silicon.
So I installed the experimental Eclipse LLDB support. I was able to change the debug environment to LLDB. When I start that, a Debug dialog pops up that says LLDB-MI failed: unknown reason.
A post someplace else says that LLDB-MI is no more, that there is some new architecture to run LLDB. (LLDB is installed - I can run it from the command line.)
I'm stuck. I first just want to debug C programs on my new MacMini (it's really fast BTW). Down the road I'd like to cross compile and debug remotely using Segger J-Link to a small processor board.
Do I have a prayer to accomplish any of this with Eclipse CDT? (If the answer is no, then changing to CLion may be a solution, but I much prefer Eclipse for a variety of reasons. And no, I won't change desktop computer/operating systems.)
Beta Was this translation helpful? Give feedback.
All reactions