2

I currently have GDB version 7.7.1 installed on my system. However, for the combination of Eclipse and a software package called openFOAM (version 2.3.1) I need to downgrade the GDB version to 6.8 in order for Eclipse to run in debug mode, as is mentioned here:

https://openfoamwiki.net/index.php/HowTo_Use_OpenFOAM_with_Eclipse#Versions

I uninstalled GDB version 7.7.1 and downloaded gdb-6.8a.tar.gz from http://ftp.gnu.org/gnu/gdb/ and try to install using:

sudo ./configure --disable-werror
sudo make
sudo make install

At the last two lines I get the error:

linux-nat.h:63:18: error: field 'siginfo' has incomplete type

I don't know how to fix this error as searching for it seems to indicate a bug that was fixed in later GDB versions (this is obviously not useful for me). Any help would be greatly appreciated.

7
  • Strange to hear that the install instruction page specially for 14.04 (openfoam.org/download/ubuntu.php) does not even mention this as an issue. Did you report them? Generally I'd try to fix .h file by myself, it's just old plain C and you are going to use it anyway, right? To fix compile error, you may either look at the specific patch, or just edit the file, or try compile options that dont fuss with NAT. Feb 9, 2015 at 19:37
  • That HowTo_Use_OpenFOAM_with_Eclipse page also recommends a version of OpenSUSE that has been EOLed for 6 years. Are you sure the current gdb and the current eclipse don't work with openfoam? Feb 9, 2015 at 19:41
  • @MarkPlotnick I'm using Eclipse 3.8.1 together with GDB 7.7.1. My OpenFOAM code runs just fine from Eclipse, as does the compilation. However, when debugging the debug mode from Eclipse is started and it points to the first entry in main(), as it should. However I cannot continue nor step over or anything else that would progress the debugger, it is stuck on the first line.
    – Kenyi89
    Feb 10, 2015 at 10:46
  • @MarkPlotnick Running GDB for an OpenFOAM application directly from command line works fine by the way.
    – Kenyi89
    Feb 10, 2015 at 10:55
  • 1
    I got gdb 6.8 to compile by changing struct siginfo to siginfo_t in several spots in linux-nat.[ch]. It appears to run, with some warnings. But in order to debug my test programs, I had to recompile them, giving gcc the -gdwarf-2 option. The current gcc produces dwarf-4 debug info, which this old gdb doesn't understand. Feb 11, 2015 at 21:47

0

You must log in to answer this question.

Browse other questions tagged .