Native Inspect Manual (H06.07+)

Using Native Inspect
Native Inspect Manual528122-006
2-6
For C/C++, Advancing Execution to main()
Path Change
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
File Name Change
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.
For C/C++, Advancing Execution to main()
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.
You can change this default behavior by entering a set command (environment) with
the continue-to-main off option. You should include this command in the
EINSCSTM file (located in your default logon directory) so that it is executed during
Native Inspect initialization.
If set continue-to-main off is specified, you must set a breakpoint at main()
to stop execution and examine the state of your program at that point, as in the
following example:
(eInspect 0,330): b main
C:\mywin\home\myfiles\test\nitest.c, line 40.
(eInspect 0,330): c
Continuing.
Breakpoint 1 main () at C:\mywin\home\myfiles\test\nitest.c:40
40 void main (void) {
(eInspect 0,330): bt
#0 main () at C:\mywin\home\myfiles\test\nitest.c:40
#1 0x70000e60:0 in_MAIN 90 at \SPEEDY.$DATA06.T8432H01.CPLMAINC:68000
(eInspect: 0,330):
Note. If you specify an unqualified source file name in the map-source-name command,
Native Inspect automatically uses the directory search list to locate the file.