PRB: Windows NT Kernel WinDbg Message "Unable to modify memory"Last reviewed: February 11, 1998Article ID: Q180577 |
The information in this article applies to:
SYMPTOMSWhen you are using WinDbg to debug a kernel-mode device driver and trying to use the Enter Values (ED, EW, EB, and so on) command to modify memory using a symbolic name, the following error message may appear:
Unable to modify memoryThis happens when the expression evaluator is set to the wrong type. You can modify memory in several different ways. For example, to set the SCSI debug print level to 3, you can type:
ed scsiport!scsidebug 3or its equivalent:
?scsiport!scsidebug=3These commands change the global variable in Scsiport.sys. If the message "Unable to modify memory" appears, the expression evaluator settings may be incorrect.
CAUSEThe default Visual C or C++ expression evaluator evaluates expressions as C expressions. MASM expressions always set the value of a symbol to its address. When the value is set incorrectly, the "Unable to modify memory" message may appear.
RESOLUTIONTo configure WinDbg to use MASM expressions, enter the following in the WinDbg command window:
.opt masmeval onTo check the current setting of the expression evaluator, use:
.opt masmevalThis command displays either "MasmEval off" or "MasmEval on", which indicates the state of MASM evaluation. Save the WinDbg common workspace so that you can maintain this evaluation setting the next time you use WinDbg.
MORE INFORMATIONFor the following discussion, type in the text after the KDx86 prompt in the WinDbg command window. The line immediately following the user input (if any) is the result of the command.
Debug Session 1This WinDbg session demonstrates how you can modify the value of the Scsiport debug variable. In this session, the expression evaluator is set to Visual C or C++, so the attempt to modify memory using the symbolic name fails until the expression evaluator is changed.
Debug Session 2This debug session demonstrates how the expression evaluator setting might display a peculiar value when you use symbolic names.
REFERENCESWindows NT DDK: WinDbg
|
Additional query words: debugprint SCSI debug
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |