Discussion:
[ddbg] Unable to find source files
Bill Baxter
2007-05-28 23:47:21 UTC
Permalink
I ran into a problem the other day where ddbg 0.8.1 was telling me that
it couldn't find line xxx of file yyy. But it knew there was a file
yyy. It listed it in the modules list.

Don't have time to narrow it down to a repro right now, but just wanted
to see if anyone else had seen this. The source file in question was
called OptMesh.d and I was running the debugger from a \data directory
beneath that. It was finding the other files fine, so my thought was
maybe there's a bug with mixed case filenames. The files that were
working were all lowercase. Maybe just a coincidence, though.

--bb
Jascha Wetzel
2007-06-04 16:33:03 UTC
Permalink
if you're using codeblocks, it happens rather frequently that CB messes
up the linenumbers of breakpoints and issues them at some very high
linenumber that doesn't exist.
if you find that the linenumber ddbg is complaining about doesn't exist,
it's probably this problem.
else i'll need to reproduce this situation.
i haven't seen any problem concerning case of filenames, yet.
Post by Bill Baxter
I ran into a problem the other day where ddbg 0.8.1 was telling me that
it couldn't find line xxx of file yyy. But it knew there was a file
yyy. It listed it in the modules list.
Don't have time to narrow it down to a repro right now, but just wanted
to see if anyone else had seen this. The source file in question was
called OptMesh.d and I was running the debugger from a \data directory
beneath that. It was finding the other files fine, so my thought was
maybe there's a bug with mixed case filenames. The files that were
working were all lowercase. Maybe just a coincidence, though.
--bb
Bill Baxter
2007-06-04 22:02:01 UTC
Permalink
Post by Jascha Wetzel
if you're using codeblocks, it happens rather frequently that CB messes
up the linenumbers of breakpoints and issues them at some very high
linenumber that doesn't exist.
Nope it wasn't codeblocks. I was getting the line number from emacs and
typing it in at the ddbg command prompt.
Post by Jascha Wetzel
if you find that the linenumber ddbg is complaining about doesn't exist,
it's probably this problem.
else i'll need to reproduce this situation.
i haven't seen any problem concerning case of filenames, yet.
Ok. I'll keep my eyes open for it happening in a little more compact
sample.

--bb
Myron Alexander
2007-06-08 00:04:05 UTC
Permalink
Post by Bill Baxter
Post by Jascha Wetzel
if you're using codeblocks, it happens rather frequently that CB
messes up the linenumbers of breakpoints and issues them at some very
high linenumber that doesn't exist.
Nope it wasn't codeblocks. I was getting the line number from emacs and
typing it in at the ddbg command prompt.
I have the same problem using ddbg from command line.
Regan Heath
2007-07-19 09:38:39 UTC
Permalink
I am getting the same sort of error but my situation is almost entirely
different :)

I'm using code::blocks. I have:

E:\Program Files\CodeBlocks
E:\D\DMD
E:\D\DMC
E:\D\DMD\BIN <-ddbg installed here
E:\D\src

I followed the directions on the ddbg site to setup the debugger etc.

I created a new project in CodeBlocks:

E:\D\src\Sudoku\

adding 1 file

E:\D\src\Sudoku\sudoku.d
break "E:/D/src/Sudoku/sudoku.d:5"
Soure file "E:\D\src\Sudoku\sudoku.d" not found

in the Debugger(debug) window and it does not stop on the breakpoint.

The interesting thing is that in command prompt the path
"E:/D/src/Sudoku/sudoku.d" cannot be found, but changing one path set
from / to \ and it can!

C:\Development>dir "E:/D/src/Sudoku/sudoku.d"
Volume in drive E is REMOVABLE
Volume Serial Number is 9C9D-85FE

Directory of E:\D\src\Sudoku

File Not Found

C:\Development>dir "E:/D/src/Sudoku\sudoku.d"
Volume in drive E is REMOVABLE
Volume Serial Number is 9C9D-85FE

Directory of E:\D\src\Sudoku

19/07/2007 10:24 5,782 sudoku.d
1 File(s) 5,782 bytes
0 Dir(s) 131,833,856 bytes free


The line number ":5" is correct.

Regan
Regan Heath
2007-07-19 09:49:36 UTC
Permalink
Stopping CodeBlocks and starting it up again seems to have resolved all
the problems, weird!

Regan
Jascha Wetzel
2007-07-19 11:50:17 UTC
Permalink
Post by Regan Heath
Stopping CodeBlocks and starting it up again seems to have resolved all
the problems, weird!
CB has a couple of issues with the GDB integration (which also controls
Ddbg). When in doubt, try reproducing the problem on the Ddbg command line.
Simen Haugen
2007-08-14 11:44:48 UTC
Permalink
I have also been having problems with this, but now I'm getting another
error using ddbg 0.10, descent 0.4, rebuild 0.70 and dmd 1.020
->Soure file "C:\projects\nsd\src\nsd.d" not found

Everything was working perfectly, but suddenly it stopped working. I've been
debugging this project before, but after writing more code (no more files or
anything) it just couldn't find the files anymore.

The strange thing is that it is not happening for all the files in the
project, just a couple of them...


"Bill Baxter" <dnewsgroup at billbaxter.com> wrote in message
I ran into a problem the other day where ddbg 0.8.1 was telling me that it
couldn't find line xxx of file yyy. But it knew there was a file yyy. It
listed it in the modules list.
Don't have time to narrow it down to a repro right now, but just wanted to
see if anyone else had seen this. The source file in question was called
OptMesh.d and I was running the debugger from a \data directory beneath
that. It was finding the other files fine, so my thought was maybe
there's a bug with mixed case filenames. The files that were working were
all lowercase. Maybe just a coincidence, though.
--bb
Jascha Wetzel
2007-08-14 11:52:47 UTC
Permalink
Post by Simen Haugen
I have also been having problems with this, but now I'm getting another
error using ddbg 0.10, descent 0.4, rebuild 0.70 and dmd 1.020
->Soure file "C:\projects\nsd\src\nsd.d" not found
Everything was working perfectly, but suddenly it stopped working. I've been
debugging this project before, but after writing more code (no more files or
anything) it just couldn't find the files anymore.
The strange thing is that it is not happening for all the files in the
project, just a couple of them...
does that problem also occur when you debug the program on the command line?
Simen Haugen
2007-08-14 13:28:55 UTC
Permalink
Yup, command line too.

C:\projects\nsdata\bin\Debug>ddbg sps2nsd.exe
Ddbg 0.10 beta - D Debugger
Copyright (c) 2007 Jascha Wetzel
see http://ddbg.mainia.de/doc.html for documentation

Loading symbols from sps2nsd.exe
->bp c:\projects\nsdata\src\nsd\nsd.d:1361
Soure file "c:\projects\nsdata\src\nsd\nsd.d" not found
->^C

C:\projects\nsdata\bin\Debug>dir c:\projects\nsdata\src\nsd\nsd.d
Volume in drive C is Partition_1
Volume Serial Number is 047C-6206

Directory of c:\projects\nsdata\src\nsd

