Skip to content

Commit

Permalink
Show thread details in Thread View
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelkschmidt committed Apr 21, 2015
1 parent 243f9ce commit afa69da
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions sublimegdb.py
Expand Up @@ -836,13 +836,17 @@ def select(self, row):


class GDBThread:
def __init__(self, id, state="UNKNOWN", func="???()"):
def __init__(self, id, state="UNKNOWN", func="???()", details=None):
self.id = id
self.state = state
self.func = func
self.details = details

def format(self):
return "%03d - %10s - %s\n" % (self.id, self.state, self.func)
if self.details:
return "%03d - %10s - %s - %s\n" % (self.id, self.state, self.details, self.func)
else:
return "%03d - %10s - %s\n" % (self.id, self.state, self.func)


class GDBThreadsView(GDBView):
Expand Down Expand Up @@ -894,7 +898,8 @@ def update_threads(self):
if "value" in arg:
args += " = " + arg["value"]
func = "%s(%s);" % (func, args)
self.threads.append(GDBThread(int(thread["id"]), thread["state"], func))
print("thread %s" % thread)
self.threads.append(GDBThread(int(thread["id"]), thread["state"], func, thread["details"]))

if "current-thread-id" in ids:
self.current_thread = int(ids["current-thread-id"])
Expand Down

0 comments on commit afa69da

Please sign in to comment.