Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Side by Side Diff: gdb/testsuite/lib/append_gdb_boards_dir.exp

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « gdb/testsuite/gdb.xml/tdesc-regs.exp ('k') | gdb/testsuite/lib/future.exp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # Copyright 2012 Free Software Foundation, Inc.
2
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 3 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16 # Make the boards under testsuite/boards automatically available to
17 # DejaGnu. This is sourced by the `site.exp' file generated in the
18 # root of the testsuite's build directory.
19
20 # Append GDB's boards dir to DejaGnu's board dir list, making sure
21 # that that is the last boards dir in the list, so that boards found
22 # in directories appended to the list by either the global config
23 # site.exp, or in `$(dirname $DEJAGNU)/boards' override GDB's boards.
24 # Unfortunately, there's no standard way to get that behavior. To
25 # make it happen, we trace all writes to the $boards_dirs global, and
26 # make sure our dir is always the last in the list. This relies on
27 # the fact that DejaGnu always writes to this variable, even if just
28 # to set it to the empty list, which it does.
29 #
30 proc append_gdb_boards_dir { name1 name2 op } {
31 global srcdir
32 global boards_dir
33
34 # In case someone wants to point at GDB's boards dir in the global
35 # config before some other board dir, in which case we should not
36 # push it to the end of the list, use an unlikely path to GDB's
37 # boards, so it compares different to other simpler but equivalent
38 # paths.
39 set gdb_boards_dir "${srcdir}/boards/../boards"
40
41 # Keep our board dir last in the list.
42 set idx [lsearch -exact $boards_dir "$gdb_boards_dir"]
43 if { $idx >= 0 } {
44 set boards_dir [lreplace $boards_dir $idx $idx]
45 }
46 lappend boards_dir "${gdb_boards_dir}"
47 }
48 trace variable "boards_dir" w append_gdb_boards_dir
OLDNEW
« no previous file with comments | « gdb/testsuite/gdb.xml/tdesc-regs.exp ('k') | gdb/testsuite/lib/future.exp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698