aboutsummaryrefslogtreecommitdiff
path: root/gdb/ui-out.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/ui-out.c')
-rw-r--r--gdb/ui-out.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/gdb/ui-out.c b/gdb/ui-out.c
index 53ad963..72a34f8 100644
--- a/gdb/ui-out.c
+++ b/gdb/ui-out.c
@@ -1141,6 +1141,28 @@ ui_out_data (struct ui_out *uiout)
return uiout->data;
}
+/* Access table field parameters. */
+int
+ui_out_query_field (struct ui_out *uiout, int colno,
+ int *width, int *alignment, char **col_name)
+{
+ struct ui_out_hdr *hdr;
+
+ if (!uiout->table.flag)
+ return 0;
+
+ for (hdr = uiout->table.header_first; hdr; hdr = hdr->next)
+ if (hdr->colno == colno)
+ {
+ *width = hdr->width;
+ *alignment = hdr->alignment;
+ *col_name = hdr->col_name;
+ return 1;
+ }
+
+ return 0;
+}
+
/* Initalize private members at startup. */
struct ui_out *