Author Topic: I'm trying to set a breakpoint: says source file not found  (Read 11207 times)

Offline 280Z28

  • Regular
  • ***
  • Posts: 397
  • *insert unicode here*
I'm trying to set a breakpoint: says source file not found
« on: December 15, 2005, 08:41:37 pm »
Here's what the Debugger (debug) log says:

Code: [Select]
(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:

Offline 280Z28

  • Regular
  • ***
  • Posts: 397
  • *insert unicode here*
Re: I'm trying to set a breakpoint: says source file not found
« Reply #1 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
78 280Z, "a few bolt-ons" - 12.71@109.04
99 Trans Am, "Daily Driver" - 525rwhp/475rwtq
 Check out The Sam Zone :cool:

Offline grv575

  • Official tester
  • Regular
  • ***
  • Posts: 381
Re: I'm trying to set a breakpoint: says source file not found
« Reply #2 on: December 15, 2005, 09:03:35 pm »
Does bf2.cpp contain main() or is that in another source file?

Offline 280Z28

  • Regular
  • ***
  • Posts: 397
  • *insert unicode here*
Re: I'm trying to set a breakpoint: says source file not found
« Reply #3 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().
78 280Z, "a few bolt-ons" - 12.71@109.04
99 Trans Am, "Daily Driver" - 525rwhp/475rwtq
 Check out The Sam Zone :cool:

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2174
Re: I'm trying to set a breakpoint: says source file not found
« Reply #4 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: [Select]
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: [Select]
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
« Last Edit: December 16, 2005, 12:37:29 am by Pecan »

Offline 280Z28

  • Regular
  • ***
  • Posts: 397
  • *insert unicode here*
Re: I'm trying to set a breakpoint: says source file not found
« Reply #5 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: [Select]
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: [Select]
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: