Skip to content

Commit f760efa

Browse files
committed
add thread name
1 parent 4c711d1 commit f760efa

File tree

3 files changed

+20
-8
lines changed

3 files changed

+20
-8
lines changed

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,8 @@ executable
66
.DS_Store
77
*.a.dSYM
88
gdbgui.spec
9+
*-link
10+
*-link.c
11+
*-link.dSYM
12+
*.pyc
13+
yarn-error.log

gdbgui/src/js/Threads.jsx

+13-6
Original file line numberDiff line numberDiff line change
@@ -105,20 +105,19 @@ class Threads extends React.Component {
105105
}
106106

107107
static get_thread_header(thread, is_current_thread_being_rendered) {
108-
// add thread name
109-
let status,
108+
let selected,
110109
cls = '';
111110
if (is_current_thread_being_rendered) {
112111
cls = 'bold';
113-
status = (
112+
selected = (
114113
<span
115114
className="label label-primary"
116115
title="This thread is selected. Variables can be inspected for the current frame of this thread.">
117116
selected
118117
</span>
119118
);
120119
} else {
121-
status = (
120+
selected = (
122121
<button
123122
className="pointer btn btn-default btn-xs"
124123
onClick={() => {
@@ -130,10 +129,18 @@ class Threads extends React.Component {
130129
</button>
131130
);
132131
}
132+
const details = Memory.make_addrs_into_links_react(thread['target-id']);
133+
const core = thread.core ? `, core ${thread.core}` : '';
134+
const state = ', ' + thread.state;
135+
const id = ', id ' + thread.id;
136+
const name = thread.name ? `, ${thread.name}` : '';
133137
return (
134138
<span key={'thread' + thread.id} className={`${cls}`} style={{fontSize: '0.9em'}}>
135-
{status} {Memory.make_addrs_into_links_react(thread['target-id'])}, core{' '}
136-
{thread.core}, {thread.state}, id {thread.id}
139+
{selected} {details}
140+
{id}
141+
{core}
142+
{state}
143+
{name}
137144
</span>
138145
);
139146
}

gdbgui/static/js/build.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)