Code::Blocks Forums

Developer forums (C::B DEVELOPMENT STRICTLY!) => Plugins development => Topic started by: 280Z28 on December 15, 2005, 08:41:37 pm

Title: I'm trying to set a breakpoint: says source file not found
Post by: 280Z28 on December 15, 2005, 08:41:37 pm
Here's what the Debugger (debug) log says:

Code
(gdb)
> break Y:/sam/c/bf2/bf2/bf2.cpp:82
No source file named Y:/sam/c/bf2/bf2/bf2.cpp.
(gdb)
> run
Program exited with code 01.
(gdb)
> quit

The file most definitely exists.  :?
Title: Re: I'm trying to set a breakpoint: says source file not found
Post by: 280Z28 on December 15, 2005, 08:43:06 pm
Here's the complete log. I highlighted what I assume are errors??

Quote
Command-line: F:\MinGW\bin\gdb.exe -nx -fullname  -args ../Win32Debug/bf2.exe
Working dir : Y:\sam\c\bf2\bf2\
> set prompt (gdb)
GNU gdb 5.2.1
Copyright 2002 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 "i686-pc-mingw32"...
(gdb) (gdb)
> set confirm off
(gdb)
> set width 0
(gdb)
> set height 0
(gdb)
> set breakpoint pending on
No symbol "breakpoint" in current context.
(gdb)
> set print asm-demangle on
(gdb)
> set new-console on
(gdb)
> set disassembly-flavor intel
(gdb)
> directory Y:/sam/c/bf2/
(gdb)
> directory Y:/sam/c/bf2/blas/
(gdb)
> directory Y:/sam/c/bf2/lapack/
(gdb)
> directory Y:/sam/c/bf2/arl/
(gdb)
> directory Y:/sam/c/bf2/bf2/
(gdb)
> delete
(gdb)
> break Y:/sam/c/bf2/bf2/bf2.cpp:82
No source file named Y:/sam/c/bf2/bf2/bf2.cpp.
(gdb)
> run
Program exited with code 01.
(gdb)
> quit
Title: Re: I'm trying to set a breakpoint: says source file not found
Post by: grv575 on December 15, 2005, 09:03:35 pm
Does bf2.cpp contain main() or is that in another source file?
Title: Re: I'm trying to set a breakpoint: says source file not found
Post by: 280Z28 on December 15, 2005, 09:04:45 pm
Does bf2.cpp contain main() or is that in another source file?

It does. I'm trying to step into main().
Title: Re: I'm trying to set a breakpoint: says source file not found
Post by: Pecan on December 16, 2005, 12:33:12 am
I remember having that problem once. I now use the following
.cmd file. Maybe it could help you also.

Code
c:\usr\codeblocks\bin\gdb --command=run c:\Usr\Proj\cbBeta\trunk\src\devel\codeb
locks.exe
"run"  of "--command=run" is just a file (without an extension) read by gdb.
I keep it in the directory of the target pgm to be debugged
Code
add-shared-symbol-files c:\Usr\CodeBlocks\share\CodeBlocks\plugins\cbKeyBinder.dll
l keybinder.cpp:809 
run

Maybe something like this will help. Also, do ya think gdb might be slash/backslash sensitive?

pecan
Title: Re: I'm trying to set a breakpoint: says source file not found
Post by: 280Z28 on December 16, 2005, 12:59:19 am
I remember having that problem once. I now use the following
.cmd file. Maybe it could help you also.

Code
c:\usr\codeblocks\bin\gdb --command=run c:\Usr\Proj\cbBeta\trunk\src\devel\codeb
locks.exe
"run"  of "--command=run" is just a file (without an extension) read by gdb.
I keep it in the directory of the target pgm to be debugged
Code
add-shared-symbol-files c:\Usr\CodeBlocks\share\CodeBlocks\plugins\cbKeyBinder.dll
l keybinder.cpp:809 
run

Maybe something like this will help. Also, do ya think gdb might be slash/backslash sensitive?

pecan


I'll try that out tomorrow. :)

I ran GDB on the command line with the same exact sequence that C::B had used, and tried with forward and backslashes. Neither worked. However, it worked when I just put:

break bf2.cpp:82

Since as you can see I was in the same directory :?