14.08.2007 15:24 37 902 nsd.d
1 File(s) 37 902 bytes
0 Dir(s) 804 540 416 bytes free
Post by Jascha Wetzel
Post by Simen Haugen
I have also been having problems with this, but now I'm getting another
error using ddbg 0.10, descent 0.4, rebuild 0.70 and dmd 1.020
->Soure file "C:\projects\nsd\src\nsd.d" not found
Everything was working perfectly, but suddenly it stopped working. I've
been debugging this project before, but after writing more code (no more
files or anything) it just couldn't find the files anymore.
The strange thing is that it is not happening for all the files in the
project, just a couple of them...
does that problem also occur when you debug the program on the command line?
Jascha Wetzel
2007-08-14 13:54:44 UTC
Permalink
Post by Simen Haugen
Yup, command line too.
C:\projects\nsdata\bin\Debug>ddbg sps2nsd.exe
Ddbg 0.10 beta - D Debugger
Copyright (c) 2007 Jascha Wetzel
see http://ddbg.mainia.de/doc.html for documentation
Loading symbols from sps2nsd.exe
->bp c:\projects\nsdata\src\nsd\nsd.d:1361
Soure file "c:\projects\nsdata\src\nsd\nsd.d" not found
->^C
C:\projects\nsdata\bin\Debug>dir c:\projects\nsdata\src\nsd\nsd.d
Volume in drive C is Partition_1
Volume Serial Number is 047C-6206
Directory of c:\projects\nsdata\src\nsd
14.08.2007 15:24 37 902 nsd.d
1 File(s) 37 902 bytes
0 Dir(s) 804 540 416 bytes free
ddbg doesn't support absolute filenames, atm.
use lsm to list the source modules as they are saved in the executable
and use these names (or substrings of them) to set the breakpoints.
in order to find the (relative) source module paths, you need to set the
search path.
assuming you compiled in c:\projects\nsdata\ and you're executing in
c:\projects\nsdata\bin\Debug the following should work:
sp ..\..
bp src\nsd\nsd.d:1361

or, as a shortcut:
bp nsd.d:1361
Ary Manzana
2007-08-14 21:53:26 UTC
Permalink
Post by Jascha Wetzel
Post by Simen Haugen
Yup, command line too.
C:\projects\nsdata\bin\Debug>ddbg sps2nsd.exe
Ddbg 0.10 beta - D Debugger
Copyright (c) 2007 Jascha Wetzel
see http://ddbg.mainia.de/doc.html for documentation
Loading symbols from sps2nsd.exe
->bp c:\projects\nsdata\src\nsd\nsd.d:1361
Soure file "c:\projects\nsdata\src\nsd\nsd.d" not found
->^C
C:\projects\nsdata\bin\Debug>dir c:\projects\nsdata\src\nsd\nsd.d
Volume in drive C is Partition_1
Volume Serial Number is 047C-6206
Directory of c:\projects\nsdata\src\nsd
14.08.2007 15:24 37 902 nsd.d
1 File(s) 37 902 bytes
0 Dir(s) 804 540 416 bytes free
ddbg doesn't support absolute filenames, atm.
Will ddbg support it in the future? The easiest way from a "front-end to
ddbg" point is to just configure the source paths, pass the absoulte
filename, and let ddbg figure the relative path. Otherwise all
front-ends will end up having this algorithm (duplicated) instead of
having it in one place (the debugger).

Also from a command-line point this is useful: instead of having the
user "calculate" the relative path, she could copy the absoulte path and
let ddbg figure it out.
Jascha Wetzel
2007-08-14 23:06:28 UTC
Permalink
Post by Ary Manzana
Will ddbg support it in the future? The easiest way from a "front-end to
ddbg" point is to just configure the source paths, pass the absoulte
filename, and let ddbg figure the relative path. Otherwise all
front-ends will end up having this algorithm (duplicated) instead of
having it in one place (the debugger).
Also from a command-line point this is useful: instead of having the
user "calculate" the relative path, she could copy the absoulte path and
let ddbg figure it out.
i have that on my todo list for the next release.
Ary Manzana
2007-08-14 22:21:24 UTC
Permalink
Post by Jascha Wetzel
Post by Ary Manzana
Will ddbg support it in the future? The easiest way from a "front-end
to ddbg" point is to just configure the source paths, pass the
absoulte filename, and let ddbg figure the relative path. Otherwise
all front-ends will end up having this algorithm (duplicated) instead
of having it in one place (the debugger).
Also from a command-line point this is useful: instead of having the
user "calculate" the relative path, she could copy the absoulte path
and let ddbg figure it out.
i have that on my todo list for the next release.
Sweet, thanks! I was about to add a ticket to Descent, but... ;-)
Ary Manzana
2007-08-14 12:14:08 UTC
Permalink
Can you send me the source code, or at least the hierarchy of the
project with stub functions? That way we'll see if it's a problem with
ddbg or with Descent.
Post by Simen Haugen
I have also been having problems with this, but now I'm getting another
error using ddbg 0.10, descent 0.4, rebuild 0.70 and dmd 1.020
->Soure file "C:\projects\nsd\src\nsd.d" not found
Everything was working perfectly, but suddenly it stopped working. I've been
debugging this project before, but after writing more code (no more files or
anything) it just couldn't find the files anymore.
The strange thing is that it is not happening for all the files in the
project, just a couple of them...
"Bill Baxter" <dnewsgroup at billbaxter.com> wrote in message
I ran into a problem the other day where ddbg 0.8.1 was telling me that it
couldn't find line xxx of file yyy. But it knew there was a file yyy. It
listed it in the modules list.
Don't have time to narrow it down to a repro right now, but just wanted to
see if anyone else had seen this. The source file in question was called
OptMesh.d and I was running the debugger from a \data directory beneath
that. It was finding the other files fine, so my thought was maybe
there's a bug with mixed case filenames. The files that were working were
all lowercase. Maybe just a coincidence, though.
--bb
Simen Haugen
2007-08-14 13:34:13 UTC
Permalink
The problem seems to be with ddbg.

