aboutsummaryrefslogtreecommitdiff
path: root/gdb/c-valprint.c
diff options
context:
space:
mode:
authorCaroline Tice <cmtice@google.com>2007-05-18 19:42:42 +0000
committerCaroline Tice <cmtice@google.com>2007-05-18 19:42:42 +0000
commit42be36b328ae784ae6981da7c7cab95b67ed7737 (patch)
tree5b0a0ffb49db6fe2d5c149e62e5d84f2c9de39b7 /gdb/c-valprint.c
parenta7c569c8f08b3485034e771a5e49cce0e23ca2b2 (diff)
downloadgdb-42be36b328ae784ae6981da7c7cab95b67ed7737.zip
gdb-42be36b328ae784ae6981da7c7cab95b67ed7737.tar.gz
gdb-42be36b328ae784ae6981da7c7cab95b67ed7737.tar.bz2
Add ability to report when a variable's value is uninitialized,
based on information provided by the compiler. Also add new DWARF OP, DW_OP_GNU_uninit, for this purpose.
Diffstat (limited to 'gdb/c-valprint.c')
-rw-r--r--gdb/c-valprint.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gdb/c-valprint.c b/gdb/c-valprint.c
index 2ec9058..ad5e4d1 100644
--- a/gdb/c-valprint.c
+++ b/gdb/c-valprint.c
@@ -556,6 +556,9 @@ c_value_print (struct value *val, struct ui_file *stream, int format,
}
}
+ if (!value_initialized (val))
+ fprintf_filtered (stream, " [uninitialized] ");
+
if (objectprint && (TYPE_CODE (type) == TYPE_CODE_CLASS))
{
/* Attempt to determine real type of object */