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: Joel Brobecker <brobecker at adacore dot com>
- To: Yao Qi <yao at codesourcery dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Sat, 17 Sep 2011 17:10:57 -0700
- 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>
> gdb/testsuite/
>
> * lib/gdb.exp (single_step_to_signal_handler_p): New.
> * gdb.base/kill-after-signal.exp: Skip if target supports single step
> to signal handler.
No one commented on this patch.
I only have minor comments, so pre-approved with those changes.
> +# Return 1 if target hardware or OS supports single stepping to single handler,
> +# otherwise, return 0.
> +
> +proc single_step_to_signal_handler_p {} {
> +
> + # Targets don't have hardware single step. On these targets, when a signal
> + # is delivered during software single step, gdb is unable to determine the
> + # next instruction addresses, because start of signal handler is one of them.
> + if { [istarget "arm*-*-*"] || [istarget "mips*-*-*"] } {
> + return 0
> + }
Can you name the function "can_single_step_to_signal_handler" instead?
I think it will be a little clearer what this function is about.
Also, your comments, both in the function description as well as
inside the function itself, are a little two wide. We have a soft-limit
of 70 chars, which can be exceeded if it helps readability.
--
Joel