[3/6] Add column information to maint info line-table

Message ID 20200516172632.4803-4-ssbssa@yahoo.de
State New
Headers show
Series
  • Step program considering the source column information
Related show

Commit Message

Simon Marchi via Gdb-patches May 16, 2020, 5:26 p.m.
---
 gdb/symmisc.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

-- 
2.26.2

Patch

diff --git a/gdb/symmisc.c b/gdb/symmisc.c
index ebbedef7b9..338c4012dc 100644
--- a/gdb/symmisc.c
+++ b/gdb/symmisc.c
@@ -1022,9 +1022,10 @@  maintenance_print_one_line_table (struct symtab *symtab, void *data)
       /* Leave space for 6 digits of index and line number.  After that the
 	 tables will just not format as well.  */
       struct ui_out *uiout = current_uiout;
-      ui_out_emit_table table_emitter (uiout, 4, -1, "line-table");
+      ui_out_emit_table table_emitter (uiout, 5, -1, "line-table");
       uiout->table_header (6, ui_left, "index", _("INDEX"));
       uiout->table_header (6, ui_left, "line", _("LINE"));
+      uiout->table_header (6, ui_left, "column", _("COLUMN"));
       uiout->table_header (18, ui_left, "address", _("ADDRESS"));
       uiout->table_header (1, ui_left, "is-stmt", _("IS-STMT"));
       uiout->table_body ();
@@ -1040,6 +1041,10 @@  maintenance_print_one_line_table (struct symtab *symtab, void *data)
 	    uiout->field_signed ("line", item->line);
 	  else
 	    uiout->field_string ("line", _("END"));
+	  if (item->column > 0)
+	    uiout->field_signed ("column", item->column);
+	  else
+	    uiout->field_string ("column", "");
 	  uiout->field_core_addr ("address", objfile->arch (),
 				  item->pc);
 	  uiout->field_string ("is-stmt", item->is_stmt ? "Y" : "");