[PATCH] [RFC] Automatically append 'gdb/testsuite/boards' to DejaGnu's boards dir list.
Jan Kratochvil
jan.kratochvil@redhat.com
Sat Mar 31 07:29:00 GMT 2012
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
More information about the Gdb-patches
mailing list