Skip to content

Commit 0733d71

Browse files
committed
make sure empty thread names are considered empty
1 parent d895ec0 commit 0733d71

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/mibase.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -274,14 +274,7 @@ export class MI2DebugSession extends DebugSession {
274274
threads: []
275275
};
276276
for (const thread of threads) {
277-
let threadName = thread.name;
278-
// TODO: Thread names are undefined on LLDB
279-
if (threadName === undefined) {
280-
threadName = thread.targetId;
281-
}
282-
if (threadName === undefined) {
283-
threadName = "<unnamed>";
284-
}
277+
let threadName = thread.name || thread.targetId || "<unnamed>";
285278
response.body.threads.push(new Thread(thread.id, thread.id + ":" + threadName));
286279
}
287280
this.sendResponse(response);

0 commit comments

Comments
 (0)