This article is from the Apple II GNO FAQ, by Devin Reade with numerous contributions by others.
A#13.3: Your program is probably changing its current working directory. The C preprocessor inserts tokens that tell the compiler which file (and on which line) it is currently processing. This information is eventually passed to the debugger. Some of the pathnames are, in general, relative to the directory from which your program was compiled. Splat! uses these relative pathnames to locate the source files that it is supposed to display. Unfortunately, the current version of Splat! always searches for these files relative to the current directory, not relative to the directory that was current at the time which Splat! was invoked. Therefore, if your program changes the current directory, the source files can no longer be found. This problem can be avoided by inserting following preprocessor directive at the top of all your source files: #line 1 "/fully/qualified/path/name.c" Of course, you should use the real path names to your source files, not the one shown above. Do not use the __FILE__ macro as it will be expanded to only a partial pathname under some circumstances, such as when using occ(1). There is a utility which automates this process, including an option to remove the preprocessor directive. See the splatprep(1) manual page for details.
 
Continue to: