Log in

View Full Version : Paths for source files


fycom
January 1st, 2005, 06:32
I have some DLLs that attach to the main executable during execution. They all have debugging information, but their sources reside in different directories.

So, my question is: How to force debugger to read and use these sources from that directories?

Currently it says that they are Absent...


blabberer
January 1st, 2005, 09:56
here is a path list (the os is 9x here so it may not reflect all calls (those that are called through registers are jumped directly or whatever they are not recoreded here)
the app used is iczelions tut02 msgbox.exe

004AEFCA COND: D:\desktop\tut02\msgbox.exe
004AEFCA COND: D:\DESKTOP\TUT02\MSGBOX.EXE
004AEFCA COND: D:\desktop\odbg110\MSGBOX.udd
004AEFCA COND: D:\DESKTOP\ODBG110\common.arg
004AEFCA COND: D:\DESKTOP\ODBG110\msgbox.arg
004AEFCA COND: D:\DESKTOP\TUT02\MSGBOX.EXE
004AEFCA COND: D:\desktop\odbg110\MSGBOX.udd
004AEFCA COND: D:\desktop\odbg110\MSGBOX.udd
004AEFCA COND: D:\DESKTOP\TUT02\MSGBOX.EXE
004AEFCA COND: D:\DESKTOP\TUT02\MSGBOX.EXE
004AEFCA COND: D:\DESKTOP\TUT02\MSGBOX.tds
004AEFCA COND: D:\DESKTOP\TUT02\MSGBOX.EXE
6D51B920 COND: dbghelp = D:\DESKTOP\TUT02\symbols\MSGBOX.dbg
6D51B920 COND: dbghelp = C:\Symbols\symbols\MSGBOX.dbg
6D51B920 COND: dbghelp = D:\DESKTOP\ODBG110\symbols\MSGBOX.dbg
6D51B920 COND: dbghelp = D:\DESKTOP\TUT02\MSGBOX.dbg
6D51B920 COND: dbghelp = C:\Symbols\MSGBOX.dbg
6D51B920 COND: dbghelp = D:\DESKTOP\ODBG110\MSGBOX.dbg
6D51B920 COND: dbghelp = D:\DESKTOP\TUT02\MSGBOX.dbg
6D51B920 COND: dbghelp = C:\Symbols\MSGBOX.dbg
6D51B920 COND: dbghelp = D:\DESKTOP\ODBG110\MSGBOX.dbg
6D51B920 COND: dbghelp = MSGBOX.dbg
004AEFCA COND: C:\Symbols\symbols\sym\MSGBOX.sym
004AEFCA COND: C:\Symbols\sym\MSGBOX.sym
004AEFCA COND: C:\Symbols\MSGBOX.sym
004AEFCA COND: D:\DESKTOP\TUT02\symbols\sym\MSGBOX.sym
004AEFCA COND: D:\DESKTOP\TUT02\sym\MSGBOX.sym
004AEFCA COND: D:\DESKTOP\TUT02\MSGBOX.sym
004AEFCA COND: D:\DESKTOP\ODBG110\sym\MSGBOX.sym
004AEFCA COND: D:\DESKTOP\ODBG110\MSGBOX.sym
6D51B529 COND: dbghelp = D:\desktop\odbg110\MSGBOX.EXE
6D51B529 COND: dbghelp = D:\DESKTOP\TUT02\msgbox.exe
6D51B920 COND: dbghelp = D:\DESKTOP\TUT02\symbols\EXE\MSGBOX.dbg
6D51B920 COND: dbghelp = D:\DESKTOP\TUT02\EXE\MSGBOX.dbg
6D51B920 COND: dbghelp = D:\DESKTOP\TUT02\MSGBOX.dbg
6D51B920 COND: dbghelp = MSGBOX.dbg

if your .dbg or .sym and your source is one of the above paths it should load it automatically and be able to show you the dbginfo in there

the exe for above is located in folder D:\desktop\tut02\
i ve set the global symbol path as c:\symbols

fycom
January 1st, 2005, 13:56
oh me anon

8-/

Thanks, but it seems that I've messed up describing my problem, may be because of my poor english.... Sorry for that...

First of all, I use Borland C.
After compiling my source files I am getting two *.DLL's and one *.EXE. And then my project's directory tree looks like this:

c:\Project\DLL1\foo1.c
c:\Project\DLL2\foo2.c
c:\Project\main.c
c:\Project\foo1.dll
c:\Project\foo2.dll
c:\Project\main.exe

So, when I start to debug, the debugger searches for my source files only in c:\Project\ directory (and does not find it), while I need it to search them in c:\Project\DLL1\, c:\Project\DLL2\ and c:\Project\ directories, because they are really there...

Its inability to find them results in the follwing look of the "source files" panel:

Source files
Module Source Source path
DLL1 (Absent) C:\Project\foo1.c
DLL2 (Absent) C:\Project\foo2.c
EXE MAIN.C C:\Project\main.c

while must be:

Module Source Source path
DLL1 FOO1.C C:\Project\DLL1\foo1.c
DLL2 FOO2.C C:\Project\DLL2\foo2.c
EXE MAIN.C C:\Project\main.c

Is this explanation more plain now ?

So, my question remains the same: How to inform debugger where to search for source files of DLL's? Or, otherwise saying, how can I specify several directories of source files?


fycom
January 1st, 2005, 14:02
Sorry, that is more accurate:

Source files
Module Source Source path
FOO1.DLL (Absent) C:\Project\foo1.c
FOO2.DLL (Absent) C:\Project\foo2.c
MAIN.EXE MAIN.C C:\Project\main.c

while desired:

Source files
Module Source Source path
FOO1.DLL FOO1.C C:\Project\DLL1\foo1.c
FOO2.DLL FOO2.C C:\Project\DLL2\foo2.c
MAIN.EXE MAIN.C C:\Project\main.c

TQN
January 2nd, 2005, 03:40
The current version of OllyDbg only supports opening the source file in the executable directory, not in subdirectoris or another directories.

fycom
January 2nd, 2005, 05:23
TQN

Thank you very much! It is a pity if so :-(

May be someone also knows when this feature will be implemented?

It already exists in the old Borland's debugger td32.exe and seems very important for complex projects %)