summaryrefslogtreecommitdiff
path: root/gdb/features/feature_to_c.sh
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/features/feature_to_c.sh')
-rw-r--r--gdb/features/feature_to_c.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/features/feature_to_c.sh b/gdb/features/feature_to_c.sh
index 764297725ee..b9441a4a1b2 100644
--- a/gdb/features/feature_to_c.sh
+++ b/gdb/features/feature_to_c.sh
@@ -8,6 +8,11 @@ if test -z "$output" || test -z "$1"; then
exit 1
fi
+if test -e "$output"; then
+ echo "Output file \"$output\" already exists; refusing to overwrite."
+ exit 1
+fi
+
for input in dummy "$@"; do
if test $input != dummy; then
arrayname=xml_feature_`echo $input | sed 's,.*/,,; s/[-.]/_/g'`