public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Fix for big enums in old gdb
@ 2006-05-08 16:03 Fabian Cenedese
  0 siblings, 0 replies; only message in thread
From: Fabian Cenedese @ 2006-05-08 16:03 UTC (permalink / raw)
  To: 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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-05-08 11:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-08 16:03 Fix for big enums in old gdb Fabian Cenedese

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).