Home » Language IDEs » C / C++ IDE (CDT) » CDT GDB No source file named ... error
CDT GDB No source file named ... error [message #236177] |
Mon, 20 July 2009 15:03  |
Eclipse User |
|
|
|
Hi,
I am using CDT on Eclipse 3.4.2 to develop on a large C project, which has
its own custom makefiles.
I am facing problems with debugging, which I could not resolve after
spending hours on google looking for solutions.
I had everything run perfect on Debian 32 for a while. I then copied the
workspace to a different PC, running Debian 64 bit, with different home
directory.
I made a make clean and make, and I am able to run the application without
problems. However, when i try to set breakpoints, it does not work. While
the application runs with the c files I set the break points in, if I add
another breakpoint, I get in the gdb console:
(gdb)
300*stopped,reason="signal-received",signal-name="SIGINT",signal-meaning= "Interrupt",thread-id="0",frame={addr="0x00007f13ba656c93 ",func="??",args=[],from="/lib/libc.so.6"}
No source file named gnuplot.c.
(gdb)
301-break-insert gnuplot.c:103
&"No source file named gnuplot.c.\n"
301^error,msg="No source file named gnuplot.c."
The same happens for absolute paths. The debugger can stop on startup at
main, and the debugger works fine with a HelloWorld c app in the same
workspace.
Would this be due to that SIGINT, and does anyone here understand what
causes this and how I may fix it?
|
|
| |
Re: CDT GDB No source file named ... error [message #236192 is a reply to message #236177] |
Tue, 21 July 2009 09:41   |
Eclipse User |
|
|
|
Originally posted by: subs._nospam_consertum.com
My guess is that you have the Source lookup path wrong for the debug
configuration. Look in the Source tab of the debug configuration.
btw: it is recommended that when moving projects between machines, you
should Export and then Import, rather than copying.
T Kruse wrote:
> Hi,
>
> I am using CDT on Eclipse 3.4.2 to develop on a large C project, which
> has its own custom makefiles.
> I am facing problems with debugging, which I could not resolve after
> spending hours on google looking for solutions.
>
> I had everything run perfect on Debian 32 for a while. I then copied the
> workspace to a different PC, running Debian 64 bit, with different home
> directory.
> I made a make clean and make, and I am able to run the application
> without problems. However, when i try to set breakpoints, it does not
> work. While the application runs with the c files I set the break points
> in, if I add another breakpoint, I get in the gdb console:
>
> (gdb)
> 300*stopped,reason="signal-received",signal-name="SIGINT",signal-meaning= "Interrupt",thread-id="0",frame={addr="0x00007f13ba656c93 ",func="??",args=[],from="/lib/libc.so.6"}
>
> No source file named gnuplot.c.
> (gdb) 301-break-insert gnuplot.c:103
> &"No source file named gnuplot.c.\n"
> 301^error,msg="No source file named gnuplot.c."
>
> The same happens for absolute paths. The debugger can stop on startup at
> main, and the debugger works fine with a HelloWorld c app in the same
> workspace.
>
> Would this be due to that SIGINT, and does anyone here understand what
> causes this and how I may fix it?
>
--
Derek
|
|
|
Re: CDT GDB No source file named ... error [message #236201 is a reply to message #236192] |
Tue, 21 July 2009 10:49   |
Eclipse User |
|
|
|
The Source tab of the default configuration has a root item "Default",
which has elements "Absolute file path" which has no children, and the
project, with all its folders. It looks fine to me, and I aldo tried
removing all Debug configurations and have a new one created for me. I do
not use any subprojects.
I tried adding only the project or only the absolute filesystem location
as source in the Debug Configuration. The same error happens.
For fun, I added the project tree same path several times, as workspace,
workspace project, filesystem folder, workspace folder. No change.
I removed all the source path, then the breakpoints did not even trigger
any gdb action.
I tried creating a new project of the same name, copied the project files
(except .project and .cproject) into it, and still nothing.
There ought to be a logical explanation to this, aren't there gdb commands
that I could use somehow to check where it looks for files or something?
|
|
| | | | |
Re: CDT GDB No source file named ... error [message #954714 is a reply to message #876310] |
Tue, 23 October 2012 03:36  |
Eclipse User |
|
|
|
I had the same issue and adding -g explicitly to CFLAGS in my makefile solved the issue for GCC.
Quote:
'-g' is a GCC command line switch which enables GCC to produce debugging information in the operating system's native format (stabs, COFF, XCOFF, or DWARF 2).
GDB can work with this debugging information. On most systems that use stabs format, '-g' enables use of extra debugging information that only GDB can use; this extra information makes debugging work better in GDB but will probably make other debuggers crash or refuse to read the program.
If you have a C or C++ project in eclipse, instead of a makefile project, go to Project properties -> C/C++ Build -> Settings -> Tool Settings -> GCC Compiler -> Debugging -> "Other debugging flags" and add -g there.
|
|
|
Goto Forum:
Current Time: Tue Jul 22 18:59:09 EDT 2025
Powered by FUDForum. Page generated in 0.30237 seconds
|