Page 1 of 3
gdb: no source file named main.cpp problem
Posted: Tue Jun 24, 2008 10:40 am
by varnie
good day.
when i try to debug my project on CodeLite IDE i get the following:
Debug session started successfully!
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-marcel-freebsd"...
set unwindonsignal on
set width 0
set height 0
No source file named /usr/home/varnie/.codelite/int/myprogram/main.cpp.
Continuing...
i'm using "debug" configuration type with "-g" flag for g++ (which is used to enable debug info), but have no result. this all results in inability of tracing program.
but if i'm using "gdb myprogram" right in console, everything works fine.
what i've missed? thanks for ideas.
Re: gdb: no source file named main.cpp problem
Posted: Tue Jun 24, 2008 10:48 am
by eranif
Can u enable to the full debugger logging and paste the entire content of the log?
To enable the log:
'Settings -> Debugger Settings ... -> Loaded Debuggers'
and enable the option "Enable full debugger logging"
- Eran
Re: gdb: no source file named main.cpp problem
Posted: Tue Jun 24, 2008 10:54 am
by varnie
here it is:
Debug session started successfully!
DEBUG>>~"GNU gdb 6.1.1 [FreeBSD]\n"
GNU gdb 6.1.1 [FreeBSD]
DEBUG>>~"Copyright 2004 Free Software Foundation, Inc.\n"
Copyright 2004 Free Software Foundation, Inc.
DEBUG>>~"GDB is free software, covered by the GNU General Public License, and you are\n"
GDB is free software, covered by the GNU General Public License, and you are
DEBUG>>~"welcome to change it and/or distribute copies of it under certain conditions.\n"
welcome to change it and/or distribute copies of it under certain conditions.
DEBUG>>~"Type \"show copying\" to see the conditions.\n"
Type "show copying" to see the conditions.
DEBUG>>~"There is absolutely no warranty for GDB. Type \"show warranty\" for details.\n"
There is absolutely no warranty for GDB. Type "show warranty" for details.
DEBUG>>~"This GDB was configured as \"i386-marcel-freebsd\"..."
This GDB was configured as "i386-marcel-freebsd"...
DEBUG>>~"\n"
DEBUG>>(gdb)
DEBUG>>&"set unwindonsignal on\n"
set unwindonsignal on
DEBUG>>^done
DEBUG>>(gdb)
DEBUG>>&"set width 0\n"
set width 0
DEBUG>>^done
DEBUG>>(gdb)
DEBUG>>&"set height 0\n"
set height 0
DEBUG>>^done
DEBUG>>(gdb)
DEBUG>>&"No source file named /usr/home/varnie/.codelite/int/interpreter/CSyntaxer.h.\n"
No source file named /usr/home/varnie/.codelite/int/interpreter/CSyntaxer.h.
DEBUG>>00000071^error,msg="No source file named /usr/home/varnie/.codelite/int/interpreter/CSyntaxer.h."
No source file named /usr/home/varnie/.codelite/int/interpreter/CSyntaxer.h.
DEBUG>>(gdb)
DEBUG>>&"No source file named /usr/home/varnie/.codelite/int/interpreter/CSyntaxer.h.\n"
No source file named /usr/home/varnie/.codelite/int/interpreter/CSyntaxer.h.
DEBUG>>00000072^error,msg="No source file named /usr/home/varnie/.codelite/int/interpreter/CSyntaxer.h."
No source file named /usr/home/varnie/.codelite/int/interpreter/CSyntaxer.h.
DEBUG>>(gdb)
DEBUG>>&"No source file named /usr/home/varnie/.codelite/int/interpreter/main.cpp.\n"
No source file named /usr/home/varnie/.codelite/int/interpreter/main.cpp.
DEBUG>>00000073^error,msg="No source file named /usr/home/varnie/.codelite/int/interpreter/main.cpp."
No source file named /usr/home/varnie/.codelite/int/interpreter/main.cpp.
DEBUG>>(gdb)
DEBUG>>&"No source file named /usr/home/varnie/.codelite/int/interpreter/main.cpp.\n"
No source file named /usr/home/varnie/.codelite/int/interpreter/main.cpp.
DEBUG>>00000074^error,msg="No source file named /usr/home/varnie/.codelite/int/interpreter/main.cpp."
No source file named /usr/home/varnie/.codelite/int/interpreter/main.cpp.
DEBUG>>(gdb)
DEBUG>>&"No source file named /usr/home/varnie/.codelite/int/interpreter/main.cpp.\n"
No source file named /usr/home/varnie/.codelite/int/interpreter/main.cpp.
DEBUG>>00000075^error,msg="No source file named /usr/home/varnie/.codelite/int/interpreter/main.cpp."
No source file named /usr/home/varnie/.codelite/int/interpreter/main.cpp.
DEBUG>>(gdb)
DEBUG>>&"No source file named /usr/home/varnie/.codelite/int/interpreter/main.cpp.\n"
No source file named /usr/home/varnie/.codelite/int/interpreter/main.cpp.
DEBUG>>00000076^error,msg="No source file named /usr/home/varnie/.codelite/int/interpreter/main.cpp."
No source file named /usr/home/varnie/.codelite/int/interpreter/main.cpp.
DEBUG>>(gdb)
DEBUG>>00000077^running
Continuing...
DEBUG>>(gdb)
Re: gdb: no source file named main.cpp problem
Posted: Tue Jun 24, 2008 10:59 am
by eranif
Hi,
Can u check the 'Automatically break at main" and start debugging again?
Eran
Re: gdb: no source file named main.cpp problem
Posted: Tue Jun 24, 2008 11:06 am
by varnie
hmm.. it seems it works now! suppose there is a need of a little "explanation" about what have been wrong with my approach? thanks.
Re: gdb: no source file named main.cpp problem
Posted: Tue Jun 24, 2008 11:13 am
by eranif
I am not sure what is wrong here, but did you set a break points? (sorry for the dumb question ...)
But I am missing this line of the form "break "<file_name>":linenumer
For example, here is the debugger output test from my machine:
Code: Select all
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-mingw32"...
set new-console on
Debuggee process ID: 3928
set unwindonsignal on
set width 0
set height 0
break "C:/TestArea/main.cpp":8
Breakpoint 1 at 0x401339: file main.cpp, line 8.
Successfully set breakpoint at: C:\TestArea\main.cpp:8
Continuing...
enabling the flag "automatically break at main" sends the debugger the command (right after the gdb starts and before any other command from the user):
Which seems to work.
One more test, now that the debuggers stops, can you break at another line and hit the continue button? does it work for you?
Eran
Re: gdb: no source file named main.cpp problem
Posted: Tue Jun 24, 2008 11:30 am
by varnie
nope. can't do that. if i disable "automatically set break point at main" and enable my own several break points and then press F5/Start continue debug the debugger won't stop on them. don't know why. after i set it back again to automatically breaks at main it stops again on the main function.
Re: gdb: no source file named main.cpp problem
Posted: Tue Jun 24, 2008 11:35 am
by eranif
Can u enable the 'enable pending breakpoints' and give it a try again.
Eran
Re: gdb: no source file named main.cpp problem
Posted: Tue Jun 24, 2008 11:45 am
by varnie
after enabling this option the debugger stops in main.cpp on my comments' line (which isn't marked to be break point at all) and i can't step further.
Re: gdb: no source file named main.cpp problem
Posted: Tue Jun 24, 2008 11:58 am
by eranif
Can you do this:
- Perform a complete re-build (Clean followed by Build)
- make sure that in build log there is a '-g' option
- Right click on project -> settings ->General tab - and make sure that the 'Command' field contains the executable that was created.
Off topic question: Can you update CodeLite to newer version? I have made some changes in the debugger which may impact on bug you are experiencing.
Eran