diff options
Diffstat (limited to 'gdb/testsuite/gdb.python/py-value-cc.cc')
-rw-r--r-- | gdb/testsuite/gdb.python/py-value-cc.cc | 6 |
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; }; |