This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] Skip kill-after-signal.exp if hw single-step is not supported
- From: Yao Qi <yao at codesourcery dot com>
- To: Matthew Gretton-Dann <matthew dot gretton-dann at arm dot com>
- Cc: Mark Kettenis <mark dot kettenis at xs4all dot nl>, "pedro at codesourcery dot com" <pedro at codesourcery dot com>, "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Tue, 09 Aug 2011 23:50:38 +0800
- Subject: Re: [patch] Skip kill-after-signal.exp if hw single-step is not supported
- References: <4E259815.8080001@codesourcery.com> <201107201605.43767.pedro@codesourcery.com> <201107232247.p6NMlwVx029216@glazunov.sibelius.xs4all.nl> <4E414503.7080201@codesourcery.com> <4E415111.7020107@arm.com>
On 08/09/2011 11:24 PM, Matthew Gretton-Dann wrote:
> Would this be better if it followed the pattern of the
> skip_hw_breakpoint_tests and skip_hw_watchpoint_tests family of
> functions in gdb.exp?
>
> So I would rename the function to skip_hw_single_step_tests[1], and test
> for the existence of gdb,no_hardware_watchpoints in the board info.
>
Personally, I don't like the procs' name skip_* in lib/gdb.exp. IMO,
procs in lib/gdb.exp of this kind is to check a certain property in
current env, and return the result. Leave the test case itself to
determine whether to skip or run.
"single_step_to_signal_handler_p" is not equivalent to "hardware single
step", because some targets have hardware single step, but can't step
into signal handler.
The property interested here is "whether we can single step into a
signal handler", instead of "whether target has hardware single step".
I am not good at naming functions, so ideas on a better/clear name is
welcome.
--
Yao (éå)