From 19c12d9d0a80220db13f9a69465bd9619176bf08 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Tue, 25 Aug 2009 15:24:10 +0000 Subject: gdb/ * inferior.c (print_inferior): Align columns left. Remove header for the the "current" column. Rename column "Id" to "Num". Rename column "PID" to "Description". Print if there's no selected inferior. gdb/doc/ * gdb.texinfo (Debugging Multiple Inferiors): Add "info inferiors" small example, and describe its columns. Replace "inferior-id" by "infno" throughout. --- gdb/inferior.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'gdb/inferior.c') diff --git a/gdb/inferior.c b/gdb/inferior.c index 43eacda4463..676fff99412 100644 --- a/gdb/inferior.c +++ b/gdb/inferior.c @@ -324,9 +324,9 @@ print_inferior (struct ui_out *uiout, int requested_inferior) old_chain = make_cleanup_ui_out_table_begin_end (uiout, 3, inf_count, "inferiors"); - ui_out_table_header (uiout, 3, ui_right, "current", "Cur"); - ui_out_table_header (uiout, 4, ui_right, "id", "Id"); - ui_out_table_header (uiout, 7, ui_right, "target-id", "PID"); + ui_out_table_header (uiout, 1, ui_left, "current", ""); + ui_out_table_header (uiout, 4, ui_left, "number", "Num"); + ui_out_table_header (uiout, 17, ui_left, "target-id", "Description"); ui_out_table_body (uiout); for (inf = inferior_list; inf; inf = inf->next) @@ -343,13 +343,19 @@ print_inferior (struct ui_out *uiout, int requested_inferior) else ui_out_field_skip (uiout, "current"); - ui_out_field_int (uiout, "id", inf->num); - ui_out_field_int (uiout, "target-id", inf->pid); + ui_out_field_int (uiout, "number", inf->num); + ui_out_field_string (uiout, "target-id", + target_pid_to_str (pid_to_ptid (inf->pid))); ui_out_text (uiout, "\n"); do_cleanups (chain2); } + if (inferior_list + && ptid_equal (inferior_ptid, null_ptid)) + ui_out_message (uiout, 0, "\n\ +No selected inferior/thread. See `help thread' or `help inferior'.\n"); + do_cleanups (old_chain); } -- cgit v1.2.1