summaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/modules.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/gdb/linux/modules.py')
-rw-r--r--scripts/gdb/linux/modules.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/gdb/linux/modules.py b/scripts/gdb/linux/modules.py
index e7c99e9c9620..2dbf6796ce4f 100644
--- a/scripts/gdb/linux/modules.py
+++ b/scripts/gdb/linux/modules.py
@@ -30,7 +30,7 @@ class ModuleList:
def __iter__(self):
return self
- def next(self):
+ def __next__(self):
entry = self.curr_entry
if entry != self.end_of_list:
self.curr_entry = entry['next']
@@ -38,6 +38,9 @@ class ModuleList:
else:
raise StopIteration
+ def next(self):
+ return self.__next__()
+
def find_module_by_name(name):
for module in ModuleList():
@@ -91,8 +94,8 @@ class LxLsmod(gdb.Command):
gdb.write("{address} {name:<19} {size:>8} {ref}".format(
address=str(module['module_core']).split()[0],
name=module['name'].string(),
- size=module['core_size'],
- ref=ref))
+ size=str(module['core_size']),
+ ref=str(ref)))
source_list = module['source_list']
t = self._module_use_type.get_type().pointer()