When non-multi-arch, use predefault as the value of a pure-multi-arch
authorAndrew Cagney <cagney@redhat.com>
Thu, 8 Nov 2001 01:33:04 +0000 (01:33 +0000)
committerAndrew Cagney <cagney@redhat.com>
Thu, 8 Nov 2001 01:33:04 +0000 (01:33 +0000)
method.

gdb/ChangeLog
gdb/gdbarch.c
gdb/gdbarch.sh

index 9ad8d3c0145093ff600eeae1c2cd0093957fa307..ceb1db6a3ff5c2e89c71fcfc3bcdb456bc649081 100644 (file)
@@ -1,3 +1,9 @@
+2001-11-07  Andrew Cagney  <ac131313@redhat.com>
+
+       * gdbarch.sh: For multi-arch functions, check there is a
+       predefault and use it as the static default.
+       * gdbarch.c: Re-generate.
+
 2001-11-08  Mark Kettenis  <kettenis@gnu.org>
 
        * config/i386/tm-linux.h (I386_LINUX_ORIG_EAX_REGNUM): Define in
index ee4512eda625f6ddb5754cd13f6423d31dab8215..1a86887c528c7f2acb5ca30c1091d68602a0a17e 100644 (file)
@@ -393,7 +393,7 @@ struct gdbarch startup_gdbarch =
   0,
   0,
   0,
-  0,
+  generic_in_function_epilogue_p,
   /* startup_gdbarch() */
 };
 
index e469460d9e5dde401669a1458fe9528bf755fcba..ad013cc367b0c8e43675c306585b1d08dc8533b3 100755 (executable)
@@ -76,7 +76,11 @@ EOF
                fi
            done
 
-           test "${staticdefault}" || staticdefault=0
+           case "${class}" in
+               m ) staticdefault="${predefault}" ;;
+               M ) staticdefault="0" ;;
+               * ) test "${staticdefault}" || staticdefault=0 ;;
+           esac
            # NOT YET: Breaks BELIEVE_PCC_PROMOTION and confuses non-
            # multi-arch defaults.
            # test "${predefault}" || predefault=0
@@ -588,6 +592,16 @@ EOF
        kill $$
        exit 1
     fi
+    if class_is_multiarch_p
+    then
+       if class_is_predicate_p ; then :
+       elif test "x${predefault}" = "x"
+       then
+           echo "Error: pure multi-arch function must have a predefault" 1>&2
+           kill $$
+           exit 1
+       fi
+    fi
     echo ""
 done