diff options
author | Paul Pluzhnikov <ppluzhnikov@google.com> | 2008-10-03 22:02:20 +0000 |
---|---|---|
committer | Paul Pluzhnikov <ppluzhnikov@google.com> | 2008-10-03 22:02:20 +0000 |
commit | 4fc5b2085878cffdc16f6ca7cbcb27cbdb12f11a (patch) | |
tree | 4a7cc78ac020ed32fcaffa602b48d42c4bfd1945 /gdb/testsuite/gdb.cp/gdb2384.cc | |
parent | 5ef737906e22d88134542767e0382c35b30d1a6c (diff) | |
download | binutils-gdb-4fc5b2085878cffdc16f6ca7cbcb27cbdb12f11a.tar.gz |
2008-10-03 Paul Pluzhnikov <ppluzhnikov@google.com>
PR gdb/2384:
* gdb.cp/gdb2384.exp: Extended to test more cases.
* gdb.cp/gdb2384.cc: Likewise.
* gdb.cp/gdb2384-base.h: Likewise.
* gdb.cp/gdb2384-base.cc: Likewise.
Diffstat (limited to 'gdb/testsuite/gdb.cp/gdb2384.cc')
-rw-r--r-- | gdb/testsuite/gdb.cp/gdb2384.cc | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/gdb/testsuite/gdb.cp/gdb2384.cc b/gdb/testsuite/gdb.cp/gdb2384.cc index 74e725d79ef..d7d5928f112 100644 --- a/gdb/testsuite/gdb.cp/gdb2384.cc +++ b/gdb/testsuite/gdb.cp/gdb2384.cc @@ -18,23 +18,36 @@ #include "gdb2384-base.h" -class derived : public base +class derived1 : public base { public: - derived (int); + derived1 (int); }; -derived::derived (int _x) +derived1::derived1 (int _x) : base (_x) { } +class derived2 : public derived +{ + public: + derived2 (int); +}; + +derived2::derived2 (int _x) + : derived (_x) +{ +} + int g; int main () { - derived d (42); - g = d.meth (); // set breakpoint here + derived1 d1 (42); + derived2 d2 (24); + g = d1.meth (); // set breakpoint here + g = d2.meth (); // set breakpoint here (second) return 0; } |