Btw, Descent is great!
I was using Code::Blocks for some time before, but it was crashing
sometimes, other times it seemed the parser hung (didn't help with restart).
The symbol browser didn't work nice. No rebuild support. Highlighting was
outdated. Probably a lot of other things I can't remember right now too.

"Ary Manzana" <ary at esperanto.org.ar> wrote in message
Can you send me the source code, or at least the hierarchy of the project
with stub functions? That way we'll see if it's a problem with ddbg or
with Descent.
Post by Simen Haugen
I have also been having problems with this, but now I'm getting another
error using ddbg 0.10, descent 0.4, rebuild 0.70 and dmd 1.020
->Soure file "C:\projects\nsd\src\nsd.d" not found
Everything was working perfectly, but suddenly it stopped working. I've
been debugging this project before, but after writing more code (no more
files or anything) it just couldn't find the files anymore.
The strange thing is that it is not happening for all the files in the
project, just a couple of them...
"Bill Baxter" <dnewsgroup at billbaxter.com> wrote in message
Post by Bill Baxter
I ran into a problem the other day where ddbg 0.8.1 was telling me that
it couldn't find line xxx of file yyy. But it knew there was a file
yyy. It listed it in the modules list.
Don't have time to narrow it down to a repro right now, but just wanted
to see if anyone else had seen this. The source file in question was
called OptMesh.d and I was running the debugger from a \data directory
beneath that. It was finding the other files fine, so my thought was
maybe there's a bug with mixed case filenames. The files that were
working were all lowercase. Maybe just a coincidence, though.
--bb
Jascha Wetzel
2007-08-14 13:59:31 UTC
Permalink
Post by Simen Haugen
The problem seems to be with ddbg.
if descent is issuing absolute filenames to ddbg, it's also a descent
problem - it shouldn't.
Simen Haugen
2007-08-14 14:19:17 UTC
Permalink
It worked using the path from lsm. Descent outputs the full pathname when as
I printed on the command line.
Post by Jascha Wetzel
Post by Simen Haugen
The problem seems to be with ddbg.
if descent is issuing absolute filenames to ddbg, it's also a descent
problem - it shouldn't.
Jascha Wetzel
2007-08-14 14:21:34 UTC
Permalink
Post by Simen Haugen
It worked using the path from lsm. Descent outputs the full pathname when as
I printed on the command line.
k, i added it in the hints section of the documentation:
http://ddbg.mainia.de/doc.html#hints
Ary Manzana
2007-08-14 14:30:02 UTC
Permalink
Post by Jascha Wetzel
Post by Simen Haugen
The problem seems to be with ddbg.
if descent is issuing absolute filenames to ddbg, it's also a descent
problem - it shouldn't.
Ok, I'll fix that and try to release a patch as soon as possible.
Loading...