gdb error not in executable format: File format not recognized

后端 未结 2 424
春和景丽
春和景丽 2020-12-16 12:29

I am trying to debug a simple \"hello world\" C++ program on Ubuntu 16.04 but gdb is not able to recognize the executable file format. However, I am able to successfully run

2条回答
  •  清酒与你
    2020-12-16 12:41

    I had the same issue on mac os. there is a bug in gdb: https://sourceware.org/bugzilla/show_bug.cgi?id=23746 their git repository has already had the fix. Unfortunately, the bins in homebrew have not had it yet. So, I had to git clone git://sourceware.org/git/binutils-gdb.git, compiled it and installed as it is described in the readme file. I do believe this will fix yours on ubuntu.

    P.S. it works on my machine but I have to run eclipse as root: sudo /.../MacOS/eclipse. Otherwise, I have Launching : Configuring GDB Aborting configuring GDB. Cause I do not know how to fix it (

提交回复
热议问题