mirror of
https://github.com/volatilityfoundation/volatility3.git
synced 2026-08-25 15:42:24 +02:00
Layers: Add internal intel debugging flag
This commit is contained in:
@@ -10,12 +10,14 @@ import struct
|
||||
from typing import Any, Dict, Iterable, List, Optional, Tuple
|
||||
|
||||
from volatility import classproperty
|
||||
from volatility.framework import exceptions, interfaces
|
||||
from volatility.framework import exceptions, interfaces, constants
|
||||
from volatility.framework.configuration import requirements
|
||||
from volatility.framework.layers import linear
|
||||
|
||||
vollog = logging.getLogger(__name__)
|
||||
|
||||
INTEL_TRANSLATION_DEBUGGING = False
|
||||
|
||||
|
||||
class Intel(linear.LinearlyMappedLayer):
|
||||
"""Translation Layer for the Intel IA32 memory mapping."""
|
||||
@@ -144,6 +146,11 @@ class Intel(linear.LinearlyMappedLayer):
|
||||
# Read the data for the next entry
|
||||
entry_data = table[(index << self._index_shift):(index << self._index_shift) + self._entry_size]
|
||||
|
||||
if INTEL_TRANSLATION_DEBUGGING:
|
||||
vollog.log(
|
||||
constants.LOGLEVEL_VVVV, "Entry {} at index {} gives data {} as {}".format(
|
||||
hex(entry), hex(index), hex(struct.unpack(self._entry_format, entry_data)[0]), name))
|
||||
|
||||
# Read out the new entry from memory
|
||||
entry, = struct.unpack(self._entry_format, entry_data)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user