简体   繁体   English

Windbg将指针视为有符号整数

[英]Windbg treating pointers as signed integers

struct Node
{
struct NodeY NY;
int data;
};

When I do this, for an instance pointer 'N' of that structure 当我这样做时,对于该结构的实例指针“ N”

2: kd> ?poi(poi(N))
Evaluate expression: -70368698399456 = ffffc000`02ba8520

basically I want to use something like this 基本上我想使用这样的东西

bp igdkmd64!KmRender+0x199 ".if (@@(N) > 0x1){}.else {gc}"

So, most of the cases it is true, but as windbg treats it has signed integer, the above conditional breakpoint is always false as @@(N) is always computed as negative. 因此,在大多数情况下是正确的,但是当windbg将其视为带符号整数时,上述条件断点始终为false,因为@@(N)始终计算为负。

How can I get a quantity comparison of 2 memory addresses? 如何获得2个内存地址的数量比较?

kd> ?? kd> ?? ( int64 ) @@(ffffc00002ba8520) > 1 int64@@(ffffc00002ba8520) > 1
bool false
kd> ?? kd> ?? ( unsigned int64 ) @@(ffffc00002ba8520) > 1 无符号int64@@(ffffc00002ba8520) > 1
bool true 布尔真

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM