This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[RFA] testsuite gdb.base/expand-psymtabs: ensure code is generated for the expected source line
- From: Christophe LYON <christophe dot lyon at st dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Mon, 08 Dec 2008 16:24:06 +0100
- Subject: [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