aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2008-01-29 19:18:18 +0000
committerDaniel Jacobowitz <drow@false.org>2008-01-29 19:18:18 +0000
commit3f4178d63f0f7971f5d33c9c2780bd9ceb093779 (patch)
treed7e1fba1efd3adf12889320db0272d01bcd98367 /gdb
parent5eeba8d46959d9b80460e653e0d8fc4073b59966 (diff)
downloadgdb-3f4178d63f0f7971f5d33c9c2780bd9ceb093779.zip
gdb-3f4178d63f0f7971f5d33c9c2780bd9ceb093779.tar.gz
gdb-3f4178d63f0f7971f5d33c9c2780bd9ceb093779.tar.bz2
2008-01-29 Aleksandar Ristovski <aristovski@qnx.com>
* varobj (adjust_value_for_child_access): Added checking for returned value from gdb_value_ind. (c_describe_child): Likewise. (cplus_describe_child): Fixed a typo.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog7
-rw-r--r--gdb/varobj.c14
2 files changed, 18 insertions, 3 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index d2904b5..a4daaec 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,10 @@
+2008-01-29 Aleksandar Ristovski <aristovski@qnx.com>
+
+ * varobj (adjust_value_for_child_access): Added checking for
+ returned value from gdb_value_ind.
+ (c_describe_child): Likewise.
+ (cplus_describe_child): Fixed a typo.
+
2008-01-29 Jim Blandy <jimb@red-bean.com>
* MAINTAINERS: Update my info.
diff --git a/gdb/varobj.c b/gdb/varobj.c
index d078bef..3690174 100644
--- a/gdb/varobj.c
+++ b/gdb/varobj.c
@@ -1920,7 +1920,11 @@ adjust_value_for_child_access (struct value **value,
|| TYPE_CODE (target_type) == TYPE_CODE_UNION)
{
if (value && *value)
- gdb_value_ind (*value, value);
+ {
+ int success = gdb_value_ind (*value, value);
+ if (!success)
+ *value = NULL;
+ }
*type = target_type;
if (was_ptr)
*was_ptr = 1;
@@ -2114,7 +2118,11 @@ c_describe_child (struct varobj *parent, int index,
*cname = xstrprintf ("*%s", parent->name);
if (cvalue && value)
- gdb_value_ind (value, cvalue);
+ {
+ int success = gdb_value_ind (value, cvalue);
+ if (!success)
+ *cvalue = NULL;
+ }
/* Don't use get_target_type because it calls
check_typedef and here, we want to show the true
@@ -2415,7 +2423,7 @@ cplus_describe_child (struct varobj *parent, int index,
adjust_value_for_child_access (&value, &type, &was_ptr);
if (TYPE_CODE (type) == TYPE_CODE_STRUCT
- || TYPE_CODE (type) == TYPE_CODE_STRUCT)
+ || TYPE_CODE (type) == TYPE_CODE_UNION)
{
char *join = was_ptr ? "->" : ".";
if (CPLUS_FAKE_CHILD (parent))