gdb is not supported on M1 Macs; you can instead consider using lldb.
Answer from 284751067qqcom on Stack OverflowReddit
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.
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
Apple Community
discussions.apple.com › thread › 253272158
gdb compiler - Apple Community
Want to know how to install TubroC++ ... tools, you get lldb, which is the debugger that works with the clang compiler install when you use ... gdb is usually a debugger....
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 ...
Published Feb 26, 2024
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
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).
Raspberry Pi Forums
forums.raspberrypi.com › board index › hardware and peripherals › raspberry pi pico › sdk
GDB on Mackbook Air M1 -- impossible? - Raspberry Pi Forums
(base) ➜ brew install gdb ==> Downloading https://formulae.brew.sh/api/formula.json ######################################################################## 100.0% ==> Downloading https://formulae.brew.sh/api/cask.json #=#=# gdb: The x86_64 architecture is required for this software. Error: gdb: An unsatisfied requirement failed this build. Does this means that there would be no SWD debug for PICO on Mackbook M1 Air?
Hacker News
news.ycombinator.com › item
Using GDB on Apple Silicon with Rosetta Emulation | Hacker News
October 17, 2023 - No such item
DEV Community
dev.to › jasonelwood › setup-gdb-on-macos-in-2020-489k
Install Gdb Mac: Setup gdb on macOS in 2020 - DEV Community
September 18, 2020 - If you tried debugging with gdb now, you would likely receive a "No symbol table is loaded" error. In order to solve this, you'll need to compile programs with the -ggdb option, as in the following example: ... At this point you should be able to successfully debug your programs on Mac using gdb.
UCI ICS
ics.uci.edu › ~pattis › common › handouts › macmingweclipse › allexperimental › mac-gdb-install.html
ICS 46: GDB Installation on Mac OS X
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). Unfortunately, Eclipse is not capable of communicating with any debugger other than GDB (yet).
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 I want to write some C++ programs on this Macbook M1 chip model but the thing is it does not work mainly because most of the apps such as VisualStudio are being emulated?
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.
MacPorts
ports.macports.org › port › gdb-apple
Install gdb-apple on macOS with MacPorts
GDB can run on most popular UNIX and Microsoft Windows variants. ... If not done already, install MacPorts.
GNU
lists.nongnu.org › archive › html › directory-discuss › 2022-03 › msg00000.html
Re: Gdb debugger issue on M1 Mac
Hi, I think it is about SIP (System ... M1 Mac. I could successfully install Ubuntu (linux/amd64). > Then I installed C and C++. Everything went well. Then I wrote a > simple C code ‘Hello World’. It generated the result. But when I tried > to run GNU’s gdb debugger, ...