[PATCH 4/8] Step over syscalll insn with disp-step on and off

Pedro Alves palves@redhat.com
Thu Feb 25 17:27:00 GMT 2016


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



More information about the Gdb-patches mailing list