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]

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


On 16.12.2008 07:28, Joel Brobecker wrote:
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.


Yes, with an empty function, all the code is attached to the opening brace.


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.


Thanks. I'll ask Denis Pilat to check it in on my behalf.


Christophe.


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