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 Subject: Re: New gdb 31 & 64 bit patches for S/390 Date: Thu, 05 Jul 2001 12:46:00 -0000 Message-id: <3B44C429.8090007@cygnus.com> References: X-SW-Source: 2001-07/msg00108.html > 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