GNU Binutils with patches for OS216
Revisión | 0d64823e51de0b0e0a94bdf88940310342a6e6fa (tree) |
---|---|
Tiempo | 2017-09-10 05:51:58 |
Autor | Simon Marchi <simon.marchi@eric...> |
Commiter | Simon Marchi |
Remove unnecessary calls to is_mi_like_p in print_thread_info_1
There are two calls to uiout->is_mi_like_p in the else branch of a
if (uiout->is_mi_like_p ()), we already know they will return false.
A bit lower, there are two if (!uiout->is_mi_like_p ()) that we can
merge.
gdb/ChangeLog:
* thread.c (print_thread_info_1): Remove unnecessary calls to
uiout->is_mi_like_p.
@@ -1,3 +1,8 @@ | ||
1 | +2017-09-09 Simon Marchi <simon.marchi@ericsson.com> | |
2 | + | |
3 | + * thread.c (print_thread_info_1): Remove unnecessary calls to | |
4 | + uiout->is_mi_like_p. | |
5 | + | |
1 | 6 | 2017-09-09 Tom Tromey <tom@tromey.com> |
2 | 7 | |
3 | 8 | * namespace.h (add_using_directive): Update. |
@@ -1276,16 +1276,12 @@ print_thread_info_1 (struct ui_out *uiout, char *requested_threads, | ||
1276 | 1276 | return; |
1277 | 1277 | } |
1278 | 1278 | |
1279 | - table_emitter.emplace (uiout, | |
1280 | - (show_global_ids || uiout->is_mi_like_p ()) | |
1281 | - ? 5 : 4, | |
1279 | + table_emitter.emplace (uiout, show_global_ids ? 5 : 4, | |
1282 | 1280 | n_threads, "threads"); |
1283 | 1281 | |
1284 | 1282 | uiout->table_header (1, ui_left, "current", ""); |
1285 | - | |
1286 | - if (!uiout->is_mi_like_p ()) | |
1287 | - uiout->table_header (4, ui_left, "id-in-tg", "Id"); | |
1288 | - if (show_global_ids || uiout->is_mi_like_p ()) | |
1283 | + uiout->table_header (4, ui_left, "id-in-tg", "Id"); | |
1284 | + if (show_global_ids) | |
1289 | 1285 | uiout->table_header (4, ui_left, "id", "GId"); |
1290 | 1286 | uiout->table_header (17, ui_left, "target-id", "Target Id"); |
1291 | 1287 | uiout->table_header (1, ui_left, "frame", "Frame"); |
@@ -1311,10 +1307,9 @@ print_thread_info_1 (struct ui_out *uiout, char *requested_threads, | ||
1311 | 1307 | uiout->field_string ("current", "*"); |
1312 | 1308 | else |
1313 | 1309 | uiout->field_skip ("current"); |
1314 | - } | |
1315 | 1310 | |
1316 | - if (!uiout->is_mi_like_p ()) | |
1317 | - uiout->field_string ("id-in-tg", print_thread_id (tp)); | |
1311 | + uiout->field_string ("id-in-tg", print_thread_id (tp)); | |
1312 | + } | |
1318 | 1313 | |
1319 | 1314 | if (show_global_ids || uiout->is_mi_like_p ()) |
1320 | 1315 | uiout->field_int ("id", tp->global_num); |