PRB: Windows NT Kernel WinDbg Message "Unable to modify memory" |
Q180577
When 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:
This happens when the expression evaluator is set to the wrong type.Unable to modify memory
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.
The 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.
To 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.
For 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.
KDx86> ed scsiport!scsidebug 3
Unable to modify memory
KDx86> .opt masmeval on
KDx86> ed scsiport!scsidebug 3
KDx86> dd scsiport!scsidebug l1
0x80260C84 00000003 .... KDx86> .opt masmeval on
KDx86> ed scsiport!scsidebug 3
KDx86> dd scsiport!scsidebug l1
0x80260C84 00000003 .... KDx86> .opt masmeval off
KDx86> dd scsiport!scsidebug l1 0x00000003 ???????? ????
Windows NT DDK: WinDbg
Additional query words: debugprint SCSI debug
Keywords : kberrmsg kbDDK kbNTOS351 kbNTOS400 kbWinOS2000 kbDSupport NTDDKDebug NTDDKKMode
Issue type : kbinfo
Technology :
|
Last Reviewed: December 9, 1999 © 2001 Microsoft Corporation. All rights reserved. Terms of Use. |