This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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 {



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]