diff options
Diffstat (limited to 'scripts/gdb/linux/utils.py')
-rw-r--r-- | scripts/gdb/linux/utils.py | 7 |
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 | |||
69 | ContainerOf() | 70 | ContainerOf() |
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(): | |||
172 | def gdb_eval_or_none(expresssion): | 173 | def 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 | ||