Native Inspect Manual (H06.13+, J06.03+)

Optionally Determining the Compilation-Time Source File Name
If you are debugging on a different system from the one used for compiling, Native Inspect cannot
locate your source files at their originally compiled locations. For this reason, the list command
will not be able to list your program source and will report an error:
(eInspect 0,384): list
Unable to open file \SIERRA.$YOSE.MHG2.NITEST
Then you should add the current subvolume to the search path for source files, as described in
Optionally Configuring a Search Path for Your Source Files (page 36). For example:
(eInspect 0,384): dir $d0117.mysvol
Source directories searched: $d0117.mysvol:$cdir:$cwd
(eInspect 0,384): list
35 char *new_ptr = "In print_and_break\n";
36 int z = 7;
37 printf ("About to call DEBUG'\n");
38 DEBUG();
39 }
40 void main (void) {
41 char *local_ptr = "From main";
42 int local_q = 0;
43 call1(local_ptr,local_q);
44 }
(eInspect 0,384):
Optionally Configuring a Search Path for Your Source Files
Loadfiles contain the original compiled locations of their source files. If you have moved your files
between compilation and debugging, you must set a search path so that Native Inspect can locate
your source files.
Changing Paths
If the unqualified file names of your source files have not changed between compilation and
debugging, use the dir command to add entries to the directory search list that Native Inspect
uses to locate source files. For example:
(eInspect 0,330): dir $myvol.mysubvol
Changing File Names
If the unqualified file names of your source files change between compilation and debugging (for
example, when transferring source files from a PC to the system), use the map-source-name
command to define mapping rules. For example:
map-source-name fully-qualified-pathname=file | new-path
To display the current search path for source files, use the show command with the directories
option.
The search path you specify is global to all processes that you debug in a single session of Native
Inspect.
NOTE: If you specify an unqualified source file name with the map-source-name command,
Native Inspect automatically uses the directory search list to locate the file.
Advancing Execution to main() in C/C++ Programs
When you start a C/C++ program with a RUND (Guardian) or run -debug (OSS) command,
execution, by default, automatically advances to main(), and you can then examine the state of
your program at the beginning of the program. It is not necessary to set a breakpoint at main()
to get control at that point.
36 Using Native Inspect