gdb is not supported on M1 Macs; you can instead consider using lldb.

Answer from 284751067qqcom on Stack Overflow
🌐
SciVision
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.
🌐
GitHub
github.com › orgs › Homebrew › discussions › 1114
Support for gdb on m1? · Homebrew · Discussion #1114
Yes. GDB still doesn't support Apple Silicon, and there doesn't seem to be any indication on the mailing lists that anyone's even working on it.
🌐
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
🌐
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).
🌐
Tweaking4All
tweaking4all.com › forums › software developmen... › delphi, lazarus, fr...
macOS - Install GDB in 2023 (for use with Lazarus Pascal)
August 2, 2021 - A lot has changed since Apple dropped ... for Apple Silicon Mac's you'd probably want to use LLDB as it seems GDB does not [yet] support Apple Silicon....
🌐
Medium
medium.com › @AI_and_Blockchain › how-to-get-gdb-running-on-macos-with-arm-chips-using-qemu-ff9041d6f380
How to Get GDB Running on macOS with ARM Chips Using QEMU | by AI_and_Blockchain | Medium
December 13, 2023 - How to Get GDB Running on macOS with ARM Chips Using QEMU · If you’re working with macOS on Apple’s ARM chips, you might have encountered challenges in running GDB (GNU Debugger).
Find elsewhere
🌐
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)
🌐
Does It Arm
doesitarm.com › formula › gdb
Does gdb work on Apple Silicon? - Does It ARM
Latest reported support status of gdb on Apple Silicon and Apple M3 Max and M2 Ultra Processors.
🌐
GitHub
gist.github.com › mike-myers-tob › 9a6013124bad7ff074d3297db2c98247
Steps to get GDB actually working in April 2021 on macOS (Intel x86-64 only) · GitHub
Oh, BTW, you're on an Intel machine, right? Gdb has apparently gained support for Apple Silicon, but only very recently and, I'm sure it doesn't support macOS 11 on Apple Silicon.
🌐
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).
🌐
JetBrains
intellij-support.jetbrains.com › hc › en-us › community › posts › 5358574720786-Using-CLion-s-bundled-GDB-through-Rosetta-on-Apple-Silicon-Mac
Using CLion's bundled GDB through Rosetta on Apple Silicon Mac? – IDEs Support (IntelliJ Platform) | JetBrains
Creating a fresh (C++) project ... debugger to the bundled GDB debugger. This is somewhat expected, as GDB does not support Apple Silicon ARM architecture. However, I hope it might be possible to run the bundled GDB debugger ...
🌐
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 ...
🌐
Discourse
fortran-lang.discourse.group › t › fortran-debugger-status-for-apple-silicon-chips-m1-m2-m3-m4 › 8822
Fortran debugger status for Apple Silicon chips (M1/M2/M3/M4...) - Fortran Discourse
November 10, 2024 - Hello, It seems that gdb is still not ported to the Apple Silicon platform. Are there any other debuggers that can be used to debug Fortran codes? I am thinking about buying a Mac Mini M4, but the lack of debugger is a …
🌐
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.