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

后端 未结 8 680
感情败类
感情败类 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 20:02

    I got past this issue on Mojave by thinning the app. GDB does not understand universal binaries. So if file myapp tells you myapp is a universal binary, try this:

    lipo -thin x86_64 -output myapp-x86_64 myapp
    

    And then

    gdb myapp-x86_64
    

提交回复
热议问题