This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[RFA] Fix observer.sh when the argument includes a drive letter
- From: "Eli Zaretskii" <eliz at gnu dot org>
- To: gdb-patches at sourceware dot org
- Date: Thu, 12 May 2005 19:00:06 +0300
- Subject: [RFA] Fix observer.sh when the argument includes a drive letter
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
This patch fixes the case where observer.texi's file name is in
absolute form on DOS/Windows.
Okay to commit?
2005-05-12 Eli Zaretskii <eliz@gnu.org>
* observer.sh: (texi) [DJGPP]: If the file name includes a
colon, convert it to the /dev/x/ form.
Index: gdb/observer.sh
===================================================================
RCS file: /cvs/src/src/gdb/observer.sh,v
retrieving revision 1.5
diff -u -r1.5 observer.sh
--- gdb/observer.sh 12 May 2005 15:44:19 -0000 1.5
+++ gdb/observer.sh 12 May 2005 15:59:05 -0000
@@ -58,6 +58,13 @@
;;
esac
+# We are about to set IFS=:, so DOS-style file names with a drive
+# letter and a colon will be in trouble
+
+if test -n $DJGPP
+then
+ texi=`echo $texi | sed -e 's,^\([a-zA-Z]\):/,/dev/\1/,'`
+fi
# generate a list of events that can be observed