mirror of
https://github.com/ivellioscolin/pykd.git
synced 2025-04-29 11:53:23 +08:00
[0.2.x] ~ntobj: print handle value
git-svn-id: https://pykd.svn.codeplex.com/svn@81209 9b283d60-5439-405e-af05-b73fd8c4d996
This commit is contained in:
parent
6697e80b6e
commit
67e1ce1e63
@ -399,24 +399,29 @@ def main():
|
|||||||
dprintln(main.__doc__, True)
|
dprintln(main.__doc__, True)
|
||||||
return
|
return
|
||||||
|
|
||||||
lstObjects = [ p[0] for p in getListByHandleTable(tableHandles, objTypeAddr, containHeaders) ]
|
ObjectHandlePairs = [ (p[0], p[1]) for p in getListByHandleTable(tableHandles, objTypeAddr, containHeaders) ]
|
||||||
|
|
||||||
dprintln("%u objects:" % len(lstObjects))
|
dprintln("%u objects:" % len(ObjectHandlePairs))
|
||||||
for object in lstObjects:
|
for objectHandle in ObjectHandlePairs:
|
||||||
objectType = getType(object)
|
objectType = getType(objectHandle[0])
|
||||||
if objectType in ViewObjectCommand:
|
if objectType in ViewObjectCommand:
|
||||||
viewCommand = ViewObjectCommand[objectType]
|
viewCommand = ViewObjectCommand[objectType]
|
||||||
else:
|
else:
|
||||||
viewCommand = "!object"
|
viewCommand = "!object"
|
||||||
dprint("\tobject=<link cmd=\"" + viewCommand + " 0x%x\">" % object + viewCommand + " 0x%x</link>" % object, True)
|
|
||||||
objectName = buildObjectName(object)
|
dprint("\t<link cmd=\"" + viewCommand + " 0x%x\">" % objectHandle[0] + viewCommand + " 0x%x</link>" % objectHandle[0], True)
|
||||||
|
objectName = buildObjectName(objectHandle[0])
|
||||||
if len(objectName):
|
if len(objectName):
|
||||||
dprintln( ", name=`" + objectName + "'" )
|
dprint( ", name=`" + objectName + "'" )
|
||||||
elif nt.typedVar("_OBJECT_TYPE", getType(object)).TypeInfo.QueryNameProcedure:
|
elif nt.typedVar("_OBJECT_TYPE", getType(objectHandle[0])).TypeInfo.QueryNameProcedure:
|
||||||
dprintln(", <i>custom</i> name", True)
|
dprint(", <i>custom</i> name", True)
|
||||||
else:
|
else:
|
||||||
dprintln(" , <_unnamed_>")
|
dprint(" , <_unnamed_>")
|
||||||
|
|
||||||
|
dprint(", <link cmd=\"!handle 0x%x\">!handle 0x%x</link>\n" % (objectHandle[1], objectHandle[1]), True)
|
||||||
|
|
||||||
dprint("\ttype is `" + getObjectName(objectType) + "' (<link cmd=\"!object 0x%x\">0x%x</link>)" % (objectType, objectType), True)
|
dprint("\ttype is `" + getObjectName(objectType) + "' (<link cmd=\"!object 0x%x\">0x%x</link>)" % (objectType, objectType), True)
|
||||||
|
|
||||||
dprintln( "\n" )
|
dprintln( "\n" )
|
||||||
|
|
||||||
if (1 == argc):
|
if (1 == argc):
|
||||||
|
Loading…
Reference in New Issue
Block a user