This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFA] gdb.cp/classes.cc and unused class.
- From: Denis PILAT <denis dot pilat at st dot com>
- To: gdb-patches <gdb-patches at sourceware dot org>
- Date: Thu, 23 Oct 2008 09:31:04 +0200
- Subject: [RFA] gdb.cp/classes.cc and unused class.
In that file we have a class that is locally defined but never
instanciated, and our compiler do not generate debug information for it,
even in -O0.
I think that could be the policy for some other compilers, that's why I
propose this simple patch.
--
Denis
2008-10-23 Denis Pilat <denis.pilat@st.com>
* gdb.cp/classes.cc (g_Static): new instance of Static class.
Index: testsuite/gdb.cp/classes.cc
===================================================================
--- testsuite/gdb.cp/classes.cc (revision 297)
+++ testsuite/gdb.cp/classes.cc (working copy)
@@ -296,6 +296,9 @@ public:
};
void Static::ii (int, int) { }
+Static g_Static; /* Use the Static class to make sure it's not removed by
+ compiler optimization. */
+
// ======================== virtual base classes=========================
class vA {