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

Answer from 284751067qqcom on Stack Overflow
🌐
MacPorts
trac.macports.org › ticket › 62356
#62356 (gdb: add arm64 support) – MacPorts
however, gdb upstream does not support arm64 MacOS at present: <​https://inbox.sourceware.org/gdb/[email protected]/> so there is nothing in MacPorts to request, until upstream has something to build. Do we have some alternative, working debugger on aarch64? ...
🌐
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 - Unfortunately, GDB doesn’t run natively on macOS with these chips, and LLDB, the default debugger on macOS, doesn’t support the 32-bit RISC-V architecture.
🌐
Apple Community
discussions.apple.com › thread › 254623428
I am looking for gdb which runs on arm64.… - Apple Community
I am looking for gdb which runs on arm64-MacMini. I am revising the old fortran codes using gfortran. I found gdb runs on the x86_64 emulator on MacMini.
🌐
Interrupt
interrupt.memfault.com › blog › installing-gdb
Tools we use: installing GDB for ARM | Interrupt
August 3, 2022 - I’m going to go through the various ways to install GDB with ARM support, but first here’s a table summarizing the approaches: ARM ships full prebuilt GCC + Binutils toolchains for Linux, Windows, and Mac.
🌐
GitHub
github.com › orgs › Homebrew › discussions › 1114
Support for gdb on m1? · Homebrew · Discussion #1114
Still it is not possible to debug aarch64-darwin binaries via GDB. But GDB is useful as a frontend for remote debugging. so folks wanting to replace lldb for macOS ARM development will be left disappointed.
🌐
Tweaking4All
tweaking4all.com › forums › software developmen... › delphi, lazarus, fr...
macOS - Install GDB in 2023 (for use with Lazarus Pascal)
August 2, 2021 - Especially for Apple Silicon Mac's you'd probably want to use LLDB as it seems GDB does not [yet] support Apple Silicon.
Find elsewhere
🌐
GitHub
gist.github.com › m0sys › 711d0ec5e52102c6ba44451caf38bd38
Apple M1 ARM GDB Build from Source with Python Support · GitHub
The latest information appears to be in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96168 - it links to a fork which has support for macOS on aarch64, but I didn't try it yet. ... Hey guys, I apologize for late response! This script that I posted only works for arm-none-eabi. I haven't personally tried to compile gdb for aarch64 since its not supported. Essentially, it's an abi issue. Check out gcc-darwin-arm64 for further support (haven't tried it yet).
🌐
LinkedIn
linkedin.com › pulse › configuring-vscode-compile-debug-c-arm64-macbook-m1-kublai-gomez-soto
Configuring VSCode to compile and debug C in ARM64 (Macbook M1) Architecture
December 20, 2022 - The classic companion debugger for gcc is gdb, but if you try to install it with "brew install gdb" this message will be shown: gdb: The x86_64 architecture is required for this software.
🌐
Stenger
stenger.io › blog › fast-gdb
Fast x86 Debugging: Using GDB On Apple Silicon with Rosetta emulation
sudo apt upgrade dpkg --add-architecture 'amd64' sudo apt install gdb-multiarch sudo apt install libc:amd64 sudo apt install gcc:amd64
🌐
SciVision
scivision.dev › macos-gdb-apple-silicon
GDB debugger for macOS Apple Silicon | Scientific Computing
June 1, 2025 - GDB debugger is not yet readily available for macOS with Apple Silicon CPU. GDB is installable on Apple Silicon Macs via Homebrew, but it is not functional on Apple Silicon Macs for local executables. It has long been possible to use a virtual machine with Linux for ARM64 to run GDB within the VM.
🌐
GitHub
gist.github.com › securisec › b88cf9e89f957669b95043c9c380a26e
gdb debugging on ARM/m1 mac with docker · GitHub
docker run --rm -it -v $PWD:/data --cap-add=SYS_PTRACE --security-opt seccomp=unconfined --platform=linux/amd64 securisec/gdb /bin/bash
🌐
Arch Linux ARM
archlinuxarm.org › packages › aarch64 › gdb
gdb (aarch64) | Packages | Arch Linux ARM
Copyright ©2009-2022 Arch Linux ARM The registered trademark Linux® is used pursuant to a sublicense from LMI, the exclusive licensee of Linus Torvalds, owner of the mark on a world-wide basis. The Arch Linux™ name and logo are used under permission of the Arch Linux Project Lead
🌐
GitHub
github.com › dinkelhacker › arm64-gdb-tools
GitHub - dinkelhacker/arm64-gdb-tools: gdb extensions for aarch64 bare metal debugging
[phil@fedora os]$ ./build/gcc-arm/bin/aarch64-none-elf-gdb -v GNU gdb (GNU Toolchain for the A-profile Architecture 10.3-2021.07 (arm-10.29)) 10.2.90.20210621-git ...
Author   dinkelhacker
🌐
GitHub
github.com › l2iterative › gdb0 › blob › main › gdb_macOS_arm.md
gdb0/gdb_macOS_arm.md at main · l2iterative/gdb0
host@host:~$ qemu-system-x86_64 -m 4096 -drive file=gdb.img -net user,hostfwd=tcp::10022-:22 -net nic -cdrom ./ubuntu-22.04.3-live-server-amd64.iso · A window should pop up for the virtual machine.
Author   l2iterative
🌐
Raspberry Pi Forums
forums.raspberrypi.com › board index › hardware and peripherals › raspberry pi pico › general
I got a debug probe, here's a bash script to build GDB for ARM - Raspberry Pi Forums
I am building on MX-Linux 21 Wildflower and will make modifications to build on https://GhostBSD.org/download to support my use of GDB-aarch64-none-eabi or is it GDB--arch64-freebsd and OpenOCD to Tigard board connected to a Raspberry Pi 4B with 8G bytes running GhostBSD-Arm64 (or FreeBSD 14.0-STABLE) operating system https://FreeBSD.org/where FreeBSD 14.0-RELEASE Look for RPI image for the Raspberry Pi 4B, 3B, 400 ; or the AMD64 image for a standard PC system Compare the Configurations for GDB --target=x86_64-pc-linux-gnu to Aarch64-GDB --target=aarch64-elf-freebsd Built with this configure line for aarch64: $ ../configure --target=aarch64-elf-freebsd --enable-target=amd64 --program-prefix=aarch64- --with-python --with-python-libdir