summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/gdb/python/classic.py2
-rw-r--r--tools/gdb/python/objects.py9
-rw-r--r--tools/gdb/python/threads.py6
3 files changed, 14 insertions, 3 deletions
diff --git a/tools/gdb/python/classic.py b/tools/gdb/python/classic.py
index b919383..261f648 100644
--- a/tools/gdb/python/classic.py
+++ b/tools/gdb/python/classic.py
@@ -140,6 +140,8 @@ class semaphore:
tasks = wait_queue.tasks()
print ' Queue: len = %d, state = %s' % (len(tasks),
wait_queue.state())
+ print ' Tasks:'
+ print ' Name (c:current, r:real), (id)'
for t in range(0, len(tasks)):
print ' ', tasks[t].brief(), ' (%08x)' % (tasks[t].id())
else:
diff --git a/tools/gdb/python/objects.py b/tools/gdb/python/objects.py
index 58c2730..f4ae5e1 100644
--- a/tools/gdb/python/objects.py
+++ b/tools/gdb/python/objects.py
@@ -253,4 +253,11 @@ class control:
def name(self):
is_string = information.is_string(self._id.api(), self._id._class())
- return str(name(self.object['name'], is_string)) \ No newline at end of file
+ val = str(name(self.object['name'],is_string))
+
+ # Normal comaprision is a bit tricky with quotes
+ # 0 '\000' in hex == '3020275c30303027'
+ if val.encode('hex') == '3020275c30303027':
+ val = ""
+
+ return val \ No newline at end of file
diff --git a/tools/gdb/python/threads.py b/tools/gdb/python/threads.py
index 77c7efa..7098481 100644
--- a/tools/gdb/python/threads.py
+++ b/tools/gdb/python/threads.py
@@ -6,7 +6,6 @@
#
import gdb
-
import chains
import objects
@@ -134,7 +133,10 @@ class control:
return self.object.id()
def name(self):
- return self.object.name()
+ val = self.object.name()
+ if val == "":
+ val = '*'
+ return val
def current_state(self):
return state(self.ctrl['current_state']).to_string()