aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.python/py-value.c2
-rw-r--r--gdb/testsuite/gdb.python/py-value.exp2
3 files changed, 9 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 991c4e8..6826ec4 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2014-04-07 Siva Chandra Reddy <sivachandra@google.com>
+
+ * gdb.python/py-value.c: Improve test case.
+ * gdb.python/py-value.exp: Add new test.
+
2014-04-07 David Blaikie <dblaikie@gmail.com>
* lib/compiler.c: Identify the clang compiler.
diff --git a/gdb/testsuite/gdb.python/py-value.c b/gdb/testsuite/gdb.python/py-value.c
index 90dc055..4d1c9c6 100644
--- a/gdb/testsuite/gdb.python/py-value.c
+++ b/gdb/testsuite/gdb.python/py-value.c
@@ -58,6 +58,8 @@ struct Derived : public Base {
};
Base *base = new Derived ();
+Derived derived;
+Base &base_ref = derived;
void ptr_ref(int*& rptr_int)
{
diff --git a/gdb/testsuite/gdb.python/py-value.exp b/gdb/testsuite/gdb.python/py-value.exp
index ed332db..13433fd 100644
--- a/gdb/testsuite/gdb.python/py-value.exp
+++ b/gdb/testsuite/gdb.python/py-value.exp
@@ -416,6 +416,8 @@ proc test_subscript_regression {exefile lang} {
# Likewise.
gdb_test "python print (gdb.parse_and_eval('base').dynamic_type)" \
"Derived \[*\]"
+ gdb_test "python print (gdb.parse_and_eval('base_ref').dynamic_type)" \
+ "Derived \[&\]"
# A static type case.
gdb_test "python print (gdb.parse_and_eval('5').dynamic_type)" \
"int"