Specifications
Debugging a Device Driver
11.4 Troubleshooting Network Failures
Example 11–5 Finding the Source Code
DBG> go
break at routine C_TEST_ROUTINES\test_c_code
%DEBUG-W-UNAOPNSRC, unable to open source file DSKD$:[DELTA.SRC]C_TEST_ROUTINES.
C;*
-RMS-F-DEV, error in device name or inappropriate device type for operation
80: Source line not available
DBG> set source sys$examples:
Now that the debugger has access to the source, you can put the debugger into
screen mode to see exactly where you are and the code surrounding it.
Example 11–6 Using the Set Mode Screen Command
DBG> Set Mode Screen; Set Step Nosource
- SRC: module C_TEST_ROUTINES -scroll-source------------------------------------
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;
69: return xdt$fregsav[23];
70: }
71: void test_c_code(void)
72: {
73: int x,y;
74: int64 x64,y64;
75:
-> 76: x = xdt$fregsav[0];
77: y = xdt$fregsav[1];
78: x64 = xdt$fregsav[2];
79: y64 = xdt$fregsav[3];
80: xdt$fregsav[14] = test_c_code2(x64+y64,x+y,x64+x,&y64);
81: return;
82: }
- OUT -output-------------------------------------------------------------------
- PROMPT -error-program-prompt--------------------------------------------------
DBG>
Now, you want to set another breakpoint inside the test_c_code3 routine. You use
the SCROLL/UP DEBUG command (8 on the keypad) to move to that routine and
see that line 56 would be a good place to set the breakpoint. It is at a recursive
call. Then you proceed to that breakpoint with the GO command.
11–18










