快乐虾
http://blog.csdn.net/lights_joy/
欢迎转载,但请保留作者信息
当VS需要获取寄存器值的时候,会调用
// Creates an enumerator for properties associated with the stack frame, such as local variables. // The sample engine only supports returning locals and parameters. Other possible values include // class fields (this pointer), registers, exceptions... int IDebugStackFrame2.EnumProperties(enum_DEBUGPROP_INFO_FLAGS dwFields, uint nRadix, ref Guid guidFilter, uint dwTimeout, out uint elementsReturned, out IEnumDebugPropertyInfo2 enumObject) {
此时传递进来的guidFilter的值为:
static private Guid _guidFilterRegisters = new Guid("223ae797-bd09-4f28-8241-2763bdc5f713");
在此调用gdb命令
-data-list-register-names
-data-list-register-values
再将结果填充到SDM要求的接口中,就可以看到寄存器的值了:
当然,直接在监视窗口中输入寄存器的值也可以:
很可惜和线程列表一样存在速度慢的问题,需要再改进!
原文地址:http://blog.csdn.net/lights_joy/article/details/42439883