This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 4/8] Step over syscalll insn with disp-step on and off
- From: Pedro Alves <palves at redhat dot com>
- To: Yao Qi <qiyaoltc at gmail dot com>, gdb-patches at sourceware dot org
- Date: Thu, 25 Feb 2016 17:27:07 +0000
- Subject: Re: [PATCH 4/8] Step over syscalll insn with disp-step on and off
- Authentication-results: sourceware.org; auth=none
- References: <1455892594-2294-1-git-send-email-yao dot qi at linaro dot org> <1455892594-2294-5-git-send-email-yao dot qi at linaro dot org>
LGTM, though minor comments below.
On 02/19/2016 02:36 PM, Yao Qi wrote:
> + set disp_step_opts { "off" }
> + if { [support_displaced_stepping] } {
> + lappend disp_step_opts "on"
> + }
> +
> + foreach displaced $disp_step_opts {
> + with_test_prefix "displaced $displaced" {
> +
This can be a single:
foreach_with_prefix displaced $disp_step_opts {
BTW, I usually write these as:
foreach_with_prefix displaced {"off" "on"} {
if {$displaced == "on" && ![support_displaced_stepping]} {
continue
}
... tests or proc call here ..
}
It makes it easier to scan the testing axis covered, particularly
when you have multiple nested foreach loops, IMO.
Thanks,
Pedro Alves