aboutsummaryrefslogtreecommitdiff
path: root/gdb/inferior.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2009-08-25 15:24:12 +0000
committerPedro Alves <palves@redhat.com>2009-08-25 15:24:12 +0000
commit3a1ff0b63931e01abd4700ea265be2b72005be75 (patch)
tree08916c4102e815493fe96208cf2d0a6c0b2b3112 /gdb/inferior.c
parent924d6a4f7fe3d5112356cfa903b178422501fe5f (diff)
downloadgdb-3a1ff0b63931e01abd4700ea265be2b72005be75.zip
gdb-3a1ff0b63931e01abd4700ea265be2b72005be75.tar.gz
gdb-3a1ff0b63931e01abd4700ea265be2b72005be75.tar.bz2
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.
Diffstat (limited to 'gdb/inferior.c')
-rw-r--r--gdb/inferior.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/gdb/inferior.c b/gdb/inferior.c
index 43eacda..676fff9 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);
}