From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12524 invoked by alias); 8 May 2006 11:28:53 -0000 Received: (qmail 12516 invoked by uid 22791); 8 May 2006 11:28:52 -0000 X-Spam-Check-By: sourceware.org Received: from mxout.hispeed.ch (HELO smtp.hispeed.ch) (62.2.95.247) by sourceware.org (qpsmtpd/0.31) with ESMTP; Mon, 08 May 2006 11:28:42 +0000 Received: from indel.ch (84-73-12-245.dclient.hispeed.ch [84.73.12.245]) by smtp.hispeed.ch (8.12.11.20060308/8.12.6/taifun-1.0) with SMTP id k48BScHO001868 for ; Mon, 8 May 2006 13:28:39 +0200 Received: from fabi.indel.ch [192.168.1.19] by indel.ch [127.0.0.1] with SMTP (MDaemon.v2.7.SP5.R) for ; Mon, 08 May 2006 13:28:25 +0200 Message-Id: <5.2.0.9.1.20060508123705.01fe6e80@NT_SERVER> X-Sender: cenedese@NT_SERVER (Unverified) X-Mailer: QUALCOMM Windows Eudora Version 5.2.0.9 Date: Mon, 08 May 2006 16:03:00 -0000 To: gdb@sourceware.org From: Fabian Cenedese Subject: Fix for big enums in old gdb Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-MDaemon-Deliver-To: gdb@sourceware.org X-Return-Path: cenedese@indel.ch X-Virus-Status: Clean X-DCC-spamcheck-02.tornado.cablecom.ch-Metrics: smtp-04.tornado.cablecom.ch 1378; Body=1 Fuz1=1 Fuz2=1 X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-05/txt/msg00079.txt.bz2 Hi I have an old gdb (i know, not supported anymore) where I want to backport a fix for big enums. gcc has no problem compiling an enum with a value bigger than 0x80000000. It's supposed to use unsigned long instead of long if a value is bigger than 0x7FFFFFFF. However our old gdb has a problem reading this stabs info. Newer gdbs don't seem to have this problem (even if read_huge_number fails the same way and only returns a long anyway) Actually gdb-6.2.50 doesn't know the type either but at least it doesn't crash: (gdb) ptype ERADef type = So I was looking for differences, mainly in stabsread.c. But I couldn't find a change that seemed useful for this, neither in read_enum_type nor in read_huge_number. Has anybody a hint what source parts may also be important in regard of this problem? Working: .stabs "ERADef:t(0,24)=eeRAClear:1,eRAClearedByCode:-1,;",128,0,36,0 Crash: .stabs "ERADef:t(0,24)=eeRAClear:1,eRAClearedByCode:4294967295,;",128,0,36,0 warning ("GDB internal error, type is NULL in stabsread.c\n"); Or ist there anything else I can do (except upgrading gdb)? Are these high enum numbers not allowed in gdb? As read_huge_number still in the cvs version only returns a long I don't know if that could work at all. Thanks bye Fabi