[RFA] testsuite gdb.base/expand-psymtabs: ensure code is generated for the expected source line

Joel Brobecker brobecker@adacore.com
Tue Dec 16 06:29:00 GMT 2008


> 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.

Does you compiler also attach the epilogue code to the opening brace
as well.  With GCC, the epilogue is attached to the closing brace,
and so breaking on the empty line causes the breakpoint to be inserted
at the beginning of the epilogue.

> 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.

Seems harmless in any case, and in fact, the original version of
the testcase when submitted included a function call at this location.
The reason why it was removed was that it was calling an IO function,
which is a no-no if we can avoid it (so that the testcase can be run
on targets that do not provide these routines).

OK to check in.

-- 
Joel



More information about the Gdb-patches mailing list