Results 1 to 6 of 6

Thread: debug

  
  1. #1

    Default debug

    Hey!

    I have a question. I was able to import the KeeperFX project into Eclipse CDT and then clean/build. I can create both builds standard and debug. I can also run the project from eclipse. But the problem appears when i try to debug the project. I setup breakpoints (lets say in main.cpp) in 'int main' but when i run in debug mode the execution does not stop in breakpoints. (if i create a simple helloworld program i can debug it!). So what's the problem? Should i be using debug SDL libs? Or is there any other trick?

    oh, one more thing. If i check the checkbox 'stop in main' (in debug run settings), the program halts on 'main' but it says it can not find source code for main.cpp. (file paths are correct...)

  2. #2
    KeeperFX Author mefistotelis's Avatar
    Join Date
    Sep 2009
    Location
    Poland
    Posts
    1,242

    Default Re: debug

    The version which is named "debug" version doesn't really have any debugging symbols - that's why you can't debug it. I named it 'debug' version because it logs a lot of information into LOG file.

    To use debugger, you have to compile sources with "-g" flag. Edit Makefile and add the " -g" at end of the line:
    Code:
    debug: DBGFLAGS = -DBFDEBUG_LEVEL=10
    Then you will have a version with debug symbols (after doing "make debug").
    Last edited by mefistotelis; May 2nd, 2011 at 21:25.

  3. #3

    Default Re: debug

    hehe, i thought there was something wrong with the "debug" build... thanks! will try it in the evening

  4. #4

    Default Re: debug

    ok, now the debuging works sortof. debuger halts on breakpoint but stepping through the code behaves very oddly, like if i press 'step over' sometimes it does step to the next line and other times it jumps 1 (or more) line(s) above or skips a line below (a valid code line, not variable declaration), or jumps out of the function. am i still missing some flags or is this the best i'll get with dkfx?

  5. #5
    KeeperFX Author mefistotelis's Avatar
    Join Date
    Sep 2009
    Location
    Poland
    Posts
    1,242

    Default Re: debug

    Ahh right... You must also disable code optimizations (change "-O3" with "-O0") in Makefile.

  6. #6

    Default Re: debug

    excelent, works like a charm now. thanks!

Similar Threads

  1. Debug versions of other Bullfrog games
    By mefistotelis in forum General Discussion
    Replies: 10
    Last Post: December 17th, 2009, 06:33

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •