aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/gdb/linux/symbols.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/gdb/linux/symbols.py')
-rw-r--r--scripts/gdb/linux/symbols.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/gdb/linux/symbols.py b/scripts/gdb/linux/symbols.py
index 139841fa7f70..ae757fdf5ce6 100644
--- a/scripts/gdb/linux/symbols.py
+++ b/scripts/gdb/linux/symbols.py
@@ -73,7 +73,7 @@ lx-symbols command."""
73 73
74 def _get_module_file(self, module_name): 74 def _get_module_file(self, module_name):
75 module_pattern = ".*/{0}\.ko$".format( 75 module_pattern = ".*/{0}\.ko$".format(
76 string.replace(module_name, "_", r"[_\-]")) 76 module_name.replace("_", r"[_\-]"))
77 for name in self.module_files: 77 for name in self.module_files:
78 if re.match(module_pattern, name) and os.path.exists(name): 78 if re.match(module_pattern, name) and os.path.exists(name):
79 return name 79 return name
@@ -87,7 +87,7 @@ lx-symbols command."""
87 attrs = sect_attrs['attrs'] 87 attrs = sect_attrs['attrs']
88 section_name_to_address = { 88 section_name_to_address = {
89 attrs[n]['name'].string() : attrs[n]['address'] 89 attrs[n]['name'].string() : attrs[n]['address']
90 for n in range(sect_attrs['nsections'])} 90 for n in range(int(sect_attrs['nsections']))}
91 args = [] 91 args = []
92 for section_name in [".data", ".data..read_mostly", ".rodata", ".bss"]: 92 for section_name in [".data", ".data..read_mostly", ".rodata", ".bss"]:
93 address = section_name_to_address.get(section_name) 93 address = section_name_to_address.get(section_name)