mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-19 19:13:22 +08:00
[~] stlp.py: added "map" parameter.
git-svn-id: https://pykd.svn.codeplex.com/svn@63804 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
b7b2b25e2d
commit
52a250ab89
@ -1,4 +1,4 @@
|
||||
"""Dump STLPort map"""
|
||||
"""Dump STLPort containers"""
|
||||
|
||||
import sys
|
||||
from pykd import *
|
||||
@ -79,10 +79,10 @@ def dumpStlportMap(addr):
|
||||
|
||||
def printUsage():
|
||||
println("Usage:")
|
||||
println("!py dump_stlp_map <map_address|variable_name> [\"accurate map pair type\"]")
|
||||
println("To retrive accurate map pair type use:")
|
||||
println("!py stlp map <map_address|variable_name> [\"accurate map pair type\"]")
|
||||
println("Use dt command to retrive accurate map pair type:")
|
||||
println("dt -r ModuleName!stlp_std::pair*")
|
||||
println("Find required type in the list and copy paste it as parameter.")
|
||||
println("Find required type in the list and copy paste it as script parameter. Don't forget about quotes.")
|
||||
|
||||
if __name__ == "__main__":
|
||||
global runningAsWinDbgExtension
|
||||
@ -91,18 +91,18 @@ if __name__ == "__main__":
|
||||
mapAddr = 0
|
||||
|
||||
argc = len(sys.argv)
|
||||
if (argc < 2):
|
||||
if (argc < 3 or sys.argv[1] != "map"):
|
||||
printUsage()
|
||||
quit(0)
|
||||
else:
|
||||
mapAddr = int(expr(sys.argv[1]))
|
||||
mapAddr = int(expr(sys.argv[2]))
|
||||
|
||||
addrList = dumpStlportMap(mapAddr)
|
||||
for addr in addrList:
|
||||
if (argc == 2):
|
||||
if (argc == 3):
|
||||
println("0x%x" % addr)
|
||||
else:
|
||||
s = "dt -r " + sys.argv[2] + " 0x%x" % addr
|
||||
s = "dt -r " + sys.argv[3] + " 0x%x" % addr
|
||||
#println(s)
|
||||
println("------------------------------------------------")
|
||||
println(dbgCommand(s))
|
||||
|
Loading…
Reference in New Issue
Block a user