阅读:1236回复:9
请问如何用softice调试时查看变量的即时值?
比如下列代码:
NTSTATUS GpdIoctlWritePort( IN PLOCAL_DEVICE_INFO pLDI, IN PIRP pIrp, IN PIO_STACK_LOCATION IrpStack, IN ULONG IoctlCode ) { // NOTE: Use METHOD_BUFFERED ioctls. PULONG pIOBuffer; // Pointer to transfer buffer // (treated as array of longs). ULONG InBufferSize ; // Amount of data avail. from caller. ULONG nPort; // Port number to read or write. ULONG DataBufferSize; PAGED_CODE(); // Size of buffer containing data from application InBufferSize = IrpStack->Parameters.DeviceIoControl.InputBufferLength; // NT copies inbuf here before entry and copies this to outbuf after return, // for METHOD_BUFFERED IOCTL's. pIOBuffer = (PULONG) pIrp->AssociatedIrp.SystemBuffer; pIrp->IoStatus.Information = 0; ......................... ......................... } 我无论用watch nPort;还是用watch &nPort;都无法查看 变量nPort的即时值? 请问如何才能想用VC调试application样查看变量的值??多谢 |
|
|
沙发#
发布于:2004-12-01 16:24
唉,本人不懂汇编呀,大学学的东东都忘光了!
|
|
|
板凳#
发布于:2004-12-01 16:59
d nPort
|
|
|
地板#
发布于:2004-12-02 09:15
不行呀,我调试了InBufferSize变量,情况如下:
:d InBufferSize :Symbol not defined (InBufferSize) :dd InBufferSize :Symbol not defined (InBufferSize) :dl InBufferSize :Symbol not defined (InBufferSize) :dw InBufferSize :Symbol not defined (InBufferSize) 不论是在执行赋值语句前或后,都提示Symbol not defined (InBufferSize),请问到底怎么办呀???? |
|
|
地下室#
发布于:2004-12-02 11:35
还是看汇编吧,反正也很简单的,再说对于做驱动来说,即使不写,至少也应该能看的.
|
|
|
5楼#
发布于:2004-12-02 15:45
难道大家都是用汇编的吗?
有没有比较方便的办法了? 多谢! |
|
|
6楼#
发布于:2004-12-02 18:07
难道大家都是用汇编的吗? 我也没学过汇编,这可咋办呢?痛苦~ |
|
7楼#
发布于:2004-12-03 10:24
我终于搞明白怎么弄了,呵呵!
|
|
|
8楼#
发布于:2004-12-03 10:24
我终于搞明白怎么弄了,呵呵!多谢!
|
|
|
9楼#
发布于:2004-12-05 12:56
1. 直接找地址看.
2. Debug时的编译参数有问题,我以前也遇到过是这样解的. |
|
|