Don't unescape parameters twice when running with -g (debugger). b=320293 r=cls sr=bsmedberg, plus a change to use perl -pe chomp instead of echo -n for portability (yikes).

This commit is contained in:
dbaron%dbaron.org 2006-02-15 00:56:54 +00:00
parent 2d07e6a635
commit 0631af1be1

View File

@ -223,7 +223,13 @@ moz_debug_program()
then
tmpfile=`mktemp /tmp/mozargs.XXXXXX` || { echo "Cannot create temporary file" >&2; exit 1; }
trap " [ -f \"$tmpfile\" ] && /bin/rm -f -- \"$tmpfile\"" 0 1 2 3 13 15
echo "set args ${1+"$@"}" > $tmpfile
# echo -n isn't portable, so pipe through perl -pe chomp instead
echo "set args" | perl -pe 'chomp' > $tmpfile
for PARAM in "$@"
do
echo " '$PARAM'" | perl -pe 'chomp' >> $tmpfile
done
echo >> $tmpfile
# If you are not using ddd, gdb and know of a way to convey the arguments
# over to the prog then add that here- Gagan Saksena 03/15/00
case `basename $debugger` in