3

I am trying to debug a C project in mint Linux using eclipse Galileo IDE. When I try to run the project in the DEBUG mode, the process terminates as it says- debugging information is missing.

In the eclipse console following messages appear

No source available for "main() " 

and 

Reading symbols from /home/project/netconf/target/bin/netconfd...(no debugging symbols found)...done. 

I am using the custom build command

make DEBUG=1 STATIC=1 [eclipse >project >properties > c/c++ build > builder settings]

it builds and runs fine in RELEASE mode.

I am able to build the same application using normal command line build using command terminal, using the same build options

> sudo make DEBUG=1 STATIC=1

now I can start a command line gdb session, as the debugging info is generated, but it is very difficult to debug that way.


I need to know if there is any other setting that needs to be changed, so that I can start debugging in eclipse.
Thanks in advance.

osum
  • 805
  • 2
  • 10
  • 32
  • 1
    what error exactly are you getting? – WeaselFox May 09 '12 at 12:06
  • I am getting a message "No source available for "main() " and in the console Reading symbols from /home/project/netconf/target/bin/netconfd...(no debugging symbols found)...done. – osum May 09 '12 at 12:46
  • Is it CMake based project? I've noticed such behavior for CMake generated projects with default settings. I had to explicitly set CMAKE_DEBUG_TYPE to Debug before configuring and generating a project with cmake-gui. After that everything is fine in Eclipse CDT. – mlt Dec 02 '12 at 19:51

1 Answers1

1

Add -d (or probably -g) to your command line. I think DEBUG=1 is defining a macro rather than generating debug info

fkl
  • 5,412
  • 4
  • 28
  • 68