From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cagney To: Denis Joseph Barrow Cc: gdb-patches@sourceware.cygnus.com, s390-patches@gnu.org, Martin Schwidefsky , Christoph Arenz Subject: Re: New gdb 31 & 64 bit patches for S/390 Date: Thu, 05 Jul 2001 10:11:00 -0000 Message-id: <3B449AC6.50801@cygnus.com> References: X-SW-Source: 2001-07/msg00100.html > 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