This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[patch] For pure multi-arch methods, use predefault whn not multi-arch
- To: gdb-patches at sources dot redhat dot com
- Subject: [patch] For pure multi-arch methods, use predefault whn not multi-arch
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Wed, 07 Nov 2001 20:22:09 -0500
Hello,
Corrina's is_function_apilogue_p() addition found a bug in the
gdbarch.sh logic. When the target wan't multi-arch the function being
called ended up being NULL :-( This can be seen on x86 linux tests.
I've committed the attached patch which should fix this.
Andrew
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.
Index: gdbarch.sh
===================================================================
RCS file: /cvs/src/src/gdb/gdbarch.sh,v
retrieving revision 1.91
diff -p -r1.91 gdbarch.sh
*** gdbarch.sh 2001/11/07 22:42:29 1.91
--- gdbarch.sh 2001/11/08 01:19:59
*************** EOF
*** 76,82 ****
fi
done
! test "${staticdefault}" || staticdefault=0
# NOT YET: Breaks BELIEVE_PCC_PROMOTION and confuses non-
# multi-arch defaults.
# test "${predefault}" || predefault=0
--- 76,86 ----
fi
done
! 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
*************** EOF
*** 587,592 ****
--- 591,606 ----
echo "Error: postdefault is useless when invalid_p=0" 1>&2
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