GDB frozen on macOS Catalina
Asked Answered
D

1

5

I ran a 'helloworld' to try GDB on mac but after typing run it output

[New Thread 0x1903 of process 69034]

and then nothing.

I've waited an hour and still nothing. Having done certification and disable startup-with-shell.

system: MacOS Catalina 10.15.4 GNU gdb (GDB) 9.1

Designer answered 15/4, 2020 at 23:59 Comment(1)
I see the same behavior with the same configuration. When I kill it, it then works the second time. But I then rebooted and tried again, and it again froze (but again, I could kill it and it then worked).Stepson
P
3

"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)." from https://www.ics.uci.edu/~pattis/common/handouts/macmingweclipse/allexperimental/mac-gdb-install.html

use lldb instead of gdb in OS X.

this doesn't solve the problem with gdb, but at least gives you a way to get around it!

lldb and gdb are very similar debuggers. here's a mapping from gdb commands to their lldb equivalents: https://lldb.llvm.org/use/map.html

Puckery answered 21/9, 2020 at 11:17 Comment(1)
I confirm LLDB doesn't get this problem on macOS Catalina.Sewell

© 2022 - 2024 — McMap. All rights reserved.