简体   繁体   中英

Error with command gdb. Debugging problem in eclipse

I am a beginner and im trying to understand and use eclipse on my new MacBook. Eclipse has been working fine for few days, but today suddenly I can run, build but not debug the code, it shows

Error with command: gdb --version Cannot run program "gdb": Unknown reason

So I spent time googling and found a solution, and that was to install another debugger (LLDB). I did so but the problem remains

This is what I get:

Error with command: lldb-mi --version Cannot run program "lldb-mi": Unknown reason

The code is super normal, here it is for instance.

#include <stdio.h>
#include <stdlib.h>

int main(void) {
    puts("!!!Hello World!!!"); /* prints !!!Hello World!!! */
    return EXIT_SUCCESS;
}

I also found advices like looking for MinGW and gdb.exe but i couldnt find MinGW on my computer, does it mean I have to install one? And maybe these pictures will help you understand my situation better. Please, help, thank you!

在此处输入图像描述 在此处输入图像描述

So for anyone with a similar problem: I needed to install a gdb of newer version 8.3 with Homebrew. You will need to codesign it manually but it shall be fine.

Wish you all best of luck!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM