06.12.2020

Gcc For Mac High Sierra

Gcc For Mac High Sierra 9,1/10 8297 votes
Home » Language IDEs » C / C++ IDE (CDT) » GDB under High Sierra - no joy!

Oct 07, 2019 Mac mini introduced in mid 2010 or later iMac introduced in late 2009 or later Mac Pro introduced in mid 2010 or later. To find your Mac model, memory, storage space, and macOS version, choose About This Mac from the Apple menu. If your Mac isn't compatible with macOS High Sierra, the installer will let you know. Mar 28, 2017 mingw-w64 Package Installation on Mac. Minimalist GNU for Windows and GCC cross-compilers! More Information. How To Install Telnet On Mac OSX Mojave High Sierra. Doing it Right¶. Let’s install a real version of Python. Before installing Python, you’ll need to install GCC. GCC can be obtained by downloading Xcode, the smaller Command Line Tools (must have an Apple account) or the even smaller OSX-GCC-Installer package. Oct 18, 2019  The easiest way to install a number of Unix style applications and open source software onto macOS Catalina, Mojave and earlier Sierra OS versions is via a package manager, unfortunately, macOS Catalina doesn’t come with one, but fortunately, some good folks care, they come in the form of Homebrew. The install of Homebrew also works on macOS Catalina, macOS Mojave, (High)Sierra, El. Install GCC on Mac OS high sierra. Ask Question Asked 2 years, 5 months ago. Active 2 years ago. Viewed 17k times 3. I've already visited the following answer but.

Show:Today's Messages::Show Polls::Message Navigator

Gcc

