gdb is not supported on M1 Macs; you can instead consider using lldb.
Answer from 284751067qqcom on Stack OverflowSciVision
scivision.dev › macos-gdb-apple-silicon
GDB debugger for macOS Apple Silicon | Scientific Computing
June 1, 2025 - GDB is installable on Apple Silicon Macs via Homebrew, but it is not functional on Apple Silicon Macs for local executables.
Videos
Learn the lldb debugger basics in 11 minutes | 2021 (Also ...
08:36
Download & install gdub on Mac OS (Big Sur, Monterey, Catalina, ...
04:14
Debugging C++ on Mac with VSCode - YouTube
05:27
Install Homebrew Natively on an Apple Silicon M1 Mac - YouTube
11:07
Install gdb on OS-X for Eclipse - YouTube
GitHub
github.com › ares-emulator › ares › issues › 1408
On Apple Silicon (Mac M1). gdb cannot be built. What are my debugging options? · Issue #1408 · ares-emulator/ares
February 26, 2024 - I am running Ares on my Apple Silicon MacBook Pro. While Ares can connect to GDB, I cannot build GDB on Apple Silicon as it does not support the architecture. What are my options? Can Ares connect to lldb? Are there any internal debuggin...
Published Feb 26, 2024
Reddit
reddit.com › r/mac › gcc and gdb on m1 macs
r/mac on Reddit: GCC and GDB on M1 Macs
January 23, 2022 -
Can I use GCC and GDB on an M1 Mac? I was wandering if it could support my development of my University assignment (they require GCC). I was also wandering if I could develop application with OpenGL with the Apple Chip?
Someone that is using them can help me?
Top answer 1 of 4
3
Hey guys! I was able to build gdb from source just now and documented the steps in the gist below. Gist Hope this helps!
2 of 4
1
Yes, you can use gcc and gdb on an M1 Mac. You can also develop OpenGL applications, though the OpenGL version on MacOS in general is out of date. Someone that is using them can help me? We can't help you if you don't do your best to explain what's not working, what you've tried, and what the result is.
Stenger
stenger.io › blog › fast-gdb
Fast x86 Debugging: Using GDB On Apple Silicon with Rosetta emulation
This blog post will outline how to setup x86 GDB on M1. This isn’t your run-of-the mill x86 emulation - this is FAST — using the Rosetta translation engine, instead of QEMU. Thanks to sporks.space for the initial writeup of the ROSETTA_DEBUGSERVER feature! I am running on a M1 Chip, running MacOS Sonoma 14.0 (Build 23A339).
Hacker News
news.ycombinator.com › item
Using GDB on Apple Silicon with Rosetta Emulation | Hacker News
October 17, 2023 - No such item
MacPorts
ports.macports.org › port › gdb-apple
Install gdb-apple on macOS with MacPorts
If not done already, install MacPorts. To install gdb-apple, run the following command in macOS terminal (Applications->Utilities->Terminal)
Apple Community
discussions.apple.com › thread › 253272158
gdb compiler - Apple Community
I’d expect gdb to install with gcc, so (if this is not already what you are trying) try installing gcc:
Apple Community
discussions.apple.com › thread › 254623428
I am looking for gdb which runs on arm64.… - Apple Community
I found gdb runs on the x86_64 emulator on MacMini. But to avoid the confusions among my codes, I would like to stick to the arm64 even for the old fortran codes. I am using OSX 13.1. ... FORTRAN COMPILER FOR MAC VISUAL CAPABILITIES What is the best fortran compiler for Mac using visual capabilities for editing, debugging and running 381 2 · Any C/C++ debugger available for m1 right now? I'm trying to debug a C++ code in Visual Studio Code(Apple Silicon Version).
UCI ICS
ics.uci.edu › ~pattis › common › handouts › macmingweclipse › allexperimental › mac-gdb-install.html
ICS 46: GDB Installation on Mac OS X
If you work on a Mac OS X 10.9 Mavericks or later, you will run into the problem of Eclipse refusing to interactively debug problems that otherwise build and run fine: An attempt to start a debugging session by selecting Run Debug from the menu will result in Eclipse complaining that an Error with command: gdb --version has occurred. The problem is caused by Apple switching away from GDB, the GNU debugger, to LLDB, the LLVM debugger, in their Xcode toolchain (along with the transition from GCC to Clang).
Reddit
reddit.com › r/c_programming › does installing gdb on a mac usually take a while? or is it only me?
r/C_Programming on Reddit: Does installing GDB on a mac usually take a while? or is it only me?
April 13, 2024 - It takes forever for Apple Silicon users unless you install JetBrains CLion and harvest the gdb build from there. It's ridiculous it took all these years to get it. ... Don't buy mac if you want to do anything beyond browsing the web and doing some basic video editing - a big fuckin' waste of money for us, coding apes ....
Apple Community
discussions.apple.com › thread › 252587810
Any C/C++ debugger available for m1 right… - Apple Community
On Homebrew website it doesn't show an option for gdb for Apple Silicon. So is there a C++ debugger for m1 yet? ... Had you installed Xcode 12.4 and/or the command-line tools for Xcode 12.4, you would have the clang/clang++ compiler, and the lldb debugger that would either allow you to debug visually (Xcode) or in the Terminal. These tools support arm64 builds and debugging. See Apple's Debugging tools. ... how to do C++ on M1 macbook ...
Doesitarm
develop.doesitarm.com › formula › gdb
Does gdb work on Apple Silicon? - Does It ARM
Latest reported support status of gdb on Apple Silicon and Apple M1 Pro and M1 Max Processors when installed via Homebrew.