Re: Xcode could not locate source file
Re: Xcode could not locate source file
- Subject: Re: Xcode could not locate source file
- From: Jim Ingham <email@hidden>
- Date: Wed, 29 Apr 2009 18:35:00 -0700
The traditional way in gdb is to use the "dir" command:
(gdb) help dir
Add directory DIR to beginning of search path for source files.
Forget cached info on source file locations and line positions.
DIR can also be $cwd for the current working directory, or $cdir for the
directory in which the source file was compiled into object code.
With no argument, reset the search path to $cdir:$cwd, the default.
You can set this either in the gdb console, or in your ~/.gdbinit
file. The "dir" command does not specify a recursive search, however,
which makes it inconvenient if you have a deep tree of sources.
To help with that we added the "pathname-substitutions" command that
is sometimes easier to use:
(gdb) help set pathname-substitutions
Set string substitutions to be used when searching for source files.
The string substitutions are space separated pairs of paths where each
string can be surrounded by quotes if a path contains spaces.
Example:
pathname-substitutions /path1/from /new/path1/to '/path2/with space/
from' /path2/to
You can use this to make the map from where the sources were on the
build machine to where they are on your debugging machine.
Or again, you can add a directory structure on your debug machine that
parallels the one on the build machine, and either put the sources
there, or make a symlink from there to the sources.
Jim
On Apr 29, 2009, at 6:22 PM, Grant Limberg wrote:
I'm running into an issue with Xcode's debugger. We're developing
with a custom build of wxWidgets. The binaries of the compiled
shared libraries are in our code repo along with their .dSYM output
for debugging. The problem comes along when trying to step into
code inside wxWidgets itself. I get the error:
Xcode could not locate source file: FileName.cpp (line: lineno)
This error does go away if wxWidgets is recompiled on the machine,
but, unless we were mistaking the benefits of .dSYM files, we were
hoping we wouldn't have to do that. Is there a way to tell Xcode
where to look for source files that the dSYMs are pointing to?
Thanks,
Grant Limberg
<unknown.gif>
email@hidden
http://www.cedrus.com/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden