From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31798 invoked by alias); 16 Aug 2002 21:50:53 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 31782 invoked from network); 16 Aug 2002 21:50:50 -0000 Received: from unknown (HELO newmx1.fast.net) (209.92.1.31) by sources.redhat.com with SMTP; 16 Aug 2002 21:50:50 -0000 Received: (qmail 10452 invoked from network); 16 Aug 2002 21:50:48 -0000 Received: from unknown (HELO rachael.scs.com) ([209.92.231.121]) (envelope-sender ) by newmx1.fast.net (qmail-ldap-1.03) with SMTP for ; 16 Aug 2002 21:50:48 -0000 Received: (qmail 7330 invoked by uid 3730); 16 Aug 2002 21:50:47 -0000 Received: from william@nscs.fast.net by rachael with scan4virus-0.51 (uvscan: v4.0.18/v4068. . Clean. Processed in 0.380951 secs); 16/08/2002 17:50:46 Received: from owl486.scs.com (HELO nscs.fast.net) (10.0.0.12) by rachael.scs.com with SMTP; 16 Aug 2002 21:50:46 -0000 Received: from mip486.scs.com by owl486.nscs.fast.net id aa15517; 16 Aug 2002 17:50 EDT From: William Bader To: ac131313@ges.redhat.com, gdb-patches@sources.redhat.com, william@nscs.fast.net Subject: ChangeLog entry, re: gdb-5.2 and SCO OpenServer 5.0.5 Date: Fri, 16 Aug 2002 14:50:00 -0000 Message-ID: <200208161749.aa10539@mip486.nscs.fast.net> X-SW-Source: 2002-08/txt/msg00463.txt.bz2 > 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 * 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);