This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] [RFC] Automatically append 'gdb/testsuite/boards' to DejaGnu's boards dir list.
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Sat, 31 Mar 2012 09:29:12 +0200
- Subject: Re: [PATCH] [RFC] Automatically append 'gdb/testsuite/boards' to DejaGnu's boards dir list.
- References: <20120331030221.8207.47982.stgit@brno.lan>
On Sat, 31 Mar 2012 05:02:21 +0200, Pedro Alves wrote:
> +++ b/gdb/testsuite/append_gdb_boards_dir
It should be in testsuite/lib/ , shouldn't it?
> +proc append_gdb_boards_dir { name1 name2 op } {
> + global srcdir
> + global boards_dir
> +
> + # The "boards/../boards" contortion accounts for the odd chance of
> + # someone wanting to point at GDB's boards dir in the global
> + # config before some other board dir, in which case we should not
> + # push it to the end of the list.
> + set gdb_boards_dir "${srcdir}/boards/../boards"
> +
> + # Keep our board dir last in the list.
> + set idx [lsearch $boards_dir "$gdb_boards_dir"]
lsearch -exact
> + set boards_dir [lreplace $boards_dir $idx $idx]
lreplace X -1 -1 seems not to modify X but according to the doc it seems to be
undefined. Suggesting one 'if' conditional, ale for the code documentation
purposes.
> + lappend boards_dir "${gdb_boards_dir}"
> +}
> +trace add variable "boards_dir" write append_gdb_boards_dir
There were some complaints on the list for features not compatible with
tcl-8.3, 'trace add' is not listed in tcl-8.3 doc:
http://www.tcl.tk/man/tcl8.3/TclCmd/trace.htm
Sure a great feature.
Thanks,
Jan