aboutsummaryrefslogtreecommitdiffstats
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:
30 def __iter__(self): 30 def __iter__(self):
31 return self 31 return self
32 32
33 def next(self): 33 def __next__(self):
34 entry = self.curr_entry 34 entry = self.curr_entry
35 if entry != self.end_of_list: 35 if entry != self.end_of_list:
36 self.curr_entry = entry['next'] 36 self.curr_entry = entry['next']
@@ -38,6 +38,9 @@ class ModuleList:
38 else: 38 else:
39 raise StopIteration 39 raise StopIteration
40 40
41 def next(self):
42 return self.__next__()
43
41 44
42def find_module_by_name(name): 45def find_module_by_name(name):
43 for module in ModuleList(): 46 for module in ModuleList():
@@ -91,8 +94,8 @@ class LxLsmod(gdb.Command):
91 gdb.write("{address} {name:<19} {size:>8} {ref}".format( 94 gdb.write("{address} {name:<19} {size:>8} {ref}".format(
92 address=str(module['module_core']).split()[0], 95 address=str(module['module_core']).split()[0],
93 name=module['name'].string(), 96 name=module['name'].string(),
94 size=module['core_size'], 97 size=str(module['core_size']),
95 ref=ref)) 98 ref=str(ref)))
96 99
97 source_list = module['source_list'] 100 source_list = module['source_list']
98 t = self._module_use_type.get_type().pointer() 101 t = self._module_use_type.get_type().pointer()