This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] gdbarch.sh cleanups


Hello,

Some mechanical cleanups.  Main one is replacing:

	GDB_MULTI_ARCH >= 1
with 
GDB_MULTI_ARCH >= GDB_MULTI_ARCH_PARTIAL

and 
GDB_MULTI_ARCH >= 2
with 
GDB_MULTI_ARCH > GDB_MULTI_ARCH_PARTIAL

Andrew
2002-02-10  Andrew Cagney  <ac131313@redhat.com>

	* gdbarch.sh: Map LEVEL onto a symbolic GT_LEVEL.  Exit on bad
	field.  Use diff -u.
	* gdbarch.c: Re-generate.

Index: gdbarch.sh
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.sh,v
retrieving revision 1.112
diff -u -r1.112 gdbarch.sh
--- gdbarch.sh	2002/02/10 06:44:59	1.112
+++ gdbarch.sh	2002/02/10 07:31:56
@@ -76,6 +76,13 @@
 		fi
 	    done
 
+	    case "${level}" in
+		1 ) gt_level=">= GDB_MULTI_ARCH_PARTIAL" ;;
+		2 ) gt_level="> GDB_MULTI_ARCH_PARTIAL" ;;
+		"" ) ;;
+		* ) error "Error: bad level for ${function}" 1>&2 ; kill $$ ; exit 1 ;;
+	    esac
+
 	    case "${class}" in
 		m ) staticdefault="${predefault}" ;;
 		M ) staticdefault="0" ;;
@@ -354,7 +361,9 @@
 
 	# Currently unused.
 
-    *) exit 1;;
+    *)
+	echo "Bad field ${field}"
+	exit 1;;
   esac
 done
 
@@ -1438,12 +1447,12 @@
 	    printf "    gdbarch->${function} = ${postdefault};\n"
 	elif [ -n "${invalid_p}" ]
 	then
-	    printf "  if ((GDB_MULTI_ARCH >= ${level})\n"
+	    printf "  if ((GDB_MULTI_ARCH ${gt_level})\n"
 	    printf "      && (${invalid_p}))\n"
 	    printf "    fprintf_unfiltered (log, \"\\\\n\\\\t${function}\");\n"
 	elif [ -n "${predefault}" ]
 	then
-	    printf "  if ((GDB_MULTI_ARCH >= ${level})\n"
+	    printf "  if ((GDB_MULTI_ARCH ${gt_level})\n"
 	    printf "      && (gdbarch->${function} == ${predefault}))\n"
 	    printf "    fprintf_unfiltered (log, \"\\\\n\\\\t${function}\");\n"
 	fi

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]