This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] sigall.exp and friends: centralize signals list.
- From: Tom Tromey <tromey at redhat dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 19 Jul 2012 11:24:29 -0600
- Subject: Re: [PATCH] sigall.exp and friends: centralize signals list.
- References: <20120719143526.8328.28449.stgit@brno.lan>
>>>>> "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