News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

I'm trying to set a breakpoint: says source file not found

Started by 280Z28, December 15, 2005, 08:41:37 PM

Previous topic - Next topic

280Z28

Here's what the Debugger (debug) log says:


(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.  :?
78 280Z, "a few bolt-ons" - 12.71@109.04
99 Trans Am, "Daily Driver" - 525rwhp/475rwtq
Check out The Sam Zone :cool:

280Z28

Here's the complete log. I highlighted what I assume are errors??

QuoteCommand-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
78 280Z, "a few bolt-ons" - 12.71@109.04
99 Trans Am, "Daily Driver" - 525rwhp/475rwtq
Check out The Sam Zone :cool:

grv575

Does bf2.cpp contain main() or is that in another source file?

280Z28

Quote from: grv575 on December 15, 2005, 09:03:35 PM
Does bf2.cpp contain main() or is that in another source file?

It does. I'm trying to step into main().
78 280Z, "a few bolt-ons" - 12.71@109.04
99 Trans Am, "Daily Driver" - 525rwhp/475rwtq
Check out The Sam Zone :cool:

Pecan

I remember having that problem once. I now use the following
.cmd file. Maybe it could help you also.


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

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

280Z28

Quote from: 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.


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

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 :?
78 280Z, "a few bolt-ons" - 12.71@109.04
99 Trans Am, "Daily Driver" - 525rwhp/475rwtq
Check out The Sam Zone :cool: