diff options
Diffstat (limited to 'scripts/gdb/linux/symbols.py')
-rw-r--r-- | scripts/gdb/linux/symbols.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/scripts/gdb/linux/symbols.py b/scripts/gdb/linux/symbols.py index cd5bea965d4e..627750cb420d 100644 --- a/scripts/gdb/linux/symbols.py +++ b/scripts/gdb/linux/symbols.py | |||
@@ -14,9 +14,8 @@ | |||
14 | import gdb | 14 | import gdb |
15 | import os | 15 | import os |
16 | import re | 16 | import re |
17 | import string | ||
18 | 17 | ||
19 | from linux import modules, utils | 18 | from linux import modules |
20 | 19 | ||
21 | 20 | ||
22 | if hasattr(gdb, 'Breakpoint'): | 21 | if hasattr(gdb, 'Breakpoint'): |
@@ -97,7 +96,7 @@ lx-symbols command.""" | |||
97 | return "" | 96 | return "" |
98 | attrs = sect_attrs['attrs'] | 97 | attrs = sect_attrs['attrs'] |
99 | section_name_to_address = { | 98 | section_name_to_address = { |
100 | attrs[n]['name'].string() : attrs[n]['address'] | 99 | attrs[n]['name'].string(): attrs[n]['address'] |
101 | for n in range(int(sect_attrs['nsections']))} | 100 | for n in range(int(sect_attrs['nsections']))} |
102 | args = [] | 101 | args = [] |
103 | for section_name in [".data", ".data..read_mostly", ".rodata", ".bss"]: | 102 | for section_name in [".data", ".data..read_mostly", ".rodata", ".bss"]: |
@@ -124,7 +123,7 @@ lx-symbols command.""" | |||
124 | addr=module_addr, | 123 | addr=module_addr, |
125 | sections=self._section_arguments(module)) | 124 | sections=self._section_arguments(module)) |
126 | gdb.execute(cmdline, to_string=True) | 125 | gdb.execute(cmdline, to_string=True) |
127 | if not module_name in self.loaded_modules: | 126 | if module_name not in self.loaded_modules: |
128 | self.loaded_modules.append(module_name) | 127 | self.loaded_modules.append(module_name) |
129 | else: | 128 | else: |
130 | gdb.write("no module object found for '{0}'\n".format(module_name)) | 129 | gdb.write("no module object found for '{0}'\n".format(module_name)) |
@@ -164,7 +163,7 @@ lx-symbols command.""" | |||
164 | self.load_all_symbols() | 163 | self.load_all_symbols() |
165 | 164 | ||
166 | if hasattr(gdb, 'Breakpoint'): | 165 | if hasattr(gdb, 'Breakpoint'): |
167 | if not self.breakpoint is None: | 166 | if self.breakpoint is not None: |
168 | self.breakpoint.delete() | 167 | self.breakpoint.delete() |
169 | self.breakpoint = None | 168 | self.breakpoint = None |
170 | self.breakpoint = LoadModuleBreakpoint( | 169 | self.breakpoint = LoadModuleBreakpoint( |