../
MGF
- Make gf2 work on MacOS
- If that doesn’t work try to create a new SwiftUI app that works with LLDB instead of GDB
- As of 2025-12-27 I haven’t been able to get
gccto generate proper debugging symbols. - Any binary compiled with
-gthrows up the following error
❌️ DWARF Error: DW_FORM_line_strp used without required section
- The problem persists even when using
-gdrawf-4 - Meanwhile
clangwith-gdrawf-4solves the symbol problem butgdbis not able to execute it for some reason
As of 2025-12-27
gdbcannot debugaarch64-darwinbinaries.
Even the formula to build gdb has to use a workaround.
# Fix: Apple Silicon build, this is only way to build native GDB
if OS.mac? && Hardware::CPU.arm?
# Workaround: "--target" must be "faked"
args << "--target=x86_64-apple-darwin20"
args << "--program-prefix="
end
They fake it to build of x86_64. This produces a gdb binary that runs natively on Apple Silicon but cannot debug any aarch-darwin code. Though it can be used for remote debugging.
Moving forward, use lldb for anything related to MacOS.