Debugging Issues [message #758123] |
Mon, 21 November 2011 19:37  |
Eclipse User |
|
|
|
Hello everyone,
I am running Eclipse Indigo on Mac 10.5.8. I have experimented with several C projects but cannot get any 'sophisticated' project into debug mode.
If I make a basic Hello World and auto-generate a makefile, then debug (and breakpoints) works. However, if I write my own makefile (same HelloWorld.c) then build and run both execute fine, but not debug mode. It compiles and runs in Mac Terminal. But in Eclipse, the breakpoints are ignored ("blue dots" become "yellow triangles" as breakpoint icons).
This is consistent with the same basic Hello World example as well as my thesis research involving many more subroutines. I don't think it is some incorrect permutation of Eclipse's options (binary/error parsers (I've used Mach-O 64 and/or Elf), or toolchain (I've used Cross GCC or MacOSC GCC with gcc/cc w/wo -WO3), or compiler (/usr/vacpp/bin) etc, but I'm not even sure which is the correct choice of parsers/toolchain?). Interestingly I have encounter this same problem of mine with Netbeans.
Under my projects' debug configurations, I use /usr/bin/gdb (also have /usr/bin/gdb-6.8/gdb) and have tried various combinations of my /.gdbinit file including:
directory /projects/micromanager/
directory /projects/micromanager/MMCore
directory /projects/micromanager/MMDevice
directory /projects/micromanager/DeviceAdapters/DemoCamera
and the latest from reverse.put.as/gdbinit/. My Debug Configuration -- Environment is blank.
Finally, I noticed that when the debug mode works for the auto-generated (default) makefile, the icons for the binary files are little bugs, whereas the icons for my non-debug-able executables is a white triangle inside a blue circle. What does this mean?
Any suggestions? I have spent nearly two weeks searching through websites for help. I am even trying it on windows later tonight! Please help.
|
|
|
Re: Debugging Issues [message #758130 is a reply to message #758123] |
Mon, 21 November 2011 21:15   |
Eclipse User |
|
|
|
On 11/21/2011 06:37 PM, mamorena12 wrote:
> Hello everyone,
>
> I am running Eclipse Indigo on Mac 10.5.8. I have experimented with
> several C projects but cannot get any 'sophisticated' project into debug
> mode.
>
> If I make a basic Hello World and auto-generate a makefile, then debug
> (and breakpoints) works. However, if I write my own makefile (same
> HelloWorld.c) then build and run both execute fine, but not debug mode.
> It compiles and runs in Mac Terminal. But in Eclipse, the breakpoints
> are ignored ("blue dots" become "yellow triangles" as breakpoint icons).
> This is consistent with the same basic Hello World example as well as my
> thesis research involving many more subroutines. I don't think it is
> some incorrect permutation of Eclipse's options (binary/error parsers
> (I've used Mach-O 64 and/or Elf), or toolchain (I've used Cross GCC or
> MacOSC GCC with gcc/cc w/wo -WO3), or compiler (/usr/vacpp/bin) etc, but
> I'm not even sure which is the correct choice of parsers/toolchain?).
> Interestingly I have encounter this same problem of mine with Netbeans.
> Under my projects' debug configurations, I use /usr/bin/gdb (also have
> /usr/bin/gdb-6.8/gdb) and have tried various combinations of my
> /.gdbinit file including:
>
> directory /projects/micromanager/
> directory /projects/micromanager/MMCore
> directory /projects/micromanager/MMDevice
> directory /projects/micromanager/DeviceAdapters/DemoCamera
>
> and the latest from reverse.put.as/gdbinit/. My Debug Configuration --
> Environment is blank.
>
> Finally, I noticed that when the debug mode works for the auto-generated
> (default) makefile, the icons for the binary files are little bugs,
> whereas the icons for my non-debug-able executables is a white triangle
> inside a blue circle. What does this mean?
>
> Any suggestions? I have spent nearly two weeks searching through
> websites for help. I am even trying it on windows later tonight! Please
> help.
>
>
You need to make sure you aren't compiling with optimizations turned on
and also that the compile/link include debug information.
|
|
|
|
|
|
Re: Debugging Issues [message #758602 is a reply to message #758354] |
Wed, 23 November 2011 15:24  |
Eclipse User |
|
|
|
You have to look at the documentation of your compiler/linker. That should tell you what options need to be specified to get debugging information. You then have to put them into the compile/link commands in your make file.
|
|
|
Powered by
FUDForum. Page generated in 0.04690 seconds