gdb 8.2 can't recognized executable file on macOS Mojave 10.14

后端 未结 8 683
感情败类
感情败类 2020-11-30 19:05

I get gdb by brew install gdb.

The source file content is:

#include 
int main(){
    int a = 10;
    for(int i = 0; i<          


        
8条回答
  •  春和景丽
    2020-11-30 19:44

    I got gdb working on Mojave by:

    a) getting the latest gdb source archive (at time of writing, ftp://sourceware.org/pub/gdb/snapshots/current/gdb-weekly-8.2.50.20190212.tar.xz) - amongst other things, it adds handling for recognizing executables on Mac.

    b) build gdb. I got errors for variable shadowing in darwin-nat.c so I edited the file and rebuilt.

    c) follow steps in https://forward-in-code.blogspot.com/2018/11/mojave-vs-gdb.html

    Voila.

    (source: GDB on Mac/Mojave: During startup program terminated with signal ?, Unknown signal)

提交回复
热议问题