[~] Improve stlport map dumping script to accept WinDbg expression as parameter rather than just address.

git-svn-id: https://pykd.svn.codeplex.com/svn@63493 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
SND\air_max_cp 2011-04-05 08:49:33 +00:00
parent f111bd9610
commit 5e35ff2352

View File

@ -10,7 +10,6 @@ def println(msg):
else: else:
print msg print msg
class StlpNodeWrapper: class StlpNodeWrapper:
def __init__(self, addr): def __init__(self, addr):
# Wrapper specific field # Wrapper specific field
@ -80,8 +79,8 @@ def dumpStlportMap(addr):
def printUsage(): def printUsage():
println("Usage:") println("Usage:")
println("!py dump_stlp_map map_address [\"EXACT MAP PAIR TYPE\"]") println("!py dump_stlp_map <map_address|variable_name> [\"accurate map pair type\"]")
println("To obtain exact map pair type use:") println("To retrive accurate map pair type use:")
println("dt -r ModuleName!stlp_std::pair*") 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 parameter.")
@ -96,7 +95,7 @@ if __name__ == "__main__":
printUsage() printUsage()
quit(0) quit(0)
else: else:
mapAddr = int(sys.argv[1], 16) mapAddr = int(expr(sys.argv[1]))
addrList = dumpStlportMap(mapAddr) addrList = dumpStlportMap(mapAddr)
for addr in addrList: for addr in addrList: