Skip to content

Commit 348720c

Browse files
committed
linux: module extension object: add docstring to get_symbol_type()
1 parent e222b06 commit 348720c

File tree

1 file changed

+12
-1
lines changed
  • volatility3/framework/symbols/linux/extensions

1 file changed

+12
-1
lines changed

volatility3/framework/symbols/linux/extensions/__init__.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,18 @@ def section_typetab(self):
361361

362362
raise AttributeError("Unable to get typetab section, it needs a kernel >= 5.2")
363363

364-
def get_symbol_type(self, symbol, symbol_index):
364+
def get_symbol_type(
365+
self, symbol: interfaces.objects.ObjectInterface, symbol_index: int
366+
) -> str:
367+
"""Determines the type of a given ELF symbol.
368+
369+
Args:
370+
symbol: The ELF symbol object (elf_sym)
371+
symbol_index: The index of the symbol within the type table
372+
373+
Returns:
374+
A single-character string representing the symbol type
375+
"""
365376
if self.has_member("kallsyms") and self.kallsyms.has_member("typetab"):
366377
# kernels >= 5.2 1c7651f43777cdd59c1aaa82c87324d3e7438c7b types have its own array
367378
layer = self._context.layers[self.vol.layer_name]

0 commit comments

Comments
 (0)