本文整理匯總了Python中volatility.debug.b方法的典型用法代碼示例。如果您正苦於以下問題:Python debug.b方法的具體用法?Python debug.b怎麽用?Python debug.b使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類volatility.debug
的用法示例。
在下文中一共展示了debug.b方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: __init__
# 需要導入模塊: from volatility import debug [as 別名]
# 或者: from volatility.debug import b [as 別名]
def __init__(self, theType, offset, vm, parent = None,
count = 1, targetType = None, target = None, name = None, **kwargs):
## Instantiate the first object on the offset:
BaseObject.__init__(self, theType, offset, vm,
parent = parent, name = name, **kwargs)
if callable(count):
count = count(parent)
self.count = int(count)
self.original_offset = offset
if targetType:
self.target = Curry(Object, targetType)
else:
self.target = target
self.current = self.target(offset = offset, vm = vm, parent = self, name = name)
if self.current.size() == 0:
## It is an error to have a zero sized element
debug.debug("Array with 0 sized members???", level = 10)
debug.b()
示例2: check_addr
# 需要導入模塊: from volatility import debug [as 別名]
# 或者: from volatility.debug import b [as 別名]
def check_addr(self, found):
""" This calls all our constraints on the offset found and
returns the number of contraints that matched.
We shortcut the loop as soon as its obvious that there will
not be sufficient matches to fit the criteria. This allows for
an early exit and a speed boost.
"""
cnt = 0
for check in self.constraints:
## constraints can raise for an error
try:
val = check.check(found)
except Exception:
debug.b()
val = False
if not val:
cnt = cnt + 1
if cnt > self.error_count:
return False
return True