From: Simon Farre <simon.farre.cx@gmail.com>
To: gdb-patches@sourceware.org
Cc: Simon Farre <simon.farre.cx@gmail.com>
Subject: [PATCH 2/5] [dap & linetable]: Add column to maint info linetable output
Date: Tue, 16 Jan 2024 20:13:02 +0100 [thread overview]
Message-ID: <20240116191305.126345-2-simon.farre.cx@gmail.com> (raw)
In-Reply-To: <20240116191305.126345-1-simon.farre.cx@gmail.com>
This adds "COL" to the output of the maintenance command "info
line-table"
---
gdb/symmisc.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/gdb/symmisc.c b/gdb/symmisc.c
index 5dfb9fca8f0..78dc63df6ac 100644
--- a/gdb/symmisc.c
+++ b/gdb/symmisc.c
@@ -973,9 +973,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, 7, -1, "line-table");
+ ui_out_emit_table table_emitter (uiout, 8, -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, "col", _("COL"));
uiout->table_header (18, ui_left, "rel-address", _("REL-ADDRESS"));
uiout->table_header (18, ui_left, "unrel-address", _("UNREL-ADDRESS"));
uiout->table_header (7, ui_left, "is-stmt", _("IS-STMT"));
@@ -991,9 +992,15 @@ maintenance_print_one_line_table (struct symtab *symtab, void *data)
ui_out_emit_tuple tuple_emitter (uiout, nullptr);
uiout->field_signed ("index", i);
if (item->line > 0)
- uiout->field_signed ("line", item->line);
+ {
+ uiout->field_signed ("line", item->line);
+ uiout->field_signed("col", item->col);
+ }
else
- uiout->field_string ("line", _("END"));
+ {
+ uiout->field_string ("line", _("END"));
+ uiout->field_string ("col", _("END"));
+ }
uiout->field_core_addr ("rel-address", objfile->arch (),
item->pc (objfile));
uiout->field_core_addr ("unrel-address", objfile->arch (),
--
2.43.0
next prev parent reply other threads:[~2024-01-16 19:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-16 19:13 [PATCH 1/5] [dap & linetable]: Add column to linetable entry Simon Farre
2024-01-16 19:13 ` Simon Farre [this message]
2024-01-16 19:13 ` [PATCH 3/5] [dap & linetable]: Change gdb.LineTableEntry & Add gdb.lookup_linetable Simon Farre
2024-01-16 19:13 ` [PATCH 4/5] [dap & linetable]: Add breakpointLocations request Simon Farre
2024-01-16 19:13 ` [PATCH 5/5] [dap & linetable]: Added docs Simon Farre
2024-01-16 19:27 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240116191305.126345-2-simon.farre.cx@gmail.com \
--to=simon.farre.cx@gmail.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).