This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fix for big enums in old gdb


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 = <unknown 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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]