• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


Commit MetaInfo

Revisión0d64823e51de0b0e0a94bdf88940310342a6e6fa (tree)
Tiempo2017-09-10 05:51:58
AutorSimon Marchi <simon.marchi@eric...>
CommiterSimon Marchi

Log Message

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.

Cambiar Resumen

Diferencia incremental

--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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+
16 2017-09-09 Tom Tromey <tom@tromey.com>
27
38 * namespace.h (add_using_directive): Update.
--- a/gdb/thread.c
+++ b/gdb/thread.c
@@ -1276,16 +1276,12 @@ print_thread_info_1 (struct ui_out *uiout, char *requested_threads,
12761276 return;
12771277 }
12781278
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,
12821280 n_threads, "threads");
12831281
12841282 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)
12891285 uiout->table_header (4, ui_left, "id", "GId");
12901286 uiout->table_header (17, ui_left, "target-id", "Target Id");
12911287 uiout->table_header (1, ui_left, "frame", "Frame");
@@ -1311,10 +1307,9 @@ print_thread_info_1 (struct ui_out *uiout, char *requested_threads,
13111307 uiout->field_string ("current", "*");
13121308 else
13131309 uiout->field_skip ("current");
1314- }
13151310
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+ }
13181313
13191314 if (show_global_ids || uiout->is_mi_like_p ())
13201315 uiout->field_int ("id", tp->global_num);