binutils-gdb/gdb/testsuite/gdb.opt
Pedro Alves 1f960ced9a Build gdb.opt/inline-*.exp tests at -O0, rely on __attribute__((always_inline))
A test recently added to gdb.opt/inline-cmds.exp fails for
arm-none-eabi targets because -O2 leads to instructions to be
reordered widely.

I guess it might have made sense years ago to enable optimization in
these tests, but I fail to see the need for that nowadays.

Using -O0 while relying on __attribute__((always_inline)), which is
already used in the tests [1] [2], avoids this sort of trouble, while
still exercising the inlining-related use cases that are the focus of
these tests.

I think that nowadays we can safely assume that all compilers we care
about support __attribute__((always_inline)) or similar.

[1] - Except one spot that missed it.

[2] - Note that the .exp files make sure the frames that should have
      been inlined are indeed inlined, with "info frame".

gdb/testsuite/ChangeLog:
2016-07-19  Pedro Alves  <palves@redhat.com>

	* gdb.opt/inline-break.exp: Remove optimize=-O2.
	* gdb.opt/inline-bt.exp: Likewise.
	* gdb.opt/inline-cmds.exp: Remove optimize=-O2 and add
	additional_flags=-Winline.
	* gdb.opt/inline-locals.exp: Likewise.
	* gdb.opt/inline-markers.c (ATTR): Define.
	(inlined_fn): Use it.
2016-07-19 17:51:05 +01:00
..
clobbered-registers-O2.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
clobbered-registers-O2.exp GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
inline-break.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
inline-break.exp Build gdb.opt/inline-*.exp tests at -O0, rely on __attribute__((always_inline)) 2016-07-19 17:51:05 +01:00
inline-bt.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
inline-bt.exp Build gdb.opt/inline-*.exp tests at -O0, rely on __attribute__((always_inline)) 2016-07-19 17:51:05 +01:00
inline-cmds.c Push thread->control.command_interp to the struct thread_fsm 2016-06-21 01:11:53 +01:00
inline-cmds.exp Build gdb.opt/inline-*.exp tests at -O0, rely on __attribute__((always_inline)) 2016-07-19 17:51:05 +01:00
inline-locals.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
inline-locals.exp Build gdb.opt/inline-*.exp tests at -O0, rely on __attribute__((always_inline)) 2016-07-19 17:51:05 +01:00
inline-markers.c Build gdb.opt/inline-*.exp tests at -O0, rely on __attribute__((always_inline)) 2016-07-19 17:51:05 +01:00
solib-intra-step-lib.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
solib-intra-step-main.c GDB copyright headers update after running GDB's copyright.py script. 2016-01-01 08:43:22 +04:00
solib-intra-step.exp Rename gdb_load_shlibs to gdb_load_shlib 2016-04-27 18:09:14 -04:00