aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2023-01-02 10:24:26 -0700
committerTom Tromey <tromey@adacore.com>2023-01-05 08:07:52 -0700
commitd66641b604182246b648f662d3c32200ac921365 (patch)
tree73ece1f2a8aa92273939b38c59fb7fa47d825492
parentc362d5978e6c049af895b0d45a19bf8439d6dba8 (diff)
downloadgdb-d66641b604182246b648f662d3c32200ac921365.zip
gdb-d66641b604182246b648f662d3c32200ac921365.tar.gz
gdb-d66641b604182246b648f662d3c32200ac921365.tar.bz2
Add type to expression dump of symbol
I recently had cause to dump some expressions from gdb. I got output like this: Operation: BINOP_GTR Operation: OP_VAR_VALUE Block symbol: Symbol: small_value Block: 0x39b4c20 Operation: OP_LONG Operation: OP_LONG Type: int Constant: 0x0000000000000014 This is ok, but it would have been handy to see the type of the symbol. This patch adds this information. Reviewed-By: Bruno Larsen <blarsen@redhat.com>
-rw-r--r--gdb/expprint.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gdb/expprint.c b/gdb/expprint.c
index 49d840b..b70645f 100644
--- a/gdb/expprint.c
+++ b/gdb/expprint.c
@@ -114,6 +114,7 @@ dump_for_expression (struct ui_file *stream, int depth, symbol *sym)
{
gdb_printf (stream, _("%*sSymbol: %s\n"), depth, "",
sym->print_name ());
+ dump_for_expression (stream, depth + 1, sym->type ());
}
void