* gdb.dwarf2/dw2-dir-file-name.exp: Don't use brace expansion,

since it's not supported in all shells.
This commit is contained in:
Christian Groessler 2013-05-21 07:25:51 +00:00
parent c22554775b
commit 023928657e
2 changed files with 34 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2013-05-21 Christian Groessler <chris@groessler.org>
* gdb.dwarf2/dw2-dir-file-name.exp: Don't use brace expansion,
since it's not supported in all shells.
2013-05-21 Hui Zhu <hui@codesourcery.com>
* gdb.mi/Makefile.in (PROGS): Add "mi-dprintf".

View File

@ -322,10 +322,35 @@ if { [gdb_compile "${asmsrcfile} ${srcdir}/${subdir}/$srcfile" "${binfile}" exec
return -1
}
remote_exec host "sh -c \"rm -f ${srcabsdir}{/rdir,}{/xdir,}{/compdir,}{/ldir,}{/fdir,}/${srctmpfile}\""
remote_exec host "sh -c \"rmdir ${srcabsdir}{/rdir,}{/xdir,}{/compdir,}{/ldir,}{/fdir,}\""
remote_exec host "sh -c \"mkdir ${srcabsdir}{,/rdir}{,/xdir}{,/compdir}{,/ldir}{,/fdir}\""
remote_exec host "sh -c \"for d in ${srcabsdir}{,/rdir}{,/xdir}{,/compdir}{,/ldir}{,/fdir};do cp ${srcdir}/${subdir}/${srcfile} \\\$d/${srctmpfile}; done\""
set dirs {}
foreach r {"" /rdir} {
foreach x {"" /xdir} {
foreach comp {"" /compdir} {
foreach l {"" /ldir} {
foreach f {"" /fdir} {
lappend dirs $r$x$comp$l$f
}
}
}
}
}
proc pathexpand {prefix dirlst suffix} {
set retlst {}
foreach dir $dirlst {
lappend retlst "$prefix$dir$suffix"
}
return $retlst
}
set filelist [pathexpand $srcabsdir $dirs "/$srctmpfile"]
set dircreatelist [pathexpand $srcabsdir $dirs ""]
set dirremovelist [pathexpand $srcabsdir [lreverse $dirs] ""]
remote_exec host "sh -c \"rm -f $filelist\""
remote_exec host "sh -c \"rmdir $dirremovelist\""
remote_exec host "sh -c \"mkdir $dircreatelist\""
remote_exec host "sh -c \"for d in $dircreatelist; do cp ${srcdir}/${subdir}/${srcfile} \\\$d/${srctmpfile}; done\""
clean_restart ${testfile}