"use strict"; // 32bit let arr = ["xxxx"]; function initializeScript() { return [new host.apiVersionSupport(1, 7)]; } function log(str) { host.diagnostics.debugLog(str + "\n"); } function exec(str) { return host.namespace.Debugger.Utility.Control.ExecuteCommand(str); } function invokeScript() { for (var address of arr) { var commandText = ".printf \"%04x\", poi(poi(poi(poi(" + address + "+0x4)+0xc)+0x4))"; var output = exec(commandText).First(); if (parseInt(output) == 0) continue; //not exists thread info commandText = ".printf \"%04x\", poi(poi(poi(poi(poi(" + address + "+0x4)+0xc)+0x4))+0x28)"; output = exec(commandText).First(); //thread id var tid = parseInt(output); if (tid > 1) log("Thread=" + tid + ",systemEventInvokeInfo=" + address); } }
标签:脚本,function,Windbg,address,0x4,poi,var,采摘,commandText From: https://www.cnblogs.com/ioriwellings/p/17111072.html