Re: New gdb 31 & 64 bit patches for S/390

Andrew Cagney
2001-07-05T10:11:00Z

> It'll be at least two weeks before I can go & update this stuff owing to
> other commitments.
> The asm/types.h in my opinion is currently needed, Andrew if you think it
> isn't, a
> config/arch/hosttypes.h with definitions for u8 u16 & u32 etc. definitions
> should be introduced for all archs
> IMO bfd_btye etc. as per previous suggestion simply doesn't cut mustard.

I don't think u8, u16, ... are needed. As I noted:

> In the past it has been suggested that types like _u32, _u8 etc would
> allow the user to exactly describe structures and hence allow the
> programmer to exactly describe structure layout. Unfortunatly, that
> won't work since allignment (and hence packing) also varies between
> hosts.
>
> If you need to read structures from memory you can use functions like:
>
> LONGEST read_memory_integer (CORE_ADDR memaddr, int len);
> ULONGEST read_memory_unsigned_integer (CORE_ADDR memaddr, int len);
>
> If you already have the memory local then:
>
> LONGEST extract_signed_integer (void *, int);
> ULONGEST extract_unsigned_integer (void *, int);
>
> will do the trick.

All other targets have managed to get things working using just the above.

Andrew