Specifications

Debugging a Device Driver
11.4 Troubleshooting Network Failures
Example 11–13 Using the Step/Return Command
- SRC: module C_TEST_ROUTINES -scroll-source------------------------------------
47: #pragma noinline(test_c_code,test_c_code2,test_c_code3)
48: extern volatile int64 xdt$fregsav[34]; /* Lie and say these are integer
49: use iregsav because the debugger will r
50: be using those!*/
51:
52: int test_c_code3(int subrtnCount)
53: {
54: subrtnCount = subrtnCount - 1;
55: if (subrtnCount != 0)
56: subrtnCount = test_c_code3(subrtnCount);
-> 57: return subrtnCount;
58: }
59: int test_c_code2(int64 in64,int in32, int64 test, int64* pVar)
60: {
61: xdt$fregsav[5] = in64;
62: xdt$fregsav[6] = in32;
63: if (xdt$fregsav[9] > 0)
64: *pVar = (*pVar + xdt$fregsav[17])%xdt$fregsav[9];
65: else
66: *pVar = (*pVar + xdt$fregsav[17]);
67: xdt$fregsav[7] = test_c_code3(10);
68: xdt$fregsav[3] = test;
- OUT -output-------------------------------------------------------------------
break at C_TEST_ROUTINES\test_c_code3\%LINE 56
C_TEST_ROUTINES\test_c_code3\subrtnCount: 8
module name routine name line rel PC abs PC
*C_TEST_ROUTINES test_c_code3 56 0000002C 8002A7CC
*C_TEST_ROUTINES test_c_code3 56 0000003C 8002A7DC
*C_TEST_ROUTINES test_c_code2 67 000000AC 8002A8A4
*C_TEST_ROUTINES test_c_code 80 00000084 8002A960
00000000 8234A244
00000000 8234A0C0
SHARE$EXEC_INIT 00000000 82379BC4
stepped to C_TEST_ROUTINES\test_c_code3\%LINE 57
stepped to C_TEST_ROUTINES\test_c_code3\%LINE 56
stepped on return from C_TEST_ROUTINES\test_c_code3\%LINE 56+16 to C_TEST_ROUTI
C_TEST_ROUTINES\test_c_code3\%R0: 0
- PROMPT -error-program-prompt--------------------------------------------------
DBG> show calls
DBG> cancel break/all
DBG> go
DBG> step
DBG> step/return
DBG> examine r0
DBG>
After you finish the system-code debugging session, enter the GO command to
leave this module. You will encounteranother INI$BRK breakpoint at the end of
init. An error message indicating there are no source lines for address 80002010
is displayed, because debug information on this image or module is not available.
The debugger leaves the source code for C_TEST_ROUTINES on the screen;
however, it is not valid.
Also notice that there is no message in the OUT display for this event. That is
because INI$BRK’s are special breakpoints that are handled as SS$_DEBUG
signals. They are a method for the system code to break into the debugger and
there is no real breakpoint in the code.
11–25