Re: [PATCH][gdb/testsuite] Reimplement gdb.gdb/python-interrupts.exp as unittest

Tom Tromey
2021-10-19T18:09:24Z

Tom> [gdb/testsuite] Reimplement gdb.gdb/python-interrupts.exp as unittest

Thanks for doing this.

Tom> +#if GDB_SELF_TEST
Tom> +namespace selftests {
Tom> +extern void (*hook_set_active_ext_lang) (void);
Tom> +void (*hook_set_active_ext_lang) (void) = nullptr;

Shouldn't need the "(void)" any more, just "()" should be ok.

It seems weird that both a declaration and definition are needed.
I guess it's a compiler issue though.

Tom> #if GDB_SELF_TEST
Tom> namespace selftests {

Tom> +extern void (*hook_set_active_ext_lang) (void);

I suppose it's hard to stick this declaration somewhere else.

Tom> +
Tom> +static void
Tom> +raise_sigint (void)

The (void) thing again, though this could also just be a tiny lambda in
the code as well.

Tom