From: David Carlton Date: Fri, 23 Jan 2004 21:55:57 +0000 (+0000) Subject: 2004-01-23 David Carlton X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=37fc574aa0dd02a486959c108328ebafd18776a0;p=binutils-gdb.git 2004-01-23 David Carlton * gdb.cp/namespace.cc (C::ensureRefs): New. * gdb.cp/namespace1.cc (C::ensureOtherRefs): New. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 15010733315..90e1ab72c15 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2004-01-23 David Carlton + + * gdb.cp/namespace.cc (C::ensureRefs): New. + * gdb.cp/namespace1.cc (C::ensureOtherRefs): New. + 2004-01-20 Nick Roberts * gdb.mi/mi-stack.exp (test_stack_locals_listing): Test for diff --git a/gdb/testsuite/gdb.cp/namespace.cc b/gdb/testsuite/gdb.cp/namespace.cc index 6a683739206..ee55168528b 100644 --- a/gdb/testsuite/gdb.cp/namespace.cc +++ b/gdb/testsuite/gdb.cp/namespace.cc @@ -97,6 +97,13 @@ namespace C }; }; + void ensureRefs () { + // NOTE (2004-04-23, carlton): This function is here only to make + // sure that GCC 3.4 outputs debug info for these classes. + static CClass *c = new CClass(); + static CClass::NestedClass *n = new CClass::NestedClass(); + } + namespace { int cX = 6; diff --git a/gdb/testsuite/gdb.cp/namespace1.cc b/gdb/testsuite/gdb.cp/namespace1.cc index 5d668106511..53b3e57c81c 100644 --- a/gdb/testsuite/gdb.cp/namespace1.cc +++ b/gdb/testsuite/gdb.cp/namespace1.cc @@ -24,6 +24,12 @@ namespace C int z; }; + void ensureOtherRefs () { + // NOTE (2004-04-23, carlton): This function is here only to make + // sure that GCC 3.4 outputs debug info for this class. + static OtherFileClass *c = new OtherFileClass(); + } + namespace { int cXOtherFile = 29; };