Debug Manual

Table Of Contents
Sample Debug Sessions
Debug Manual421921-003
F-29
Native Program Example
SEGMENT_PTR STRING EXT POINTER
%H48 %H4 LOCAL VARIABLE
9.300 1 0 PROC example_main MAIN;
10. 1 1 BEGIN
11.020 1 1 INT error_main;
11.030 1 1 INT error_detail;
12. 1 1 example_init;
12.007 1 error_main := SEGMENT_ALLOCATE_ (1, 131064D, !filename;len!,
error_detail);
12.020 1 1 IF error_main <> 0 THEN
12.021 1 1 DEBUG;
12.022 1 error_main := SEGMENT_ALLOCATE_ (2, 131064D, !filename;len!,
error_detail);
12.030 1 1 IF error_main <> 0 THEN
12.031 1 1 DEBUG;
12.032 1 error_main := SEGMENT_ALLOCATE_ (17, 258000D, !filename;len!,
error_detail);
12.040 1 1 IF error_main <> 0 THEN
12.050 1 1 DEBUG;
12.200 1 1 example_fill_array (1);
12.300 1 1 example_fill_array (2);
13. 1 1 example_fill_array (17);
14. 1 1 END; -- example_maim
ERROR_DETAIL INT(16)
%H44 %H2 LOCAL VARIABLE
ERROR_MAIN INT(16)
%H46 %H2 LOCAL VARIABLE
Global Map
MY_TERMNUM INT(16)
%H0 %H2 _GLOBAL
PROCESS_HANDLE INT(16) [0:9]
%H2 %H14 _GLOBAL
SP STRING EXT POINTER
%H18 %H4 _GLOBAL
To make the program executable, we must also run NLD on the compiled object to
create an executable object. We use this command:
NLD tdemo1 -o ndemo1 -set inspect off -s
We also need to get some address information about various procedures from the
noft listing. For more information about using noft, see the nld Manual and the noft
Manual. For our example, we specify noft commands as follows:
NOFT out $s.#lndemo1;f ndemo1; lp * d