Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Thiébaud Weksteen and committed by
Linus Torvalds
6ad18b73 a2e73c48

+7 -7
-1
scripts/gdb/linux/dmesg.py
··· 12 12 # 13 13 14 14 import gdb 15 - import string 16 15 17 16 from linux import utils 18 17
+4 -5
scripts/gdb/linux/symbols.py
··· 14 14 import gdb 15 15 import os 16 16 import re 17 - import string 18 17 19 - from linux import modules, utils 18 + from linux import modules 20 19 21 20 22 21 if hasattr(gdb, 'Breakpoint'): ··· 96 97 return "" 97 98 attrs = sect_attrs['attrs'] 98 99 section_name_to_address = { 99 - attrs[n]['name'].string() : attrs[n]['address'] 100 + attrs[n]['name'].string(): attrs[n]['address'] 100 101 for n in range(int(sect_attrs['nsections']))} 101 102 args = [] 102 103 for section_name in [".data", ".data..read_mostly", ".rodata", ".bss"]: ··· 123 124 addr=module_addr, 124 125 sections=self._section_arguments(module)) 125 126 gdb.execute(cmdline, to_string=True) 126 - if not module_name in self.loaded_modules: 127 + if module_name not in self.loaded_modules: 127 128 self.loaded_modules.append(module_name) 128 129 else: 129 130 gdb.write("no module object found for '{0}'\n".format(module_name)) ··· 163 164 self.load_all_symbols() 164 165 165 166 if hasattr(gdb, 'Breakpoint'): 166 - if not self.breakpoint is None: 167 + if self.breakpoint is not None: 167 168 self.breakpoint.delete() 168 169 self.breakpoint = None 169 170 self.breakpoint = LoadModuleBreakpoint(
+2
scripts/gdb/linux/tasks.py
··· 18 18 19 19 task_type = utils.CachedType("struct task_struct") 20 20 21 + 21 22 def task_lists(): 22 23 global task_type 23 24 task_ptr_type = task_type.get_type().pointer() ··· 38 37 task_ptr_type, "tasks") 39 38 if t == init_task: 40 39 return 40 + 41 41 42 42 def get_task_by_pid(pid): 43 43 for task in task_lists():
+1 -1
scripts/gdb/linux/utils.py
··· 151 151 gdbserver_type = GDBSERVER_QEMU 152 152 elif probe_kgdb(): 153 153 gdbserver_type = GDBSERVER_KGDB 154 - if not gdbserver_type is None and hasattr(gdb, 'events'): 154 + if gdbserver_type is not None and hasattr(gdb, 'events'): 155 155 gdb.events.exited.connect(exit_handler) 156 156 return gdbserver_type