Page 1 of 1

GDB and 64-bit executable

Posted: Sun Jan 11, 2015 9:18 pm
by foxmuldr
I have a project I've created which uses MinGW-w64-4.9.2. When I compile it and go to run it in Codelite I get the error:

Code: Select all

Debugger exited with the following error string:
"No executable specified, use 'target exec'."
When I use the same settings for a 32-bit build using MinGW 4.8.1 with it works properly.

Is there something special I need to do to debug 64-bit programs in Codelite with GDB?

You can see my project settings and what I'm doing by cloning this repository to c:\, and then loading this project:

Code: Select all

C:\WINDOWS> cd \
C:\> git clone https://github.com/RickCHodgin/libsf.git libsf

// And then open:
C:\libsf\source\vjr\projects\mingw_gcc_codelite\vjr64.workspace
If you try to compile it you'll need to create the output directory structure (at least C:\libsf_offline\source\vjr\bin\64-bit) and possibly others, or to install other software. I'm not sure of its current "new install and compile" stability (as I appear to be the only one using this project it hasn't been an issue to date :-)).

Thank you in advance for any assistance.

Re: GDB and 64-bit executable

Posted: Sun Jan 11, 2015 9:24 pm
by foxmuldr
Okay ... I was able to get it to launch by changing the debugger to:

Code: Select all

c:\mingw-w64-4.9.2\mingw64\bin\gdb.exe
When it launches now it immediate throws:

Code: Select all

Program received signal
SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
Program Received signal SIGSEGV
Not sure the cause. In 32-bit GCC it works properly, and in 32-bit and 64-bit Visual Studio 2010 compilations. 64-bit g++ doesn't throw any errors, and only one warning which is a non-issue.

Any advice is appreciated. Thank you in advance.

Re: GDB and 64-bit executable

Posted: Sun Jan 11, 2015 9:48 pm
by eranif
Like I mentioned in another post this is now fixed in git head
Eran

Re: GDB and 64-bit executable

Posted: Mon Jan 12, 2015 7:42 pm
by foxmuldr
eranif wrote:Like I mentioned in another post this is now fixed in git head
Eran
Does this mean the 64-bit signal fault I was getting was due to something in Codelite and not the result of my code, or compiler or gdb settings?

Re: GDB and 64-bit executable

Posted: Mon Jan 12, 2015 8:02 pm
by eranif
foxmuldr wrote:Does this mean the 64-bit signal fault I was getting was due to something in Codelite and not the result of my code, or compiler or gdb settings?
No, this means that codelite (in git master) will detect the proper gdb so you wont need to alter your settings to switch gdb(s)

Eran

Re: GDB and 64-bit executable

Posted: Mon Jan 12, 2015 8:44 pm
by foxmuldr
eranif wrote:No, this means that codelite (in git master) will detect the proper gdb so you wont need to alter your settings to switch gdb(s)
Eran
Well ... there was always hope. :-)

BTW, I think Codelite looks really fantastic. You're doing excellent work, Eran.