gcc/gdb/emacs in a Mac
Instructions for Installing gcc/gdb/emacs on a Mac
-
In your Mac, pen a terminal.
-
Install Homebrew (https://brew.sh/).
-
After the Homebrew installation has been completed you can install gcc, gdb, emacs by executing
on a Mac terminal:
- brew install gcc
- brew install gdb
- brew install emacs
- The previous installation will not overwrite the default gcc (clang). You will fing GNU gcc
at /usr/local/bin and the name will be something like gcc-14. You can run gdb and emacs by
just typing gdb and emacs, respectively. The installed emacs version does not have a GUI.
If you would like a GUI version, install the emacs app available at
https://emacsformacosx.com/.
-
To detect memory problems you can use the Apple's leaks command. On the terminal
you can execute it as follows: leaks --atExit -- a.out. If you
would like to install valgrind
check https://ports.macports.org/port/valgrind/.
Web Accessibility