Debugging with mingw32/GDB/Codeblocks

Debugging with mingw32/GDB/Codeblocks

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Debugging with mingw32/GDB/Codeblocks

Post by AF »

This is really annoying me now, in that no matter what I do I cant get any help, google has literally nothing on debugging using codeblocks for dll's, I'm being ignored everywhere I go as soon as I even mention debugging and codeblocks.

This is as far as I've gotten so far:
Selecting target: default
Compiling: done
Starting debugger: done
Adding source dir: C:\Users\Tom\Documents\Development\JLobby\ntaiCodeblocks\
Adding file: spring.exe
Adding symbol file: NTai.dll
Changing directory to: C:/PROGRA~1/Spring/
spring.exe: No such file or directory.
error
No executable specified, use `target exec'.
error
Debugger finished with status 0
User avatar
QMan
Posts: 103
Joined: 17 Feb 2006, 01:10

Post by QMan »

Seems to work fine for me. Well, stepping through lines doesn't work, but stack traces and such on a crash do.

Code: Select all

Building to ensure sources are up-to-date
Build succeeded
Selecting target: default
Adding source dir: C:\temp\AIDev\QAI2\
Adding source dir: C:\temp\AIDev\QAI2\
Changing directory to: ../TASpring74/
Adding file: ..\TASpring74\spring.exe
Starting debugger: done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Minimal symbols from spring.exe...(no debugging symbols found)
Debugger name and version: GNU gdb 6.3
And then it runs. :)

EDIT: Looks like you never set the target application in Project->Set Program's Arguments->default->Host Application

I'm using build SVN 3545 btw.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

It took me hours to find that particular aprt. Once I did find it I started setting values and testing and nothing seemed to work, I set spring.exe spring, a full path to the spring folder, nothing worked they all came up with something along the lines of:

Code: Select all

spring.exe: No such file or directory. 
error 
No executable specified, use `target exec'. 
what do you have? spring.exe? spring? C:\program files\TASpring\spring.exe?
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Post by Kloot »

Put the path to spring.exe in quotes?
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

I think i tried that and got something wierd like:

""c:\program files\spring\spring.exe""
User avatar
QMan
Posts: 103
Joined: 17 Feb 2006, 01:10

Post by QMan »

I've got:

..\TASpring74\spring.exe

in the host application box, and

script.txt

in the program arguments part, and the checkbox unchecked (this target provides the project's main executable)
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

I noticed that whatever I do if I reselect default it rechecks, if I press ok then reopen its checked still, I cant uncheck it...
Post Reply

Return to “Engine”