开发者

Comparing two Object addresses in WinDbg

Is there a way to k开发者_高级运维now if two addresses, which are references to two objects are connected ? By connected I mean whether one of the objects holds a reference to the other object.


In most languages, the memory storing the object referencing the other will contain a pointer to the other object. The difficulty is then to determine where this memory starts and end.

If you are in .Net, there is a windbg extension named sosex that exposes a !refs command displaying the immediate references from and to a given object.

If you are in native code, you can use !heap -p -a to obtain the logical memory block containing an object and then check if this memory contains a pointer to the memory of the other object.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