integer types in gdb code
Andrew Cagney
ac131313@redhat.com
Mon Jan 27 21:17:00 GMT 2003
>
>> 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.
The above are GDB's host types.
When representing target types (or stuff related to a protocol) GDB can
either use a function like extract_unsigned_integer() or construct a
type exactly describing the data using that (but be wary of byte order
problems).
Trying to do something like:
struct { uint32_t i; ... }
can end up being non-portable (due to struct packing issues and the like).
Andrew
More information about the Gdb
mailing list