aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.python/py-value-cc.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.python/py-value-cc.cc')
-rw-r--r--gdb/testsuite/gdb.python/py-value-cc.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.python/py-value-cc.cc b/gdb/testsuite/gdb.python/py-value-cc.cc
index 2d38a26..08b9915 100644
--- a/gdb/testsuite/gdb.python/py-value-cc.cc
+++ b/gdb/testsuite/gdb.python/py-value-cc.cc
@@ -42,6 +42,7 @@ class B : public A {
int arg0_func ();
int arg1_func (int arg1);
int arg2_func (int arg1, int arg2);
+ char operator[] (int num);
};
int B::static_func ()
@@ -64,6 +65,11 @@ int B::arg2_func (int arg1, int arg2)
return a * arg1 + arg2;
}
+char B::operator[] (int num)
+{
+ return a + num;
+}
+
struct X
{
union { int x; char y; };