summaryrefslogtreecommitdiffstats
path: root/scripts/gdb/linux/symbols.py
diff options
context:
space:
mode:
authorThiƩbaud Weksteen <thiebaud@weksteen.fr>2015-06-30 14:58:18 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2015-06-30 19:44:58 -0700
commit6ad18b73317714e7d0fad08ee78365ecc817e923 (patch)
tree563331af84bf2909ce98eabc630bb9ad37db3f0e /scripts/gdb/linux/symbols.py
parenta2e73c480494101f5f6932b6904acb15c44180ee (diff)
downloadop-kernel-dev-6ad18b73317714e7d0fad08ee78365ecc817e923.zip
op-kernel-dev-6ad18b73317714e7d0fad08ee78365ecc817e923.tar.gz
scripts/gdb: fix PEP8 compliance
Signed-off-by: ThiƩbaud Weksteen <thiebaud@weksteen.fr> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts/gdb/linux/symbols.py')
-rw-r--r--scripts/gdb/linux/symbols.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/scripts/gdb/linux/symbols.py b/scripts/gdb/linux/symbols.py
index cd5bea9..627750c 100644
--- a/scripts/gdb/linux/symbols.py
+++ b/scripts/gdb/linux/symbols.py
@@ -14,9 +14,8 @@
import gdb
import os
import re
-import string
-from linux import modules, utils
+from linux import modules
if hasattr(gdb, 'Breakpoint'):
@@ -97,7 +96,7 @@ lx-symbols command."""
return ""
attrs = sect_attrs['attrs']
section_name_to_address = {
- attrs[n]['name'].string() : attrs[n]['address']
+ attrs[n]['name'].string(): attrs[n]['address']
for n in range(int(sect_attrs['nsections']))}
args = []
for section_name in [".data", ".data..read_mostly", ".rodata", ".bss"]:
@@ -124,7 +123,7 @@ lx-symbols command."""
addr=module_addr,
sections=self._section_arguments(module))
gdb.execute(cmdline, to_string=True)
- if not module_name in self.loaded_modules:
+ if module_name not in self.loaded_modules:
self.loaded_modules.append(module_name)
else:
gdb.write("no module object found for '{0}'\n".format(module_name))
@@ -164,7 +163,7 @@ lx-symbols command."""
self.load_all_symbols()
if hasattr(gdb, 'Breakpoint'):
- if not self.breakpoint is None:
+ if self.breakpoint is not None:
self.breakpoint.delete()
self.breakpoint = None
self.breakpoint = LoadModuleBreakpoint(
OpenPOWER on IntegriCloud