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] sigall.exp and friends: centralize signals list.


>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:

Pedro> +for {set i 0;} {$i < [llength $signals]} {incr i;} {
Pedro> +    # Skip the first.
Pedro> +    if { $i == 0 } {
Pedro> +	continue
Pedro> +    }
Pedro> +
Pedro> +    set sig [lindex $signals $i]
Pedro> +    test_one_sig $sig
Pedro> +}

The ";"s aren't needed.  They're only needed in Tcl if you write
multiple statements on one line, but we don't do that anyhow, or
shouldn't, since it is bad style.

For the above I think it is more idiomatic in Tcl to write:

foreach sig $signals {
    if {$sig == "ABRT"} {
      continue
    }
   test_one_sig $sig
}

That said, I don't care if you leave it as-is.

Tom


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