LD WATCH LDan: lbn [,lbn...] This command will set a watchpoint on a virtual or logical blocknumber on the specified device. The lbn is ignored on I/O functions which don't need an lbn (IO$_PACKACK for example). This makes it possible to let the driver take some actions dependant of which lbn was accessed with a specified function- code.
1 /FUNCTION
/FUNCTION[=Keyword] This qualifier specifies for which I/O function the watchpoint is set. An optional keyword may be given: FUNCTION=ALL The watchpoint is set for all I/O functions FUNCTION=READ The watchpoint is set for IO$_READPBLK FUNCTION=WRITE The watchpoint is set for IO$_WRITEPBLK FUNCTION=CODE=number The watchpoint is set for the specified I/O function code The default is /FUNCTION=READ
2 /ACTION
/ACTION[=Keyword] This qualifier specifies the action to be performed when a valid watchpoint is encountered. To be able to set a watchpoint one must have either CMKRNL privilege, or be the owner of the device. A watchpoint may have one action only: CRASH, ERROR or SUSPEND. An exception is OPCOM, which may be specified in addition to any other action for a specific watchpoint. An optional keyword may be given: ACTION=CRASH This action will crash the system when a matching lbn and function are found. Usage of this keyword needs CMKRNL privilege. The bugcheck type will be RSVD_LP. ACTION=ERROR[=code] This action will return a user-specified errorcode when a matching lbn and function are found. When the code is not specified SS$_BUGCHECK will be returned. ACTION=SUSPEND This action will suspend the thread when a matching lbn and function are found. This enables one to look at the system with SDA for further investigation. LD SHOW/WATCH will show all processes waiting for a specific watchpoint, while LD WATCH/RESUME will resume the thread. ACTION=OPCOM This action will display an OPCOM message when a matching lbn and function are found. The message includes the process-id and the imagename doing the request, the devicename, the functioncode and the lbn. If the watchpoint was a virtual one (/FILE specified) then it will show the vbn as well as the file-id of the corresponding file. The default is /ACTION=ERROR=676 (SS$_BUGCHECK)
3 /FILE
/FILE=filespec This qualifier will enable a virtual watchpoint on the specified file. The parameter(s) will then be virtual blocknumbers of the file.
4 /RESUME
/RESUME This qualifier resumes a suspended watchpoint. The parameter is the watchpoint to resume. An alternate way to resume a watchpoint is by /INDEX. If no parameter is specified then all suspended watchpoints will be resumed.
5 /INDEX
/INDEX=n This qualifier enables watchpoint resume by index. The parameter is the watchpoint number to resume.