GDB under High Sierra - no joy![message #1793946]Tue, 21 August 2018 01:20
Andrew Voelkel
Messages: 17
Registered: September 2016
I have a C++ only Mac project and I'm sick of dealing with the poor C++ environment in Xcode. So I'd like to use Eclipse Photon.
I've tried various recipes on Stack Overflow etc. to get native gdb to work with Mac OS High Sierra and Eclipse. After spending a couple hours still no joy. The variety of error messages is too great to enumerate. From the looks of the comments to the recipes I've found, this is far from a slam dunk.
The problems seem to be:
a) gdb 8.1 compatibility with Eclipse Photon.
b) Big time code signing crapola with gdb and High Sierra.
Should I just give up on this? I'm pretty damn frustrated at this point.
It sure would be nice if I could just get a code signed version of gdb.
I guess that most folks doing this sort of thing just use Xcode?
Re: GDB under High Sierra - no joy![message #1795142 is a reply to message #1793946]Sun, 16 September 2018 22:19
Marc-André Laperle
Messages: 256
Registered: July 2009
I was able to make GDB 8.0.1 work OK on High Sierra, compiling it from source and following the instructions here https://sourceware.org/gdb/wiki/BuildingOnDarwin. There is some discussion here:
https://sourceware.org/bugzilla/show_bug.cgi?id=20266
Otherwise, you could also try the integration with LLDB, which I have been looking at improving, see https://wiki.eclipse.org/CDT/User/FAQ#How_do_I_get_the_LLDB_debugger.3F and following sections. It might not be a good solution for you yet but any feedback and bug reports are appreciated.
Re: GDB under High Sierra - no joy![message #1795147 is a reply to message #1795142]Mon, 17 September 2018 05:26
Andrew Voelkel
Messages: 17
Registered: September 2016
I tried lldb-mi. It seemed to work, but then I tried debugging some stuff which uses the STL container library, and it was pretty useless.
I don't actually know that gdb would be much better. I've seen post about 'pretty printing' and python scripts, but that doesn't exactly sound like gdb is truly STL aware.
For all its faults, Xcode actually handles this part 'OK'. It is a terrible C++ composition environment, but at least you can debug STL containers.
I'm kind of shaking my head that STL container debugging isn't completely integrated and old hat in Eclipse by now. How long has STL been around? A long time.
So at this point I use Eclipse for C++ composition and Xcode for debug. It seems pretty silly that is what I have to do, but there you have it. CLion is OK, but it isn't free and it has issues too.
If I were in Windows, Visual Studio would 'just work'. But I gave up on Windows when Windows 8 came out and I'm not going back anytime soon.
Re: GDB under High Sierra - no joy![message #1795181 is a reply to message #1795147]Tue, 18 September 2018 04:06
Marc-André Laperle
Messages: 256
Registered: July 2009
You bring up a good point about STL support. I created a bug to track STL support https://bugs.eclipse.org/bugs/show_bug.cgi?id=539168
Most of the debug support in Eclipse was done for Linux and GNU toolchain (GCC, libstdc++ and GDB). With this combination, you can have good support for STL pretty printing and it should work out of the box. The way I understand it, GDB pretty printers are heavily tied to the standard library implementation details, so on macOS the pretty printing support would need to be implemented there for libc++ (I think that's the standard library being used?). I actually don't know how this works in Xcode but it sounds promising and maybe we can add it to lldb-mi support too.
I do understand your pain, I've used Eclipse+Xcode combination and Eclipse+VisualStudio combination for a very long time. Pre-lldb in Xcode, it got to a point where Apple-gdb support was pretty on par (i.e. as bad) as Xcode. In the end, no one in the.. thousands of users?.. cares enough to make this work as well as on Linux.
Re: GDB under High Sierra - no joy![message #1795187 is a reply to message #1795181]Tue, 18 September 2018 06:32
Andrew Voelkel
Messages: 17
Registered: September 2016
I'm curious about what this 'pretty printing' buys you. With LLDB in either Xcode or CLion, you can dive down into STL containers interactively, looking at individual elements in the containers, and opening them up in a tree view pretty seamlessly. Does pretty printing let you do this? It kinda doesn't sound like it.
I haven't been over to Windows to try this stuff on Visual Studio for a while, not since starting to use STL containers heavily. I'd be surprised if the experience were not at least as good as LLDB with Xcode or Clion, but I really don't know. I would think it would be a decent C++ composition tool also. But it isn't worth running Windows to do it. Not unless I'm hired to do a sizable C++ project on Windows, and I'm not holding my breath on that one.
Without good debug support, using STL containers definitely loses a lot of its appeal! I should be thankful to have it, even if I have to use one IDE for composition and one for debug.
Re: GDB under High Sierra - no joy![message #1795292 is a reply to message #1795187]Thu, 20 September 2018 04:37
Marc-André Laperle
Messages: 256
Registered: July 2009
Quote:
I'm curious about what this 'pretty printing' buys you. With LLDB in either Xcode or CLion, you can dive down into STL containers interactively, looking at individual elements in the containers, and opening them up in a tree view pretty seamlessly. Does pretty printing let you do this? It kinda doesn't sound like it.

Yes, it lets you do that.
Without: https://wiki.eclipse.org/images/3/31/NoPrettyPrint.png
With: https://wiki.eclipse.org/images/8/81/FullPrettyPrint.png
And you can also add your own. In LLVM for example, there are gdb pretty printers for a few base types, right in the repo.
Re: GDB under High Sierra - no joy![message #1795341 is a reply to message #1795292]Thu, 20 September 2018 14:46
Andrew Voelkel
Messages: 17
Registered: September 2016
That's excellent news about STL 'pretty printing'. I'm about to do a cross development project Mac Host / Linux Target. This should make life much better.
It might also motivate me at some point to get gdb working on the Mac target.
Too bad it doesn't work outta the box though!
Re: GDB under High Sierra - no joy![message #1795568 is a reply to message #1793946]Tue, 25 September 2018 11:25
Avarro mickllov
Messages: 2
Registered: September 2018
in my case downgrading to 8.0.1 didn't help.
but the following steps helped.
(i inserted step 12, 'check if it works' because, instead of restarting i've tested gdb and it worked just fine. i didn't follow the steps 12+)
Open Keychain Access
In menu, open Keychain Access > Certificate Assistant > Create a certificate
Give it a name (e.g. gdb-cert)
Identity type: Self Signed Root
Certificate type: Code Signing
Check: let me override defaults
Continue until 'specify a location for..'
Set Keychain location to System
Create certificate and close Certificate Assistant.
Find certificate in System keychain.
Double click the certificate
Expand Trust, set Code signing to always trust
Restart taskgated in terminal: killall taskgated
Codesign gdb using your certificate: codesign -fs gdb-cert /usr/local/bin/gdb FetLifeIMVUCanva
--- CHECK IF IT WORKS ---
Shut down your mac and restart in recovery mode (hold down command-Runtil apple logo appears)
Open terminal window
Modify System Integrity Protection to allow debugging: csrutil enable --without debug
Reboot your Mac
Debugging with gdb should now work as expected.

[Updated on: Wed, 26 September 2018 17:48] Browser for os x 10.6.

Re: GDB under High Sierra - no joy![message #1795745 is a reply to message #1795568]Thu, 27 September 2018 15:45
Andrew Voelkel
Messages: 17
Registered: September 2016
Does STL pretty printing work for you?
Re: GDB under High Sierra - no joy![message #1795799 is a reply to message #1795745]Sat, 29 September 2018 00:11
Marc-André Laperle
Messages: 256
Registered: July 2009
With GDB on macOS target? No, I don't think it's supposed to work out of the box right now since there would need to be pretty printers installed along with libc++. They are often installed with libstdc++ which is more commonly used on Linux. I did find this however but never tried it: https://libcxx.llvm.org/docs/UsingLibcxx.html#gdb-pretty-printers-for-libc

Install Gcc For Mac

Gcc For Mac High Sierra
Previous Topic:undefined reference to class::class
Next Topic:CDT Makefile Build kills background processes
Goto Forum:
[ Syndicate this forum (XML) ] [ ]

Gcc Compiler For Mac


Gcc for mac high sierra download

Mac Gcc Compiler

Powered by FUDForum. Page generated in 0.02253 seconds