Refactor symbol to object_type (so it doesn't shadow builtin type).

This commit is contained in:
Mike Auty
2019-08-14 20:50:42 +01:00
committed by ikelos
parent 18283ab410
commit be27aab8ae
27 changed files with 89 additions and 79 deletions
@@ -98,7 +98,7 @@ class Check_afinfo(plugins.PluginInterface):
except exceptions.SymbolError:
continue
global_var = vmlinux.object(symbol = struct_type, offset = global_var.address)
global_var = vmlinux.object(object_type = struct_type, offset = global_var.address)
for name, member, address in self._check_afinfo(global_var_name, global_var, op_members, seq_members):
yield 0, (name, member, format_hints.Hex(address))
@@ -176,7 +176,7 @@ class Check_syscall(plugins.PluginInterface):
for (table_name, (tableaddr, tblsz)) in tables:
table = vmlinux.object(
symbol = "array", subtype = vmlinux.get_type("pointer"), offset = tableaddr, count = tblsz)
object_type = "array", subtype = vmlinux.get_type("pointer"), offset = tableaddr, count = tblsz)
for (i, call_addr) in enumerate(table):
if not call_addr:
+1 -1
View File
@@ -50,7 +50,7 @@ class Lsmod(plugins.PluginInterface):
vmlinux = contexts.Module(context, vmlinux_symbols, layer_name, 0)
modules = vmlinux.object_from_symbol(symbol = "modules").cast("list_head")
modules = vmlinux.object_from_symbol(object_type = "modules").cast("list_head")
table_name = modules.vol.type_name.split(constants.BANG)[0]
+1 -1
View File
@@ -77,7 +77,7 @@ class PsList(interfaces_plugins.PluginInterface):
vmlinux = contexts.Module(context, vmlinux_symbols, layer_name, 0)
init_task = vmlinux.object_from_symbol(symbol = "init_task")
init_task = vmlinux.object_from_symbol(object_type = "init_task")
for task in init_task.tasks:
if not filter_func(task):