我正在使用 PYKD 进行转储调试,因此我正在使用PYKD
dbgCommand()
获取有关对象的信息。
问题是:dbgCommand()
需要解析结果才能使用,如以下示例所示:
source code : result = dbgCommand(("dt -c CStringArray m_nSize " + pointer_format) % (ptr)).split(' : ')
example : dt -c CStringArray m_nSize 0x03966ce8
example output :
<application>!CStringArray
+0x008 m_nSize 0n16
我只对大小本身感兴趣0n16
(尽可能限制结果。
有没有办法(使用其他显示选项,使用其他命令dt
,如果需要,使用本机可视化器)来获得以下情况:
dt <options> CStringArray m_nSize 0x03966ce8
0n16 // only that, nothing else
与此同时,我已经使用命令更进一步dd
,如您所见:
0:000> dd 0x03966ce8+0x008 L1 // for a CStringArray, m_nSize is at memory address +0x008
// L1 means: limit the amount of answers to one byte
03966cf0 00000010 // the result only contains one line.
现在我只需要找到一种不再看到内存地址的方法。