From a72293e2a7d173542d2abc1e1309842501036b56 Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Thu, 8 Nov 2001 01:33:04 +0000 Subject: [PATCH] When non-multi-arch, use predefault as the value of a pure-multi-arch method. --- gdb/ChangeLog | 6 ++++++ gdb/gdbarch.c | 2 +- gdb/gdbarch.sh | 16 +++++++++++++++- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9ad8d3c0145..ceb1db6a3ff 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2001-11-07 Andrew Cagney + + * 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 * config/i386/tm-linux.h (I386_LINUX_ORIG_EAX_REGNUM): Define in diff --git a/gdb/gdbarch.c b/gdb/gdbarch.c index ee4512eda62..1a86887c528 100644 --- a/gdb/gdbarch.c +++ b/gdb/gdbarch.c @@ -393,7 +393,7 @@ struct gdbarch startup_gdbarch = 0, 0, 0, - 0, + generic_in_function_epilogue_p, /* startup_gdbarch() */ }; diff --git a/gdb/gdbarch.sh b/gdb/gdbarch.sh index e469460d9e5..ad013cc367b 100755 --- a/gdb/gdbarch.sh +++ b/gdb/gdbarch.sh @@ -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 -- 2.30.2