• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Xcode could not locate source file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Xcode could not locate source file


  • Subject: Re: Xcode could not locate source file
  • From: Grant Limberg <email@hidden>
  • Date: Thu, 30 Apr 2009 10:53:30 -0700

I have a little additional info. Hopefully this helps. I turned on the gdb log and found something interesting when its loading the stack trace Here's the output from the gdb.log:

<- frame={level="1",addr="0x00c2974a",fp="0xbfffeb00",func="wxAppConsole::HandleEvent",file="../src/common/appbase.cpp",fullname="/Users/grant/Documents/Development/wxWidgets/src/common/appbase.cpp",line="322",dir="/Volumes/Dump/Users/whschultz/Documents/wxWidgets/wxWidgets_local/osx-x86-debug-cg"},
--- SNIP---


Notice that the fullname property is honoring the 'set pathname- substitutions' whereas the file and dir properties are not. Is it possible that Xcode is trying to use the file and dir properties rather than the fullname?

Grant Limberg

GIF image



email@hidden
http://www.cedrus.com/



On Apr 30, 2009, at 10:34 AM, Grant Limberg wrote:

This begins to help, but doesn't get me all the way there. I am able to load specific lines, functions and files in wxWidgets from the gdb command console, however Xcode still won't show the file. For instance, I have the debugger set to break on an event in my code. The previous function call in the stack trace in Xcode shows up as wxAppConsole::HandleEvent. If I click on that line, Xcode puts the following into the debugger console:

	Xcode could not locate source file: appbase.cpp (line: 322)

However, take a look at the following when calling list manually from the gdb command console:

	(gdb) list appbase.cpp:322
	317	wxAppConsole::HandleEvent(wxEvtHandler *handler,
	318	                          wxEventFunction func,
	319	                          wxEvent& event) const
	320	{
	321	    // by default, simply call the handler
	322	    (handler->*func)(event);
	323	}
	324
	325	#endif // wxUSE_EXCEPTIONS
	326
	(gdb)

So gdb is definitely able to find the files. It's just Xcode that is having problems finding the file now.

Grant Limberg

<unknown.gif>

email@hidden
http://www.cedrus.com/



On Apr 29, 2009, at 6:35 PM, Jim Ingham wrote:

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/


Attachment: PGP.sig
Description: This is a digitally signed message part

 _______________________________________________
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

References: 
 >Xcode could not locate source file (From: Grant Limberg <email@hidden>)
 >Re: Xcode could not locate source file (From: Jim Ingham <email@hidden>)
 >Re: Xcode could not locate source file (From: Grant Limberg <email@hidden>)

  • Prev by Date: Re: need way to debug tool called by popen--at startup
  • Next by Date: re need way to debug tool called by popen--at startup
  • Previous by thread: Re: Xcode could not locate source file
  • Next by thread: Determine nested return value from asm in debugger
  • Index(es):
    • Date
    • Thread