Gdb on Mac OS X v10.7 (Lion)

后端 未结 3 1295
攒了一身酷
攒了一身酷 2020-12-05 10:18

I am a new Mac user and wonder how to install the latest version of GDB (> 7.1). I prefer to use Homebrew, but I could not find GDB listed.

brew install gdb
         


        
3条回答
  •  萌比男神i
    2020-12-05 11:01

    This does not directly answer the given question, but if you're like me, what you really want is a simple way to run (something very much like) gdb.

    Apple now uses Clang as its compiler, and it turns out that the clang debugger, lldb, is installed along with the other command-line tools. It appears that lldb is designed with a user interface that mimics gdb very closely.

    So, the answer to your question may in fact be:

    just use lldb!

提交回复
热议问题