This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
ChangeLog entry, re: gdb-5.2 and SCO OpenServer 5.0.5
- From: William Bader <william at nscs dot fast dot net>
- To: ac131313 at ges dot redhat dot com, gdb-patches at sources dot redhat dot com, william at nscs dot fast dot net
- Date: Fri, 16 Aug 2002 17:49:54 EDT
- Subject: ChangeLog entry, re: gdb-5.2 and SCO OpenServer 5.0.5
> Just use alloca(), its use is accepted in cases like the above. Would
> you have a changeLog entry?
> Andrew
How is this:
2002-08-16 William Bader <william@nscs.fast.net>
* gdb/i386-tdep.c: Dymanically allocate buf;
TARGET_PTR_BIT is not a constant.
--- gdb-5.2/gdb/i386-tdep.c- Tue Feb 19 13:42:27 2002
+++ gdb-5.2/gdb/i386-tdep.c Fri Aug 16 17:37:19 2002
@@ -858,7 +858,12 @@
int
get_longjmp_target (CORE_ADDR *pc)
{
+#if GDB_MULTI_ARCH
+ /* TARGET_PTR_BIT evaluates to a function call */
+ char *buf = alloca(TARGET_PTR_BIT / TARGET_CHAR_BIT);
+#else
char buf[TARGET_PTR_BIT / TARGET_CHAR_BIT];
+#endif
CORE_ADDR sp, jb_addr;
sp = read_register (SP_REGNUM);