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] testsuite gdb.base/expand-psymtabs: ensure code is generated for the expected source line


Hi all,

I propose the attached small patch to expand-psymtabs.c. The goal is to make sure the compiler actually generates code and debug information for the expected line. Currently, our compiler attaches code only to the opening brace, hence causing the test to fail.

Christophe.
2008-12-08  Christophe Lyon  <christophe.lyon@st.com>

	* gdb.base/expand-psymtabs.c: Insert code in foo so that the
	compiler actually generate code at the expected line number.
Index: src/gdb/testsuite/gdb.base/expand-psymtabs.c
===================================================================
--- src/gdb/testsuite/gdb.base/expand-psymtabs.c	(revision 308)
+++ src/gdb/testsuite/gdb.base/expand-psymtabs.c	(working copy)
@@ -27,9 +27,14 @@ main (void)
 
 #else
 void
+bar (void)
+  {
+  }
+
+void
 foo (void)
   {
-    /* Break here  */
+    bar(); /* Break here  */
   }
 
 #endif

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