lotus

previous page: 13.2: Why is the Splat! debugger crashing when my code calls fork(2)?
  
page up: comp.sys.apple2. gno FAQ
  
next page: 14.1: Some programs I run have two cursors and sometimes characters I type don't get sent to the program. When I quit the program, the characters show up on the command line! What's wrong?

13.3: Part way through my debugging session, Splat! no longer shows mysource file. Why?




Description

This article is from the Apple II GNO FAQ, by Devin Reade with numerous contributions by others.

13.3: Part way through my debugging session, Splat! no longer shows mysource file. Why?

    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:













TOP
previous page: 13.2: Why is the Splat! debugger crashing when my code calls fork(2)?
  
page up: comp.sys.apple2. gno FAQ
  
next page: 14.1: Some programs I run have two cursors and sometimes characters I type don't get sent to the program. When I quit the program, the characters show up on the command line! What's wrong?