Author Topic: Cannot debug project when built using custom makefile  (Read 4613 times)

Offline kmittal82

  • Single posting newcomer
  • *
  • Posts: 4
Cannot debug project when built using custom makefile
« on: December 02, 2008, 01:09:56 pm »
Hi Guys,

I am relatively new to using C::B, so please excuse my ignorance on this issue.

I have successfully built a console executable (.exe) using a Custom Makefile. The reason I did not use C::B to built it using its own build system was because the project is quite big, and I did not want to import every souce file and header file from loads of locations, and I already had a makefile which builds.

So, the project builds successfully, without any issues. Now, when I try and debug this issue, I get an error on the lines of:
Code
Starting debugger: 
done
Registered new type: wxString
Registered new type: STL String
Registered new type: STL Vector
Setting breakpoints
Debugger name and version: GNU gdb 6.7.50.20071127
No source file named N:/src/cedar/generic/tools/e32tools/rofsbuild/rofsbuild.cpp.
Breakpoint 1 ("N:/src/cedar/generic/tools/e32tools/rofsbuild/rofsbuild.cpp:364) pending.
Child process PID: 3396
Program exited with code 037777777776.
Debugger finished with status 0

I have set a breakpoint in the "main" function in the cpp file, but I am unable to debug this.

I have used gdb from the command line manually, and I can set breakpoints using the same binary without any problems. Just wondering if this is a C::B bug ? (Essentially, I am trying to use C::B like Insight, but I prefer C::B due to a much better interface :).

Thanks in advance

Offline kmittal82

  • Single posting newcomer
  • *
  • Posts: 4
Re: Cannot debug project when built using custom makefile
« Reply #1 on: December 02, 2008, 01:12:11 pm »
Oh, by the way, forgot to mention.

I am using Windows XP and C::B 8.02, and the file which C::B complains is missing actually exists. Could this be a '/' issue?

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Cannot debug project when built using custom makefile
« Reply #2 on: December 02, 2008, 01:21:58 pm »
Please have a look at this post: http://forums.codeblocks.org/index.php/topic,9673.msg67893.html.

It's most likely the same problem (and solution).

Offline kmittal82

  • Single posting newcomer
  • *
  • Posts: 4
Re: Cannot debug project when built using custom makefile
« Reply #3 on: December 02, 2008, 01:36:34 pm »
Thanks for a quick reply Jens.

I have tried the solution mentioned in the posting, but that doesnt seem to fix my problem either.

My makefile already has absolute paths, and the option for using full paths (GDB Workaround) is also enabled. :(

Offline kmittal82

  • Single posting newcomer
  • *
  • Posts: 4
Re: Cannot debug project when built using custom makefile
« Reply #4 on: December 02, 2008, 01:42:59 pm »
Got it to work finally! :)

Had to hand-edit some of the paths in the makefile, seems like some had absolute paths and some didnt.

Thanks for all your help.

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Cannot debug project when built using custom makefile
« Reply #5 on: December 02, 2008, 01:47:05 pm »
My makefile already has absolute paths, and the option for using full paths (GDB Workaround) is also enabled. :(

The GDB workaround is not needed for custom makefiles, because it only affects the build-process of C::B.

Can you post the build log (or a part of it) after turning on full commandline logging:

Change "Settings -> Compiler and debugger... -> Global compiler settings -> Other settings(rightmost tab)" "Compiler logging" to "Full commandline".

EDIT:

It seems our posts have crossed each other
« Last Edit: December 02, 2008, 01:53:48 pm by jens »