This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: gdb-5.2 and SCO OpenServer 5.0.5
- From: Andrew Cagney <ac131313 at ges dot redhat dot com>
- To: William Bader <william at nscs dot fast dot net>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Fri, 16 Aug 2002 17:31:51 -0400
- Subject: Re: gdb-5.2 and SCO OpenServer 5.0.5
- References: <200208161701.aa10382@mip486.nscs.fast.net>
I built gdb-5.2 under SCO OpenServer 5.0.5 using gnu-make-3.79
but SCO cc, as, and ld. SCO OpenServer sets GDB_MULTI_ARCH
because it supports both COFF and ELF. This makes TARGET_PTR_BIT
expand to a function call instead of a constant, and SCO cc
requires a constant for array declarations. Pointers are 4 bytes.
I made the buffer twice as large just to be safe.
William
http://williambader.com/
--- gdb-5.2/gdb/i386-tdep.c- Tue Feb 19 13:42:27 2002
+++ gdb-5.2/gdb/i386-tdep.c Fri Aug 16 16:08:50 2002
@@ -858,7 +858,11 @@
int
get_longjmp_target (CORE_ADDR *pc)
{
+#if GDB_MULTI_ARCH && defined(_SCO_DS)
+ char buf[ 8 ];
+#else
char buf[TARGET_PTR_BIT / TARGET_CHAR_BIT];
+#endif
CORE_ADDR sp, jb_addr;
sp = read_register (SP_REGNUM);
Just use alloca(), its use is accepted in cases like the above. Would
you have a changeLog entry?
Andrew