aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/gdb/linux/utils.py
diff options
context:
space:
mode:
authorStephen Boyd <swboyd@chromium.org>2019-05-14 18:46:02 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2019-05-14 22:52:52 -0400
commit494dbe02b6df0bd98f7353c21e0b9849a25d2dce (patch)
treeae4884ba977d2198b62837b5b1b7f5fbd9c8879a /scripts/gdb/linux/utils.py
parent442284a89a65965b044df00345c193fcc3c53ad2 (diff)
scripts/gdb: silence pep8 checks
These scripts have some pep8 style warnings. Fix them up so that this directory is all pep8 clean. Link: http://lkml.kernel.org/r/20190329220844.38234-6-swboyd@chromium.org Signed-off-by: Stephen Boyd <swboyd@chromium.org> Cc: Douglas Anderson <dianders@chromium.org> Cc: Nikolay Borisov <n.borisov.lkml@gmail.com> Cc: Kieran Bingham <kbingham@kernel.org> Cc: Jan Kiszka <jan.kiszka@siemens.com> Cc: Jackie Liu <liuyun01@kylinos.cn> Cc: Jason Wessel <jason.wessel@windriver.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/utils.py')
-rw-r--r--scripts/gdb/linux/utils.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/scripts/gdb/linux/utils.py b/scripts/gdb/linux/utils.py
index 50805874cfc3..bc67126118c4 100644
--- a/scripts/gdb/linux/utils.py
+++ b/scripts/gdb/linux/utils.py
@@ -66,6 +66,7 @@ Note that TYPE and ELEMENT have to be quoted as strings."""
66 return container_of(ptr, gdb.lookup_type(typename.string()).pointer(), 66 return container_of(ptr, gdb.lookup_type(typename.string()).pointer(),
67 elementname.string()) 67 elementname.string())
68 68
69
69ContainerOf() 70ContainerOf()
70 71
71 72
@@ -148,14 +149,14 @@ def get_gdbserver_type():
148 def probe_qemu(): 149 def probe_qemu():
149 try: 150 try:
150 return gdb.execute("monitor info version", to_string=True) != "" 151 return gdb.execute("monitor info version", to_string=True) != ""
151 except: 152 except gdb.error:
152 return False 153 return False
153 154
154 def probe_kgdb(): 155 def probe_kgdb():
155 try: 156 try:
156 thread_info = gdb.execute("info thread 2", to_string=True) 157 thread_info = gdb.execute("info thread 2", to_string=True)
157 return "shadowCPU0" in thread_info 158 return "shadowCPU0" in thread_info
158 except: 159 except gdb.error:
159 return False 160 return False
160 161
161 global gdbserver_type 162 global gdbserver_type
@@ -172,7 +173,7 @@ def get_gdbserver_type():
172def gdb_eval_or_none(expresssion): 173def gdb_eval_or_none(expresssion):
173 try: 174 try:
174 return gdb.parse_and_eval(expresssion) 175 return gdb.parse_and_eval(expresssion)
175 except: 176 except gdb.error:
176 return None 177 return None
177 178
178 179