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

Denis Joseph Barrow
2001-07-06T02:31:00Z

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2189 bytes --]

Hi Andrew,
I've warmed to this idea I'll code in definite offsets instead of
s390_offsetof stuff.
I didn't think about the padding problem previously & all going well I
might be able to remove the asm/types.h stuff.

D.J. Barrow Gnu/Linux for S/390 kernel developer
eMail: djbarrow@de.ibm.com,barrow_dj@yahoo.com
Phone: +49-(0)7031-16-2583
IBM Germany Lab, SchÃ¶naicherstr. 220, 71032 BÃ¶blingen

Andrew Cagney <ac131313@cygnus.com> on 05.07.2001 21:46:49

Please respond to Andrew Cagney <ac131313@cygnus.com>

To: Denis Joseph Barrow/Germany/Contr/IBM@IBMDE
cc: gdb-patches@sourceware.cygnus.com, s390-patches@gnu.org, Martin
Schwidefsky/Germany/IBM@IBMDE
Subject: Re: New gdb 31 & 64 bit patches for S/390

> There are some target specific structures for to find out if I'm in a
> signal handler which I
> currently need see the s390_offsetof stuff in the tm-s390.c.
>
> What about using the __attribute__(packed) gcc extension.
> & add a
> #ifndef gcc
> define __attribute__
> #endif

No. So far GDB has managed to avoid a dependency on GCCoteric features,
I don't see any reason to change this.

With regard to the other target specific structures, I suggested moving
them to s390-nat.c since (I think) only that file would be using them
(?correct). s390-nat.c is very host=target specific - it needs to
correctly unpack the data returned from ptrace/procfs. However, even
there, the __attribute__(packed) should be removed.

> for non gcc compilers this would get around some of the common problems,
> the only other way is for me to
> add #defines for all the offsets I need.

Remember s390-tdep.c analizes and implements an ABI. That ABI is
hopefully publised and defined. It isn't going to change. If it does
then the debugger, the compiler and who knows what else will need to be
modified.

Because the ABI is ``set in stone'' constants using enums (not #defines)
are typically used in the *-tdep.c file.

For what its worth, BFD has adopted the strategy of:

o having the ABI constants wired in

o when host=target=s390-linux,
verify that those constants havn't
been changed by someones foobar.

Andrew