This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]