summaryrefslogtreecommitdiff
path: root/gdb/expprint.c
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2009-03-18 16:38:17 +0000
committerDoug Evans <dje@google.com>2009-03-18 16:38:17 +0000
commit9d4c404f085e44f57198b9dd49c19b98438b6312 (patch)
tree1a5359a1155cdc4a9d9e1517359984ca806f07d3 /gdb/expprint.c
parente4e4cf0c68335d414443577034bd1b78e6d6801b (diff)
downloadgdb-9d4c404f085e44f57198b9dd49c19b98438b6312.tar.gz
* expprint.c (dump_raw_expression): Print note if non-NULL.
Diffstat (limited to 'gdb/expprint.c')
-rw-r--r--gdb/expprint.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gdb/expprint.c b/gdb/expprint.c
index 89bae03bade..d7fac86c676 100644
--- a/gdb/expprint.c
+++ b/gdb/expprint.c
@@ -802,6 +802,9 @@ op_name_standard (enum exp_opcode opcode)
}
}
+/* Print a raw dump of expression EXP to STREAM.
+ NOTE, if non-NULL, is printed as extra explanatory text. */
+
void
dump_raw_expression (struct expression *exp, struct ui_file *stream,
char *note)
@@ -813,7 +816,9 @@ dump_raw_expression (struct expression *exp, struct ui_file *stream,
fprintf_filtered (stream, "Dump of expression @ ");
gdb_print_host_address (exp, stream);
- fprintf_filtered (stream, "'\n\tLanguage %s, %d elements, %ld bytes each.\n",
+ if (note)
+ fprintf_filtered (stream, ", %s:", note);
+ fprintf_filtered (stream, "\n\tLanguage %s, %d elements, %ld bytes each.\n",
exp->language_defn->la_name, exp->nelts,
(long) sizeof (union exp_element));
fprintf_filtered (stream, "\t%5s %20s %16s %s\n", "Index", "Opcode",