diff --git a/gdb/ChangeLog b/gdb/ChangeLog index fe95d0a614b..a5107f7fb65 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2017-10-20 Pedro Alves + + * main.c (captured_command_loop): Add attribute noinline. + 2017-10-19 Simon Marchi * interps.c (struct interp_factory): Add constructor. diff --git a/gdb/main.c b/gdb/main.c index beb820351d9..835ae24dcf0 100644 --- a/gdb/main.c +++ b/gdb/main.c @@ -307,6 +307,11 @@ setup_alternate_signal_stack (void) /* Call command_loop. */ +/* Prevent inlining this function for the benefit of GDB's selftests + in the testsuite. Those tests want to run GDB under GDB and stop + here. */ +static void captured_command_loop () __attribute__((noinline)); + static void captured_command_loop () {