diff --git a/sublimegdb.py b/sublimegdb.py index 2256201..a444678 100644 --- a/sublimegdb.py +++ b/sublimegdb.py @@ -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): @@ -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"])