This is the mail archive of the gdb@sources.redhat.com 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]

Re: integer types in gdb code


> > I'm having trouble cleaning up our code to compile on various targets.
> >
> > It seems like most targets have uint32_t, int8_t, etc. defined but not
> > always (ie. cygwin).  Is there a 'gdb approved' header or set of defines
> > that works consistently everywhere?  I'd like to be able to use
something
> > consistently in all of our code without having to type in 'unsigned long
> > long' and such.
>
> CORE_ADDR  ~= void *
> LONGEST ~= long
> ULONGEST ~= unsigned long

No 16 and 8 bit constructs?  Also, what if you want to guarantee the number
of bits?  From defs.h it looks to me like LONGEST could be 32 or 64 bits, so
if you're reading structures over the wire, you could have problems.

Kris


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