This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: New gdb 31 & 64 bit patches for S/390
- To: Denis Joseph Barrow <DJBARROW at de dot ibm dot com>
- Subject: Re: New gdb 31 & 64 bit patches for S/390
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Thu, 05 Jul 2001 12:50:14 -0400
- Cc: gdb-patches at sourceware dot cygnus dot com, s390-patches at gnu dot org,Martin Schwidefsky <schwidefsky at de dot ibm dot com>,Christoph Arenz <ARENZ at de dot ibm dot com>
- References: <OFD9727B4C.E2B8843F-ONC1256A80.003B52E2@de.ibm.com>
> 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